-
Notifications
You must be signed in to change notification settings - Fork 600
Open
Labels
🐞 bugSomething isn't workingSomething isn't working🧐 unconfirmedwaiting to be confirmedwaiting to be confirmed
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch tdesign-vue-next@1.10.7 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/tdesign-vue-next/dist/tdesign.js b/node_modules/tdesign-vue-next/dist/tdesign.js
index f9462e7..8f4f1e2 100644
--- a/node_modules/tdesign-vue-next/dist/tdesign.js
+++ b/node_modules/tdesign-vue-next/dist/tdesign.js
@@ -65943,6 +65943,15 @@
var endRowValue = get_1(params.target, keys.rowKey);
var startState = this.treeDataMap.get(startRowValue);
var endState = this.treeDataMap.get(endRowValue);
+ // 新增防护代码:判断节点状态不存在时,直接返回,不执行后续逻辑
+ if (!startState || !endState) {
+ return {
+ dataSource: dataSource,
+ result: false,
+ code: "CUSTOM_ERROR",
+ reason: "节点状态未初始化,忽略拖拽"
+ };
+ }
if (startState.level !== endState.level) {
return {
dataSource: dataSource,This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working🧐 unconfirmedwaiting to be confirmedwaiting to be confirmed