forked from github/dataease
Merge pull request #3894 from dataease/pr@dev_memory_component
Pr@dev memory component
This commit is contained in:
commit
70aa2054cd
@ -90,7 +90,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
<div class="de-bottom-line" />
|
<div class="de-bottom-line short" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!['null', 'empty', 'not_null', 'not_empty'].includes(item.term)">
|
<template v-else-if="!['null', 'empty', 'not_null', 'not_empty'].includes(item.term)">
|
||||||
<el-input
|
<el-input
|
||||||
@ -334,12 +334,12 @@ export default {
|
|||||||
initNameEnumName() {
|
initNameEnumName() {
|
||||||
const { name, enumValue, fieldId } = this.item
|
const { name, enumValue, fieldId } = this.item
|
||||||
if (!name && fieldId) {
|
if (!name && fieldId) {
|
||||||
this.checklist = enumValue.split(',')
|
this.checklist = [...new Set(enumValue.split(',') || [])]
|
||||||
}
|
}
|
||||||
if (!name && !fieldId) return
|
if (!name && !fieldId) return
|
||||||
this.initEnumOptions()
|
this.initEnumOptions()
|
||||||
this.activeName = this.item.name
|
this.activeName = this.item.name
|
||||||
this.checklist = enumValue.split(',')
|
this.checklist = [...new Set(enumValue.split(',') || [])]
|
||||||
},
|
},
|
||||||
cancelKeyDow() {
|
cancelKeyDow() {
|
||||||
if (!this.showTextArea && !this.keydownCanceled) {
|
if (!this.showTextArea && !this.keydownCanceled) {
|
||||||
@ -420,14 +420,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
addFields() {
|
addFields() {
|
||||||
const list = this.textareaValue.split('\n').reduce((pre, next) => {
|
let list = this.textareaValue.split('\n').reduce((pre, next) => {
|
||||||
const str = next.trim()
|
const str = next.trim()
|
||||||
if (!str) return pre
|
if (!str) return pre
|
||||||
pre.add(str)
|
pre.push(str)
|
||||||
return pre
|
return pre
|
||||||
}, new Set([]))
|
}, [])
|
||||||
if (list.size) {
|
if (list.length) {
|
||||||
this.checklist = [...this.checklist, ...list]
|
if (list.length > 500) {
|
||||||
|
list = list.slice(0, 500)
|
||||||
|
}
|
||||||
|
this.checklist = [...new Set([...this.checklist, ...list])]
|
||||||
}
|
}
|
||||||
this.showTextArea = false
|
this.showTextArea = false
|
||||||
},
|
},
|
||||||
@ -438,6 +441,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.delChecks(index)
|
this.delChecks(index)
|
||||||
}
|
}
|
||||||
|
this.checklist = [...new Set(this.checklist)]
|
||||||
},
|
},
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.showTextArea = false
|
this.showTextArea = false
|
||||||
@ -553,6 +557,11 @@ export default {
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.short {
|
||||||
|
width: 83px;
|
||||||
|
right: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep.el-input-number.is-controls-right .el-input__inner {
|
::v-deep.el-input-number.is-controls-right .el-input__inner {
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user