rayyy-vue-table-components 1.2.33 → 1.2.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.
- package/dist/index.es.js +439 -406
- package/dist/index.umd.js +8 -8
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/index.d.ts +3 -1
- package/dist/src/components/items/FilterDrawer.vue.d.ts +31 -0
- package/dist/src/types/components.d.ts +47 -0
- package/package.json +1 -1
- package/src/components/index.ts +5 -0
- package/src/components/items/FilterBtn.vue +12 -25
- package/src/components/items/FilterDrawer.vue +63 -0
- package/src/types/components.d.ts +47 -0
|
@@ -2,6 +2,7 @@ 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
4
|
export { default as FilterBtn } from './items/FilterBtn.vue';
|
|
5
|
+
export { default as FilterDrawer } from './items/FilterDrawer.vue';
|
|
5
6
|
export { default as BaseDialog } from './items/BaseDialog.vue';
|
|
6
7
|
export { default as BaseForm } from './form/BaseForm.vue';
|
|
7
8
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue';
|
|
@@ -12,11 +13,12 @@ export { default as TransferItem } from './transfer/transferItem.vue';
|
|
|
12
13
|
export { default as FunctionHeader } from './layout/FunctionHeader.vue';
|
|
13
14
|
export { default as MainPanel } from './layout/MainPanel.vue';
|
|
14
15
|
export { default as SearchableListPanel } from './layout/SearchableListPanel.vue';
|
|
15
|
-
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseInputProps, BaseInputEmits, BaseInputInstance, FilterBtnProps, FilterBtnEmits, FilterBtnInstance, BaseFormProps, BaseFormEmits, BaseFormInstance, SortTableProps, SortTableEmits, SortTableInstance, SearchBarProps, SearchBarEmits, SearchBarInstance, TransferDialogProps, TransferDialogEmits, TransferDialogInstance, TransferItemProps, TransferItemEmits, TransferItemInstance, MainPanelProps, MainPanelEmits, MainPanelInstance, FunctionHeaderProps, FunctionHeaderEmits, FunctionHeaderInstance, PluginOptions, VueTableComponentsPlugin, } from '../types/components';
|
|
16
|
+
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseInputProps, BaseInputEmits, BaseInputInstance, FilterBtnProps, FilterBtnEmits, FilterBtnInstance, FilterDrawerProps, FilterDrawerEmits, FilterDrawerInstance, BaseFormProps, BaseFormEmits, BaseFormInstance, SortTableProps, SortTableEmits, SortTableInstance, SearchBarProps, SearchBarEmits, SearchBarInstance, TransferDialogProps, TransferDialogEmits, TransferDialogInstance, TransferItemProps, TransferItemEmits, TransferItemInstance, MainPanelProps, MainPanelEmits, MainPanelInstance, FunctionHeaderProps, FunctionHeaderEmits, FunctionHeaderInstance, PluginOptions, VueTableComponentsPlugin, } from '../types/components';
|
|
16
17
|
export type { default as BaseTableType } from './tables/BaseTable.vue';
|
|
17
18
|
export type { default as BaseBtnType } from './items/BaseBtn.vue';
|
|
18
19
|
export type { default as BaseInputType } from './form/BaseInput.vue';
|
|
19
20
|
export type { default as FilterBtnType } from './items/FilterBtn.vue';
|
|
21
|
+
export type { default as FilterDrawerType } from './items/FilterDrawer.vue';
|
|
20
22
|
export type { default as BaseDialogType } from './items/BaseDialog.vue';
|
|
21
23
|
export type { default as BaseFormType } from './form/BaseForm.vue';
|
|
22
24
|
export type { default as SortTableType } from './tables/SortTable.vue';
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
};
|
|
@@ -164,6 +164,34 @@ export interface FilterBtnInstance {
|
|
|
164
164
|
$emit: FilterBtnEmits
|
|
165
165
|
}
|
|
166
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
|
+
|
|
167
195
|
// ==================== 對話框相關組件類型 ====================
|
|
168
196
|
|
|
169
197
|
// ==================== BaseDialog 組件類型 ====================
|
|
@@ -590,6 +618,22 @@ export declare const FilterBtn: DefineComponent<
|
|
|
590
618
|
install: (app: App) => void
|
|
591
619
|
}
|
|
592
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
|
+
|
|
593
637
|
/** BaseDialog 組件定義 */
|
|
594
638
|
export declare const BaseDialog: DefineComponent<
|
|
595
639
|
BaseDialogProps,
|
|
@@ -772,6 +816,8 @@ export interface VueTableComponentsPlugin {
|
|
|
772
816
|
BaseBtn: typeof BaseBtn
|
|
773
817
|
/** FilterBtn 組件 */
|
|
774
818
|
FilterBtn: typeof FilterBtn
|
|
819
|
+
/** FilterDrawer 組件 */
|
|
820
|
+
FilterDrawer: typeof FilterDrawer
|
|
775
821
|
/** BaseDialog 組件 */
|
|
776
822
|
BaseDialog: typeof BaseDialog
|
|
777
823
|
/** TransferDialog 組件 */
|
|
@@ -802,6 +848,7 @@ declare module '@vue/runtime-core' {
|
|
|
802
848
|
SortTable: typeof SortTable
|
|
803
849
|
BaseBtn: typeof BaseBtn
|
|
804
850
|
FilterBtn: typeof FilterBtn
|
|
851
|
+
FilterDrawer: typeof FilterDrawer
|
|
805
852
|
BaseDialog: typeof BaseDialog
|
|
806
853
|
TransferDialog: typeof TransferDialog
|
|
807
854
|
BaseInput: typeof BaseInput
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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
5
|
export { default as FilterBtn } from './items/FilterBtn.vue'
|
|
6
|
+
export { default as FilterDrawer } from './items/FilterDrawer.vue'
|
|
6
7
|
export { default as BaseDialog } from './items/BaseDialog.vue'
|
|
7
8
|
export { default as BaseForm } from './form/BaseForm.vue'
|
|
8
9
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue'
|
|
@@ -31,6 +32,9 @@ export type {
|
|
|
31
32
|
FilterBtnProps,
|
|
32
33
|
FilterBtnEmits,
|
|
33
34
|
FilterBtnInstance,
|
|
35
|
+
FilterDrawerProps,
|
|
36
|
+
FilterDrawerEmits,
|
|
37
|
+
FilterDrawerInstance,
|
|
34
38
|
BaseFormProps,
|
|
35
39
|
BaseFormEmits,
|
|
36
40
|
BaseFormInstance,
|
|
@@ -61,6 +65,7 @@ export type { default as BaseTableType } from './tables/BaseTable.vue'
|
|
|
61
65
|
export type { default as BaseBtnType } from './items/BaseBtn.vue'
|
|
62
66
|
export type { default as BaseInputType } from './form/BaseInput.vue'
|
|
63
67
|
export type { default as FilterBtnType } from './items/FilterBtn.vue'
|
|
68
|
+
export type { default as FilterDrawerType } from './items/FilterDrawer.vue'
|
|
64
69
|
export type { default as BaseDialogType } from './items/BaseDialog.vue'
|
|
65
70
|
export type { default as BaseFormType } from './form/BaseForm.vue'
|
|
66
71
|
export type { default as SortTableType } from './tables/SortTable.vue'
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ref, useAttrs } from 'vue'
|
|
3
3
|
import { BaseBtn } from '@/components'
|
|
4
|
-
import {
|
|
4
|
+
import { Filter } from '@element-plus/icons-vue'
|
|
5
|
+
import FilterDrawer from './FilterDrawer.vue'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
withDefaults(
|
|
7
8
|
defineProps<{
|
|
8
9
|
badgeValue?: number
|
|
9
10
|
drawerSize?: string
|
|
@@ -30,8 +31,9 @@ const emit = defineEmits<{
|
|
|
30
31
|
const resetValue = () => {
|
|
31
32
|
emit('update:reset')
|
|
32
33
|
}
|
|
34
|
+
|
|
33
35
|
const submitFilter = () => {
|
|
34
|
-
|
|
36
|
+
emit('update:submit')
|
|
35
37
|
}
|
|
36
38
|
</script>
|
|
37
39
|
|
|
@@ -55,29 +57,14 @@ const submitFilter = () => {
|
|
|
55
57
|
</el-icon>
|
|
56
58
|
</slot>
|
|
57
59
|
</base-btn>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<div class="flex justify-between items-center pb-5 font-semibold">
|
|
66
|
-
<div class="text-base text-black/70">篩選條件</div>
|
|
67
|
-
<div class="text-base text-primary cursor-pointer" @click="resetValue">重置</div>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
60
|
+
<FilterDrawer
|
|
61
|
+
v-model="showDrawer"
|
|
62
|
+
:drawerSize="drawerSize"
|
|
63
|
+
@reset="resetValue"
|
|
64
|
+
@submit="submitFilter"
|
|
65
|
+
>
|
|
70
66
|
<slot></slot>
|
|
71
|
-
|
|
72
|
-
<template #footer>
|
|
73
|
-
<base-btn type="primary" class="filter-btn" @click="submitFilter">
|
|
74
|
-
<el-icon>
|
|
75
|
-
<Search />
|
|
76
|
-
</el-icon>
|
|
77
|
-
<p>查詢</p>
|
|
78
|
-
</base-btn>
|
|
79
|
-
</template>
|
|
80
|
-
</el-drawer>
|
|
67
|
+
</FilterDrawer>
|
|
81
68
|
</template>
|
|
82
69
|
|
|
83
70
|
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { BaseBtn } from '@/components'
|
|
4
|
+
import { Search } from '@element-plus/icons-vue'
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
modelValue: boolean
|
|
9
|
+
drawerSize?: string
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
drawerSize: '50%',
|
|
13
|
+
},
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
(e: 'update:modelValue', value: boolean): void
|
|
18
|
+
(e: 'reset'): void
|
|
19
|
+
(e: 'submit'): void
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const showDrawer = computed({
|
|
23
|
+
get: () => props.modelValue,
|
|
24
|
+
set: (value) => emit('update:modelValue', value),
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const resetValue = () => {
|
|
28
|
+
emit('reset')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const submitFilter = () => {
|
|
32
|
+
emit('submit')
|
|
33
|
+
showDrawer.value = false
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<el-drawer v-model="showDrawer" :size="drawerSize">
|
|
39
|
+
<template #header>
|
|
40
|
+
<div class="flex justify-center text-base text-black font-semibold">
|
|
41
|
+
<span>查詢條件</span>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<div class="flex justify-between items-center pb-5 font-semibold">
|
|
46
|
+
<div class="text-base text-black/70">篩選條件</div>
|
|
47
|
+
<div class="text-base text-primary cursor-pointer" @click="resetValue">重置</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<slot></slot>
|
|
51
|
+
|
|
52
|
+
<template #footer>
|
|
53
|
+
<base-btn type="primary" class="filter-btn" @click="submitFilter">
|
|
54
|
+
<el-icon>
|
|
55
|
+
<Search />
|
|
56
|
+
</el-icon>
|
|
57
|
+
<p>查詢</p>
|
|
58
|
+
</base-btn>
|
|
59
|
+
</template>
|
|
60
|
+
</el-drawer>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<style scoped lang="scss"></style>
|
|
@@ -165,6 +165,34 @@ export interface FilterBtnInstance {
|
|
|
165
165
|
$emit: FilterBtnEmits
|
|
166
166
|
}
|
|
167
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
|
+
|
|
168
196
|
// ==================== 對話框相關組件類型 ====================
|
|
169
197
|
|
|
170
198
|
// ==================== BaseDialog 組件類型 ====================
|
|
@@ -591,6 +619,22 @@ export declare const FilterBtn: DefineComponent<
|
|
|
591
619
|
install: (app: App) => void
|
|
592
620
|
}
|
|
593
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
|
+
|
|
594
638
|
/** BaseDialog 組件定義 */
|
|
595
639
|
export declare const BaseDialog: DefineComponent<
|
|
596
640
|
BaseDialogProps,
|
|
@@ -773,6 +817,8 @@ export interface VueTableComponentsPlugin {
|
|
|
773
817
|
BaseBtn: typeof BaseBtn
|
|
774
818
|
/** FilterBtn 組件 */
|
|
775
819
|
FilterBtn: typeof FilterBtn
|
|
820
|
+
/** FilterDrawer 組件 */
|
|
821
|
+
FilterDrawer: typeof FilterDrawer
|
|
776
822
|
/** BaseDialog 組件 */
|
|
777
823
|
BaseDialog: typeof BaseDialog
|
|
778
824
|
/** TransferDialog 組件 */
|
|
@@ -803,6 +849,7 @@ declare module '@vue/runtime-core' {
|
|
|
803
849
|
SortTable: typeof SortTable
|
|
804
850
|
BaseBtn: typeof BaseBtn
|
|
805
851
|
FilterBtn: typeof FilterBtn
|
|
852
|
+
FilterDrawer: typeof FilterDrawer
|
|
806
853
|
BaseDialog: typeof BaseDialog
|
|
807
854
|
TransferDialog: typeof TransferDialog
|
|
808
855
|
BaseInput: typeof BaseInput
|