qtsk-vue3 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,10 @@
|
|
3
3
|
<slot>内容</slot>
|
4
4
|
<template #footer v-if="showFooter">
|
5
5
|
<div class="dialog-footer">
|
6
|
-
<el-button @click="handleCancel">
|
6
|
+
<el-button @click="handleCancel" class="cancelButton">
|
7
7
|
{{ cancelName }}
|
8
8
|
</el-button>
|
9
|
-
<el-button type="primary" @click="handleConfirm">
|
9
|
+
<el-button type="primary" @click="handleConfirm" class="confirmButton">
|
10
10
|
{{ confirmName }}
|
11
11
|
</el-button>
|
12
12
|
</div>
|
@@ -54,4 +54,13 @@ const handleConfirm = () => {
|
|
54
54
|
}
|
55
55
|
</script>
|
56
56
|
|
57
|
-
<style lang="less" scoped
|
57
|
+
<style lang="less" scoped>
|
58
|
+
.cancelButton:hover {
|
59
|
+
background-color: #fff;
|
60
|
+
border-color: #dcdfe6;
|
61
|
+
color: #606266;
|
62
|
+
}
|
63
|
+
.confirmButton:hover {
|
64
|
+
background-color: var(--main-color);
|
65
|
+
}
|
66
|
+
</style>
|
@@ -65,6 +65,10 @@ const props = defineProps({
|
|
65
65
|
},
|
66
66
|
selectable: {
|
67
67
|
type: Function
|
68
|
+
},
|
69
|
+
multipleCheckbox: {
|
70
|
+
type: Boolean,
|
71
|
+
default: false
|
68
72
|
}
|
69
73
|
})
|
70
74
|
const tableRef = ref(null)
|
@@ -79,6 +83,10 @@ watch(() => props.data, (nv) => {
|
|
79
83
|
})
|
80
84
|
const handleSelectionChange = (list) => {
|
81
85
|
multipleSelection.value = [];
|
86
|
+
if (props.multipleCheckbox) {
|
87
|
+
multipleSelection.value = list
|
88
|
+
return false
|
89
|
+
}
|
82
90
|
if (list.length > 1) {
|
83
91
|
tableRef.value.clearSelection();
|
84
92
|
tableRef.value.toggleRowSelection(list[list.length - 1]);
|