rayyy-vue-table-components 1.3.4 → 1.3.6
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 +4996 -4895
- package/dist/index.umd.js +12 -12
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/index.d.ts +5 -1
- package/dist/src/components/layout/DetailLayout.vue.d.ts +30 -0
- package/dist/src/components/layout/FilterLayout.vue.d.ts +27 -0
- package/dist/src/components/tables/TitleTable.vue.d.ts +3 -0
- package/dist/src/router/constants.d.ts +4 -0
- package/dist/src/types/components.d.ts +100 -0
- package/dist/src/views/demo/DetailLayoutDemo.vue.d.ts +2 -0
- package/dist/src/views/demo/FilterLayoutDemo.vue.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/index.ts +12 -0
- package/src/components/layout/FilterLayout.vue +53 -0
- package/src/components/tables/TitleTable.vue +12 -6
- package/src/types/components.d.ts +100 -0
|
@@ -11,7 +11,9 @@ export { default as TransferItem } from './transfer/transferItem.vue';
|
|
|
11
11
|
export { default as FunctionHeader } from './layout/FunctionHeader.vue';
|
|
12
12
|
export { default as MainPanel } from './layout/MainPanel.vue';
|
|
13
13
|
export { default as SearchableListPanel } from './layout/SearchableListPanel.vue';
|
|
14
|
-
export
|
|
14
|
+
export { default as DetailLayout } from './layout/DetailLayout.vue';
|
|
15
|
+
export { default as FilterLayout } from './layout/FilterLayout.vue';
|
|
16
|
+
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseInputProps, BaseInputEmits, BaseInputInstance, SortTableProps, SortTableEmits, SortTableInstance, TitleTableProps, TitleTableEmits, TitleTableInstance, SearchBarProps, SearchBarEmits, SearchBarInstance, SearchBarSlots, TransferDialogProps, TransferDialogEmits, TransferDialogInstance, TransferItemProps, TransferItemEmits, TransferItemInstance, MainPanelProps, MainPanelEmits, MainPanelInstance, SearchableListPanelProps, SearchableListPanelEmits, SearchableListPanelInstance, SearchableListPanelSlots, FunctionHeaderProps, FunctionHeaderEmits, FunctionHeaderInstance, DetailLayoutProps, DetailLayoutEmits, DetailLayoutInstance, FilterLayoutProps, FilterLayoutEmits, FilterLayoutInstance, PluginOptions, VueTableComponentsPlugin } from '../types/components.d';
|
|
15
17
|
export type { default as BaseTableType } from './tables/BaseTable.vue';
|
|
16
18
|
export type { default as BaseBtnType } from './items/BaseBtn.vue';
|
|
17
19
|
export type { default as BaseInputType } from './form/BaseInput.vue';
|
|
@@ -25,3 +27,5 @@ export type { default as SearchableListPanelType } from './layout/SearchableList
|
|
|
25
27
|
export type { default as BaseMultipleInputType } from './form/BaseMultipleInput.vue';
|
|
26
28
|
export type { default as FunctionHeaderType } from './layout/FunctionHeader.vue';
|
|
27
29
|
export type { default as MainPanelType } from './layout/MainPanel.vue';
|
|
30
|
+
export type { default as DetailLayoutType } from './layout/DetailLayout.vue';
|
|
31
|
+
export type { default as FilterLayoutType } from './layout/FilterLayout.vue';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
showBack?: boolean | string | object;
|
|
4
|
+
isEditable: boolean;
|
|
5
|
+
pageLoading?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
detailHeader?(_: {}): any;
|
|
11
|
+
main?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
18
|
+
"update:saveEdit": (value: boolean) => any;
|
|
19
|
+
"update:cancelEdit": () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
"onUpdate:saveEdit"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
"onUpdate:cancelEdit"?: (() => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
mainTitle: string;
|
|
3
|
+
filterTitle: 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
|
+
submitEmit: () => any;
|
|
16
|
+
resetEmit: () => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onSubmitEmit?: (() => any) | undefined;
|
|
19
|
+
onResetEmit?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -12,7 +12,10 @@ declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNull
|
|
|
12
12
|
data: T[];
|
|
13
13
|
columns: TableColumn<T>[];
|
|
14
14
|
tableTitle?: string;
|
|
15
|
+
propIsEditable?: boolean;
|
|
15
16
|
showSelection?: boolean;
|
|
17
|
+
onlyDelete?: boolean;
|
|
18
|
+
showDelete?: boolean;
|
|
16
19
|
loading?: boolean;
|
|
17
20
|
showSummary?: boolean;
|
|
18
21
|
showOverFlowTooltip?: boolean;
|
|
@@ -16,6 +16,8 @@ export declare const ROUTES: {
|
|
|
16
16
|
readonly SEARCH_BAR: "/demo/search-bar";
|
|
17
17
|
readonly FUNCTION_HEADER: "/demo/function-header";
|
|
18
18
|
readonly MAIN_PANEL: "/demo/main-panel";
|
|
19
|
+
readonly DETAIL_LAYOUT: "/demo/detail-layout";
|
|
20
|
+
readonly FILTER_LAYOUT: "/demo/filter-layout";
|
|
19
21
|
readonly NOT_FOUND: "/:catchAll(.*)";
|
|
20
22
|
};
|
|
21
23
|
export declare const ROUTE_NAMES: {
|
|
@@ -35,5 +37,7 @@ export declare const ROUTE_NAMES: {
|
|
|
35
37
|
readonly SEARCH_BAR: "SearchBar";
|
|
36
38
|
readonly FUNCTION_HEADER: "FunctionHeader";
|
|
37
39
|
readonly MAIN_PANEL: "MainPanel";
|
|
40
|
+
readonly DETAIL_LAYOUT: "DetailLayout";
|
|
41
|
+
readonly FILTER_LAYOUT: "FilterLayout";
|
|
38
42
|
readonly NOT_FOUND: "NotFoundPage";
|
|
39
43
|
};
|
|
@@ -102,8 +102,14 @@ export interface TitleTableProps<T extends Record<string, unknown> = Record<stri
|
|
|
102
102
|
columns: import('./index').TableColumn<T>[]
|
|
103
103
|
/** 表格標題 */
|
|
104
104
|
tableTitle?: string
|
|
105
|
+
/** 是否可編輯(顯示新增/刪除按鈕) */
|
|
106
|
+
propIsEditable?: boolean
|
|
105
107
|
/** 是否顯示選擇列 */
|
|
106
108
|
showSelection?: boolean
|
|
109
|
+
/** 是否只顯示刪除按鈕(隱藏新增按鈕) */
|
|
110
|
+
onlyDelete?: boolean
|
|
111
|
+
/** 是否顯示刪除按鈕 */
|
|
112
|
+
showDelete?: boolean
|
|
107
113
|
/** 是否顯示加載狀態 */
|
|
108
114
|
loading?: boolean
|
|
109
115
|
/** 是否顯示匯總行 */
|
|
@@ -472,6 +478,62 @@ export interface MainPanelInstance {
|
|
|
472
478
|
$emit: MainPanelEmits
|
|
473
479
|
}
|
|
474
480
|
|
|
481
|
+
// ==================== DetailLayout 組件類型 ====================
|
|
482
|
+
|
|
483
|
+
/** DetailLayout 組件 Props 類型 */
|
|
484
|
+
export interface DetailLayoutProps {
|
|
485
|
+
/** 標題 */
|
|
486
|
+
title: string
|
|
487
|
+
/** 是否顯示返回按鈕 */
|
|
488
|
+
showBack?: boolean | string | object
|
|
489
|
+
/** 是否可編輯 */
|
|
490
|
+
isEditable: boolean
|
|
491
|
+
/** 頁面加載狀態 */
|
|
492
|
+
pageLoading?: boolean
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/** DetailLayout 組件 Emits 類型 */
|
|
496
|
+
export interface DetailLayoutEmits {
|
|
497
|
+
/** 保存編輯事件 */
|
|
498
|
+
(e: 'update:saveEdit', value: boolean): void
|
|
499
|
+
/** 取消編輯事件 */
|
|
500
|
+
(e: 'update:cancelEdit'): void
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/** DetailLayout 組件實例類型 */
|
|
504
|
+
export interface DetailLayoutInstance {
|
|
505
|
+
/** 組件 Props */
|
|
506
|
+
$props: DetailLayoutProps
|
|
507
|
+
/** 組件 Emits */
|
|
508
|
+
$emit: DetailLayoutEmits
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// ==================== FilterLayout 組件類型 ====================
|
|
512
|
+
|
|
513
|
+
/** FilterLayout 組件 Props 類型 */
|
|
514
|
+
export interface FilterLayoutProps {
|
|
515
|
+
/** 主要標題 */
|
|
516
|
+
mainTitle: string
|
|
517
|
+
/** 篩選標題 */
|
|
518
|
+
filterTitle: string
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/** FilterLayout 組件 Emits 類型 */
|
|
522
|
+
export interface FilterLayoutEmits {
|
|
523
|
+
/** 提交篩選事件 */
|
|
524
|
+
(e: 'submitEmit'): void
|
|
525
|
+
/** 重置篩選事件 */
|
|
526
|
+
(e: 'resetEmit'): void
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/** FilterLayout 組件實例類型 */
|
|
530
|
+
export interface FilterLayoutInstance {
|
|
531
|
+
/** 組件 Props */
|
|
532
|
+
$props: FilterLayoutProps
|
|
533
|
+
/** 組件 Emits */
|
|
534
|
+
$emit: FilterLayoutEmits
|
|
535
|
+
}
|
|
536
|
+
|
|
475
537
|
// ==================== 轉移相關組件類型 ====================
|
|
476
538
|
|
|
477
539
|
// ==================== TransferItem 組件類型 ====================
|
|
@@ -704,6 +766,38 @@ export declare const MainPanel: DefineComponent<
|
|
|
704
766
|
install: (app: App) => void
|
|
705
767
|
}
|
|
706
768
|
|
|
769
|
+
/** DetailLayout 組件定義 */
|
|
770
|
+
export declare const DetailLayout: DefineComponent<
|
|
771
|
+
DetailLayoutProps,
|
|
772
|
+
{},
|
|
773
|
+
{},
|
|
774
|
+
{},
|
|
775
|
+
{},
|
|
776
|
+
{},
|
|
777
|
+
{},
|
|
778
|
+
{},
|
|
779
|
+
DetailLayoutEmits
|
|
780
|
+
> & {
|
|
781
|
+
/** 安裝方法 */
|
|
782
|
+
install: (app: App) => void
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** FilterLayout 組件定義 */
|
|
786
|
+
export declare const FilterLayout: DefineComponent<
|
|
787
|
+
FilterLayoutProps,
|
|
788
|
+
{},
|
|
789
|
+
{},
|
|
790
|
+
{},
|
|
791
|
+
{},
|
|
792
|
+
{},
|
|
793
|
+
{},
|
|
794
|
+
{},
|
|
795
|
+
FilterLayoutEmits
|
|
796
|
+
> & {
|
|
797
|
+
/** 安裝方法 */
|
|
798
|
+
install: (app: App) => void
|
|
799
|
+
}
|
|
800
|
+
|
|
707
801
|
/** TransferItem 組件定義 */
|
|
708
802
|
export declare const TransferItem: DefineComponent<
|
|
709
803
|
TransferItemProps<any>,
|
|
@@ -758,6 +852,10 @@ export interface VueTableComponentsPlugin {
|
|
|
758
852
|
FunctionHeader: typeof FunctionHeader
|
|
759
853
|
/** MainPanel 組件 */
|
|
760
854
|
MainPanel: typeof MainPanel
|
|
855
|
+
/** DetailLayout 組件 */
|
|
856
|
+
DetailLayout: typeof DetailLayout
|
|
857
|
+
/** FilterLayout 組件 */
|
|
858
|
+
FilterLayout: typeof FilterLayout
|
|
761
859
|
/** TransferItem 組件 */
|
|
762
860
|
TransferItem: typeof TransferItem
|
|
763
861
|
}
|
|
@@ -778,6 +876,8 @@ declare module '@vue/runtime-core' {
|
|
|
778
876
|
SearchableListPanel: typeof SearchableListPanel
|
|
779
877
|
FunctionHeader: typeof FunctionHeader
|
|
780
878
|
MainPanel: typeof MainPanel
|
|
879
|
+
DetailLayout: typeof DetailLayout
|
|
880
|
+
FilterLayout: typeof FilterLayout
|
|
781
881
|
TransferItem: typeof TransferItem
|
|
782
882
|
}
|
|
783
883
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { default as TransferItem } from './transfer/transferItem.vue'
|
|
|
12
12
|
export { default as FunctionHeader } from './layout/FunctionHeader.vue'
|
|
13
13
|
export { default as MainPanel } from './layout/MainPanel.vue'
|
|
14
14
|
export { default as SearchableListPanel } from './layout/SearchableListPanel.vue'
|
|
15
|
+
export { default as DetailLayout } from './layout/DetailLayout.vue'
|
|
16
|
+
export { default as FilterLayout } from './layout/FilterLayout.vue'
|
|
15
17
|
|
|
16
18
|
// 導出組件類型
|
|
17
19
|
export type {
|
|
@@ -65,6 +67,14 @@ export type {
|
|
|
65
67
|
FunctionHeaderProps,
|
|
66
68
|
FunctionHeaderEmits,
|
|
67
69
|
FunctionHeaderInstance,
|
|
70
|
+
// DetailLayout 組件類型
|
|
71
|
+
DetailLayoutProps,
|
|
72
|
+
DetailLayoutEmits,
|
|
73
|
+
DetailLayoutInstance,
|
|
74
|
+
// FilterLayout 組件類型
|
|
75
|
+
FilterLayoutProps,
|
|
76
|
+
FilterLayoutEmits,
|
|
77
|
+
FilterLayoutInstance,
|
|
68
78
|
// 插件類型
|
|
69
79
|
PluginOptions,
|
|
70
80
|
VueTableComponentsPlugin
|
|
@@ -84,3 +94,5 @@ export type { default as SearchableListPanelType } from './layout/SearchableList
|
|
|
84
94
|
export type { default as BaseMultipleInputType } from './form/BaseMultipleInput.vue'
|
|
85
95
|
export type { default as FunctionHeaderType } from './layout/FunctionHeader.vue'
|
|
86
96
|
export type { default as MainPanelType } from './layout/MainPanel.vue'
|
|
97
|
+
export type { default as DetailLayoutType } from './layout/DetailLayout.vue'
|
|
98
|
+
export type { default as FilterLayoutType } from './layout/FilterLayout.vue'
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { MainPanel, BaseBtn } from '@/components'
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
mainTitle: string
|
|
6
|
+
filterTitle: string
|
|
7
|
+
}>()
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits<{
|
|
10
|
+
(e: 'submitEmit'): void
|
|
11
|
+
(e: 'resetEmit'): void
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
const doFilter = () => {
|
|
15
|
+
emit('submitEmit')
|
|
16
|
+
}
|
|
17
|
+
const resetFilter = () => {
|
|
18
|
+
emit('resetEmit')
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<main-panel :title="mainTitle">
|
|
24
|
+
<template #main>
|
|
25
|
+
<div class="filter-container">
|
|
26
|
+
<div class="filter-header">{{ filterTitle }}</div>
|
|
27
|
+
|
|
28
|
+
<slot></slot>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<template #footer>
|
|
32
|
+
<div class="submit-row">
|
|
33
|
+
<base-btn text="執行" is-fill type="primary" @click="doFilter" />
|
|
34
|
+
<base-btn text="重設" type="primary" @click="resetFilter" />
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
</main-panel>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped>
|
|
41
|
+
.filter-container {
|
|
42
|
+
@apply w-full md:w-3/5;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.filter-header {
|
|
46
|
+
@apply px-4 py-2 font-bold border-b text-lg;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.submit-row {
|
|
50
|
+
@apply flex items-center justify-end w-full;
|
|
51
|
+
@apply pt-2 border-t;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -9,7 +9,10 @@ defineProps<{
|
|
|
9
9
|
data: T[]
|
|
10
10
|
columns: TableColumn<T>[]
|
|
11
11
|
tableTitle?: string
|
|
12
|
+
propIsEditable?: boolean
|
|
12
13
|
showSelection?: boolean
|
|
14
|
+
onlyDelete?: boolean
|
|
15
|
+
showDelete?: boolean
|
|
13
16
|
loading?: boolean
|
|
14
17
|
showSummary?: boolean
|
|
15
18
|
showOverFlowTooltip?: boolean
|
|
@@ -44,15 +47,18 @@ const handleCellClick = (column: TableColumn<T>, row: T) => {
|
|
|
44
47
|
<template>
|
|
45
48
|
<div class="w-full mb-4">
|
|
46
49
|
<!-- 表格標題區域:包含標題文本和操作按鈕 -->
|
|
47
|
-
<div
|
|
48
|
-
|
|
50
|
+
<div
|
|
51
|
+
class="flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-between"
|
|
52
|
+
v-if="tableTitle"
|
|
53
|
+
>
|
|
54
|
+
<p class="font-bold text-xl">{{ tableTitle }}</p>
|
|
49
55
|
|
|
50
56
|
<div class="flex items-center">
|
|
51
57
|
<slot name="tableSearch" />
|
|
52
58
|
|
|
53
|
-
<div class="flex items-center">
|
|
54
|
-
<BaseBtn text="新增" type="primary" @click="addInvoiceDetail" />
|
|
55
|
-
<BaseBtn text="刪除" type="primary" @click="deleteSelectRow" />
|
|
59
|
+
<div class="flex items-center" v-if="propIsEditable">
|
|
60
|
+
<BaseBtn text="新增" type="primary" @click="addInvoiceDetail" v-if="!onlyDelete" />
|
|
61
|
+
<BaseBtn text="刪除" type="primary" @click="deleteSelectRow" v-if="showDelete" />
|
|
56
62
|
</div>
|
|
57
63
|
</div>
|
|
58
64
|
</div>
|
|
@@ -65,7 +71,7 @@ const handleCellClick = (column: TableColumn<T>, row: T) => {
|
|
|
65
71
|
:columns="columns"
|
|
66
72
|
:show-summary="showSummary"
|
|
67
73
|
:summary-method="summaryMethod"
|
|
68
|
-
:show-selection="showSelection"
|
|
74
|
+
:show-selection="propIsEditable || showSelection"
|
|
69
75
|
:show-over-flow-tooltip="showOverFlowTooltip"
|
|
70
76
|
@selection-change="handleSelectionChange"
|
|
71
77
|
@cell-click="handleCellClick"
|
|
@@ -103,8 +103,14 @@ export interface TitleTableProps<T extends Record<string, unknown> = Record<stri
|
|
|
103
103
|
columns: import('./index').TableColumn<T>[]
|
|
104
104
|
/** 表格標題 */
|
|
105
105
|
tableTitle?: string
|
|
106
|
+
/** 是否可編輯(顯示新增/刪除按鈕) */
|
|
107
|
+
propIsEditable?: boolean
|
|
106
108
|
/** 是否顯示選擇列 */
|
|
107
109
|
showSelection?: boolean
|
|
110
|
+
/** 是否只顯示刪除按鈕(隱藏新增按鈕) */
|
|
111
|
+
onlyDelete?: boolean
|
|
112
|
+
/** 是否顯示刪除按鈕 */
|
|
113
|
+
showDelete?: boolean
|
|
108
114
|
/** 是否顯示加載狀態 */
|
|
109
115
|
loading?: boolean
|
|
110
116
|
/** 是否顯示匯總行 */
|
|
@@ -473,6 +479,62 @@ export interface MainPanelInstance {
|
|
|
473
479
|
$emit: MainPanelEmits
|
|
474
480
|
}
|
|
475
481
|
|
|
482
|
+
// ==================== DetailLayout 組件類型 ====================
|
|
483
|
+
|
|
484
|
+
/** DetailLayout 組件 Props 類型 */
|
|
485
|
+
export interface DetailLayoutProps {
|
|
486
|
+
/** 標題 */
|
|
487
|
+
title: string
|
|
488
|
+
/** 是否顯示返回按鈕 */
|
|
489
|
+
showBack?: boolean | string | object
|
|
490
|
+
/** 是否可編輯 */
|
|
491
|
+
isEditable: boolean
|
|
492
|
+
/** 頁面加載狀態 */
|
|
493
|
+
pageLoading?: boolean
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/** DetailLayout 組件 Emits 類型 */
|
|
497
|
+
export interface DetailLayoutEmits {
|
|
498
|
+
/** 保存編輯事件 */
|
|
499
|
+
(e: 'update:saveEdit', value: boolean): void
|
|
500
|
+
/** 取消編輯事件 */
|
|
501
|
+
(e: 'update:cancelEdit'): void
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/** DetailLayout 組件實例類型 */
|
|
505
|
+
export interface DetailLayoutInstance {
|
|
506
|
+
/** 組件 Props */
|
|
507
|
+
$props: DetailLayoutProps
|
|
508
|
+
/** 組件 Emits */
|
|
509
|
+
$emit: DetailLayoutEmits
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// ==================== FilterLayout 組件類型 ====================
|
|
513
|
+
|
|
514
|
+
/** FilterLayout 組件 Props 類型 */
|
|
515
|
+
export interface FilterLayoutProps {
|
|
516
|
+
/** 主要標題 */
|
|
517
|
+
mainTitle: string
|
|
518
|
+
/** 篩選標題 */
|
|
519
|
+
filterTitle: string
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** FilterLayout 組件 Emits 類型 */
|
|
523
|
+
export interface FilterLayoutEmits {
|
|
524
|
+
/** 提交篩選事件 */
|
|
525
|
+
(e: 'submitEmit'): void
|
|
526
|
+
/** 重置篩選事件 */
|
|
527
|
+
(e: 'resetEmit'): void
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** FilterLayout 組件實例類型 */
|
|
531
|
+
export interface FilterLayoutInstance {
|
|
532
|
+
/** 組件 Props */
|
|
533
|
+
$props: FilterLayoutProps
|
|
534
|
+
/** 組件 Emits */
|
|
535
|
+
$emit: FilterLayoutEmits
|
|
536
|
+
}
|
|
537
|
+
|
|
476
538
|
// ==================== 轉移相關組件類型 ====================
|
|
477
539
|
|
|
478
540
|
// ==================== TransferItem 組件類型 ====================
|
|
@@ -705,6 +767,38 @@ export declare const MainPanel: DefineComponent<
|
|
|
705
767
|
install: (app: App) => void
|
|
706
768
|
}
|
|
707
769
|
|
|
770
|
+
/** DetailLayout 組件定義 */
|
|
771
|
+
export declare const DetailLayout: DefineComponent<
|
|
772
|
+
DetailLayoutProps,
|
|
773
|
+
{},
|
|
774
|
+
{},
|
|
775
|
+
{},
|
|
776
|
+
{},
|
|
777
|
+
{},
|
|
778
|
+
{},
|
|
779
|
+
{},
|
|
780
|
+
DetailLayoutEmits
|
|
781
|
+
> & {
|
|
782
|
+
/** 安裝方法 */
|
|
783
|
+
install: (app: App) => void
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/** FilterLayout 組件定義 */
|
|
787
|
+
export declare const FilterLayout: DefineComponent<
|
|
788
|
+
FilterLayoutProps,
|
|
789
|
+
{},
|
|
790
|
+
{},
|
|
791
|
+
{},
|
|
792
|
+
{},
|
|
793
|
+
{},
|
|
794
|
+
{},
|
|
795
|
+
{},
|
|
796
|
+
FilterLayoutEmits
|
|
797
|
+
> & {
|
|
798
|
+
/** 安裝方法 */
|
|
799
|
+
install: (app: App) => void
|
|
800
|
+
}
|
|
801
|
+
|
|
708
802
|
/** TransferItem 組件定義 */
|
|
709
803
|
export declare const TransferItem: DefineComponent<
|
|
710
804
|
TransferItemProps<any>,
|
|
@@ -759,6 +853,10 @@ export interface VueTableComponentsPlugin {
|
|
|
759
853
|
FunctionHeader: typeof FunctionHeader
|
|
760
854
|
/** MainPanel 組件 */
|
|
761
855
|
MainPanel: typeof MainPanel
|
|
856
|
+
/** DetailLayout 組件 */
|
|
857
|
+
DetailLayout: typeof DetailLayout
|
|
858
|
+
/** FilterLayout 組件 */
|
|
859
|
+
FilterLayout: typeof FilterLayout
|
|
762
860
|
/** TransferItem 組件 */
|
|
763
861
|
TransferItem: typeof TransferItem
|
|
764
862
|
}
|
|
@@ -779,6 +877,8 @@ declare module '@vue/runtime-core' {
|
|
|
779
877
|
SearchableListPanel: typeof SearchableListPanel
|
|
780
878
|
FunctionHeader: typeof FunctionHeader
|
|
781
879
|
MainPanel: typeof MainPanel
|
|
880
|
+
DetailLayout: typeof DetailLayout
|
|
881
|
+
FilterLayout: typeof FilterLayout
|
|
782
882
|
TransferItem: typeof TransferItem
|
|
783
883
|
}
|
|
784
884
|
}
|