Skip to content

Commit f849697

Browse files
author
v_boweicai(蔡博伟)
committed
fix: 动态标签,添加、删除标签时,同步修改添加、删除标签态数组,避免编辑态错乱
1 parent 9895007 commit f849697

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/traction-widget/components/TagsPanel/TagsPanel.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ const tempTagInput = ref<string>('');
129129
const currentInstance = getCurrentInstance();
130130
const deleteTag = async (index: number) => {
131131
datasource.tags.splice(index, 1);
132+
showTagInputArray.value.splice(index, 1);
132133
console.log(datasource.tags);
133134
await currentInstance?.proxy?.$forceUpdate();
134135
};
@@ -164,8 +165,10 @@ const addNewTag = () => {
164165
}
165166
if (datasource.tags) {
166167
datasource.tags.push(tempTagInput.value);
168+
showTagInputArray.value.push(false);
167169
} else {
168170
datasource.tags = [tempTagInput.value];
171+
showTagInputArray.value = [false];
169172
}
170173
} else {
171174
FMessage.warning(props.regexTip);

0 commit comments

Comments
 (0)