完成通过注释生成table选择器组件;完善table选择器必选效果。

This commit is contained in:
2022-07-09 15:53:00 +08:00
parent 7a8c75de45
commit 69ac76a108
7 changed files with 101 additions and 21 deletions

View File

@@ -76,7 +76,9 @@ define(['jquery', 'vue'], function ($, Vue) {
},
created() {
this.value = options.selectValue;
if(typeof this.value != 'string') {
this.value = this.value.toString();
}
var valueLength = this.value.split(',').length;
loading.show();
$.get(options.index,{
@@ -90,6 +92,11 @@ define(['jquery', 'vue'], function ($, Vue) {
})
},
mounted() {
if(options.required == 1){
$(this.$refs['tableData']).closest('.layui-form-item').children('.layui-form-label').addClass('required');
}
},
template: tableDataTemplate,
methods: {