|
@@ -298,11 +298,10 @@ const copyKeyList = ref(getStoreData('TableFormCopyKeyList') || [])
|
|
|
//设置选择数据
|
|
|
const setShiftTableForm = (key) => {
|
|
|
if (isCtrlKey.value) {
|
|
|
- const form = tableFormInfo.value
|
|
|
const keys = checkKeyList.value
|
|
|
const index = getIndex(keys, 'key', key)
|
|
|
if (index === -1) {
|
|
|
- keys.push({key, val: form[key] ?? ''})
|
|
|
+ keys.push({key: key})
|
|
|
} else {
|
|
|
keys.splice(index, 1)
|
|
|
}
|
|
@@ -332,12 +331,18 @@ document.onkeydown = (event) => {
|
|
|
if (ctrlKey && key === 'v') {
|
|
|
const keysList = deepClone(copyKeyList.value)
|
|
|
const checkList = checkKeyList.value
|
|
|
- checkList.forEach(item => {
|
|
|
+ const form = tableFormInfo.value
|
|
|
+ checkList.forEach((item) => {
|
|
|
+ const form_key = item['key']
|
|
|
+ const item_value = form[form_key]
|
|
|
if (keysList.length > 0) {
|
|
|
- tableFormInfo.value[item['key']] = keysList[0]?.val ?? item['val']
|
|
|
+ const val = form[keysList[0]['key']]
|
|
|
+ tableFormInfo.value[form_key] = val ? val : item_value
|
|
|
keysList.splice(0, 1) //删除第一个元素
|
|
|
+ } else {
|
|
|
+ tableFormInfo.value[form_key] = item_value
|
|
|
}
|
|
|
- HTableForm.setCheckKeyStyle(item['key'], true)
|
|
|
+ HTableForm.setCheckKeyStyle(form_key, true)
|
|
|
})
|
|
|
//清除缓存
|
|
|
checkKeyList.value = []
|
|
@@ -512,15 +517,15 @@ defineExpose({
|
|
|
|
|
|
.hc-red-border {
|
|
|
&.el-textarea__inner, &.el-input .el-input__wrapper {
|
|
|
- --el-input-border-color: #fe0000;
|
|
|
- box-shadow: 0 0 0 2px #fe0000 inset;
|
|
|
+ --el-input-border-color: #fe0000 !important;
|
|
|
+ box-shadow: 0 0 0 2px #fe0000 inset !important;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.hc-green-border {
|
|
|
&.el-textarea__inner, &.el-input .el-input__wrapper {
|
|
|
- --el-input-border-color: #1ECC95;
|
|
|
- box-shadow: 0 0 0 2px #1ECC95 inset;
|
|
|
+ --el-input-border-color: #1ECC95 !important;
|
|
|
+ box-shadow: 0 0 0 2px #1ECC95 inset !important;
|
|
|
}
|
|
|
}
|
|
|
|