diff --git a/src/main/resources/modules/SpringBoot/resources/templates/control/mint-ui-extend.ftl b/src/main/resources/modules/SpringBoot/resources/templates/control/mint-ui-extend.ftl index e40ab772..81931418 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/control/mint-ui-extend.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/control/mint-ui-extend.ftl @@ -63,15 +63,16 @@ }, props: ['value', 'label', 'placeholder', 'items'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); @@ -119,15 +120,16 @@ } }, props: ['value', 'label', 'placeholder', 'items'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); @@ -161,15 +163,16 @@ } }, props: ['value', 'label', 'placeholder', 'items'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); @@ -203,15 +206,16 @@ } }, props: ['value', 'label', 'placeholder', 'items'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); @@ -245,35 +249,128 @@ } }, props: ['value', 'label', 'placeholder', 'items'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); Vue.component('wb-field-cphm', { data: function () { return { - prefixData: [{ - key: '', - value: '苏', - children: ['A', 'B', 'C'] - }, { - key: '', - value: '鲁', - children: ['A', 'B', 'C', 'D'] - }], + prefixData: [ + { + key: '', + value: '京', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'Y'] + }, + { + key: '', + value: '津', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R'] + }, + {key: '', value: '冀', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'O', 'R', 'T']}, + {key: '', value: '晋', children: ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M']}, + {key: '', value: '蒙', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M']}, + { + key: '', + value: '辽', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P'] + }, + {key: '', value: '吉', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K']}, + { + key: '', + value: '黑', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R'] + }, + { + key: '', + value: '沪', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'AX', 'BX', 'DX'] + }, + { + key: '', + value: '苏', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'U'] + }, + {key: '', value: '浙', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L']}, + { + key: '', + value: '皖', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S'] + }, + {key: '', value: '闽', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K']}, + {key: '', value: '赣', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'S']}, + { + key: '', + value: '鲁', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'U', 'V', 'W', 'Y'] + }, + { + key: '', + value: '豫', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'U'] + }, + { + key: '', + value: '鄂', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'AW'] + }, + { + key: '', + value: '湘', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'S', 'U'] + }, + { + key: '', + value: '粤', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] + }, + { + key: '', + value: '桂', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R'] + }, + {key: '', value: '琼', children: ['A', 'B', 'C', 'D', 'E', 'F']}, + {key: '', value: '渝', children: ['A', 'B', 'C', 'D', 'F', 'G', 'H', 'N']}, + { + key: '', + value: '川', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] + }, + {key: '', value: '贵', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J']}, + { + key: '', + value: '云', + children: ['A', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S'] + }, + {key: '', value: '藏', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J']}, + {key: '', value: '陕', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'V']}, + { + key: '', + value: '甘', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P'] + }, + {key: '', value: '青', children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']}, + {key: '', value: '宁', children: ['A', 'B', 'C', 'D', 'E']}, + { + key: '', + value: '新', + children: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'S'] + } + ], popupVisible: false, clearVisible: false, slots: [{ values: [], - defaultIndex: 0, + defaultIndex: 9, className: 'slot1' }, { divider: true, @@ -281,14 +378,14 @@ className: 'slot2' }, { values: [], - defaultIndex: 0, + defaultIndex: 11, className: 'slot3' }], } }, created: function () { if (!this.value) {//当model为空时初始化前缀 - this.$emit('input', this.prefixData[0].value + this.prefixData[0].children[0]); + this.$emit('input', this.prefixData[this.slots[0].defaultIndex].value + this.prefixData[this.slots[0].defaultIndex].children[this.slots[2].defaultIndex]); } this.slots[0].values = this.getSlot1(); this.slots[2].values = this.getSlot3(this.prefixData[0].value); @@ -341,17 +438,18 @@ } } }, - props: ['value', 'label', 'placeholder', 'items',], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '

{{prefix}}

' + - '' + - '
' + - '
' + - '
' + - '' + + props: ['value', 'label', 'placeholder', 'items'], + template: '' + + '
' + + '
' + + '
{{label}}
' + + '
' + + ' {{prefix}}' + + ' ' + + '
' + + '
' + + '
' + + ' ' + '
' }); @@ -384,33 +482,34 @@ onChange: function (e, file) { file.file = e.target.files[0] file.name = e.target.files[0].name; - this.$emit("handle-file",file,{ - finish:function () { - this.$emit("input",this.fileList) + this.$emit("handle-file", file, { + finish: function () { + this.$emit("input", this.fileList) }.bind(this), - cancel:function () { + cancel: function () { this.fileList.remove(file); - this.$emit("input",this.fileList) + this.$emit("input", this.fileList) }.bind(this) }); }, }, props: ['value', 'label'], - template: '' + - '
' + - '
{{label}}
' + - '
' + - '
' + - ' 添加' + - '
' + - ' ' + - ' {{item.name}}' + - ' ' + + template: '' + + '' + + ' ' + - '
' + '' }); \ No newline at end of file