rayyy-vue-table-components 2.0.44 → 2.0.46
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/README.md +0 -2
- package/dist/index.es.js +1176 -1169
- package/dist/index.umd.js +2 -2
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/items/BaseWaringDialog.vue.d.ts +0 -1
- package/dist/src/components/tables/BaseTable.vue.d.ts +1 -0
- package/dist/src/types/components.d.ts +2 -7
- package/package.json +1 -1
- package/src/assets/styles/element/index.scss +1 -1
- package/src/components/items/BaseDialog.vue +2 -4
- package/src/components/items/BaseWaringDialog.vue +5 -7
- package/src/components/tables/BaseTable.vue +5 -0
- package/src/types/components.d.ts +2 -7
|
@@ -15,6 +15,7 @@ declare const _default: <T extends Record<string, unknown> = Record<string, unkn
|
|
|
15
15
|
data: T[];
|
|
16
16
|
columns: TableColumn<T>[];
|
|
17
17
|
showSelection?: boolean;
|
|
18
|
+
showIndex?: boolean;
|
|
18
19
|
showSummary?: boolean;
|
|
19
20
|
showOverFlowTooltip?: boolean;
|
|
20
21
|
summaryMethod?: ((param: {
|
|
@@ -15,6 +15,8 @@ export interface BaseTableProps<T extends Record<string, unknown> = Record<strin
|
|
|
15
15
|
columns: TableColumn<T>[]
|
|
16
16
|
/** 是否顯示選擇列 */
|
|
17
17
|
showSelection?: boolean
|
|
18
|
+
/** 是否顯示索引列 */
|
|
19
|
+
showIndex?: boolean
|
|
18
20
|
/** 是否顯示匯總行 */
|
|
19
21
|
showSummary?: boolean
|
|
20
22
|
/** 是否顯示溢出提示 */
|
|
@@ -230,8 +232,6 @@ export interface BaseDialogProps {
|
|
|
230
232
|
subTitle?: string
|
|
231
233
|
/** 關閉前回調 */
|
|
232
234
|
beforeClose?: () => void
|
|
233
|
-
/** 自定義寬度 */
|
|
234
|
-
customWidth?: string
|
|
235
235
|
/** 是否為警告對話框 */
|
|
236
236
|
isWaring?: boolean
|
|
237
237
|
/** 是否為主要對話框 */
|
|
@@ -272,8 +272,6 @@ export interface BaseWaringDialogProps {
|
|
|
272
272
|
subWaringText?: string
|
|
273
273
|
/** 標題文字 */
|
|
274
274
|
titleText?: string
|
|
275
|
-
/** 對話框寬度 */
|
|
276
|
-
modalWidth?: string
|
|
277
275
|
}
|
|
278
276
|
|
|
279
277
|
/** BaseWaringDialog 組件 Emits 類型 */
|
|
@@ -325,7 +323,6 @@ export interface TransferDialogInstance<T = Record<string, unknown>> {
|
|
|
325
323
|
$emit: TransferDialogEmits<T>
|
|
326
324
|
}
|
|
327
325
|
|
|
328
|
-
|
|
329
326
|
// ==================== BaseInput 組件類型 ====================
|
|
330
327
|
|
|
331
328
|
/** BaseInput 組件 Props 類型 */
|
|
@@ -404,7 +401,6 @@ export interface BaseSelectorInstance {
|
|
|
404
401
|
$emit: BaseSelectorEmits
|
|
405
402
|
}
|
|
406
403
|
|
|
407
|
-
|
|
408
404
|
// ==================== 搜尋相關組件類型 ====================
|
|
409
405
|
|
|
410
406
|
// ==================== SearchBar 組件類型 ====================
|
|
@@ -799,7 +795,6 @@ export declare const BaseSelector: DefineComponent<
|
|
|
799
795
|
install: (app: App) => void
|
|
800
796
|
}
|
|
801
797
|
|
|
802
|
-
|
|
803
798
|
/** SearchBar 組件定義 */
|
|
804
799
|
export declare const SearchBar: DefineComponent<
|
|
805
800
|
SearchBarProps,
|
package/package.json
CHANGED
|
@@ -6,12 +6,11 @@ import BaseDialog from './BaseDialog.vue'
|
|
|
6
6
|
const { t } = useI18n()
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}>()
|
|
9
|
+
modelValue: boolean
|
|
10
|
+
waringText?: string
|
|
11
|
+
subWaringText?: string
|
|
12
|
+
titleText?: string
|
|
13
|
+
}>()
|
|
15
14
|
|
|
16
15
|
const emit = defineEmits<{
|
|
17
16
|
(e: 'update:modelValue', value: boolean): void
|
|
@@ -31,7 +30,6 @@ const handleSubmit = () => {
|
|
|
31
30
|
<base-dialog
|
|
32
31
|
v-model="dialogVisible"
|
|
33
32
|
:title="titleText || t('common.warning')"
|
|
34
|
-
:custom-width="modalWidth"
|
|
35
33
|
:is-waring="true"
|
|
36
34
|
@click:submit="handleSubmit"
|
|
37
35
|
>
|
|
@@ -13,6 +13,7 @@ type Props<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
|
13
13
|
data: T[]
|
|
14
14
|
columns: TableColumn<T>[]
|
|
15
15
|
showSelection?: boolean
|
|
16
|
+
showIndex?: boolean
|
|
16
17
|
showSummary?: boolean
|
|
17
18
|
showOverFlowTooltip?: boolean
|
|
18
19
|
summaryMethod?: (param: {
|
|
@@ -30,6 +31,7 @@ const props = withDefaults(defineProps<Props<T>>(), {
|
|
|
30
31
|
loading: false,
|
|
31
32
|
data: () => [],
|
|
32
33
|
showSelection: false,
|
|
34
|
+
showIndex: false,
|
|
33
35
|
showSummary: false,
|
|
34
36
|
showOverFlowTooltip: false,
|
|
35
37
|
showCheckBtn: false,
|
|
@@ -101,6 +103,9 @@ const operatorWidth = computed(() => {
|
|
|
101
103
|
<!-- 選擇列 -->
|
|
102
104
|
<el-table-column v-if="showSelection" type="selection" width="60" fixed="left" align="center" />
|
|
103
105
|
|
|
106
|
+
<!-- 索引列 -->
|
|
107
|
+
<el-table-column v-if="showIndex" type="index" width="60" fixed="left" align="center" label="No" />
|
|
108
|
+
|
|
104
109
|
<!-- 數據列 -->
|
|
105
110
|
<el-table-column v-for="(column, index) in columns" :key="index" v-bind="column">
|
|
106
111
|
<template #default="{ row }">
|
|
@@ -16,6 +16,8 @@ export interface BaseTableProps<T extends Record<string, unknown> = Record<strin
|
|
|
16
16
|
columns: TableColumn<T>[]
|
|
17
17
|
/** 是否顯示選擇列 */
|
|
18
18
|
showSelection?: boolean
|
|
19
|
+
/** 是否顯示索引列 */
|
|
20
|
+
showIndex?: boolean
|
|
19
21
|
/** 是否顯示匯總行 */
|
|
20
22
|
showSummary?: boolean
|
|
21
23
|
/** 是否顯示溢出提示 */
|
|
@@ -231,8 +233,6 @@ export interface BaseDialogProps {
|
|
|
231
233
|
subTitle?: string
|
|
232
234
|
/** 關閉前回調 */
|
|
233
235
|
beforeClose?: () => void
|
|
234
|
-
/** 自定義寬度 */
|
|
235
|
-
customWidth?: string
|
|
236
236
|
/** 是否為警告對話框 */
|
|
237
237
|
isWaring?: boolean
|
|
238
238
|
/** 是否為主要對話框 */
|
|
@@ -273,8 +273,6 @@ export interface BaseWaringDialogProps {
|
|
|
273
273
|
subWaringText?: string
|
|
274
274
|
/** 標題文字 */
|
|
275
275
|
titleText?: string
|
|
276
|
-
/** 對話框寬度 */
|
|
277
|
-
modalWidth?: string
|
|
278
276
|
}
|
|
279
277
|
|
|
280
278
|
/** BaseWaringDialog 組件 Emits 類型 */
|
|
@@ -326,7 +324,6 @@ export interface TransferDialogInstance<T = Record<string, unknown>> {
|
|
|
326
324
|
$emit: TransferDialogEmits<T>
|
|
327
325
|
}
|
|
328
326
|
|
|
329
|
-
|
|
330
327
|
// ==================== BaseInput 組件類型 ====================
|
|
331
328
|
|
|
332
329
|
/** BaseInput 組件 Props 類型 */
|
|
@@ -405,7 +402,6 @@ export interface BaseSelectorInstance {
|
|
|
405
402
|
$emit: BaseSelectorEmits
|
|
406
403
|
}
|
|
407
404
|
|
|
408
|
-
|
|
409
405
|
// ==================== 搜尋相關組件類型 ====================
|
|
410
406
|
|
|
411
407
|
// ==================== SearchBar 組件類型 ====================
|
|
@@ -800,7 +796,6 @@ export declare const BaseSelector: DefineComponent<
|
|
|
800
796
|
install: (app: App) => void
|
|
801
797
|
}
|
|
802
798
|
|
|
803
|
-
|
|
804
799
|
/** SearchBar 組件定義 */
|
|
805
800
|
export declare const SearchBar: DefineComponent<
|
|
806
801
|
SearchBarProps,
|