mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
完成通过注释生成table选择器组件;完善table选择器必选效果。
This commit is contained in:
@@ -11,4 +11,7 @@
|
||||
}
|
||||
.table-data-container .layui-input .layui-btn i {
|
||||
pointer-events: all;
|
||||
}
|
||||
.table-data-container .layui-form-danger + .layui-input {
|
||||
border-color: #ff5722 !important;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="table-data-container">
|
||||
<input type="hidden" :name="setting.name" :value="value">
|
||||
<div class="table-data-container" ref="tableData">
|
||||
<input type="hidden" :name="setting.name" :value="value" :lay-verify="setting.required == 1?'required':''">
|
||||
<div class="layui-input" @click="openSelectPage">
|
||||
<div class="placeholder" v-if="listSelected.length == 0">{{setting.placeholder}}</div>
|
||||
<div class="layui-btn layui-btn-xs layui-btn-normal" v-for="(itemSelect,indexSelect) in listSelected">
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -16,4 +16,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.layui-form-danger+.layui-input {
|
||||
border-color: #ff5722 !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user