| 1 |
Vue.component('field-dynamic-field', { |
| 2 |
mixins: [wpuf_mixins.option_field_mixin], |
| 3 |
template: '#tmpl-wpuf-dynamic-field', |
| 4 |
data: function(){ |
| 5 |
return { |
| 6 |
dynamic: { |
| 7 |
status: false, |
| 8 |
param_name: '', |
| 9 |
} |
| 10 |
} |
| 11 |
}, |
| 12 |
computed: { |
| 13 |
dynamic: function(){ |
| 14 |
return this.editing_form_field.dynamic; |
| 15 |
}, |
| 16 |
editing_field: function(){ |
| 17 |
return this.editing_form_field; |
| 18 |
}, |
| 19 |
}, |
| 20 |
|
| 21 |
created: function () { |
| 22 |
this.dynamic = $.extend(false, this.dynamic, this.editing_form_field.dynamic); |
| 23 |
}, |
| 24 |
|
| 25 |
methods: { |
| 26 |
|
| 27 |
}, |
| 28 |
|
| 29 |
watch: { |
| 30 |
dynamic: function(){ |
| 31 |
this.update_value('dynamic', this.dynamic); |
| 32 |
} |
| 33 |
}, |
| 34 |
}); |
| 35 |
|