rayyy-vue-table-components 1.3.2 → 1.3.4
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.
- package/dist/index.es.js +73 -75
- package/dist/index.umd.js +7 -7
- package/dist/rayyy-vue-table-components.css +1 -1
- package/package.json +1 -1
- package/src/assets/styles/_components.scss +13 -46
- package/src/components/form/BaseInput.vue +3 -1
- package/src/components/tables/SortTable.vue +1 -1
- package/src/components/transfer/TransferDialog.vue +19 -24
package/package.json
CHANGED
|
@@ -19,63 +19,30 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
// ==================== TransferItem 組件樣式 ====================
|
|
23
|
-
.transfer-item-wrapper {
|
|
24
|
-
@apply border-t border-gray-200 px-4 flex items-center justify-between w-full;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.transfer-arrow-wrapper {
|
|
28
|
-
@apply w-28 text-primary-10;
|
|
29
|
-
}
|
|
30
22
|
|
|
31
23
|
// ==================== TransferDialog 組件樣式 ====================
|
|
32
24
|
.transfer-sort-wrapper {
|
|
33
|
-
@apply border border-gray-200
|
|
25
|
+
@apply border-2 border-gray-200 border-solid;
|
|
26
|
+
@apply h-96 overflow-auto;
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
.transfer-active-bg {
|
|
37
|
-
|
|
30
|
+
@apply bg-primary/10;
|
|
38
31
|
}
|
|
39
32
|
|
|
40
33
|
.transfer-active-border {
|
|
41
|
-
@apply border border-
|
|
34
|
+
@apply border rounded border-solid;
|
|
35
|
+
@apply border-blue-10;
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
// ==================== 組件樣式配置 ====================
|
|
45
|
-
.component-styles {
|
|
46
|
-
// SortTable
|
|
47
|
-
.sort-table-container {
|
|
48
|
-
@apply w-full mb-4;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.sort-table-function-bar {
|
|
52
|
-
@apply flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.sort-table-settings-btn {
|
|
56
|
-
@apply cursor-pointer text-primary-dark text-xl flex items-center justify-center;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.transfer-active-bg {
|
|
66
|
-
background-color: rgba(103, 133, 193, 0.1);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.transfer-active-border {
|
|
70
|
-
@apply border border-primary-10 rounded;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// TransferItem
|
|
74
|
-
.transfer-item-wrapper {
|
|
75
|
-
@apply border-t border-gray-200 px-4 flex items-center justify-between w-full;
|
|
76
|
-
}
|
|
39
|
+
// ==================== TransferItem 組件樣式 ====================
|
|
40
|
+
.transfer-item-wrapper {
|
|
41
|
+
@apply border-t px-4;
|
|
42
|
+
@apply flex items-center justify-between w-full;
|
|
43
|
+
}
|
|
77
44
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
45
|
+
.transfer-arrow-wrapper {
|
|
46
|
+
@apply w-28;
|
|
47
|
+
@apply text-blue-10;
|
|
81
48
|
}
|
|
@@ -48,7 +48,9 @@ const handlerClear = () => {
|
|
|
48
48
|
@clear="handlerClear"
|
|
49
49
|
>
|
|
50
50
|
<template #prefix>
|
|
51
|
-
<
|
|
51
|
+
<div class="text-text-border w-full h-full flex items-center justify-center text-lg">
|
|
52
|
+
<el-icon><Search /></el-icon>
|
|
53
|
+
</div>
|
|
52
54
|
</template>
|
|
53
55
|
</el-input>
|
|
54
56
|
</template>
|
|
@@ -48,7 +48,7 @@ const handleColumnSortChange = (data: SortChangValue<T>) => {
|
|
|
48
48
|
<div class="flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end">
|
|
49
49
|
<div class="flex items-center mr-4">
|
|
50
50
|
<div
|
|
51
|
-
class="cursor-pointer text-
|
|
51
|
+
class="cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600"
|
|
52
52
|
@click="openTransferDialog"
|
|
53
53
|
>
|
|
54
54
|
<el-icon><Setting /></el-icon>
|
|
@@ -16,7 +16,7 @@ const props = defineProps<{
|
|
|
16
16
|
const emit = defineEmits<{
|
|
17
17
|
(e: 'update:modelValue', value: boolean): void
|
|
18
18
|
(e: 'update:submit', data: TableColumn<T>[]): void
|
|
19
|
-
(e: 'update:checkChange', data: { columns: TableColumn<T>[]
|
|
19
|
+
(e: 'update:checkChange', data: { columns: TableColumn<T>[]; checkList: string[] }): void
|
|
20
20
|
}>()
|
|
21
21
|
|
|
22
22
|
const dialogVisible = computed({
|
|
@@ -82,7 +82,6 @@ watch(
|
|
|
82
82
|
},
|
|
83
83
|
)
|
|
84
84
|
const handlerSubmit = () => {
|
|
85
|
-
console.log('state.localColumns', state.localColumns)
|
|
86
85
|
emit('update:submit', state.localColumns)
|
|
87
86
|
}
|
|
88
87
|
|
|
@@ -99,7 +98,7 @@ const handleCheckChange = (val: CheckboxValueType[]) => {
|
|
|
99
98
|
// 即時 emit checkbox 狀態變更
|
|
100
99
|
emit('update:checkChange', {
|
|
101
100
|
columns: state.localColumns,
|
|
102
|
-
checkList: state.checkList
|
|
101
|
+
checkList: state.checkList,
|
|
103
102
|
})
|
|
104
103
|
}
|
|
105
104
|
|
|
@@ -128,9 +127,7 @@ const doFilterColumn = (keyword: string) => {
|
|
|
128
127
|
<base-dialog v-model="dialogVisible" :title="transferTitle" @click:submit="handlerSubmit">
|
|
129
128
|
<div class="search-bar">
|
|
130
129
|
<search-bar
|
|
131
|
-
:show-filter="false"
|
|
132
130
|
:show-search="true"
|
|
133
|
-
:full-input="true"
|
|
134
131
|
@update:clear="resetFilterColumn"
|
|
135
132
|
@keydown:enter="doFilterColumn"
|
|
136
133
|
/>
|
|
@@ -149,25 +146,23 @@ const doFilterColumn = (keyword: string) => {
|
|
|
149
146
|
:handle-mousedown="(prop: string) => (state.clickItemProp = prop)"
|
|
150
147
|
>
|
|
151
148
|
<!-- 默認的靜態列表 -->
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</template>
|
|
170
|
-
</div>
|
|
149
|
+
<template v-for="(element, index) in state.localColumns" :key="element.prop">
|
|
150
|
+
<transfer-item
|
|
151
|
+
:dialog-modal-visible="dialogVisible"
|
|
152
|
+
:columns-value="element"
|
|
153
|
+
:columns-index="index"
|
|
154
|
+
:columns-len="state.localColumns.length"
|
|
155
|
+
:class="{
|
|
156
|
+
'transfer-active-bg': element.checkActive,
|
|
157
|
+
'transfer-active-border': state.clickItemProp == element.prop,
|
|
158
|
+
}"
|
|
159
|
+
@mousedown="state.clickItemProp = element.prop || ''"
|
|
160
|
+
@update:toTop="handleItemEvents.toTop(index)"
|
|
161
|
+
@update:toBottom="handleItemEvents.toBottom(index)"
|
|
162
|
+
@update:toPre="handleItemEvents.toPre(index)"
|
|
163
|
+
@update:toNext="handleItemEvents.toNext(index)"
|
|
164
|
+
/>
|
|
165
|
+
</template>
|
|
171
166
|
</slot>
|
|
172
167
|
</el-checkbox-group>
|
|
173
168
|
</div>
|