p-pc-ui 1.3.8 → 1.3.10
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.
|
@@ -33,6 +33,8 @@ const {
|
|
|
33
33
|
initSearchFormData = [],
|
|
34
34
|
} = defineProps<Props>();
|
|
35
35
|
|
|
36
|
+
const selectedIds = defineModel<string[]>("selectedIds", { default: [] });
|
|
37
|
+
|
|
36
38
|
const pageQuery = reactive({
|
|
37
39
|
p: 1,
|
|
38
40
|
pc: 10,
|
|
@@ -51,9 +53,14 @@ const tableData = reactive({
|
|
|
51
53
|
const emits = defineEmits(["select"]);
|
|
52
54
|
|
|
53
55
|
const rowSelection = {
|
|
54
|
-
|
|
56
|
+
get selectedRowKeys() {
|
|
57
|
+
return selectedIds.value;
|
|
58
|
+
},
|
|
59
|
+
onChange: (selectedRowKeys: string[], _selectedRows: any[]) => {
|
|
60
|
+
selectedIds.value = selectedRowKeys;
|
|
55
61
|
emits("select", selectedRowKeys);
|
|
56
62
|
},
|
|
63
|
+
preserveSelectedRowKeys: true,
|
|
57
64
|
};
|
|
58
65
|
|
|
59
66
|
const editableData = reactive({});
|
|
@@ -326,7 +333,11 @@ defineExpose({
|
|
|
326
333
|
<template v-else-if="column['type'] === 'operate'">
|
|
327
334
|
<div style="display: flex; gap: 10px; justify-content: center">
|
|
328
335
|
<span v-for="item in column['operateButtons']">
|
|
329
|
-
<a
|
|
336
|
+
<a
|
|
337
|
+
v-if="!item.visibleFunc || (item.visibleFunc && item.visibleFunc(record))"
|
|
338
|
+
class="operate-a"
|
|
339
|
+
@click="item.click(record)"
|
|
340
|
+
>
|
|
330
341
|
{{ item.label }}</a
|
|
331
342
|
>
|
|
332
343
|
</span>
|