Commit da01cf5e authored by miaojiale's avatar miaojiale

增加可清除

parent a91cbf5a
...@@ -34,14 +34,13 @@ ...@@ -34,14 +34,13 @@
v-model="form[item.prop]" v-model="form[item.prop]"
:readonly="item.readonly" :readonly="item.readonly"
:disabled="item.disabled" :disabled="item.disabled"
clearable=""
:placeholder="item.placeholder" :placeholder="item.placeholder"
@focus="item.focusFunc ? item.focusFunc($event) : {}" @focus="item.focusFunc ? item.focusFunc($event) : {}"
@change="item.func ? item.func($event) : {}" @change="item.func ? item.func($event) : {}"
> >
<span v-if="item.unit" :slot="item.slot ? item.slot : 'append'"> <span v-if="item.unit" :slot="item.slot ? item.slot : 'append'">
{{ {{ item.unit }}
item.unit
}}
</span> </span>
</el-input> </el-input>
...@@ -146,7 +145,8 @@ ...@@ -146,7 +145,8 @@
:class="item.class" :class="item.class"
:label="opt.value" :label="opt.value"
@change="item.func ? item.func($event) : {}" @change="item.func ? item.func($event) : {}"
>{{ opt.label }}</el-radio> >{{ opt.label }}</el-radio
>
<!-- 级联 --> <!-- 级联 -->
<el-cascader <el-cascader
...@@ -159,7 +159,9 @@ ...@@ -159,7 +159,9 @@
></el-cascader> ></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 <el-input-number
...@@ -191,7 +193,8 @@ ...@@ -191,7 +193,8 @@
:icon="btn.icon" :icon="btn.icon"
:style="btn.style" :style="btn.style"
@click="btn.func(form)" @click="btn.func(form)"
>{{ btn.btnText }}</el-button> >{{ btn.btnText }}</el-button
>
<div <div
v-if="btn.btnType == 'tobeModified'" v-if="btn.btnType == 'tobeModified'"
:key="index" :key="index"
...@@ -199,8 +202,13 @@ ...@@ -199,8 +202,13 @@
:style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }" :style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }"
@click="changeModified" @click="changeModified"
> >
<i :style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }" class="el-icon-check"></i> <i
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }">待修改({{ btn.tobeModified }}</span> :style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }"
class="el-icon-check"
></i>
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }"
>待修改({{ btn.tobeModified }}</span
>
</div> </div>
</template> </template>
</div> </div>
...@@ -215,7 +223,8 @@ ...@@ -215,7 +223,8 @@
:icon="btn.icon" :icon="btn.icon"
:style="btn.style" :style="btn.style"
@click="btn.func" @click="btn.func"
>{{ btn.btnText }}</el-button> >{{ btn.btnText }}</el-button
>
</el-col> </el-col>
</el-form> </el-form>
</template> </template>
...@@ -230,7 +239,7 @@ export default { ...@@ -230,7 +239,7 @@ export default {
inlineFlag: { type: Boolean, default: false }, inlineFlag: { type: Boolean, default: false },
forms: { type: Array }, // 表单组, forms: { type: Array }, // 表单组,
lists: { type: Array }, // 按钮组 lists: { type: Array }, // 按钮组
formEdit:{type: Object} formEdit: { type: Object },
}, },
data() { data() {
const form = {} const form = {}
...@@ -257,7 +266,7 @@ export default { ...@@ -257,7 +266,7 @@ export default {
methods: { methods: {
// 查询 // 查询
handleSearch() { handleSearch() {
console.log("this.form",this.form) console.log("this.form", this.form)
this.$emit("handleSearch", this.form) this.$emit("handleSearch", this.form)
}, },
...@@ -324,10 +333,10 @@ export default { ...@@ -324,10 +333,10 @@ export default {
}, },
}, },
watch: { watch: {
formEdit(val){ formEdit(val) {
this.initforms(val) this.initforms(val)
} },
} },
} }
</script> </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