feat(runtime-core): implement RFC-0020
BREAKING CHANGE: data no longer supports object format (per RFC-0020)
This commit is contained in:
@@ -634,9 +634,9 @@ describe('api: options', () => {
|
||||
test('data property is already declared in props', () => {
|
||||
const Comp = {
|
||||
props: { foo: Number },
|
||||
data: {
|
||||
data: () => ({
|
||||
foo: 1
|
||||
},
|
||||
}),
|
||||
render() {}
|
||||
}
|
||||
|
||||
@@ -649,9 +649,9 @@ describe('api: options', () => {
|
||||
|
||||
test('computed property is already declared in data', () => {
|
||||
const Comp = {
|
||||
data: {
|
||||
data: () => ({
|
||||
foo: 1
|
||||
},
|
||||
}),
|
||||
computed: {
|
||||
foo() {}
|
||||
},
|
||||
@@ -699,9 +699,9 @@ describe('api: options', () => {
|
||||
|
||||
test('methods property is already declared in data', () => {
|
||||
const Comp = {
|
||||
data: {
|
||||
data: () => ({
|
||||
foo: 2
|
||||
},
|
||||
}),
|
||||
methods: {
|
||||
foo() {}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user