Comments (4)
👋 @lhdhtrc,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
from tdesign-vue.
回显解决携带父级id,导致半选变全选 是指什么时候额?
from tdesign-vue.
@uyarn 例如返回数据是[p1, c1, c2], p1下有c1, c2 c3,但是这里只返回了p1下的c1,c2, 那么如果回显到数组件上p1节点会变成全选,这个时候就需要去做处理,看p1下是否存在c1, c2, c3如果存在则不过滤p1, 如果存在则过滤p1
from tdesign-vue.
<template>
<t-tree
ref="menuRef"
v-model="formData.menuIdList"
class="narrow-scrollbar"
max-height="300px"
checkable
value-mode="all"
:expand-all="menuAll"
:data="menu"
:keys="{ value: 'id', label: 'name', children: 'children' }"
@change="treeChange($event, 0)"
></t-tree>
</template>
<script>
......
const onWatcher = watch(
() => props.active,
async () => {
if (props.active) {
switch (props.type) {
case 0:
break;
case 1:
loading.value = true;
try {
const res = await GetRoleInfoAPI(props.row.id);
res.menuIdList = useTreeFilter(props.menu, res.menuIdList);
res.deptIdList = useTreeFilter(props.dept, res.deptIdList);
formData.value = res;
menuAll.value = res.menuIdList.length === menuRef.value.getItems().length;
deptAll.value = res.deptIdList.length === deptRef.value.getItems().length;
} catch (err) {
console.log(err);
}
loading.value = false;
break;
default:
}
} else {
formData.value = JSON.parse(JSON.stringify(reset));
}
},
);
......
</script>
from tdesign-vue.
Related Issues (20)
- [Dialog] 插件函数式调用例子建议给销毁或者使用提醒,否则很容易造成使用者内存泄漏 HOT 2
- [Transfer] 穿梭框与树结合使用,并且开启穿梭框的搜索功能之后,只能搜索树的一级数据,二级或是更低层级的数据无法通过关键字搜索 HOT 3
- [Tree] 激活状态样式可以配置到tree-item不 HOT 2
- [upload] 自定义上传为什么进度一直为0% HOT 3
- [table] 配置了header-affixed-top,当表格有横向滚动条时,windows的chrome表头会有滚动条 HOT 5
- [Transfer 穿梭框] @search的时候 回车的时候type返回 任然是“input” HOT 2
- [DatePicker] windows年份下拉选项文字被遮挡,不能全部展示 HOT 2
- [Table] 使用了fixedRows,控制台报错 HOT 2
- [Transfer] 穿梭框内tree属性传入function无效 HOT 1
- [space] 在[email protected]无效 HOT 2
- [table] 树形表格展开层级于expandedTreeNodes.sync不符 HOT 1
- 不能用在vue3中吗,npm install tdesign-vue@naruto 总是报错 HOT 3
- t-menu 设置 popupProps placement 属性无效 HOT 2
- t-select value 绑定Boolean值 报错 HOT 8
- tree-select 自定义key值后 select框默认值回显有问题 HOT 3
- [Table] 对齐方式对Foot表尾生效 HOT 1
- [t-upload] t-upload的locale属性如何使用没有详细文档,链接的地址里面内容是空的,有没有如何使用这个属性的详细文档,像imageViewerProps详细API文档 HOT 4
- 组件: Dialog HOT 2
- [t-table] 横向滚动场景,最新版本[1.9.2]表头依然无法跟随滚动 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tdesign-vue.