Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以拖动不允许拖动的元素 #95

Closed
kawais opened this issue Dec 20, 2023 · 9 comments
Closed

可以拖动不允许拖动的元素 #95

kawais opened this issue Dec 20, 2023 · 9 comments

Comments

@kawais
Copy link

kawais commented Dec 20, 2023

vue是不可拖动的,但是点一下vue,然后点一下其他可拖动的元素,比如next,然后vue就可以拖动了
eachDraggable函数如下:

function eachDraggableTest(stat: Stat<TreeNode>) {
  return stat.data.text !== 'Vue'
}
Eln.-.Personal.-.Microsoft.Edge.2023-12-20.11-34-03.mp4
@phphe
Copy link
Owner

phphe commented Dec 20, 2023

fixed in 2.7.3

@kawais
Copy link
Author

kawais commented Dec 21, 2023

安装了2.7.3还是不行,用的vue2版

@phphe
Copy link
Owner

phphe commented Dec 21, 2023

删了node_modules重装,因为实际上更新的是依赖

@kawais
Copy link
Author

kawais commented Dec 21, 2023

还要删掉package-lock.json,现在好了
另外,控制台还有错误,能解决吗?
vue.runtime.esm.js:4609 [Vue warn]: Avoid using Array as root value for reactive() as it cannot be tracked in watch() or watchEffect(). Use ref() instead. This is a Vue-2-only limitation.
应该是这两个地方
image
image

@phphe
Copy link
Owner

phphe commented Dec 21, 2023

只是警告。vue2不报错就行,兼容难做。

@kawais
Copy link
Author

kawais commented Dec 21, 2023

问题是这个错误太多了。。。一拖动就有大量的。。。

@phphe
Copy link
Owner

phphe commented Dec 26, 2023

这个再示例里是可以工作的,文件夹:/examples/example-vue2
估计是后来vue的更新改变了。vue2的例子里依赖@vue/composition-api,但是@vue/composition-api vue2.7自带了,但是看来和@vue/composition-api有些不同。所以建议vue降级到2.6, @vue/composition-api使用1.4

@kawais
Copy link
Author

kawais commented Jan 2, 2024

项目已经开始了。。。降不了级了。。。

@phphe
Copy link
Owner

phphe commented Jan 2, 2024

抱歉,帮不了你

@phphe phphe closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants