快乐的昕的电脑
2025-11-24 c2bd8d29ff48cb95d31818155535befb27f99c7c
复选框逻辑修改
已修改1个文件
10 ■■■■ 文件已修改
pages/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index.vue
@@ -345,8 +345,14 @@
        },
        methods: {
            onRowClick(index) {
                this.selectedIndexs = [index]; // 单选
                // 手动触发 selectionChange 以同步复选框
                this.selectedIndexs = [index];
                this.$nextTick(() => {
                    const row = this.tableData[index];
                    if (this.$refs.table && this.$refs.table.toggleRowSelection) {
                        this.$refs.table.clearSelection && this.$refs.table.clearSelection();
                        this.$refs.table.toggleRowSelection(row, true);
                    }
                });
                this.selectionChange({ detail: { index } });
            },
            checkForUpdate() {