rayyy-vue-table-components 1.3.4 → 1.3.5

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.
@@ -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 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, PluginOptions, VueTableComponentsPlugin } from '../types/components.d';
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
+ };
@@ -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
  };
@@ -472,6 +472,62 @@ export interface MainPanelInstance {
472
472
  $emit: MainPanelEmits
473
473
  }
474
474
 
475
+ // ==================== DetailLayout 組件類型 ====================
476
+
477
+ /** DetailLayout 組件 Props 類型 */
478
+ export interface DetailLayoutProps {
479
+ /** 標題 */
480
+ title: string
481
+ /** 是否顯示返回按鈕 */
482
+ showBack?: boolean | string | object
483
+ /** 是否可編輯 */
484
+ isEditable: boolean
485
+ /** 頁面加載狀態 */
486
+ pageLoading?: boolean
487
+ }
488
+
489
+ /** DetailLayout 組件 Emits 類型 */
490
+ export interface DetailLayoutEmits {
491
+ /** 保存編輯事件 */
492
+ (e: 'update:saveEdit', value: boolean): void
493
+ /** 取消編輯事件 */
494
+ (e: 'update:cancelEdit'): void
495
+ }
496
+
497
+ /** DetailLayout 組件實例類型 */
498
+ export interface DetailLayoutInstance {
499
+ /** 組件 Props */
500
+ $props: DetailLayoutProps
501
+ /** 組件 Emits */
502
+ $emit: DetailLayoutEmits
503
+ }
504
+
505
+ // ==================== FilterLayout 組件類型 ====================
506
+
507
+ /** FilterLayout 組件 Props 類型 */
508
+ export interface FilterLayoutProps {
509
+ /** 主要標題 */
510
+ mainTitle: string
511
+ /** 篩選標題 */
512
+ filterTitle: string
513
+ }
514
+
515
+ /** FilterLayout 組件 Emits 類型 */
516
+ export interface FilterLayoutEmits {
517
+ /** 提交篩選事件 */
518
+ (e: 'submitEmit'): void
519
+ /** 重置篩選事件 */
520
+ (e: 'resetEmit'): void
521
+ }
522
+
523
+ /** FilterLayout 組件實例類型 */
524
+ export interface FilterLayoutInstance {
525
+ /** 組件 Props */
526
+ $props: FilterLayoutProps
527
+ /** 組件 Emits */
528
+ $emit: FilterLayoutEmits
529
+ }
530
+
475
531
  // ==================== 轉移相關組件類型 ====================
476
532
 
477
533
  // ==================== TransferItem 組件類型 ====================
@@ -704,6 +760,38 @@ export declare const MainPanel: DefineComponent<
704
760
  install: (app: App) => void
705
761
  }
706
762
 
763
+ /** DetailLayout 組件定義 */
764
+ export declare const DetailLayout: DefineComponent<
765
+ DetailLayoutProps,
766
+ {},
767
+ {},
768
+ {},
769
+ {},
770
+ {},
771
+ {},
772
+ {},
773
+ DetailLayoutEmits
774
+ > & {
775
+ /** 安裝方法 */
776
+ install: (app: App) => void
777
+ }
778
+
779
+ /** FilterLayout 組件定義 */
780
+ export declare const FilterLayout: DefineComponent<
781
+ FilterLayoutProps,
782
+ {},
783
+ {},
784
+ {},
785
+ {},
786
+ {},
787
+ {},
788
+ {},
789
+ FilterLayoutEmits
790
+ > & {
791
+ /** 安裝方法 */
792
+ install: (app: App) => void
793
+ }
794
+
707
795
  /** TransferItem 組件定義 */
708
796
  export declare const TransferItem: DefineComponent<
709
797
  TransferItemProps<any>,
@@ -758,6 +846,10 @@ export interface VueTableComponentsPlugin {
758
846
  FunctionHeader: typeof FunctionHeader
759
847
  /** MainPanel 組件 */
760
848
  MainPanel: typeof MainPanel
849
+ /** DetailLayout 組件 */
850
+ DetailLayout: typeof DetailLayout
851
+ /** FilterLayout 組件 */
852
+ FilterLayout: typeof FilterLayout
761
853
  /** TransferItem 組件 */
762
854
  TransferItem: typeof TransferItem
763
855
  }
@@ -778,6 +870,8 @@ declare module '@vue/runtime-core' {
778
870
  SearchableListPanel: typeof SearchableListPanel
779
871
  FunctionHeader: typeof FunctionHeader
780
872
  MainPanel: typeof MainPanel
873
+ DetailLayout: typeof DetailLayout
874
+ FilterLayout: typeof FilterLayout
781
875
  TransferItem: typeof TransferItem
782
876
  }
