Skip to content

Instantly share code, notes, and snippets.

@DavidStrada
Last active March 27, 2017 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidStrada/2698d99f74d362fccd2b22d9f901ad22 to your computer and use it in GitHub Desktop.
Save DavidStrada/2698d99f74d362fccd2b22d9f901ad22 to your computer and use it in GitHub Desktop.
fields:
test_addon:
type: test
validate: required
var Child = {
template: '<div>A custom component! that can include other childs</div>'
}
Vue.component('test-fieldtype', {
template: `<div>
Testing addon
<my-component></my-component>
</div>`,
props: ['data', 'config', 'name'],
data: function() {
return {
//
};
},
components: {
'my-component': Child
},
computed: {
//
},
methods: {
//
},
ready: function() {
//
}
});
var Child = {
template: '<div>A custom component! that can include other childs</div>'
}
var Child2 = {
template: `<div>I'm a new child :)</div>`
}
Vue.component('test-fieldtype', {
template: `<div>
Testing addon
<my-component></my-component>
<my-component2></my-component2>
</div>`,
props: ['data', 'config', 'name'],
data: function() {
return {
//
};
},
components: {
'my-component': Child,
'my-component2': Child2
},
computed: {
//
},
methods: {
//
},
ready: function() {
//
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment