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
1.10.7
No response
以下为会出现报错的代码(可直接复制运行):
<t-drawer v-model:visible="drawerVisible" size="55%"> <t-table row-key="index" :columns="columns" :data="data" :loading="loading" drag-sort="row-handler" lazy-load @drag-sort="onDragSort" > </t-table> </t-drawer> <t-button @click="drawerVisible = !drawerVisible">打开Drawer</t-button> </template> <script lang="jsx" setup> import { CheckCircleFilledIcon, CloseCircleFilledIcon, ErrorCircleFilledIcon, MoveIcon } from 'tdesign-icons-vue-next'; import { ref } from 'vue'; const drawerVisible = ref(false); const statusNameListMap = { 0: { label: '审批通过', theme: 'success', icon: <CheckCircleFilledIcon /> }, 1: { label: '审批失败', theme: 'danger', icon: <CloseCircleFilledIcon /> }, 2: { label: '审批过期', theme: 'warning', icon: <ErrorCircleFilledIcon /> }, }; const initialData = []; for (let i = 0; i < 5; i++) { initialData.push({ index: i + 1, applicant: ['贾明', '张三', '王芳'][i % 3], status: i % 3, channel: ['电子签署', '纸质签署', '纸质签署'][i % 3], detail: { email: ['[email protected]', '[email protected]', '[email protected]'][i % 3], }, matters: ['宣传物料制作费用', 'algolia 服务报销', '相关周边制作费', '激励奖品快递费'][i % 4], time: [2, 3, 1, 4][i % 4], createTime: ['2022-01-01', '2022-02-01', '2022-03-01', '2022-04-01', '2022-05-01'][i % 4], }); } const columns = [ { colKey: 'drag', // 列拖拽排序必要参数 title: '排序', // eslint-disable-next-line @typescript-eslint/no-unused-vars cell: () => ( <span> <MoveIcon /> </span> ), width: 46, }, { colKey: 'applicant', title: '申请人', width: '100' }, { colKey: 'status', title: '申请状态', width: '150', cell: (h, { row }) => { return ( <t-tag shape="round" theme={statusNameListMap[row.status].theme} variant="light-outline"> {statusNameListMap[row.status].icon} {statusNameListMap[row.status].label} </t-tag> ); }, }, { colKey: 'channel', title: '签署方式', width: '120' }, { colKey: 'detail.email', title: '邮箱地址', ellipsis: true }, { colKey: 'createTime', title: '申请时间' }, ]; const loading = ref(false); const data = ref([...initialData]); // { currentIndex, targetIndex, current, target, data, newData, e } const onDragSort = (params) => { console.log('交换行', params); data.value = params.newData; }; </script>
期望控制台无报错
控制台输出错误内容: tbody does not exist.
3.3.13
131.0.2903.70 (正式版本) (arm64)
MacOS 15.0.1
v20.16.0
如 重现步骤中的代码所示,在t-drawer 组件中的 t-table 组件中使用了 drag-sort="row-handler" 属性后,控制台就会报错
The text was updated successfully, but these errors were encountered:
👋 @Zccf,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
No branches or pull requests
tdesign-vue-next 版本
1.10.7
重现链接
No response
重现步骤
以下为会出现报错的代码(可直接复制运行):
期望结果
期望控制台无报错
实际结果
控制台输出错误内容: tbody does not exist.
框架版本
3.3.13
浏览器版本
131.0.2903.70 (正式版本) (arm64)
系统版本
MacOS 15.0.1
Node版本
v20.16.0
补充说明
如 重现步骤中的代码所示,在t-drawer 组件中的 t-table 组件中使用了 drag-sort="row-handler" 属性后,控制台就会报错
The text was updated successfully, but these errors were encountered: