Sha256: 41bdaaa7efb979de75d542b3399cce3076d6ec9b02caba3bb10343e77fcc3659
Contents?: true
Size: 771 Bytes
Versions: 14
Compression:
Stored size: 771 Bytes
Contents
import Vue from 'vue'; export default Vue.component('asset-form', { props: { asset: { coerce: (val) => JSON.parse(val) } }, computed: { createPath: function() { return `${ PushType.Routes.adminPath }/media`; }, updatePath: function() { return `${ PushType.Routes.adminPath }/media/${ this.asset.id }`; }, saveMethod: function() { return this.asset['new_record?'] ? 'post' : 'patch'; }, saveUrl: function() { return this.asset['new_record?'] ? this.createPath : this.updatePath; }, 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