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

The tree component replaces the key with: field-names and will report Tree missing follow keys:'undefined' #4790

Closed
1 task
cff-github opened this issue Oct 21, 2021 · 1 comment
Labels

Comments

@cff-github
Copy link

cff-github commented Oct 21, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-alpha.4

Environment

3.2.20

Reproduction link

https://codesandbox.io/s/admiring-bush-mcmq7

Steps to reproduce

{{ name }} {{ name }} <script> import { defineComponent, ref, watch } from 'vue'; export default defineComponent({ setup() { const expandedKeys = ref(['0-0-0', '0-0-1']); const selectedKeys = ref(['0-0-0', '0-0-1']); const checkedKeys = ref(['0-0-0', '0-0-1']); const fieldNames = { children: 'child', title: 'name', key:'test' }; const treeData = [{ name: 'parent 1', test: '0-0', child: [{ name: '张晨成', test: '0-0-0', disabled: true, child: [{ name: 'leaf', test: '0-0-0-0', disableCheckbox: true, }, { name: 'leaf', test: '0-0-0-1', }], }, { name: 'parent 1-1', test: '0-0-1', child: [{ test: '0-0-1-0', name: 'zcvc', }], }], }]; watch(expandedKeys, () => { console.log('expandedKeys', expandedKeys); }); watch(selectedKeys, () => { console.log('selectedKeys', selectedKeys); }); watch(checkedKeys, () => { console.log('checkedKeys', checkedKeys); }); return { expandedKeys, selectedKeys, checkedKeys, fieldNames, treeData: ref(treeData), }; },

});
</script>

What is expected?

希望不报错

What is actually happening?

warning.js?2149:6 Warning: Tree missing follow keys: 'undefined'

@github-actions github-actions bot changed the title tree组件用:field-names替换key,会报 Tree missing follow keys: 'undefined' The tree component replaces the key with: field-names and will report Tree missing follow keys:'undefined' Oct 21, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant