rayyy-vue-table-components 1.3.32 → 1.4.0
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 +10401 -15108
- package/dist/index.umd.js +20 -41
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/form/BaseMultipleInput.vue.d.ts +549 -0
- package/dist/src/components/index.d.ts +3 -2
- package/dist/src/components/items/BaseDialog.vue.d.ts +1 -0
- package/dist/src/components/items/BaseWaringDialog.vue.d.ts +4 -1
- package/dist/src/components/items/SearchBar.vue.d.ts +2 -0
- package/dist/src/components/layout/SearchableListPanel.vue.d.ts +4 -1
- package/dist/src/const/tableConst.d.ts +51 -0
- package/dist/src/index.d.ts +1 -12
- package/dist/src/router/constants.d.ts +2 -2
- package/dist/src/types/components.d.ts +6 -47
- package/dist/src/{components/LanguageSwitcher.vue.d.ts → views/demo/BaseMultipleInputDemo.vue.d.ts} +1 -1
- package/package.json +2 -6
- package/src/components/form/BaseMultipleInput.vue +112 -0
- package/src/components/form/BaseSelector.vue +62 -0
- package/src/components/index.ts +3 -2
- package/src/components/items/BaseDialog.vue +12 -11
- package/src/components/items/BaseWaringDialog.vue +13 -10
- package/src/components/items/SearchBar.vue +6 -4
- package/src/components/layout/DetailLayout.vue +4 -7
- package/src/components/layout/FilterLayout.vue +2 -5
- package/src/components/layout/FunctionHeader.vue +0 -1
- package/src/components/layout/SearchableListPanel.vue +15 -9
- package/src/components/tables/BaseTable.vue +3 -6
- package/src/components/tables/SortTable.vue +3 -2
- package/src/components/tables/TitleTable.vue +2 -1
- package/src/types/components.d.ts +6 -47
- package/dist/src/locales/en-US.json.d.ts +0 -39
- package/dist/src/locales/zh-TW.json.d.ts +0 -39
- package/dist/src/plugins/i18n.d.ts +0 -504
- package/dist/src/utils/languageSwitcher.d.ts +0 -49
- package/dist/src/views/demo/I18nDemo.vue.d.ts +0 -2
- package/src/components/LanguageSwitcher.vue +0 -53
- package/src/utils/languageSwitcher.ts +0 -145
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends Record<string, unknown> = Record<string, unknown>">
|
|
2
2
|
import type { VNode } from 'vue'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
-
import { useI18n } from 'vue-i18n'
|
|
5
4
|
import type { TableColumnCtx } from 'element-plus'
|
|
6
5
|
import type { SortChangValue, TableColumn } from '@/types'
|
|
7
6
|
|
|
8
|
-
const { t } = useI18n()
|
|
9
|
-
|
|
10
7
|
type Props<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
11
8
|
loading?: boolean
|
|
12
9
|
data: T[]
|
|
@@ -82,7 +79,7 @@ const operatorWidth = computed(() => {
|
|
|
82
79
|
<template>
|
|
83
80
|
<el-table
|
|
84
81
|
v-loading="loading"
|
|
85
|
-
|
|
82
|
+
element-loading-text="數據加載中..."
|
|
86
83
|
:data="data"
|
|
87
84
|
border
|
|
88
85
|
:show-summary="showSummary"
|
|
@@ -130,7 +127,7 @@ const operatorWidth = computed(() => {
|
|
|
130
127
|
@click="handleOperateClick(row, 'check')"
|
|
131
128
|
v-if="showCheckBtn"
|
|
132
129
|
>
|
|
133
|
-
|
|
130
|
+
查看
|
|
134
131
|
</p>
|
|
135
132
|
<el-divider direction="vertical" class="!mx-2" v-if="showCheckBtn && showEditBtn" />
|
|
136
133
|
<p
|
|
@@ -138,7 +135,7 @@ const operatorWidth = computed(() => {
|
|
|
138
135
|
@click="handleOperateClick(row, 'edit')"
|
|
139
136
|
v-if="showEditBtn"
|
|
140
137
|
>
|
|
141
|
-
|
|
138
|
+
編輯
|
|
142
139
|
</p>
|
|
143
140
|
</div>
|
|
144
141
|
</template>
|
|
@@ -69,13 +69,14 @@ const handleEditClick = (row: T) => {
|
|
|
69
69
|
</div>
|
|
70
70
|
|
|
71
71
|
<base-table
|
|
72
|
-
|
|
72
|
+
v-loading="loading"
|
|
73
|
+
element-loading-text="數據加載中..."
|
|
73
74
|
:data="data"
|
|
74
75
|
:columns="columns"
|
|
75
|
-
:show-selection="showSelection"
|
|
76
76
|
:show-summary="showSummary"
|
|
77
77
|
:show-over-flow-tooltip="showOverFlowTooltip"
|
|
78
78
|
:summary-method="summaryMethod"
|
|
79
|
+
:show-selection="showSelection"
|
|
79
80
|
:base-table-row-class-name="sortTableRowClassName"
|
|
80
81
|
:show-check-btn="showCheckBtn"
|
|
81
82
|
:show-edit-btn="showEditBtn"
|
|
@@ -239,6 +239,8 @@ export interface BaseDialogProps {
|
|
|
239
239
|
bodyLoading?: boolean
|
|
240
240
|
/** 提交按鈕加載狀態 */
|
|
241
241
|
submitLoading?: boolean
|
|
242
|
+
/** 是否顯示關閉按鈕 */
|
|
243
|
+
showClose?: boolean
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
/** BaseDialog 組件 Emits 類型 */
|
|
@@ -410,6 +412,8 @@ export interface SearchBarEmits {
|
|
|
410
412
|
(e: 'keydown:enter', data: string): void
|
|
411
413
|
/** 清除事件 */
|
|
412
414
|
(e: 'update:clear'): void
|
|
415
|
+
/** 重置篩選事件 */
|
|
416
|
+
(e: 'update:resetFilter'): void
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
/** SearchBar 組件實例類型 */
|
|
@@ -446,6 +450,8 @@ export interface SearchableListPanelProps {
|
|
|
446
450
|
showFilter?: boolean
|
|
447
451
|
/** 是否顯示預設搜尋 */
|
|
448
452
|
showDefaultSearch?: boolean
|
|
453
|
+
/** 分頁大小選項列表 */
|
|
454
|
+
pageSizeList?: number[]
|
|
449
455
|
}
|
|
450
456
|
|
|
451
457
|
/** SearchableListPanel 組件 Emits 類型 */
|
|
@@ -638,34 +644,6 @@ export interface TransferItemInstance {
|
|
|
638
644
|
$emit: TransferItemEmits
|
|
639
645
|
}
|
|
640
646
|
|
|
641
|
-
// ==================== 語言切換相關組件類型 ====================
|
|
642
|
-
|
|
643
|
-
// ==================== LanguageSwitcher 組件類型 ====================
|
|
644
|
-
|
|
645
|
-
/** LanguageSwitcher 組件 Props 類型 */
|
|
646
|
-
export interface LanguageSwitcherProps {
|
|
647
|
-
/** 是否顯示語言名稱 */
|
|
648
|
-
showLabel?: boolean
|
|
649
|
-
/** 自定義 CSS 類名 */
|
|
650
|
-
class?: string
|
|
651
|
-
/** 是否禁用 */
|
|
652
|
-
disabled?: boolean
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/** LanguageSwitcher 組件 Emits 類型 */
|
|
656
|
-
export interface LanguageSwitcherEmits {
|
|
657
|
-
/** 語言變更事件 */
|
|
658
|
-
(e: 'change', locale: string): void
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/** LanguageSwitcher 組件實例類型 */
|
|
662
|
-
export interface LanguageSwitcherInstance {
|
|
663
|
-
/** 組件 Props */
|
|
664
|
-
$props: LanguageSwitcherProps
|
|
665
|
-
/** 組件 Emits */
|
|
666
|
-
$emit: LanguageSwitcherEmits
|
|
667
|
-
}
|
|
668
|
-
|
|
669
647
|
// ==================== 組件定義類型 ====================
|
|
670
648
|
|
|
671
649
|
/** BaseTable 組件定義 */
|
|
@@ -925,22 +903,6 @@ export declare const TransferItem: DefineComponent<
|
|
|
925
903
|
install: (app: App) => void
|
|
926
904
|
}
|
|
927
905
|
|
|
928
|
-
/** LanguageSwitcher 組件定義 */
|
|
929
|
-
export declare const LanguageSwitcher: DefineComponent<
|
|
930
|
-
LanguageSwitcherProps,
|
|
931
|
-
{},
|
|
932
|
-
{},
|
|
933
|
-
{},
|
|
934
|
-
{},
|
|
935
|
-
{},
|
|
936
|
-
{},
|
|
937
|
-
{},
|
|
938
|
-
LanguageSwitcherEmits
|
|
939
|
-
> & {
|
|
940
|
-
/** 安裝方法 */
|
|
941
|
-
install: (app: App) => void
|
|
942
|
-
}
|
|
943
|
-
|
|
944
906
|
// ==================== 插件類型 ====================
|
|
945
907
|
|
|
946
908
|
/** 插件安裝選項 */
|
|
@@ -987,8 +949,6 @@ export interface VueTableComponentsPlugin {
|
|
|
987
949
|
FilterLayout: typeof FilterLayout
|
|
988
950
|
/** TransferItem 組件 */
|
|
989
951
|
TransferItem: typeof TransferItem
|
|
990
|
-
/** LanguageSwitcher 組件 */
|
|
991
|
-
LanguageSwitcher: typeof LanguageSwitcher
|
|
992
952
|
}
|
|
993
953
|
|
|
994
954
|
// ==================== 全局類型擴展 ====================
|
|
@@ -1011,6 +971,5 @@ declare module '@vue/runtime-core' {
|
|
|
1011
971
|
DetailLayout: typeof DetailLayout
|
|
1012
972
|
FilterLayout: typeof FilterLayout
|
|
1013
973
|
TransferItem: typeof TransferItem
|
|
1014
|
-
LanguageSwitcher: typeof LanguageSwitcher
|
|
1015
974
|
}
|
|
1016
975
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"common.select": "Please select",
|
|
3
|
-
"common.confirm": "Confirm",
|
|
4
|
-
"common.cancel": "Cancel",
|
|
5
|
-
"dialog.confirmRemoveUser": "Are you sure you want to remove this user?",
|
|
6
|
-
"common.warning": "Warning",
|
|
7
|
-
"search.placeholder": "Please enter keywords to search the list",
|
|
8
|
-
"common.execute": "Execute",
|
|
9
|
-
"common.reset": "Reset",
|
|
10
|
-
"common.loading": "Data loading",
|
|
11
|
-
"common.view": "View",
|
|
12
|
-
"common.edit": "Edit",
|
|
13
|
-
"common.column": "Column",
|
|
14
|
-
"common.back": " Back",
|
|
15
|
-
"demo.componentDemo": "Component Demo",
|
|
16
|
-
"button.title": "Button",
|
|
17
|
-
"button.primary ": "Primary",
|
|
18
|
-
"button.default": "Default",
|
|
19
|
-
"button.danger": "Danger",
|
|
20
|
-
"button.success": "Success",
|
|
21
|
-
"button.warning": "Warning",
|
|
22
|
-
"button.info": "Info",
|
|
23
|
-
"button.style": "Style",
|
|
24
|
-
"button.size": "Size",
|
|
25
|
-
"button.small": "Small",
|
|
26
|
-
"button.medium": "Medium",
|
|
27
|
-
"button.large ": "Large",
|
|
28
|
-
"status.title": "Status",
|
|
29
|
-
"status.normal ": "Normal",
|
|
30
|
-
"status.loading": "Loading",
|
|
31
|
-
"status.disabled": "Disabled",
|
|
32
|
-
"button.withIcon ": "With Icon",
|
|
33
|
-
"button.add": "Add",
|
|
34
|
-
"button.delete": "Delete",
|
|
35
|
-
"common.save": "Save",
|
|
36
|
-
"common.discard": "Discard"
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"common.select": "請選擇",
|
|
3
|
-
"common.confirm": "確定",
|
|
4
|
-
"common.cancel": "取消",
|
|
5
|
-
"dialog.confirmRemoveUser": "請問是否確認移除該使用者",
|
|
6
|
-
"common.warning": "警告",
|
|
7
|
-
"search.placeholder": "請輸入關鍵字搜尋列表",
|
|
8
|
-
"common.execute": "執行",
|
|
9
|
-
"common.reset": "重設",
|
|
10
|
-
"common.loading": "數據加載中",
|
|
11
|
-
"common.view": "查看",
|
|
12
|
-
"common.edit": "編輯",
|
|
13
|
-
"common.column": "欄",
|
|
14
|
-
"common.back": "回到前一頁",
|
|
15
|
-
"demo.componentDemo": "組件示範",
|
|
16
|
-
"button.title": "按鈕",
|
|
17
|
-
"button.primary ": "主要",
|
|
18
|
-
"button.default": "默認",
|
|
19
|
-
"button.danger": "危險",
|
|
20
|
-
"button.success": "成功",
|
|
21
|
-
"button.warning": "警告",
|
|
22
|
-
"button.info": "信息",
|
|
23
|
-
"button.style": "樣式",
|
|
24
|
-
"button.size": "尺寸",
|
|
25
|
-
"button.small": "小",
|
|
26
|
-
"button.medium": "中",
|
|
27
|
-
"button.large ": "大",
|
|
28
|
-
"status.title": "狀態",
|
|
29
|
-
"status.normal ": "正常",
|
|
30
|
-
"status.loading": "載入中",
|
|
31
|
-
"status.disabled": "禁用",
|
|
32
|
-
"button.withIcon ": "帶圖標的",
|
|
33
|
-
"button.add": "添加",
|
|
34
|
-
"button.delete": "刪除",
|
|
35
|
-
"common.save": "儲存",
|
|
36
|
-
"common.discard": "捨棄"
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default _default;
|