Sha256: fe6eea89041fd80c3b7c1b9f4258a575afb97f6d81ac09423adfbfdaee7e2251
Contents?: true
Size: 647 Bytes
Versions: 14
Compression:
Stored size: 647 Bytes
Contents
import Vue from 'vue'; export default Vue.component('asset-form', { props: { asset: { coerce: (val) => JSON.parse(val) }, createPath: true, updatePath: true }, computed: { saveMethod: function() { return this.asset['new_record?'] ? 'post' : 'patch'; }, saveUrl: function() { return this.asset['new_record?'] ? this.createPath : this.updatePath.replace(/~id$/, this.asset.id); }, saveButtonText: function() { return this.asset['new_record?'] ? 'Upload file' : 'Update media'; } }, methods: { afterUpload: function(asset) { this.asset = asset; } } })
Version data entries
14 entries across 14 versions & 1 rubygems