Commit e73d20f7 by caoyanzhi

update: 标签值

parent 7286cb28
......@@ -333,12 +333,13 @@ export default {
return this.$message.warning('请不要复制多列');
}
const data = $tds.filter(el => el.length > 0).map(el => el[0].innerText).filter(el => el.length > 0);
this.ruleForm.tagValue = this.ruleForm.tagValue.filter(el => el.tagItemName.length > 0);
// 已经填写完成的标签值
const fillData = this.ruleForm.tagValue.filter(el => el.tagItemName.length > 0);
// 加上已填写的数据大于100时,不进行粘贴
if (this.ruleForm.tagValue.length + data.length > 100) {
return this.$message.warning(`最多可以复制${100 - this.ruleForm.tagValue.length}个标签值`);
if ((fillData.length + data.length) > 100) {
return this.$message.warning(`最多可以复制${100 - fillData.length}个标签值`);
}
this.ruleForm.tagValue = this.ruleForm.tagValue.concat(data.map(el => {
this.ruleForm.tagValue = fillData.concat(data.map(el => {
return {
id: GenNonDuplicateID(),
deleteFlag: false,
......
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