rayyy-vue-table-components 1.3.8 → 1.3.10
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 +642 -605
- 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/BaseWaringDialog.vue.d.ts +33 -0
- package/dist/src/router/constants.d.ts +2 -0
- package/dist/src/types/components.d.ts +52 -0
- package/dist/src/views/demo/BaseWaringDialogDemo.vue.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/styles/_dialogs.scss +2 -2
- package/src/components/index.ts +6 -0
- package/src/components/items/BaseWaringDialog.vue +50 -0
- package/src/types/components.d.ts +52 -0
- package/src/components/form/BaseForm.vue +0 -69
|
@@ -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 BaseDialog } from './items/BaseDialog.vue';
|
|
5
|
+
export { default as BaseWaringDialog } from './items/BaseWaringDialog.vue';
|
|
5
6
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue';
|
|
6
7
|
export { default as SortTable } from './tables/SortTable.vue';
|
|
7
8
|
export { default as TitleTable } from './tables/TitleTable.vue';
|
|
@@ -13,11 +14,12 @@ export { default as MainPanel } from './layout/MainPanel.vue';
|
|
|
13
14
|
export { default as SearchableListPanel } from './layout/SearchableListPanel.vue';
|
|
14
15
|
export { default as DetailLayout } from './layout/DetailLayout.vue';
|
|
15
16
|
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';
|
|
17
|
+
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, BaseWaringDialogProps, BaseWaringDialogEmits, BaseWaringDialogInstance, 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';
|
|
17
18
|
export type { default as BaseTableType } from './tables/BaseTable.vue';
|
|
18
19
|
export type { default as BaseBtnType } from './items/BaseBtn.vue';
|
|
19
20
|
export type { default as BaseInputType } from './form/BaseInput.vue';
|
|
20
21
|
export type { default as BaseDialogType } from './items/BaseDialog.vue';
|
|
22
|
+
export type { default as BaseWaringDialogType } from './items/BaseWaringDialog.vue';
|
|
21
23
|
export type { default as SortTableType } from './tables/SortTable.vue';
|
|
22
24
|
export type { default as TitleTableType } from './tables/TitleTable.vue';
|
|
23
25
|
export type { default as SearchBarType } from './items/SearchBar.vue';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
waringText?: string;
|
|
4
|
+
subWaringText?: string;
|
|
5
|
+
titleText?: string;
|
|
6
|
+
modalWidth?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): 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:modelValue": (value: boolean) => any;
|
|
19
|
+
"update:submit": () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
"onUpdate:submit"?: (() => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
waringText: string;
|
|
25
|
+
titleText: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -11,6 +11,7 @@ export declare const ROUTES: {
|
|
|
11
11
|
readonly BASE_BTN: "/demo/base-btn";
|
|
12
12
|
readonly BASE_INPUT: "/demo/base-input";
|
|
13
13
|
readonly BASE_DIALOG: "/demo/base-dialog";
|
|
14
|
+
readonly BASE_WARING_DIALOG: "/demo/base-waring-dialog";
|
|
14
15
|
readonly BASE_FORM: "/demo/base-form";
|
|
15
16
|
readonly TABLE: "/demo/table";
|
|
16
17
|
readonly SEARCH_BAR: "/demo/search-bar";
|
|
@@ -33,6 +34,7 @@ export declare const ROUTE_NAMES: {
|
|
|
33
34
|
readonly BASE_BTN: "BaseBtn";
|
|
34
35
|
readonly BASE_INPUT: "BaseInput";
|
|
35
36
|
readonly BASE_DIALOG: "BaseDialog";
|
|
37
|
+
readonly BASE_WARING_DIALOG: "BaseWaringDialog";
|
|
36
38
|
readonly TABLE: "Table";
|
|
37
39
|
readonly SEARCH_BAR: "SearchBar";
|
|
38
40
|
readonly FUNCTION_HEADER: "FunctionHeader";
|
|
@@ -234,6 +234,38 @@ export interface BaseDialogInstance {
|
|
|
234
234
|
$emit: BaseDialogEmits
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
// ==================== BaseWaringDialog 組件類型 ====================
|
|
238
|
+
|
|
239
|
+
/** BaseWaringDialog 組件 Props 類型 */
|
|
240
|
+
export interface BaseWaringDialogProps {
|
|
241
|
+
/** 是否顯示對話框 */
|
|
242
|
+
modelValue: boolean
|
|
243
|
+
/** 警告文字 */
|
|
244
|
+
waringText?: string
|
|
245
|
+
/** 副警告文字 */
|
|
246
|
+
subWaringText?: string
|
|
247
|
+
/** 標題文字 */
|
|
248
|
+
titleText?: string
|
|
249
|
+
/** 對話框寬度 */
|
|
250
|
+
modalWidth?: string
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** BaseWaringDialog 組件 Emits 類型 */
|
|
254
|
+
export interface BaseWaringDialogEmits {
|
|
255
|
+
/** 更新 modelValue 事件 */
|
|
256
|
+
(e: 'update:modelValue', value: boolean): void
|
|
257
|
+
/** 提交事件 */
|
|
258
|
+
(e: 'update:submit'): void
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** BaseWaringDialog 組件實例類型 */
|
|
262
|
+
export interface BaseWaringDialogInstance {
|
|
263
|
+
/** 組件 Props */
|
|
264
|
+
$props: BaseWaringDialogProps
|
|
265
|
+
/** 組件 Emits */
|
|
266
|
+
$emit: BaseWaringDialogEmits
|
|
267
|
+
}
|
|
268
|
+
|
|
237
269
|
// ==================== TransferDialog 組件類型 ====================
|
|
238
270
|
|
|
239
271
|
/** TransferDialog 組件 Props 類型 */
|
|
@@ -663,6 +695,23 @@ export declare const BaseDialog: DefineComponent<
|
|
|
663
695
|
install: (app: App) => void
|
|
664
696
|
}
|
|
665
697
|
|
|
698
|
+
/** BaseWaringDialog 組件定義 */
|
|
699
|
+
export declare const BaseWaringDialog: DefineComponent<
|
|
700
|
+
BaseWaringDialogProps,
|
|
701
|
+
{},
|
|
702
|
+
{},
|
|
703
|
+
{},
|
|
704
|
+
{},
|
|
705
|
+
{},
|
|
706
|
+
{},
|
|
707
|
+
{},
|
|
708
|
+
{},
|
|
709
|
+
BaseWaringDialogEmits
|
|
710
|
+
> & {
|
|
711
|
+
/** 安裝方法 */
|
|
712
|
+
install: (app: App) => void
|
|
713
|
+
}
|
|
714
|
+
|
|
666
715
|
/** TransferDialog 組件定義 */
|
|
667
716
|
export declare const TransferDialog: DefineComponent<
|
|
668
717
|
TransferDialogProps<any>,
|
|
@@ -847,6 +896,8 @@ export interface VueTableComponentsPlugin {
|
|
|
847
896
|
BaseBtn: typeof BaseBtn
|
|
848
897
|
/** BaseDialog 組件 */
|
|
849
898
|
BaseDialog: typeof BaseDialog
|
|
899
|
+
/** BaseWaringDialog 組件 */
|
|
900
|
+
BaseWaringDialog: typeof BaseWaringDialog
|
|
850
901
|
/** TransferDialog 組件 */
|
|
851
902
|
TransferDialog: typeof TransferDialog
|
|
852
903
|
/** BaseInput 組件 */
|
|
@@ -878,6 +929,7 @@ declare module '@vue/runtime-core' {
|
|
|
878
929
|
TitleTable: typeof TitleTable
|
|
879
930
|
BaseBtn: typeof BaseBtn
|
|
880
931
|
BaseDialog: typeof BaseDialog
|
|
932
|
+
BaseWaringDialog: typeof BaseWaringDialog
|
|
881
933
|
TransferDialog: typeof TransferDialog
|
|
882
934
|
BaseInput: typeof BaseInput
|
|
883
935
|
BaseMultipleInput: typeof BaseMultipleInput
|
|
@@ -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, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
// 警告對話框樣式
|
|
37
37
|
.waring-dialog {
|
|
38
38
|
.el-dialog__header {
|
|
39
|
-
@apply border-b-orange;
|
|
39
|
+
@apply border-b-orange border border-solid;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// 上傳結果對話框樣式
|
|
44
44
|
.upload-result-dialog {
|
|
45
45
|
.el-dialog__header {
|
|
46
|
-
@apply border-b-blue-10;
|
|
46
|
+
@apply border-b-blue-10 border border-solid;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
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 BaseDialog } from './items/BaseDialog.vue'
|
|
6
|
+
export { default as BaseWaringDialog } from './items/BaseWaringDialog.vue'
|
|
6
7
|
export { default as BaseMultipleInput } from './form/BaseMultipleInput.vue'
|
|
7
8
|
export { default as SortTable } from './tables/SortTable.vue'
|
|
8
9
|
export { default as TitleTable } from './tables/TitleTable.vue'
|
|
@@ -29,6 +30,10 @@ export type {
|
|
|
29
30
|
BaseDialogProps,
|
|
30
31
|
BaseDialogEmits,
|
|
31
32
|
BaseDialogInstance,
|
|
33
|
+
// BaseWaringDialog 組件類型
|
|
34
|
+
BaseWaringDialogProps,
|
|
35
|
+
BaseWaringDialogEmits,
|
|
36
|
+
BaseWaringDialogInstance,
|
|
32
37
|
// BaseInput 組件類型
|
|
33
38
|
BaseInputProps,
|
|
34
39
|
BaseInputEmits,
|
|
@@ -85,6 +90,7 @@ export type { default as BaseTableType } from './tables/BaseTable.vue'
|
|
|
85
90
|
export type { default as BaseBtnType } from './items/BaseBtn.vue'
|
|
86
91
|
export type { default as BaseInputType } from './form/BaseInput.vue'
|
|
87
92
|
export type { default as BaseDialogType } from './items/BaseDialog.vue'
|
|
93
|
+
export type { default as BaseWaringDialogType } from './items/BaseWaringDialog.vue'
|
|
88
94
|
export type { default as SortTableType } from './tables/SortTable.vue'
|
|
89
95
|
export type { default as TitleTableType } from './tables/TitleTable.vue'
|
|
90
96
|
export type { default as SearchBarType } from './items/SearchBar.vue'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import BaseDialog from './BaseDialog.vue'
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
modelValue: boolean
|
|
8
|
+
waringText?: string
|
|
9
|
+
subWaringText?: string
|
|
10
|
+
titleText?: string
|
|
11
|
+
modalWidth?: string
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
waringText: '請問是否確認移除該使用者',
|
|
15
|
+
titleText: '警告',
|
|
16
|
+
},
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits<{
|
|
20
|
+
(e: 'update:modelValue', value: boolean): void
|
|
21
|
+
(e: 'update:submit'): void
|
|
22
|
+
}>()
|
|
23
|
+
const dialogVisible = computed({
|
|
24
|
+
get: () => props.modelValue,
|
|
25
|
+
set: (value) => emit('update:modelValue', value),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const handleSubmit = () => {
|
|
29
|
+
emit('update:submit')
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<base-dialog
|
|
35
|
+
v-model="dialogVisible"
|
|
36
|
+
:title="titleText"
|
|
37
|
+
:custom-width="modalWidth"
|
|
38
|
+
:is-waring="true"
|
|
39
|
+
@click:submit="handleSubmit"
|
|
40
|
+
>
|
|
41
|
+
<div class="w-full h-16 flex items-center justify-center flex-col">
|
|
42
|
+
<slot>
|
|
43
|
+
<p>{{ subWaringText }}</p>
|
|
44
|
+
<p>{{ waringText }} ?</p>
|
|
45
|
+
</slot>
|
|
46
|
+
</div>
|
|
47
|
+
</base-dialog>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped lang="scss"></style>
|
|
@@ -235,6 +235,38 @@ export interface BaseDialogInstance {
|
|
|
235
235
|
$emit: BaseDialogEmits
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
// ==================== BaseWaringDialog 組件類型 ====================
|
|
239
|
+
|
|
240
|
+
/** BaseWaringDialog 組件 Props 類型 */
|
|
241
|
+
export interface BaseWaringDialogProps {
|
|
242
|
+
/** 是否顯示對話框 */
|
|
243
|
+
modelValue: boolean
|
|
244
|
+
/** 警告文字 */
|
|
245
|
+
waringText?: string
|
|
246
|
+
/** 副警告文字 */
|
|
247
|
+
subWaringText?: string
|
|
248
|
+
/** 標題文字 */
|
|
249
|
+
titleText?: string
|
|
250
|
+
/** 對話框寬度 */
|
|
251
|
+
modalWidth?: string
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** BaseWaringDialog 組件 Emits 類型 */
|
|
255
|
+
export interface BaseWaringDialogEmits {
|
|
256
|
+
/** 更新 modelValue 事件 */
|
|
257
|
+
(e: 'update:modelValue', value: boolean): void
|
|
258
|
+
/** 提交事件 */
|
|
259
|
+
(e: 'update:submit'): void
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** BaseWaringDialog 組件實例類型 */
|
|
263
|
+
export interface BaseWaringDialogInstance {
|
|
264
|
+
/** 組件 Props */
|
|
265
|
+
$props: BaseWaringDialogProps
|
|
266
|
+
/** 組件 Emits */
|
|
267
|
+
$emit: BaseWaringDialogEmits
|
|
268
|
+
}
|
|
269
|
+
|
|
238
270
|
// ==================== TransferDialog 組件類型 ====================
|
|
239
271
|
|
|
240
272
|
/** TransferDialog 組件 Props 類型 */
|
|
@@ -664,6 +696,23 @@ export declare const BaseDialog: DefineComponent<
|
|
|
664
696
|
install: (app: App) => void
|
|
665
697
|
}
|
|
666
698
|
|
|
699
|
+
/** BaseWaringDialog 組件定義 */
|
|
700
|
+
export declare const BaseWaringDialog: DefineComponent<
|
|
701
|
+
BaseWaringDialogProps,
|
|
702
|
+
{},
|
|
703
|
+
{},
|
|
704
|
+
{},
|
|
705
|
+
{},
|
|
706
|
+
{},
|
|
707
|
+
{},
|
|
708
|
+
{},
|
|
709
|
+
{},
|
|
710
|
+
BaseWaringDialogEmits
|
|
711
|
+
> & {
|
|
712
|
+
/** 安裝方法 */
|
|
713
|
+
install: (app: App) => void
|
|
714
|
+
}
|
|
715
|
+
|
|
667
716
|
/** TransferDialog 組件定義 */
|
|
668
717
|
export declare const TransferDialog: DefineComponent<
|
|
669
718
|
TransferDialogProps<any>,
|
|
@@ -848,6 +897,8 @@ export interface VueTableComponentsPlugin {
|
|
|
848
897
|
BaseBtn: typeof BaseBtn
|
|
849
898
|
/** BaseDialog 組件 */
|
|
850
899
|
BaseDialog: typeof BaseDialog
|
|
900
|
+
/** BaseWaringDialog 組件 */
|
|
901
|
+
BaseWaringDialog: typeof BaseWaringDialog
|
|
851
902
|
/** TransferDialog 組件 */
|
|
852
903
|
TransferDialog: typeof TransferDialog
|
|
853
904
|
/** BaseInput 組件 */
|
|
@@ -879,6 +930,7 @@ declare module '@vue/runtime-core' {
|
|
|
879
930
|
TitleTable: typeof TitleTable
|
|
880
931
|
BaseBtn: typeof BaseBtn
|
|
881
932
|
BaseDialog: typeof BaseDialog
|
|
933
|
+
BaseWaringDialog: typeof BaseWaringDialog
|
|
882
934
|
TransferDialog: typeof TransferDialog
|
|
883
935
|
BaseInput: typeof BaseInput
|
|
884
936
|
BaseMultipleInput: typeof BaseMultipleInput
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts" generic="T extends Record<string, unknown>">
|
|
2
|
-
import { computed, ref, useAttrs } from 'vue'
|
|
3
|
-
import type { FormInstance, FormRules } from 'element-plus'
|
|
4
|
-
|
|
5
|
-
type Props<T extends object = object> = {
|
|
6
|
-
modelValue?: T
|
|
7
|
-
rules?: FormRules
|
|
8
|
-
labelWidth?: string
|
|
9
|
-
}
|
|
10
|
-
const props = withDefaults(defineProps<Props>(), {})
|
|
11
|
-
|
|
12
|
-
// 獲取所有非 props 屬性
|
|
13
|
-
const attrs = useAttrs()
|
|
14
|
-
|
|
15
|
-
const computedLabelWidth = computed(() => {
|
|
16
|
-
if (props.labelWidth) return props.labelWidth
|
|
17
|
-
else return '100px'
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const formData = computed(() => props.modelValue)
|
|
21
|
-
|
|
22
|
-
defineEmits<{
|
|
23
|
-
(e: 'update:modelValue', value: Record<string, unknown>): void
|
|
24
|
-
(e: 'submit'): void
|
|
25
|
-
(e: 'validate', valid: boolean): void
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const formRef = ref<FormInstance>()
|
|
29
|
-
|
|
30
|
-
const validate = async () => {
|
|
31
|
-
if (!formRef.value) return false
|
|
32
|
-
return await formRef.value.validate()
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const resetFields = () => {
|
|
36
|
-
formRef.value?.resetFields()
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const clearValidate = (props?: string | string[]) => {
|
|
40
|
-
formRef.value?.clearValidate(props)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const validateField = (prop: string) => {
|
|
44
|
-
formRef.value?.validateField(prop)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
defineExpose({
|
|
48
|
-
validate,
|
|
49
|
-
resetFields,
|
|
50
|
-
clearValidate,
|
|
51
|
-
validateField,
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<template>
|
|
56
|
-
<el-form
|
|
57
|
-
v-bind="attrs"
|
|
58
|
-
ref="formRef"
|
|
59
|
-
:model="formData"
|
|
60
|
-
:label-width="computedLabelWidth"
|
|
61
|
-
:rules="rules"
|
|
62
|
-
@submit.prevent
|
|
63
|
-
class="filter-form"
|
|
64
|
-
>
|
|
65
|
-
<slot></slot>
|
|
66
|
-
</el-form>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<style scoped lang="scss"></style>
|