diff options
Diffstat (limited to 'UI source code/dns_mapping_ui-master/src/components/Dict/index.js')
| -rw-r--r-- | UI source code/dns_mapping_ui-master/src/components/Dict/index.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/UI source code/dns_mapping_ui-master/src/components/Dict/index.js b/UI source code/dns_mapping_ui-master/src/components/Dict/index.js new file mode 100644 index 0000000..0952f43 --- /dev/null +++ b/UI source code/dns_mapping_ui-master/src/components/Dict/index.js @@ -0,0 +1,29 @@ +import Dict from './Dict' + +const install = function(Vue) { + Vue.mixin({ + data() { + if (this.$options.dicts instanceof Array) { + const dict = { + dict: {}, + label: {} + } + return { + dict + } + } + return {} + }, + created() { + if (this.$options.dicts instanceof Array) { + new Dict(this.dict).init(this.$options.dicts, () => { + this.$nextTick(() => { + this.$emit('dictReady') + }) + }) + } + } + }) +} + +export default { install } |
