yc-vep-ui 0.3.41 → 0.3.43

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 ADDED
@@ -0,0 +1,37 @@
1
+
2
+
3
+ # 基于 vue3 + element-plus 的UI组件库
4
+
5
+ ## 介绍 📖
6
+ vep-ui => vue element plus - ui
7
+ 这是一个基于 vue3 + element-plus 的UI组件库,主要用于快速搭建后台管理系统。简化开发流程,提高开发效率。
8
+
9
+ 组件包括:
10
+ table、from、tree、editor、card、InfiniteScroll、dialog、upload、staffSelect等
11
+
12
+ ## 特性 🚀
13
+ 无vue, element-plus, element-plus-icons-vue, 仅依赖宿主项目,体积较小,易于使用。
14
+
15
+
16
+ ## 安装 📦
17
+ ```bash
18
+ npm install yc-vep-ui
19
+ ```
20
+
21
+ ## 快速上手
22
+ 在`main.ts`中引入`yc-vep-ui`
23
+ ```ts
24
+ import { createApp } from 'vue'
25
+ import ElementPlus from 'element-plus'
26
+ import * as Vue from 'vue'
27
+ import VepUi, { setHostVue } from 'yc-vep-ui'
28
+ import 'yc-vep-ui/dist/index.css' // 引入样式
29
+ setHostVue(Vue) // 把vue传给yc-vep-ui
30
+
31
+ const app = createApp(App)
32
+ app.use(VepUi, { elementPlus: ElementPlus })
33
+
34
+ app.mount('#app')
35
+ ```
36
+
37
+ ## 使用
@@ -8,15 +8,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
8
8
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
9
9
  attrs: any;
10
10
  slots: {
11
- left?(_: {
12
- form: import('@vue/reactivity').DistributeRef<import('vue').Reactive<T>>;
13
- }): any;
14
11
  handle?(_: {
15
12
  form: import('@vue/reactivity').DistributeRef<import('vue').Reactive<T>>;
16
13
  }): any;
17
- right?(_: {
18
- form: import('@vue/reactivity').DistributeRef<import('vue').Reactive<T>>;
19
- }): any;
20
14
  };
21
15
  emit: (event: "search" | "reset" | "submit", ...args: any[]) => void;
22
16
  }>) => import('vue').VNode & {
@@ -37,6 +37,7 @@ export interface IFilterProps<T> {
37
37
  expandNum?: number
38
38
  valueWidth?: string
39
39
  labelWidth?: string
40
+ labelPosition?: 'top' | 'right' | 'left'
40
41
  /** 重置需要省略的字段 */
41
42
  omitFields?: (keyof T)[]
42
43
  rules?: Record<string, any>
@@ -27,6 +27,7 @@ export declare const El: {
27
27
  readonly ButtonGroup: any;
28
28
  readonly Descriptions: any;
29
29
  readonly DescriptionsItem: any;
30
+ readonly Switch: any;
30
31
  readonly Message: any;
31
32
  };
32
33
  export declare function getIcon(name: string): any;
@@ -18,7 +18,8 @@ declare function link(props: LinkProps & {
18
18
  type?: 'primary' | 'success' | 'warning' | 'info' | 'danger';
19
19
  }): any;
20
20
  declare function tag(props: TagProps & {
21
- prop: string;
21
+ prop?: string;
22
+ text?: string | string[];
22
23
  }): any;
23
24
  declare function _switch(props: SwitchProps): any;
24
25
  declare function select(props: SelectProps): any;
@@ -1,5 +1,7 @@
1
- import { IField } from '../type';
1
+ import { IField, IColumn } from '../type';
2
2
  export declare function getLabelWidth(width?: string | number): string;
3
3
  export declare function getValueWidth(width: number | string): string;
4
4
  export declare function getRenderAttr<T>(field: IField<T>, data: T): any;
5
5
  export declare function renderNode<T>(field: IField<T>, data: T): any;
6
+ /** 模板配置,转渲染 */
7
+ export declare function tempToRender<T>(tempList: Array<IColumn<T> | IField<T>>): Array<IColumn<T> | IField<T>>;