@weitutech/by-components-v3 1.1.10 → 1.1.12

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.
@@ -1,6 +1,7 @@
1
1
  import type { App } from 'vue';
2
2
  export * from './form/src/props';
3
3
  export * from './pager/types';
4
+ export * from './tool-bar/ToolBarType';
4
5
  import 'vxe-pc-ui/lib/style.css';
5
6
  import 'vxe-table/lib/style.css';
6
7
  import './index.scss';
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  type: BooleanConstructor;
13
13
  default: boolean;
14
14
  };
15
+ loading: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
15
19
  }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
20
  gridOptions: {
17
21
  type: ObjectConstructor;
@@ -25,10 +29,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
29
  type: BooleanConstructor;
26
30
  default: boolean;
27
31
  };
32
+ loading: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
28
36
  }>> & Readonly<{
29
37
  [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
30
38
  }>, {
31
39
  name: string;
32
40
  autoHeight: boolean;
41
+ loading: boolean;
33
42
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
34
43
  export default _default;
@@ -0,0 +1,25 @@
1
+ import { type ToolBarItem, type ToolBarActionEvent } from './ToolBarType';
2
+ import './ByToolBar.scss';
3
+ interface Props {
4
+ items?: ToolBarItem[];
5
+ }
6
+ declare var __VLS_29: string, __VLS_30: {}, __VLS_60: string, __VLS_61: {};
7
+ type __VLS_Slots = {} & {
8
+ [K in NonNullable<typeof __VLS_29>]?: (props: typeof __VLS_30) => any;
9
+ } & {
10
+ [K in NonNullable<typeof __VLS_60>]?: (props: typeof __VLS_61) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ action: (event: ToolBarActionEvent) => any;
14
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
15
+ onAction?: (event: ToolBarActionEvent) => any;
16
+ }>, {
17
+ items: ToolBarItem[];
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,56 @@
1
+ /**
2
+ * 工具栏组件类型
3
+ */
4
+ export declare enum ToolBarItemType {
5
+ Text = "text",
6
+ Button = "button",
7
+ RadioGroup = "radio-group",
8
+ Select = "select",
9
+ Input = "input"
10
+ }
11
+ export interface ToolBarItem {
12
+ type?: ToolBarItemType;
13
+ name?: string;
14
+ label?: string;
15
+ position?: 'left' | 'right';
16
+ hidden?: boolean;
17
+ disabled?: boolean;
18
+ slot?: string;
19
+ props?: ToolBarItemProps;
20
+ radios?: ToolBarItemRadio[];
21
+ asyncOptions?: ToolBarItemOption[];
22
+ }
23
+ export interface ToolBarItemOption {
24
+ label: string;
25
+ value: any;
26
+ }
27
+ export interface ToolBarItemRadio {
28
+ label: string;
29
+ value: any;
30
+ }
31
+ export interface ToolBarItemProps {
32
+ size?: string;
33
+ loading?: boolean;
34
+ options?: ToolBarItemOption[];
35
+ loadOptions?: () => Promise<ToolBarItemOption[]>;
36
+ icon?: string;
37
+ fontSize?: string;
38
+ color?: string;
39
+ maxWidth?: string;
40
+ width?: string;
41
+ children?: string;
42
+ innerHTML?: string;
43
+ [key: string]: any;
44
+ }
45
+ export interface LoadedOptions {
46
+ [key: string]: {
47
+ loading: boolean;
48
+ options: ToolBarItemOption[];
49
+ loaded?: boolean;
50
+ };
51
+ }
52
+ export interface ToolBarActionEvent {
53
+ type: string;
54
+ item: ToolBarItem;
55
+ payload: any;
56
+ }
@@ -0,0 +1,3 @@
1
+ import ByToolBar from './ByToolBar.vue';
2
+ export * from './ToolBarType';
3
+ export default ByToolBar;
@@ -0,0 +1,68 @@
1
+ import { ToolBarItemType, type ToolBarItem } from '../packages/tool-bar/ToolBarType';
2
+ export declare const toolBarItems: import("vue").Ref<{
3
+ type?: ToolBarItemType;
4
+ name?: string;
5
+ label?: string;
6
+ position?: "left" | "right";
7
+ hidden?: boolean;
8
+ disabled?: boolean;
9
+ slot?: string;
10
+ props?: {
11
+ [x: string]: any;
12
+ size?: string;
13
+ loading?: boolean;
14
+ options?: {
15
+ label: string;
16
+ value: any;
17
+ }[];
18
+ loadOptions?: () => Promise<import("../packages/tool-bar/ToolBarType").ToolBarItemOption[]>;
19
+ icon?: string;
20
+ fontSize?: string;
21
+ color?: string;
22
+ maxWidth?: string;
23
+ width?: string;
24
+ children?: string;
25
+ innerHTML?: string;
26
+ };
27
+ radios?: {
28
+ label: string;
29
+ value: any;
30
+ }[];
31
+ asyncOptions?: {
32
+ label: string;
33
+ value: any;
34
+ }[];
35
+ }[], ToolBarItem[] | {
36
+ type?: ToolBarItemType;
37
+ name?: string;
38
+ label?: string;
39
+ position?: "left" | "right";
40
+ hidden?: boolean;
41
+ disabled?: boolean;
42
+ slot?: string;
43
+ props?: {
44
+ [x: string]: any;
45
+ size?: string;
46
+ loading?: boolean;
47
+ options?: {
48
+ label: string;
49
+ value: any;
50
+ }[];
51
+ loadOptions?: () => Promise<import("../packages/tool-bar/ToolBarType").ToolBarItemOption[]>;
52
+ icon?: string;
53
+ fontSize?: string;
54
+ color?: string;
55
+ maxWidth?: string;
56
+ width?: string;
57
+ children?: string;
58
+ innerHTML?: string;
59
+ };
60
+ radios?: {
61
+ label: string;
62
+ value: any;
63
+ }[];
64
+ asyncOptions?: {
65
+ label: string;
66
+ value: any;
67
+ }[];
68
+ }[]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@weitutech/by-components-v3",
4
- "version": "1.1.10",
4
+ "version": "1.1.12",
5
5
  "private": false,
6
6
  "main": "/src/main.ts",
7
7
  "module": "./dist/by-components-v3.js",
package/src/main.ts CHANGED
@@ -11,6 +11,7 @@ import ByComponentsV3 from '../packages/index'
11
11
  import ElementPlus from 'element-plus'
12
12
  import 'element-plus/dist/index.css'
13
13
  import zhCn from 'element-plus/es/locale/lang/zh-cn'
14
+ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
14
15
  // import VxeTable from 'vxe-table'
15
16
  // import 'vxe-table/lib/style.css'
16
17
  import VxeUI from 'vxe-pc-ui'
@@ -19,6 +20,12 @@ import VxeUITable from 'vxe-table'
19
20
  import 'vxe-table/lib/style.css'
20
21
  import './style/index.scss'
21
22
  const app = createApp(App)
23
+
24
+ // 注册所有图标
25
+ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
26
+ app.component(key, component)
27
+ }
28
+
22
29
  app
23
30
  .use(ElementPlus, {
24
31
  locale: zhCn,