rayyy-vue-table-components 1.2.35 → 1.2.37
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 +9224 -10122
- package/dist/index.umd.js +18 -18
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/index.d.ts +1 -5
- package/dist/src/components/items/SearchBar.vue.d.ts +1 -1
- package/dist/src/components/layout/SearchableListPanel.vue.d.ts +1 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/router/constants.d.ts +0 -2
- package/dist/src/types/components.d.ts +11 -93
- package/package.json +1 -1
- package/src/assets/styles/_components.scss +0 -54
- package/src/components/index.ts +1 -10
- package/src/components/items/SearchBar.vue +1 -15
- package/src/components/layout/SearchableListPanel.vue +2 -2
- package/src/types/components.d.ts +11 -93
- package/dist/src/components/items/FilterBtn.vue.d.ts +0 -31
- package/dist/src/components/items/FilterDrawer.vue.d.ts +0 -31
- package/dist/src/views/demo/FilterBtnDemo.vue.d.ts +0 -2
- package/src/components/items/FilterBtn.vue +0 -70
- package/src/components/items/FilterDrawer.vue +0 -63
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { default as BaseTable } from './tables/BaseTable.vue';
|
|
2
2
|
export { default as BaseBtn } from './items/BaseBtn.vue';
|
|
3
3
|
export { default as BaseInput } from './form/BaseInput.vue';
|
|
4
|
-
export { default as FilterBtn } from './items/FilterBtn.vue';
|
|
5
|
-
export { default as FilterDrawer } from './items/FilterDrawer.vue';
|
|
6
4
|
export { default as BaseDialog } from './items/BaseDialog.vue';
|
|
7
5
|
export { default as BaseForm } from './form/BaseForm.vue';
|
|
8
6
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue';
|
|
@@ -13,12 +11,10 @@ export { default as TransferItem } from './transfer/transferItem.vue';
|
|
|
13
11
|
export { default as FunctionHeader } from './layout/FunctionHeader.vue';
|
|
14
12
|
export { default as MainPanel } from './layout/MainPanel.vue';
|
|
15
13
|
export { default as SearchableListPanel } from './layout/SearchableListPanel.vue';
|
|
16
|
-
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseInputProps, BaseInputEmits, BaseInputInstance,
|
|
14
|
+
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseInputProps, BaseInputEmits, BaseInputInstance, BaseFormProps, BaseFormEmits, BaseFormInstance, SortTableProps, SortTableEmits, SortTableInstance, SearchBarProps, SearchBarEmits, SearchBarInstance, SearchBarSlots, TransferDialogProps, TransferDialogEmits, TransferDialogInstance, TransferItemProps, TransferItemEmits, TransferItemInstance, MainPanelProps, MainPanelEmits, MainPanelInstance, FunctionHeaderProps, FunctionHeaderEmits, FunctionHeaderInstance, PluginOptions, VueTableComponentsPlugin, } from '../types/components';
|
|
17
15
|
export type { default as BaseTableType } from './tables/BaseTable.vue';
|
|
18
16
|
export type { default as BaseBtnType } from './items/BaseBtn.vue';
|
|
19
17
|
export type { default as BaseInputType } from './form/BaseInput.vue';
|
|
20
|
-
export type { default as FilterBtnType } from './items/FilterBtn.vue';
|
|
21
|
-
export type { default as FilterDrawerType } from './items/FilterDrawer.vue';
|
|
22
18
|
export type { default as BaseDialogType } from './items/BaseDialog.vue';
|
|
23
19
|
export type { default as BaseFormType } from './form/BaseForm.vue';
|
|
24
20
|
export type { default as SortTableType } from './tables/SortTable.vue';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,13 +2,12 @@ import { App } from 'vue';
|
|
|
2
2
|
import { default as BaseTable } from './components/tables/BaseTable.vue';
|
|
3
3
|
import { default as BaseBtn } from './components/items/BaseBtn.vue';
|
|
4
4
|
import { default as BaseInput } from './components/form/BaseInput.vue';
|
|
5
|
-
import { default as FilterBtn } from './components/items/FilterBtn.vue';
|
|
6
5
|
import { default as BaseDialog } from './components/items/BaseDialog.vue';
|
|
7
6
|
import { default as SortTable } from './components/tables/SortTable.vue';
|
|
8
7
|
import { default as SearchBar } from './components/items/SearchBar.vue';
|
|
9
8
|
export * from './types';
|
|
10
9
|
export * from './utils/tableHelper';
|
|
11
|
-
export { BaseTable, BaseBtn, BaseInput,
|
|
10
|
+
export { BaseTable, BaseBtn, BaseInput, BaseDialog, SortTable, SearchBar };
|
|
12
11
|
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, PluginOptions, VueTableComponentsPlugin, } from './types/components';
|
|
13
12
|
export * from './components';
|
|
14
13
|
export declare function install(app: App, options?: {
|
|
@@ -8,7 +8,6 @@ export declare const ROUTES: {
|
|
|
8
8
|
readonly BASE_TABLE: "/demo/base-table";
|
|
9
9
|
readonly BASE_BTN: "/demo/base-btn";
|
|
10
10
|
readonly BASE_INPUT: "/demo/base-input";
|
|
11
|
-
readonly FILTER_BTN: "/demo/filter-btn";
|
|
12
11
|
readonly BASE_DIALOG: "/demo/base-dialog";
|
|
13
12
|
readonly BASE_FORM: "/demo/base-form";
|
|
14
13
|
readonly SORT_TABLE: "/demo/sort-table";
|
|
@@ -28,7 +27,6 @@ export declare const ROUTE_NAMES: {
|
|
|
28
27
|
readonly BASE_TABLE: "BaseTable";
|
|
29
28
|
readonly BASE_BTN: "BaseBtn";
|
|
30
29
|
readonly BASE_INPUT: "BaseInput";
|
|
31
|
-
readonly FILTER_BTN: "FilterBtn";
|
|
32
30
|
readonly BASE_DIALOG: "BaseDialog";
|
|
33
31
|
readonly BASE_FORM: "BaseForm";
|
|
34
32
|
readonly SORT_TABLE: "SortTable";
|
|
@@ -138,59 +138,6 @@ export interface BaseBtnInstance {
|
|
|
138
138
|
$emit: BaseBtnEmits
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
// ==================== FilterBtn 組件類型 ====================
|
|
142
|
-
|
|
143
|
-
/** FilterBtn 組件 Props 類型 */
|
|
144
|
-
export interface FilterBtnProps {
|
|
145
|
-
/** 徽章數值 */
|
|
146
|
-
badgeValue?: number
|
|
147
|
-
/** 抽屜大小,預設為 '50%' */
|
|
148
|
-
drawerSize?: string
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/** FilterBtn 組件 Emits 類型 */
|
|
152
|
-
export interface FilterBtnEmits {
|
|
153
|
-
/** 重置事件 */
|
|
154
|
-
(e: 'update:reset'): void
|
|
155
|
-
/** 提交事件 */
|
|
156
|
-
(e: 'update:submit'): void
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/** FilterBtn 組件實例類型 */
|
|
160
|
-
export interface FilterBtnInstance {
|
|
161
|
-
/** 組件 Props */
|
|
162
|
-
$props: FilterBtnProps
|
|
163
|
-
/** 組件 Emits */
|
|
164
|
-
$emit: FilterBtnEmits
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// ==================== FilterDrawer 組件類型 ====================
|
|
168
|
-
|
|
169
|
-
/** FilterDrawer 組件 Props 類型 */
|
|
170
|
-
export interface FilterDrawerProps {
|
|
171
|
-
/** 是否顯示抽屜 */
|
|
172
|
-
modelValue: boolean
|
|
173
|
-
/** 抽屜大小,預設為 '50%' */
|
|
174
|
-
drawerSize?: string
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/** FilterDrawer 組件 Emits 類型 */
|
|
178
|
-
export interface FilterDrawerEmits {
|
|
179
|
-
/** 更新 modelValue */
|
|
180
|
-
(e: 'update:modelValue', value: boolean): void
|
|
181
|
-
/** 重置事件 */
|
|
182
|
-
(e: 'reset'): void
|
|
183
|
-
/** 提交事件 */
|
|
184
|
-
(e: 'submit'): void
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/** FilterDrawer 組件實例類型 */
|
|
188
|
-
export interface FilterDrawerInstance {
|
|
189
|
-
/** 組件 Props */
|
|
190
|
-
$props: FilterDrawerProps
|
|
191
|
-
/** 組件 Emits */
|
|
192
|
-
$emit: FilterDrawerEmits
|
|
193
|
-
}
|
|
194
141
|
|
|
195
142
|
// ==================== 對話框相關組件類型 ====================
|
|
196
143
|
|
|
@@ -402,6 +349,14 @@ export interface SearchBarInstance {
|
|
|
402
349
|
$emit: SearchBarEmits
|
|
403
350
|
}
|
|
404
351
|
|
|
352
|
+
/** SearchBar 組件 Slots 類型 */
|
|
353
|
+
export interface SearchBarSlots {
|
|
354
|
+
/** 按鈕 slot */
|
|
355
|
+
button: () => VNode[]
|
|
356
|
+
/** 自定義篩選 slot */
|
|
357
|
+
customerFilter: () => VNode[]
|
|
358
|
+
}
|
|
359
|
+
|
|
405
360
|
// ==================== SearchableListPanel 組件類型 ====================
|
|
406
361
|
|
|
407
362
|
/** SearchableListPanel 組件 Props 類型 */
|
|
@@ -454,8 +409,8 @@ export interface SearchableListPanelSlots {
|
|
|
454
409
|
customButton: () => VNode[]
|
|
455
410
|
/** 最後一個按鈕 slot */
|
|
456
411
|
lastButton: () => VNode[]
|
|
457
|
-
/**
|
|
458
|
-
|
|
412
|
+
/** 篩選按鈕 slot */
|
|
413
|
+
filterButton: () => VNode[]
|
|
459
414
|
/** 主要內容 slot */
|
|
460
415
|
main: () => VNode[]
|
|
461
416
|
}
|
|
@@ -602,37 +557,6 @@ export declare const BaseBtn: DefineComponent<
|
|
|
602
557
|
install: (app: App) => void
|
|
603
558
|
}
|
|
604
559
|
|
|
605
|
-
/** FilterBtn 組件定義 */
|
|
606
|
-
export declare const FilterBtn: DefineComponent<
|
|
607
|
-
FilterBtnProps,
|
|
608
|
-
{},
|
|
609
|
-
{},
|
|
610
|
-
{},
|
|
611
|
-
{},
|
|
612
|
-
{},
|
|
613
|
-
{},
|
|
614
|
-
{},
|
|
615
|
-
FilterBtnEmits
|
|
616
|
-
> & {
|
|
617
|
-
/** 安裝方法 */
|
|
618
|
-
install: (app: App) => void
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/** FilterDrawer 組件定義 */
|
|
622
|
-
export declare const FilterDrawer: DefineComponent<
|
|
623
|
-
FilterDrawerProps,
|
|
624
|
-
{},
|
|
625
|
-
{},
|
|
626
|
-
{},
|
|
627
|
-
{},
|
|
628
|
-
{},
|
|
629
|
-
{},
|
|
630
|
-
{},
|
|
631
|
-
FilterDrawerEmits
|
|
632
|
-
> & {
|
|
633
|
-
/** 安裝方法 */
|
|
634
|
-
install: (app: App) => void
|
|
635
|
-
}
|
|
636
560
|
|
|
637
561
|
/** BaseDialog 組件定義 */
|
|
638
562
|
export declare const BaseDialog: DefineComponent<
|
|
@@ -722,7 +646,7 @@ export declare const SearchBar: DefineComponent<
|
|
|
722
646
|
{},
|
|
723
647
|
{},
|
|
724
648
|
{},
|
|
725
|
-
|
|
649
|
+
SearchBarSlots,
|
|
726
650
|
{},
|
|
727
651
|
SearchBarEmits
|
|
728
652
|
> & {
|
|
@@ -814,10 +738,6 @@ export interface VueTableComponentsPlugin {
|
|
|
814
738
|
SortTable: typeof SortTable
|
|
815
739
|
/** BaseBtn 組件 */
|
|
816
740
|
BaseBtn: typeof BaseBtn
|
|
817
|
-
/** FilterBtn 組件 */
|
|
818
|
-
FilterBtn: typeof FilterBtn
|
|
819
|
-
/** FilterDrawer 組件 */
|
|
820
|
-
FilterDrawer: typeof FilterDrawer
|
|
821
741
|
/** BaseDialog 組件 */
|
|
822
742
|
BaseDialog: typeof BaseDialog
|
|
823
743
|
/** TransferDialog 組件 */
|
|
@@ -847,8 +767,6 @@ declare module '@vue/runtime-core' {
|
|
|
847
767
|
BaseTable: typeof BaseTable
|
|
848
768
|
SortTable: typeof SortTable
|
|
849
769
|
BaseBtn: typeof BaseBtn
|
|
850
|
-
FilterBtn: typeof FilterBtn
|
|
851
|
-
FilterDrawer: typeof FilterDrawer
|
|
852
770
|
BaseDialog: typeof BaseDialog
|
|
853
771
|
TransferDialog: typeof TransferDialog
|
|
854
772
|
BaseInput: typeof BaseInput
|
package/package.json
CHANGED
|
@@ -18,52 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// ==================== FilterBtn 組件樣式 ====================
|
|
22
|
-
.filter-btn {
|
|
23
|
-
@apply text-sky-500;
|
|
24
|
-
|
|
25
|
-
p {
|
|
26
|
-
@apply text-primary-80 ml-2 text-base font-bold;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
i {
|
|
30
|
-
@apply text-xl;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.filter-icon {
|
|
34
|
-
@apply w-5 h-5 stroke-primary;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
&:hover {
|
|
40
|
-
@apply text-white bg-sky-500;
|
|
41
|
-
|
|
42
|
-
p {
|
|
43
|
-
@apply text-white;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.filter-icon {
|
|
47
|
-
@apply stroke-white;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.fill-icon path {
|
|
51
|
-
@apply stroke-white ;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:disabled {
|
|
56
|
-
@apply bg-white opacity-50;
|
|
57
|
-
|
|
58
|
-
&:hover {
|
|
59
|
-
@apply bg-white;
|
|
60
|
-
|
|
61
|
-
p {
|
|
62
|
-
@apply text-black/20;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
21
|
|
|
68
22
|
// ==================== TransferItem 組件樣式 ====================
|
|
69
23
|
.transfer-item-wrapper {
|
|
@@ -102,14 +56,6 @@
|
|
|
102
56
|
@apply cursor-pointer text-primary-dark text-xl flex items-center justify-center;
|
|
103
57
|
}
|
|
104
58
|
|
|
105
|
-
// FilterBtn 文字和圖標樣式
|
|
106
|
-
.filter-btn-text {
|
|
107
|
-
@apply text-primary-80 ml-2 text-base font-bold;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.filter-btn-icon {
|
|
111
|
-
@apply text-xl;
|
|
112
|
-
}
|
|
113
59
|
|
|
114
60
|
// TransferDialog
|
|
115
61
|
.transfer-sort-wrapper {
|
package/src/components/index.ts
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
export { default as BaseTable } from './tables/BaseTable.vue'
|
|
3
3
|
export { default as BaseBtn } from './items/BaseBtn.vue'
|
|
4
4
|
export { default as BaseInput } from './form/BaseInput.vue'
|
|
5
|
-
export { default as FilterBtn } from './items/FilterBtn.vue'
|
|
6
|
-
export { default as FilterDrawer } from './items/FilterDrawer.vue'
|
|
7
5
|
export { default as BaseDialog } from './items/BaseDialog.vue'
|
|
8
6
|
export { default as BaseForm } from './form/BaseForm.vue'
|
|
9
7
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue'
|
|
@@ -29,12 +27,6 @@ export type {
|
|
|
29
27
|
BaseInputProps,
|
|
30
28
|
BaseInputEmits,
|
|
31
29
|
BaseInputInstance,
|
|
32
|
-
FilterBtnProps,
|
|
33
|
-
FilterBtnEmits,
|
|
34
|
-
FilterBtnInstance,
|
|
35
|
-
FilterDrawerProps,
|
|
36
|
-
FilterDrawerEmits,
|
|
37
|
-
FilterDrawerInstance,
|
|
38
30
|
BaseFormProps,
|
|
39
31
|
BaseFormEmits,
|
|
40
32
|
BaseFormInstance,
|
|
@@ -44,6 +36,7 @@ export type {
|
|
|
44
36
|
SearchBarProps,
|
|
45
37
|
SearchBarEmits,
|
|
46
38
|
SearchBarInstance,
|
|
39
|
+
SearchBarSlots,
|
|
47
40
|
TransferDialogProps,
|
|
48
41
|
TransferDialogEmits,
|
|
49
42
|
TransferDialogInstance,
|
|
@@ -64,8 +57,6 @@ export type {
|
|
|
64
57
|
export type { default as BaseTableType } from './tables/BaseTable.vue'
|
|
65
58
|
export type { default as BaseBtnType } from './items/BaseBtn.vue'
|
|
66
59
|
export type { default as BaseInputType } from './form/BaseInput.vue'
|
|
67
|
-
export type { default as FilterBtnType } from './items/FilterBtn.vue'
|
|
68
|
-
export type { default as FilterDrawerType } from './items/FilterDrawer.vue'
|
|
69
60
|
export type { default as BaseDialogType } from './items/BaseDialog.vue'
|
|
70
61
|
export type { default as BaseFormType } from './form/BaseForm.vue'
|
|
71
62
|
export type { default as SortTableType } from './tables/SortTable.vue'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ref, useAttrs } from 'vue'
|
|
3
3
|
import BaseInput from '../form/BaseInput.vue'
|
|
4
|
-
import FilterBtn from './FilterBtn.vue'
|
|
5
4
|
|
|
6
5
|
defineProps<{
|
|
7
6
|
showFilter?: boolean
|
|
@@ -48,16 +47,7 @@ const resetFilter = () => {
|
|
|
48
47
|
class="search-input_inner"
|
|
49
48
|
/>
|
|
50
49
|
</div>
|
|
51
|
-
|
|
52
|
-
<div class="filter-customer" v-if="showFilter">
|
|
53
|
-
<filter-btn
|
|
54
|
-
:badge-value="badgeValue"
|
|
55
|
-
@update:reset="resetFilter"
|
|
56
|
-
:drawer-size="filterDrawerSize"
|
|
57
|
-
>
|
|
58
|
-
<slot name="filterBody" />
|
|
59
|
-
</filter-btn>
|
|
60
|
-
</div>
|
|
50
|
+
<slot name="customerFilter"> </slot>
|
|
61
51
|
</div>
|
|
62
52
|
</div>
|
|
63
53
|
</template>
|
|
@@ -67,10 +57,6 @@ const resetFilter = () => {
|
|
|
67
57
|
@apply flex-wrap;
|
|
68
58
|
}
|
|
69
59
|
|
|
70
|
-
.filter-customer {
|
|
71
|
-
@apply flex ml-0.5;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
60
|
.search-input {
|
|
75
61
|
@apply w-64;
|
|
76
62
|
|
|
@@ -66,8 +66,8 @@ const changePageSize = (limit: number) => {
|
|
|
66
66
|
<slot name="customButton" v-if="showAllFeatures || showEdit"> </slot>
|
|
67
67
|
<slot name="lastButton"></slot>
|
|
68
68
|
</template>
|
|
69
|
-
<template #
|
|
70
|
-
<slot name="
|
|
69
|
+
<template #customerFilter>
|
|
70
|
+
<slot name="filterButton"></slot>
|
|
71
71
|
</template>
|
|
72
72
|
</search-bar>
|
|
73
73
|
</template>
|
|
@@ -139,59 +139,6 @@ export interface BaseBtnInstance {
|
|
|
139
139
|
$emit: BaseBtnEmits
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
// ==================== FilterBtn 組件類型 ====================
|
|
143
|
-
|
|
144
|
-
/** FilterBtn 組件 Props 類型 */
|
|
145
|
-
export interface FilterBtnProps {
|
|
146
|
-
/** 徽章數值 */
|
|
147
|
-
badgeValue?: number
|
|
148
|
-
/** 抽屜大小,預設為 '50%' */
|
|
149
|
-
drawerSize?: string
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/** FilterBtn 組件 Emits 類型 */
|
|
153
|
-
export interface FilterBtnEmits {
|
|
154
|
-
/** 重置事件 */
|
|
155
|
-
(e: 'update:reset'): void
|
|
156
|
-
/** 提交事件 */
|
|
157
|
-
(e: 'update:submit'): void
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/** FilterBtn 組件實例類型 */
|
|
161
|
-
export interface FilterBtnInstance {
|
|
162
|
-
/** 組件 Props */
|
|
163
|
-
$props: FilterBtnProps
|
|
164
|
-
/** 組件 Emits */
|
|
165
|
-
$emit: FilterBtnEmits
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// ==================== FilterDrawer 組件類型 ====================
|
|
169
|
-
|
|
170
|
-
/** FilterDrawer 組件 Props 類型 */
|
|
171
|
-
export interface FilterDrawerProps {
|
|
172
|
-
/** 是否顯示抽屜 */
|
|
173
|
-
modelValue: boolean
|
|
174
|
-
/** 抽屜大小,預設為 '50%' */
|
|
175
|
-
drawerSize?: string
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/** FilterDrawer 組件 Emits 類型 */
|
|
179
|
-
export interface FilterDrawerEmits {
|
|
180
|
-
/** 更新 modelValue */
|
|
181
|
-
(e: 'update:modelValue', value: boolean): void
|
|
182
|
-
/** 重置事件 */
|
|
183
|
-
(e: 'reset'): void
|
|
184
|
-
/** 提交事件 */
|
|
185
|
-
(e: 'submit'): void
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/** FilterDrawer 組件實例類型 */
|
|
189
|
-
export interface FilterDrawerInstance {
|
|
190
|
-
/** 組件 Props */
|
|
191
|
-
$props: FilterDrawerProps
|
|
192
|
-
/** 組件 Emits */
|
|
193
|
-
$emit: FilterDrawerEmits
|
|
194
|
-
}
|
|
195
142
|
|
|
196
143
|
// ==================== 對話框相關組件類型 ====================
|
|
197
144
|
|
|
@@ -403,6 +350,14 @@ export interface SearchBarInstance {
|
|
|
403
350
|
$emit: SearchBarEmits
|
|
404
351
|
}
|
|
405
352
|
|
|
353
|
+
/** SearchBar 組件 Slots 類型 */
|
|
354
|
+
export interface SearchBarSlots {
|
|
355
|
+
/** 按鈕 slot */
|
|
356
|
+
button: () => VNode[]
|
|
357
|
+
/** 自定義篩選 slot */
|
|
358
|
+
customerFilter: () => VNode[]
|
|
359
|
+
}
|
|
360
|
+
|
|
406
361
|
// ==================== SearchableListPanel 組件類型 ====================
|
|
407
362
|
|
|
408
363
|
/** SearchableListPanel 組件 Props 類型 */
|
|
@@ -455,8 +410,8 @@ export interface SearchableListPanelSlots {
|
|
|
455
410
|
customButton: () => VNode[]
|
|
456
411
|
/** 最後一個按鈕 slot */
|
|
457
412
|
lastButton: () => VNode[]
|
|
458
|
-
/**
|
|
459
|
-
|
|
413
|
+
/** 篩選按鈕 slot */
|
|
414
|
+
filterButton: () => VNode[]
|
|
460
415
|
/** 主要內容 slot */
|
|
461
416
|
main: () => VNode[]
|
|
462
417
|
}
|
|
@@ -603,37 +558,6 @@ export declare const BaseBtn: DefineComponent<
|
|
|
603
558
|
install: (app: App) => void
|
|
604
559
|
}
|
|
605
560
|
|
|
606
|
-
/** FilterBtn 組件定義 */
|
|
607
|
-
export declare const FilterBtn: DefineComponent<
|
|
608
|
-
FilterBtnProps,
|
|
609
|
-
{},
|
|
610
|
-
{},
|
|
611
|
-
{},
|
|
612
|
-
{},
|
|
613
|
-
{},
|
|
614
|
-
{},
|
|
615
|
-
{},
|
|
616
|
-
FilterBtnEmits
|
|
617
|
-
> & {
|
|
618
|
-
/** 安裝方法 */
|
|
619
|
-
install: (app: App) => void
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
/** FilterDrawer 組件定義 */
|
|
623
|
-
export declare const FilterDrawer: DefineComponent<
|
|
624
|
-
FilterDrawerProps,
|
|
625
|
-
{},
|
|
626
|
-
{},
|
|
627
|
-
{},
|
|
628
|
-
{},
|
|
629
|
-
{},
|
|
630
|
-
{},
|
|
631
|
-
{},
|
|
632
|
-
FilterDrawerEmits
|
|
633
|
-
> & {
|
|
634
|
-
/** 安裝方法 */
|
|
635
|
-
install: (app: App) => void
|
|
636
|
-
}
|
|
637
561
|
|
|
638
562
|
/** BaseDialog 組件定義 */
|
|
639
563
|
export declare const BaseDialog: DefineComponent<
|
|
@@ -723,7 +647,7 @@ export declare const SearchBar: DefineComponent<
|
|
|
723
647
|
{},
|
|
724
648
|
{},
|
|
725
649
|
{},
|
|
726
|
-
|
|
650
|
+
SearchBarSlots,
|
|
727
651
|
{},
|
|
728
652
|
SearchBarEmits
|
|
729
653
|
> & {
|
|
@@ -815,10 +739,6 @@ export interface VueTableComponentsPlugin {
|
|
|
815
739
|
SortTable: typeof SortTable
|
|
816
740
|
/** BaseBtn 組件 */
|
|
817
741
|
BaseBtn: typeof BaseBtn
|
|
818
|
-
/** FilterBtn 組件 */
|
|
819
|
-
FilterBtn: typeof FilterBtn
|
|
820
|
-
/** FilterDrawer 組件 */
|
|
821
|
-
FilterDrawer: typeof FilterDrawer
|
|
822
742
|
/** BaseDialog 組件 */
|
|
823
743
|
BaseDialog: typeof BaseDialog
|
|
824
744
|
/** TransferDialog 組件 */
|
|
@@ -848,8 +768,6 @@ declare module '@vue/runtime-core' {
|
|
|
848
768
|
BaseTable: typeof BaseTable
|
|
849
769
|
SortTable: typeof SortTable
|
|
850
770
|
BaseBtn: typeof BaseBtn
|
|
851
|
-
FilterBtn: typeof FilterBtn
|
|
852
|
-
FilterDrawer: typeof FilterDrawer
|
|
853
771
|
BaseDialog: typeof BaseDialog
|
|
854
772
|
TransferDialog: typeof TransferDialog
|
|
855
773
|
BaseInput: typeof BaseInput
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
badgeValue?: number;
|
|
3
|
-
drawerSize?: string;
|
|
4
|
-
};
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
'fill-filter'?(_: {}): any;
|
|
9
|
-
'filter-icon'?(_: {}): any;
|
|
10
|
-
default?(_: {}): any;
|
|
11
|
-
};
|
|
12
|
-
refs: {};
|
|
13
|
-
rootEl: any;
|
|
14
|
-
};
|
|
15
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
-
"update:reset": () => any;
|
|
18
|
-
"update:submit": () => any;
|
|
19
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
-
"onUpdate:reset"?: (() => any) | undefined;
|
|
21
|
-
"onUpdate:submit"?: (() => any) | undefined;
|
|
22
|
-
}>, {
|
|
23
|
-
drawerSize: string;
|
|
24
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
-
export default _default;
|
|
27
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
modelValue: boolean;
|
|
3
|
-
drawerSize?: string;
|
|
4
|
-
};
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default?(_: {}): any;
|
|
9
|
-
};
|
|
10
|
-
refs: {};
|
|
11
|
-
rootEl: any;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
|
-
reset: () => any;
|
|
16
|
-
submit: () => any;
|
|
17
|
-
"update:modelValue": (value: boolean) => any;
|
|
18
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onReset?: (() => any) | undefined;
|
|
20
|
-
onSubmit?: (() => any) | undefined;
|
|
21
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
-
}>, {
|
|
23
|
-
drawerSize: string;
|
|
24
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
-
export default _default;
|
|
27
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { ref, useAttrs } from 'vue'
|
|
3
|
-
import { BaseBtn } from '@/components'
|
|
4
|
-
import { Filter } from '@element-plus/icons-vue'
|
|
5
|
-
import FilterDrawer from './FilterDrawer.vue'
|
|
6
|
-
|
|
7
|
-
withDefaults(
|
|
8
|
-
defineProps<{
|
|
9
|
-
badgeValue?: number
|
|
10
|
-
drawerSize?: string
|
|
11
|
-
}>(),
|
|
12
|
-
{
|
|
13
|
-
drawerSize: '50%',
|
|
14
|
-
},
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
// 獲取所有非 props 屬性
|
|
18
|
-
const attrs = useAttrs()
|
|
19
|
-
|
|
20
|
-
const showDrawer = ref(false)
|
|
21
|
-
|
|
22
|
-
function onClickBtn() {
|
|
23
|
-
showDrawer.value = !showDrawer.value
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const emit = defineEmits<{
|
|
27
|
-
(e: 'update:reset'): void
|
|
28
|
-
(e: 'update:submit'): void
|
|
29
|
-
}>()
|
|
30
|
-
|
|
31
|
-
const resetValue = () => {
|
|
32
|
-
emit('update:reset')
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const submitFilter = () => {
|
|
36
|
-
emit('update:submit')
|
|
37
|
-
}
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<base-btn v-bind="attrs" type="primary" class="filter-btn" @click="onClickBtn">
|
|
42
|
-
<el-badge
|
|
43
|
-
:value="badgeValue"
|
|
44
|
-
class="!flex justify-center items-center"
|
|
45
|
-
type="primary"
|
|
46
|
-
v-if="badgeValue && badgeValue > 0"
|
|
47
|
-
>
|
|
48
|
-
<slot name="fill-filter">
|
|
49
|
-
<el-icon class="filter-icon fill-icon">
|
|
50
|
-
<Filter />
|
|
51
|
-
</el-icon>
|
|
52
|
-
</slot>
|
|
53
|
-
</el-badge>
|
|
54
|
-
<slot name="filter-icon" v-else>
|
|
55
|
-
<el-icon class="filter-icon">
|
|
56
|
-
<Filter />
|
|
57
|
-
</el-icon>
|
|
58
|
-
</slot>
|
|
59
|
-
</base-btn>
|
|
60
|
-
<FilterDrawer
|
|
61
|
-
v-model="showDrawer"
|
|
62
|
-
:drawerSize="drawerSize"
|
|
63
|
-
@reset="resetValue"
|
|
64
|
-
@submit="submitFilter"
|
|
65
|
-
>
|
|
66
|
-
<slot></slot>
|
|
67
|
-
</FilterDrawer>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<style scoped lang="scss"></style>
|