|
@@ -7,7 +7,7 @@
|
|
|
<t-input
|
|
|
class="w-full"
|
|
|
placeholder="ID"
|
|
|
- :value="props.pen.id"
|
|
|
+ v-model:value="penId"
|
|
|
@change="changeID($event)"
|
|
|
/>
|
|
|
</div>
|
|
@@ -1205,15 +1205,19 @@ const penTree: any = ref([]);
|
|
|
|
|
|
let timer: any;
|
|
|
|
|
|
+const penId = ref('');
|
|
|
+
|
|
|
const changeID = (value: any) => {
|
|
|
if (!value) {
|
|
|
// initPenData();
|
|
|
+ penId.value = props.pen.id;
|
|
|
MessagePlugin.error('id 不能为空');
|
|
|
return;
|
|
|
}
|
|
|
const oldID: string = props.pen.id;
|
|
|
try {
|
|
|
meta2d.changePenId(oldID, value);
|
|
|
+ penId.value = props.pen.id;
|
|
|
// initPenData();
|
|
|
} catch (error) {
|
|
|
console.warn(error.message);
|
|
@@ -1841,6 +1845,7 @@ const childrenPens = ref([]);
|
|
|
watch(
|
|
|
() => props.pen.id,
|
|
|
(newValue) => {
|
|
|
+ penId.value = props.pen.id;
|
|
|
childrenPens.value = [];
|
|
|
// childrenKey.value = s8();
|
|
|
if(props.pen.children?.length){
|
|
@@ -1851,6 +1856,7 @@ watch(
|
|
|
);
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ penId.value = props.pen.id;
|
|
|
childrenPens.value = [];
|
|
|
if(props.pen.children?.length){
|
|
|
childrenPens.value = getAllChildren(meta2d.store.pens[props.pen.id],meta2d.store);
|