@weitutech/by-components-v3 1.0.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.
Binary file
@@ -0,0 +1 @@
1
+ export declare const deepClone: (target: any) => any;
@@ -0,0 +1,21 @@
1
+ type IProps = {
2
+ dialogVisible: boolean;
3
+ infoMethod: (page: any) => {
4
+ data: any;
5
+ };
6
+ submitMethod: (params: Record<string, any>) => void;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<IProps, {
9
+ getCustomTableList: (page: any, column: any) => Promise<void>;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ changeTable: (...args: any[]) => void;
12
+ changeTableGroup: (...args: any[]) => void;
13
+ closeDialog: (...args: any[]) => void;
14
+ }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
15
+ onChangeTable?: (...args: any[]) => any;
16
+ onChangeTableGroup?: (...args: any[]) => any;
17
+ onCloseDialog?: (...args: any[]) => any;
18
+ }>, {
19
+ dialogVisible: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
21
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import CustomDatePicker from './src/datePicker.vue';
2
+ export * from './src/type';
3
+ export default CustomDatePicker;
@@ -0,0 +1,15 @@
1
+ import { IDatePickerProps } from './type';
2
+ declare const _default: import("vue").DefineComponent<IDatePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
3
+ "update:modelValue": (values: any[]) => any;
4
+ }, string, import("vue").PublicProps, Readonly<IDatePickerProps> & Readonly<{
5
+ "onUpdate:modelValue"?: (values: any[]) => any;
6
+ }>, {
7
+ size: string;
8
+ type: string;
9
+ modelValue: any[] | string;
10
+ startPlaceholder: string;
11
+ endPlaceholder: string;
12
+ rangeSeparator: string;
13
+ active: string;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
15
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export type IDatePickerProps = {
2
+ modelValue: any[] | string;
3
+ startPlaceholder?: string;
4
+ endPlaceholder?: string;
5
+ type?: string;
6
+ rangeSeparator?: string;
7
+ size?: string;
8
+ active?: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ import FoldSearch from './src/foldSearch.vue';
2
+ export default FoldSearch;
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ unfold: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ change: (values: boolean) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onChange?: (values: boolean) => any;
8
+ }>, {
9
+ unfold: boolean;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import ZshForm from "./src/form.vue";
2
+ export * from "./src/props";
3
+ export * from "./src/helper";
4
+ export default ZshForm;
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { IFormItems } from './props';
3
+ /**
4
+ * 用于设置formItems表单字段的值
5
+ * @param { Array<IFormItems> | Ref<Array<IFormItems>> } formItems
6
+ * @param { Array<string> } keys formItems的唯一标识field
7
+ * @param { string } updateField formItems中需要更改的字段
8
+ * @param { any } value 赋值
9
+ */
10
+ export declare const setFormItemField: (formItems: Array<IFormItems> | Ref<Array<IFormItems>>, keys: Array<string>, updateField: string, value: any) => void;
11
+ export declare function cloneDeep<T>(obj: T): T;
@@ -0,0 +1,92 @@
1
+ import { type FormProps, FormItemProps, FormRules } from 'element-plus';
2
+ export type TColLayout<T = number | string> = {
3
+ span?: T;
4
+ xs?: T;
5
+ sm?: T;
6
+ md?: T;
7
+ ls?: T;
8
+ lg?: T;
9
+ xl?: T;
10
+ };
11
+ export type TFormItemType = 'input' | 'inputNumber' | 'select' | 'treeSelect' | 'datepicker' | 'cascader' | 'switch' | 'checkbox' | 'radio' | 'upload' | 'customDatePicker' | 'search' | 'custom';
12
+ export type TFormItemProps = {
13
+ /** 避免field重复 */
14
+ id?: number | string;
15
+ /** 表单里面元素的类型 */
16
+ type: TFormItemType;
17
+ /** 对应v-model的字段值 */
18
+ field?: string;
19
+ actions?: string;
20
+ /** 是否隐藏不显示 */
21
+ hidden?: boolean;
22
+ /** 该项疑问 */
23
+ /** formItem 样式 */
24
+ itemStyle?: Record<string, any>;
25
+ /** 响应式栏珊格 */
26
+ colLayout?: TColLayout;
27
+ /** 是否隐藏表单label(不占位置) */
28
+ hiddenLabel?: boolean;
29
+ /** element 属性 */
30
+ attrs?: Record<string, any>;
31
+ props?: Record<string, any>;
32
+ /** 只适用于多选框 默认checkbox*/
33
+ checkboxType?: 'checkbox' | 'button';
34
+ /** 只适用于单选看 默认radio */
35
+ radioType?: 'radio' | 'button';
36
+ /** 需要对应element插槽名称 */
37
+ slotsName?: Record<string, string>;
38
+ /** 一般用于下拉框等需要的数据 */
39
+ options?: Array<Record<string, any>>;
40
+ /** 表单label,不填不显示,但是占位置 */
41
+ label?: string;
42
+ labelWidth?: string | number;
43
+ /** 是否以行内形式展示校验信息 默认false*/
44
+ inlineMessage?: Boolean;
45
+ /** 是否显示校验错误信息 默认显示(true) */
46
+ showMessage?: Boolean;
47
+ /** 表单域标签的位置,如果值为 left 或者 right 时,则需要设置 label-width 默认right */
48
+ labelPosition?: 'left' | 'right' | 'top';
49
+ };
50
+ export declare type IFormItems = TFormItemProps & Omit<FormItemProps, 'labelWidth' | 'inlineMessage' | 'showMessage' | 'labelPosition'>;
51
+ interface IRow {
52
+ gutter?: number;
53
+ justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
54
+ align?: 'top' | 'middle' | 'bottom';
55
+ tag?: string;
56
+ }
57
+ export interface IForm {
58
+ formItems: Array<IFormItems>;
59
+ itemStyle?: Record<string, any>;
60
+ /** 是否有展开按钮 */
61
+ isFlexible?: boolean;
62
+ flexible?: {
63
+ /** 需要折叠字段 */
64
+ foldField?: any[] | 'none';
65
+ /** 默认展开 */
66
+ unfold?: boolean;
67
+ };
68
+ rules?: FormRules;
69
+ rowAttrs?: IRow;
70
+ /** 是否用于查询 */
71
+ colLayout?: TColLayout;
72
+ labelWidth?: string;
73
+ labelPosition?: 'left' | 'right' | 'top';
74
+ /** 星号的位置 */
75
+ requireAsteriskPosition?: 'left' | 'right';
76
+ labelSuffix?: string;
77
+ inline?: boolean;
78
+ /** 是否在输入框中显示校验结果反馈图标 */
79
+ statusIcon?: boolean;
80
+ validateOnRuleChange?: boolean;
81
+ hideRequiredAsterisk?: boolean;
82
+ scrollToError?: boolean;
83
+ disabled?: boolean;
84
+ showMessage?: boolean;
85
+ inlineMessage?: boolean;
86
+ elSize?: 'small' | 'large' | 'default' | '' | string;
87
+ }
88
+ export type IProps = IForm & {
89
+ /** v-model 表单需要的数据 */
90
+ modelValue: Record<string, any>;
91
+ } & Omit<FormProps, 'model' | 'labelPosition' | 'requireAsteriskPosition' | 'labelWidth' | 'labelSuffix' | 'inline' | 'inlineMessage' | 'statusIcon' | 'showMessage' | 'validateOnRuleChange' | 'hideRequiredAsterisk' | 'scrollToError' | 'disabled' | 'size'>;
92
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { App } from 'vue';
2
+ export * from './form/src/props';
3
+ export * from './pager/types';
4
+ import 'vxe-pc-ui/lib/style.css';
5
+ import 'vxe-table/lib/style.css';
6
+ import './index.scss';
7
+ export declare const components: Record<string, any>;
8
+ declare const ByComponentsV3: {
9
+ install: (app: App) => void;
10
+ };
11
+ export default ByComponentsV3;
@@ -0,0 +1,3 @@
1
+ import BasePager from "./src/base-pager.vue";
2
+ export * from "./types";
3
+ export default BasePager;
@@ -0,0 +1,17 @@
1
+ import { PagerConfig } from '../types';
2
+ type __VLS_Props = {
3
+ pageSize?: number;
4
+ pageSizes?: number[];
5
+ currentPage?: number;
6
+ total: number;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ change: (values: PagerConfig) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onChange?: (values: PagerConfig) => any;
12
+ }>, {
13
+ pageSize: number;
14
+ pageSizes: number[];
15
+ currentPage: number;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
17
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export interface IPager {
2
+ pageSize: number;
3
+ currentPage: number;
4
+ total: number;
5
+ }
6
+ export interface PagerConfig {
7
+ currentPage: number;
8
+ pageSize: number;
9
+ }
@@ -0,0 +1,2 @@
1
+ import ByTable from './src/table';
2
+ export default ByTable;
@@ -0,0 +1,14 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ gridOptions: {
3
+ type: ObjectConstructor;
4
+ required: true;
5
+ };
6
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ gridOptions: {
8
+ type: ObjectConstructor;
9
+ required: true;
10
+ };
11
+ }>> & Readonly<{
12
+ [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ 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, {}, HTMLDivElement>;
2
+ export default _default;