Commit da01cf5e authored by miaojiale's avatar miaojiale

增加可清除

parent a91cbf5a
......@@ -34,14 +34,13 @@
v-model="form[item.prop]"
:readonly="item.readonly"
:disabled="item.disabled"
clearable=""
:placeholder="item.placeholder"
@focus="item.focusFunc ? item.focusFunc($event) : {}"
@change="item.func ? item.func($event) : {}"
>
<span v-if="item.unit" :slot="item.slot ? item.slot : 'append'">
{{
item.unit
}}
{{ item.unit }}
</span>
</el-input>
......@@ -146,7 +145,8 @@
:class="item.class"
:label="opt.value"
@change="item.func ? item.func($event) : {}"
>{{ opt.label }}</el-radio>
>{{ opt.label }}</el-radio
>
<!-- 级联 -->
<el-cascader
......@@ -159,7 +159,9 @@
></el-cascader>
<!-- 文字 -->
<span v-else-if="item.type === 'text'">{{ item.text ? item.text : form[item.prop] }}</span>
<span v-else-if="item.type === 'text'">{{
item.text ? item.text : form[item.prop]
}}</span>
<!-- 数字输入框 -->
<el-input-number
......@@ -191,7 +193,8 @@
:icon="btn.icon"
:style="btn.style"
@click="btn.func(form)"
>{{ btn.btnText }}</el-button>
>{{ btn.btnText }}</el-button
>
<div
v-if="btn.btnType == 'tobeModified'"
:key="index"
......@@ -199,8 +202,13 @@
:style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }"
@click="changeModified"
>
<i :style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }" class="el-icon-check"></i>
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }">待修改({{ btn.tobeModified }}</span>
<i
:style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }"
class="el-icon-check"
></i>
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }"
>待修改({{ btn.tobeModified }}</span
>
</div>
</template>
</div>
......@@ -215,7 +223,8 @@
:icon="btn.icon"
:style="btn.style"
@click="btn.func"
>{{ btn.btnText }}</el-button>
>{{ btn.btnText }}</el-button
>
</el-col>
</el-form>
</template>
......@@ -230,7 +239,7 @@ export default {
inlineFlag: { type: Boolean, default: false },
forms: { type: Array }, // 表单组,
lists: { type: Array }, // 按钮组
formEdit:{type: Object}
formEdit: { type: Object },
},
data() {
const form = {}
......@@ -257,7 +266,7 @@ export default {
methods: {
// 查询
handleSearch() {
console.log("this.form",this.form)
console.log("this.form", this.form)
this.$emit("handleSearch", this.form)
},
......@@ -324,10 +333,10 @@ export default {
},
},
watch: {
formEdit(val){
formEdit(val) {
this.initforms(val)
}
}
},
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment