完善公共表单组件
This commit is contained in:
@@ -83,7 +83,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.currentTime = [this.startTime, this.endTime]
|
||||
this.currentTime = [this.startTime || '', this.endTime || '']
|
||||
},
|
||||
methods: {
|
||||
handleChange (event) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<!-- 多选时间组件 -->
|
||||
<template>
|
||||
<el-tooltip class="item" effect="dark" :content="label || config.attrName" placement="top-start">
|
||||
<el-tooltip class="item" effect="dark" :content="label" placement="top-start">
|
||||
<el-form-item
|
||||
:label="label || config.attrName"
|
||||
:prop="prop || config.attrField"
|
||||
:label-width="label ? '210px' : '150px'"
|
||||
:label="label"
|
||||
:prop="prop"
|
||||
:label-width="labelWidth"
|
||||
class="add-form-item"
|
||||
:class="{'form-item-disabled': disabled}"
|
||||
>
|
||||
@@ -66,20 +66,19 @@ export default {
|
||||
value: {
|
||||
required: true
|
||||
},
|
||||
// label/props 和config 二选一
|
||||
label: {
|
||||
type: String,
|
||||
},
|
||||
prop: {
|
||||
type: String
|
||||
},
|
||||
config: {
|
||||
type: Object
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
labelWidth: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
placeholder () {
|
||||
|
||||
@@ -155,7 +155,6 @@ export default {
|
||||
},
|
||||
prop: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
value: {
|
||||
required: true
|
||||
@@ -177,7 +176,6 @@ export default {
|
||||
// label宽度
|
||||
labelWidth: {
|
||||
type: String,
|
||||
default: '150px'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:visible.sync="isVisible2"
|
||||
:wrapperClosable="false"
|
||||
@close="handleTreeDrawerCancel"
|
||||
append-to-body
|
||||
size="400px">
|
||||
<el-form
|
||||
@submit.native.prevent
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:visible.sync="visible"
|
||||
:wrapperClosable="false"
|
||||
@close="handleTreeDrawerCancel"
|
||||
append-to-body
|
||||
size="460px">
|
||||
<el-form
|
||||
ref="attributeEO"
|
||||
|
||||
Reference in New Issue
Block a user