data --> props

pull/1864/head
Rich Harris 7 years ago
parent b1417ff8ae
commit 171f75d4cf

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: [
{ foo: true, bar: false },
{ foo: false, bar: true },

@ -1,5 +1,5 @@
export default {
data: {
props: {
class: 'foo'
},

@ -1,7 +1,7 @@
export default {
'skip-ssr': true,
data: {
props: {
inputType: 'text',
inputValue: 42
},

@ -1,5 +1,5 @@
export default {
data: { foo: 'bar' },
props: { foo: 'bar' },
html: `
<svg>

@ -1,7 +1,7 @@
export default {
'skip-ssr': true,
data: {
props: {
foo: false
},

@ -1,7 +1,7 @@
const promise = Promise.resolve(42);
export default {
data: {
props: {
promise
},

@ -10,7 +10,7 @@ const items = [{
}];
export default {
data: {
props: {
items
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -4,7 +4,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -5,7 +5,7 @@ const thePromise = new Promise(f => {
});
export default {
data: {
props: {
show: true,
thePromise
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
thePromise: 'not actually a promise'
},

@ -5,7 +5,7 @@ let promise = new Promise(f => {
});
export default {
data: {
props: {
promise
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -5,7 +5,7 @@ let thePromise = new Promise(f => {
});
export default {
data: {
props: {
thePromise
},

@ -8,7 +8,7 @@ const tasks = [
export default {
'skip-ssr': true,
data: {
props: {
tasks,
selected: tasks[0]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: [
{ description: 'one', completed: true },
{ description: 'two', completed: false },

@ -5,7 +5,7 @@ const values = [
];
export default {
data: {
props: {
values,
selected: [ values[1] ]
},

@ -5,7 +5,7 @@ const values = [
];
export default {
data: {
props: {
values,
selected: [ values[1] ]
},

@ -1,7 +1,7 @@
export default {
'skip-ssr': true,
data: {
props: {
indeterminate: true,
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
cats: [
{
name: "cat 0",

@ -1,5 +1,5 @@
export default {
data: {
props: {
foo: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
count: 42,
},

@ -5,7 +5,7 @@ const values = [
];
export default {
data: {
props: {
values,
selected: values[1]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
count: 42,
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
count: 42,
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: ['one', 'two', 'three'],
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
component: {
name: 'world',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
prop: 'bar',
obj: {
foo: 'a',

@ -1,5 +1,5 @@
export default {
data: {
props: {
prop: 'name',
user: {
name: 'alice',

@ -1,5 +1,5 @@
export default {
data: {
props: {
prop: 'bar',
objects: [
{

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: [
{ description: 'one' },
{ description: 'two' },

@ -1,5 +1,5 @@
export default {
data: {
props: {
user: {
name: 'alice',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
name: 'world',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
a: 42
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
values: [1, 2, 3],
foo: 2
},

@ -13,7 +13,7 @@ export default {
</select>
`,
data: {
props: {
items: [{ value: 'hullo' }, { value: 'world' }]
},

@ -1,7 +1,7 @@
export default {
html: ``,
data: {
props: {
letter: 'b'
},

@ -23,7 +23,7 @@ export default {
<p>selected: b</p>
`,
data: {
props: {
selected: 'b',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: [],
selected: null
},

@ -1,7 +1,7 @@
export default {
skip: true, // JSDOM
data: {
props: {
selected: [ 'two', 'three' ]
},

@ -23,7 +23,7 @@ export default {
<p>selected: one</p>
`,
data: {
props: {
selected: 'one',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
value: 'some text',
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
user: { active: true }
},
html: `<div class="active"></div>`,

@ -1,5 +1,5 @@
export default {
data: {
props: {
things: ['one', 'two', 'three'],
selected: 'two'
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
"is-active": true,
isSelected: true,
myClass: 'one two'

@ -1,5 +1,5 @@
export default {
data: {
props: {
"is-active": true,
isSelected: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
myClass: 'one two'
},
html: `<div class="one two three"></div>`,

@ -1,7 +1,7 @@
export default {
'skip-ssr': true,
data: {
props: {
count: 3
},

@ -1,7 +1,7 @@
export default {
'skip-ssr': true,
data: {
props: {
count: 3
},

@ -14,7 +14,7 @@ const selectedComponent = components[0];
export default {
skip: true, // doesn't reflect real-world bug, maybe a JSDOM quirk
data: {
props: {
components,
selectedComponent
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
a: [{ id: 'foo' }, { id: 'bar' }, { id: 'baz' }]
},

@ -1,7 +1,7 @@
export default {
'skip-ssr': true, // TODO delete this line, once binding works
data: {
props: {
x: 'initial'
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
show: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
foo: 42
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
bar: 'lol',
x: 2,
compound: 'piece of',

@ -1,5 +1,5 @@
export default {
data: {
props: {
value: 1,
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
items: [ 'a', 'b', 'c' ]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
visible: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
flag: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
values: [1, 2, 3, 4]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
things: [1, 2, 3]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
showModal: true
},

@ -15,7 +15,7 @@ export default {
</ul>
`,
data: {
props: {
components: [
{ name: 'foo', edit: true },
{ name: 'bar', edit: false },

@ -3,7 +3,7 @@ export default {
<ul><li>foo</li><li>bar</li><li>baz</li></ul>
`,
data: {
props: {
components: [ 'foo', 'bar', 'baz' ]
}
};

@ -1,5 +1,5 @@
export default {
data: {
props: {
name: 'everybody'
},

@ -1,7 +1,7 @@
export default {
html: `<button>click me</button>`,
data: {
props: {
foo: 42
},

@ -3,7 +3,7 @@ export default {
dev: true
},
data: {
props: {
x: true
},

@ -3,7 +3,7 @@ export default {
dev: true
},
data: {
props: {
bar: 1
},

@ -3,7 +3,7 @@ export default {
dev: true
},
data: {
props: {
letters: [
{
id: 1,

@ -3,7 +3,7 @@ export default {
dev: true
},
data: {
props: {
a: 42
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true,
foo: 'one'
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: true
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
show: false,
fields: [1, 2]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
foo: {
bar: ['x', 'y', 'z']
}

@ -1,5 +1,5 @@
export default {
data: {
props: {
animalPawsEntries: [
['raccoon', 'hands'],
['eagle', 'wings']

@ -1,5 +1,5 @@
export default {
data: {
props: {
animalPawsEntries: [
['raccoon', 'hands'],
['eagle', 'wings']

@ -1,5 +1,5 @@
export default {
data: {
props: {
people: [{ name: { first: 'Doctor', last: 'Who' } }],
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
animalPawsEntries: [
{ animal: 'raccoon', pawType: 'hands' },
{ animal: 'eagle', pawType: 'wings' }

@ -1,5 +1,5 @@
export default {
data: {
props: {
animals: [ 'alpaca', 'baboon', 'capybara' ]
},

@ -1,5 +1,5 @@
export default {
nestedTransitions: true,
data: { items: [] },
props: { items: [] },
html: `No items.`,
};

@ -1,5 +1,5 @@
export default {
data: {
props: {
animals: [],
foo: 'something else'
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
animals: [ 'alpaca', 'baboon', 'capybara' ],
foo: 'something else'
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
visible: true,
empty: []
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
dummy: false,
fruits: ['Apple', 'Banana', 'Tomato'],
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
things: [0, 0, 0, 0, 0]
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
animals: [ 'adder', 'blue whale', 'chameleon' ]
},
html: `<p>0: adder</p><p>1: blue whale</p><p>2: chameleon</p><!---->`

@ -1,5 +1,5 @@
export default {
data: {
props: {
todos: [
{ id: 123, description: 'buy milk' },
{ id: 234, description: 'drink milk' }

@ -1,5 +1,5 @@
export default {
data: {
props: {
x: [{ z: 1 }, { z: 2 }],
},

@ -1,5 +1,5 @@
export default {
data: {
props: {
words: ['foo', 'bar', 'baz']
},

@ -18,7 +18,7 @@ function permute() {
}
export default {
data: {
props: {
values: toObjects('abc'),
},

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save