783
877
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -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>
@@ -473,6 +473,62 @@ export interface MainPanelInstance {
473
473
  $emit: MainPanelEmits
474
474
  }
475
475
 
476
+ // ==================== DetailLayout 組件類型 ====================
477
+
478
+ /** DetailLayout 組件 Props 類型 */
479
+ export interface DetailLayoutProps {
480
+ /** 標題 */
481
+ title: string
482
+ /** 是否顯示返回按鈕 */
483
+ showBack?: boolean | string | object
484
+ /** 是否可編輯 */
485
+ isEditable: boolean
486
+ /** 頁面加載狀態 */
487
+ pageLoading?: boolean
488
+ }
489
+
490
+ /** DetailLayout 組件 Emits 類型 */
491
+ export interface DetailLayoutEmits {
492
+ /** 保存編輯事件 */
493
+ (e: 'update:saveEdit', value: boolean): void
494
+ /** 取消編輯事件 */
495
+ (e: 'update:cancelEdit'): void
496
+ }
497
+
498
+ /** DetailLayout 組件實例類型 */
499
+ export interface DetailLayoutInstance {
500
+ /** 組件 Props */
501
+ $props: DetailLayoutProps
502
+ /** 組件 Emits */
503
+ $emit: DetailLayoutEmits
504
+ }
505
+
506
+ // ==================== FilterLayout 組件類型 ====================
507
+
508
+ /** FilterLayout 組件 Props 類型 */
509
+ export interface FilterLayoutProps {
510
+ /** 主要標題 */
511
+ mainTitle: string
512
+ /** 篩選標題 */
513
+ filterTitle: string
514
+ }
515
+
516
+ /** FilterLayout 組件 Emits 類型 */
517
+ export interface FilterLayoutEmits {
518
+ /** 提交篩選事件 */
519
+ (e: 'submitEmit'): void
520
+ /** 重置篩選事件 */
521
+ (e: 'resetEmit'): void
522
+ }
523
+
524
+ /** FilterLayout 組件實例類型 */
525
+ export interface FilterLayoutInstance {
526
+ /** 組件 Props */
527
+ $props: FilterLayoutProps
528
+ /** 組件 Emits */
529
+ $emit: FilterLayoutEmits
530
+ }
531
+
476
532
  // ==================== 轉移相關組件類型 ====================
477
533
 
478
534
  // ==================== TransferItem 組件類型 ====================
@@ -705,6 +761,38 @@ export declare const MainPanel: DefineComponent<
705
761
  install: (app: App) => void
706
762
  }
707
763
 
764
+ /** DetailLayout 組件定義 */
765
+ export declare const DetailLayout: DefineComponent<
766
+ DetailLayoutProps,
767
+ {},
768
+ {},
769
+ {},
770
+ {},
771
+ {},
772
+ {},
773
+ {},
774
+ DetailLayoutEmits
775
+ > & {
776
+ /** 安裝方法 */
777
+ install: (app: App) => void
778
+ }
779
+
780
+ /** FilterLayout 組件定義 */
781
+ export declare const FilterLayout: DefineComponent<
782
+ FilterLayoutProps,
783
+ {},
784
+ {},
785
+ {},
786
+ {},
787
+ {},
788
+ {},
789
+ {},
790
+ FilterLayoutEmits
791
+ > & {
792
+ /** 安裝方法 */
793
+ install: (app: App) => void
794
+ }
795
+
708
796
  /** TransferItem 組件定義 */
709
797
  export declare const TransferItem: DefineComponent<
710
798
  TransferItemProps<any>,
@@ -759,6 +847,10 @@ export interface VueTableComponentsPlugin {
759
847
  FunctionHeader: typeof FunctionHeader
760
848
  /** MainPanel 組件 */
761
849
  MainPanel: typeof MainPanel
850
+ /** DetailLayout 組件 */
851
+ DetailLayout: typeof DetailLayout
852
+ /** FilterLayout 組件 */
853
+ FilterLayout: typeof FilterLayout
762
854
  /** TransferItem 組件 */
763
855
  TransferItem: typeof TransferItem
764
856
  }
@@ -779,6 +871,8 @@ declare module '@vue/runtime-core' {
779
871
  SearchableListPanel: typeof SearchableListPanel
780
872
  FunctionHeader: typeof FunctionHeader
781
873
  MainPanel: typeof MainPanel
874
+ DetailLayout: typeof DetailLayout
875
+ FilterLayout: typeof FilterLayout
782
876
  TransferItem: typeof TransferItem
783
877
  }
784
878
  }