-
@@ -54,11 +53,11 @@
-
+
@@ -113,6 +112,7 @@
import { getDicDetailList } from '/@/api/system/dic';
import { useI18n } from '/@/hooks/web/useI18n';
import { MutipleHeadInfo } from '/@/components/Designer';
+ import { buildUUID } from '/@/utils/uuid';
const { t } = useI18n();
// 用于包裹弹窗的form组件 因为一个FormItem 只能收集一个表单组件 所以弹窗的form 必须排除
@@ -237,7 +237,7 @@
function addDataKey(rows) {
rows.forEach((row) => {
if (!row['_key_']) {
- row['_key_'] = Math.random();
+ row['_key_'] = buildUUID();
}
});
return rows;
@@ -375,7 +375,8 @@
}
};
- const remove = (index) => {
+ const remove = (record) => {
+ const index = data.value.findIndex((r) => r._key_ === record._key_);
data.value.splice(index, 1);
emit('change', unref(data));
emit('update:value', unref(data));