We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@lingdayan @canyuegongzi
watch改成如下:
watch: { value() { this.valueId = this.value; this.initHandle(); }, options: { handler(newValue, oldValue) { this.valueId = this.value; this.initHandle(); }, deep: true } },
methods 里面 initHandle函数改成如下:
// 初始化值 initHandle() { if (this.valueId) { this.$nextTick(() => { let node = this.$refs.selectTree.getNode(this.valueId); if (node != null) { this.valueTitle = node.data[this.props.label]; // 初始化显示 this.$refs.selectTree.setCurrentKey(this.valueId); // 设置默认选中 this.defaultExpandedKey = [this.valueId]; // 设置默认展开 } }); } else { this.valueTitle = ""; // 清除缓存显示 } this.initScroll(); },
Originally posted by @luwzchn in #9 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@lingdayan @canyuegongzi
watch改成如下:
methods 里面 initHandle函数改成如下:
Originally posted by @luwzchn in #9 (comment)
The text was updated successfully, but these errors were encountered: