NEZ-2436 fix:chart编辑页面 Threshold 删除时颜色选框不同步
This commit is contained in:
@@ -113,7 +113,7 @@ export default {
|
||||
if (confirmReg.length) {
|
||||
confirmReg.forEach(item => {
|
||||
const reg = new RegExp('\\$' + item.name, 'g') // 后续需要考虑 item,name 使用特殊字符的问题
|
||||
str = str.replace(reg, item.checked.map(label => label.replace(/\"/g, '\\"').replace(/\'/g, "\\'")).join('+'))
|
||||
str = str.replace(reg, item.checked.map(label => label.replace(/\\"/g, '"').replace(/\\'/g, "'")).join('+'))
|
||||
})
|
||||
}
|
||||
return str
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
<el-row v-if="chartConfig.param.enable.thresholds && isThresholdConfig(chartConfig.type)">
|
||||
<el-form-item
|
||||
v-for="(item,index) in chartConfig.param.thresholds"
|
||||
:key="index"
|
||||
:key="item.color"
|
||||
class="thresholds-item"
|
||||
:prop="'param.thresholds.' + index + '.value'"
|
||||
:rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}"
|
||||
|
||||
Reference in New Issue
Block a user