Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of asset selector
const Fieldtype = {
mixins: [window.Storyblok.plugin],
template: `<div>
<sb-asset-selector :uid="uid" field="example">
</sb-asset-selector>
{{model.example}}
</div>`,
methods: {
initWith() {
return {
plugin: 'example_plugin',
example: ''
}
},
pluginCreated() {
console.log('plugin:created')
}
},
watch: {
'model': {
handler: function (value) {
this.$emit('changed-model', value);
},
deep: true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment