Sha256: 50e7819f506ce7effba59fddd0fd4a864971207c7118ea5803c8f164f6a6c4ff
Contents?: true
Size: 700 Bytes
Versions: 23
Compression:
Stored size: 700 Bytes
Contents
import Vue from 'vue'; import AssetModal from './asset-modal.vue'; export default Vue.component('asset-field', { props: { asset: { coerce: (val) => JSON.parse(val) } }, data: function() { return { uid: `asset-${ Math.uid() }` } }, ready: function() { if (window.fndtnInit) { setTimeout(() => $(this.$el).trigger('init.fndtn'), 100); } }, computed: { assetId: function() { return this.asset ? this.asset.id : null; } }, methods: { selectAsset: function(asset) { this.asset = asset; }, deselectAsset: function() { this.asset = null; } }, components: { 'asset-modal': AssetModal } })
Version data entries
23 entries across 23 versions & 1 rubygems