yc-vep-ui 0.0.21 → 0.0.23
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/components/Card/type.d.ts +6 -0
- package/dist/components/Descriptions/type.d.ts +15 -0
- package/dist/components/Editor/type.d.ts +4 -0
- package/dist/components/Filter/type.d.ts +48 -0
- package/dist/components/Form/type.d.ts +33 -0
- package/dist/components/InfiniteScroll/type.d.ts +8 -0
- package/dist/components/Table/type.d.ts +101 -0
- package/dist/components/Tree/type.d.ts +21 -0
- package/dist/components/type.d.ts +9 -0
- package/dist/entry.d.ts +1 -2
- package/package.json +2 -15
- package/dist/element-plus.d.ts +0 -1
- package/dist/element-plus.es.js +0 -1
- package/dist/element-plus.umd.js +0 -1
- package/dist/icons-vue.es.js +0 -1
- package/dist/icons-vue.umd.js +0 -1
- package/dist/icons.d.ts +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DescriptionProps } from 'element-plus'
|
|
2
|
+
|
|
3
|
+
export interface IDescriptionsField<T> {
|
|
4
|
+
label: string
|
|
5
|
+
prop: keyof T
|
|
6
|
+
render?: (props: IDescriptionsRenderProps) => VNode | string | number
|
|
7
|
+
span?: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IDescriptionsProps<T> extends DescriptionProps<T> {
|
|
11
|
+
data: T
|
|
12
|
+
fields: IDescriptionsField<T>[]
|
|
13
|
+
column?: number
|
|
14
|
+
title?: string
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IRender } from '..'
|
|
2
|
+
|
|
3
|
+
interface IFieldSlot<T> extends IField<T> {
|
|
4
|
+
prop: string
|
|
5
|
+
width?: number
|
|
6
|
+
render?: (props: IFilterRenderProps<T>) => VNode | string | number
|
|
7
|
+
defaultValue?: any
|
|
8
|
+
placeholder?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 表格筛选
|
|
12
|
+
export interface IField<T> {
|
|
13
|
+
label?: string
|
|
14
|
+
prop?: keyof T
|
|
15
|
+
required?: boolean
|
|
16
|
+
rules?: Record<string, any>
|
|
17
|
+
span?: number
|
|
18
|
+
slots?: IFieldSlot<T>[]
|
|
19
|
+
/** 整个宽度 */
|
|
20
|
+
width?: number
|
|
21
|
+
/** label宽度 */
|
|
22
|
+
labelWidth?: number
|
|
23
|
+
/** value宽度 */
|
|
24
|
+
valueWidth?: number
|
|
25
|
+
render?: (props: IFilterRenderProps<T>) => VNode | string | number | symbol
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type IFilterRenderProps<T> = {
|
|
29
|
+
h: IRender
|
|
30
|
+
data: T
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IFilterProps<T> {
|
|
34
|
+
type?: 'default' | 'simple'
|
|
35
|
+
size?: 'small' | 'default' | 'large'
|
|
36
|
+
fields: IField<T>[]
|
|
37
|
+
expandNum?: number
|
|
38
|
+
valueWidth?: string
|
|
39
|
+
labelWidth?: string
|
|
40
|
+
/** 重置需要省略的字段 */
|
|
41
|
+
omitFields?: (keyof T)[]
|
|
42
|
+
rules?: Record<string, any>
|
|
43
|
+
required?: boolean
|
|
44
|
+
/** 每行显示的字段数量,默认为4 */
|
|
45
|
+
column?: number
|
|
46
|
+
// 每次请求的固定值
|
|
47
|
+
filterFixedValues?: Record<string, any>
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FormInstance } from 'element-plus'
|
|
2
|
+
import type { IField } from '../Filter/type'
|
|
3
|
+
|
|
4
|
+
export interface IFormProps<T> {
|
|
5
|
+
fields: IField<T>[]
|
|
6
|
+
/** 下拉框展开数量 */
|
|
7
|
+
expandNum?: number
|
|
8
|
+
valueWidth?: string
|
|
9
|
+
labelWidth?: string
|
|
10
|
+
labelPosition?: 'top' | 'left' | 'right'
|
|
11
|
+
/** 重置需要省略的字段 */
|
|
12
|
+
omitFields?: (keyof T)[]
|
|
13
|
+
rules?: Record<string, any> | Reactive<Record<string, any>>
|
|
14
|
+
/** 必填 */
|
|
15
|
+
required?: boolean
|
|
16
|
+
/** 每行显示的字段数量,默认为4 */
|
|
17
|
+
column?: number
|
|
18
|
+
/** 默认值 */
|
|
19
|
+
defaultValues?: Record<string, any>
|
|
20
|
+
/** 表单双向绑定 (配合 v-model:form 使用) */
|
|
21
|
+
form?: Record<string, any>
|
|
22
|
+
valueModel?: 'default' | 'underline'
|
|
23
|
+
/** 按钮尺寸 */
|
|
24
|
+
size?: '' | 'small' | 'default' | 'large'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IFormInstance {
|
|
28
|
+
getValues: () => Reactive<Record<string, any>>
|
|
29
|
+
setValues: (values: Record<string, any>) => void
|
|
30
|
+
clearValidate: () => void
|
|
31
|
+
onSubmit: (el: FormInstance) => void
|
|
32
|
+
validate: () => Promise<any>
|
|
33
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { VNode } from 'vue'
|
|
2
|
+
|
|
3
|
+
export interface IRender {
|
|
4
|
+
button: (props: ButtonProps | ButtonProps[]) => VNode | string | number
|
|
5
|
+
link: (props?: LinkProps) => VNode | string | number
|
|
6
|
+
tag: (props?: TagProps | TagProps[]) => VNode | string | number
|
|
7
|
+
switch: (props?: SwitchProps) => VNode | string | number
|
|
8
|
+
select: (props?: SelectProps) => VNode | string | number
|
|
9
|
+
datePicker: (props?: DatePickerProps) => VNode | string | number
|
|
10
|
+
timeSelect: (props?: TimeSelectProps) => VNode | string | number
|
|
11
|
+
input: (props?: InputProps) => VNode | string | number
|
|
12
|
+
inputNumber: (props?: InputNumberProps) => VNode | string | number
|
|
13
|
+
textarea: (props?: InputProps) => VNode | string | number
|
|
14
|
+
inputTag: (props?: InputTagProps) => VNode | string | number
|
|
15
|
+
staffSelect: (props?: IStaffSelectProps) => VNode | string | number
|
|
16
|
+
editor: (props?: any) => VNode | string | number
|
|
17
|
+
radio: (props?: RadioProps) => VNode | string | number
|
|
18
|
+
upload: (props?: IUploadProps) => VNode | string | number
|
|
19
|
+
text: (props?: TextProps) => VNode | string | number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type IRenderProps =
|
|
23
|
+
| ButtonProps
|
|
24
|
+
| ButtonProps[]
|
|
25
|
+
| LinkProps
|
|
26
|
+
| TagProps
|
|
27
|
+
| TagProps[]
|
|
28
|
+
| SwitchProps
|
|
29
|
+
| SelectProps
|
|
30
|
+
| DatePickerProps
|
|
31
|
+
| InputProps
|
|
32
|
+
| InputNumberProps
|
|
33
|
+
| InputTagProps
|
|
34
|
+
| TimeSelectProps
|
|
35
|
+
| IStaffSelectProps
|
|
36
|
+
| RadioProps
|
|
37
|
+
| IUploadProps
|
|
38
|
+
| TextProps
|
|
39
|
+
|
|
40
|
+
// 组件属性扩展
|
|
41
|
+
export interface IExtra {
|
|
42
|
+
width?: string | number
|
|
43
|
+
sortable?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface IColumn<T> extends IExtra {
|
|
47
|
+
type?: 'index' | 'selection'
|
|
48
|
+
label?: string
|
|
49
|
+
prop?: keyof T
|
|
50
|
+
fixed?: 'left' | 'right' | boolean
|
|
51
|
+
showOverflowTooltip?: boolean
|
|
52
|
+
render?: (props: IColumnRenderProps<T>) => VNode | string | number
|
|
53
|
+
children?: IColumn<T>[]
|
|
54
|
+
lineClamp?: number // 文本行数限制
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type IColumnRenderProps<T> = {
|
|
58
|
+
h: IRender
|
|
59
|
+
data: T
|
|
60
|
+
index?: number
|
|
61
|
+
column?: IColumn<T>
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ITableProps<T> {
|
|
65
|
+
/** 加载状态 */
|
|
66
|
+
loading?: boolean | Ref<boolean>
|
|
67
|
+
/** 是否显示边框 */
|
|
68
|
+
border?: boolean
|
|
69
|
+
/** 表格尺寸 */
|
|
70
|
+
size?: 'large' | 'default' | 'small'
|
|
71
|
+
/** 表格数据 */
|
|
72
|
+
data: Reactive<T[]>
|
|
73
|
+
/** 表格列 */
|
|
74
|
+
columns: IColumn<T>[]
|
|
75
|
+
/** 表格对齐方式 */
|
|
76
|
+
align?: 'center' | 'left' | 'right'
|
|
77
|
+
/** 是否隐藏分页 */
|
|
78
|
+
hidePagination?: boolean
|
|
79
|
+
/** 分页数据 */
|
|
80
|
+
pagination?: Reactive<{ page: number; pageSize: number; total: number; pageSizes?: number[] }>
|
|
81
|
+
/** 当前行改变时触发 */
|
|
82
|
+
currentChange?: (currentRow: T, oldCurrentRow: T) => void
|
|
83
|
+
/** 选择项改变时触发 */
|
|
84
|
+
selectionChange?: (selection: Array<T>) => void
|
|
85
|
+
/** 是否可选择 */
|
|
86
|
+
selectable?: (row: T) => boolean
|
|
87
|
+
/** 默认选中的rowKey */
|
|
88
|
+
defaultCheckedKeys?: any[]
|
|
89
|
+
rowKey?: keyof T
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ITableInstance<T = any> {
|
|
93
|
+
columns: IColumn<T>[]
|
|
94
|
+
data: Reactive<T[]>
|
|
95
|
+
loading: boolean
|
|
96
|
+
pagination: Reactive<{ page: number; pageSize: number; total: number }>
|
|
97
|
+
selection: Array<T>
|
|
98
|
+
currentRow: T | null
|
|
99
|
+
// 任意
|
|
100
|
+
[key: string]: any
|
|
101
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TreeNodeData } from 'element-plus'
|
|
2
|
+
export interface ITreeProps {
|
|
3
|
+
id?: string
|
|
4
|
+
data: TreeNodeData[]
|
|
5
|
+
filterable?: boolean
|
|
6
|
+
placeholder?: string
|
|
7
|
+
/** 因此添加操作节点 */
|
|
8
|
+
hidePlusHandle?: boolean
|
|
9
|
+
/** 隐藏节点添加子目录按钮 */
|
|
10
|
+
hideNodeAdd?: boolean
|
|
11
|
+
/** 隐藏节点的编辑按钮 */
|
|
12
|
+
hideNodeEdit?: boolean
|
|
13
|
+
/** 隐藏节点的删除按钮 */
|
|
14
|
+
hideNodeDel?: boolean
|
|
15
|
+
/** 隐藏所偶遇节点操作 */
|
|
16
|
+
hideNodeHandle?: boolean
|
|
17
|
+
nodeKey?: string
|
|
18
|
+
props?: {
|
|
19
|
+
label?: string
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type IProp = string | number | boolean | null | undefined
|
|
2
|
+
export * from './Table/type'
|
|
3
|
+
export * from './Filter/type'
|
|
4
|
+
export * from './Form/type'
|
|
5
|
+
export * from './Descriptions/type'
|
|
6
|
+
export * from './InfiniteScroll/type'
|
|
7
|
+
export * from './Tree/type'
|
|
8
|
+
export * from './Card/type'
|
|
9
|
+
export * from './Editor/type'
|
package/dist/entry.d.ts
CHANGED
|
@@ -9,9 +9,8 @@ import { default as UiInfiniteScroll } from './components/InfiniteScroll/index.v
|
|
|
9
9
|
import { default as UiDescriptions } from './components/Descriptions/index.vue';
|
|
10
10
|
import { default as UiDialog } from './components/Dialog/index.vue';
|
|
11
11
|
export { UiCard, UiTable, UiFilter, UiForm, UiEditor, UiTree, UiInfiniteScroll, UiDescriptions, UiDialog, };
|
|
12
|
-
export type * from './components/type';
|
|
13
12
|
export type { IProp } from './components/type';
|
|
14
|
-
export type * from '
|
|
13
|
+
export type * from './components/type';
|
|
15
14
|
declare const _default: {
|
|
16
15
|
install(app: App): void;
|
|
17
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yc-vep-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
|
|
6
6
|
"keywords": [
|
|
@@ -25,16 +25,6 @@
|
|
|
25
25
|
"import": "./dist/vep-ui.es.js",
|
|
26
26
|
"require": "./dist/vep-ui.umd.js"
|
|
27
27
|
},
|
|
28
|
-
"./icons-vue": {
|
|
29
|
-
"types": "./dist/icons.d.ts",
|
|
30
|
-
"import": "./dist/icons-vue.es.js",
|
|
31
|
-
"require": "./dist/icons-vue.umd.js"
|
|
32
|
-
},
|
|
33
|
-
"./element-plus": {
|
|
34
|
-
"types": "./dist/element-plus.d.ts",
|
|
35
|
-
"import": "./dist/element-plus.es.js",
|
|
36
|
-
"require": "./dist/element-plus.umd.js"
|
|
37
|
-
},
|
|
38
28
|
"./dist/yc-vep-ui.css": "./dist/yc-vep-ui.css"
|
|
39
29
|
},
|
|
40
30
|
"files": [
|
|
@@ -44,7 +34,7 @@
|
|
|
44
34
|
"scripts": {
|
|
45
35
|
"dev": "vite",
|
|
46
36
|
"build": "vue-tsc -b && vite build",
|
|
47
|
-
"build:lib": "vite build
|
|
37
|
+
"build:lib": "vite build",
|
|
48
38
|
"preview": "vite preview",
|
|
49
39
|
"prepublishOnly": "npm run build:lib"
|
|
50
40
|
},
|
|
@@ -54,18 +44,15 @@
|
|
|
54
44
|
"vue": "^3.5.0"
|
|
55
45
|
},
|
|
56
46
|
"devDependencies": {
|
|
57
|
-
"@element-plus/icons-vue": "^2.3.2",
|
|
58
47
|
"@types/node": "^24.12.3",
|
|
59
48
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
60
49
|
"@vue/tsconfig": "^0.9.1",
|
|
61
|
-
"cross-env": "^10.1.0",
|
|
62
50
|
"typescript": "~6.0.2",
|
|
63
51
|
"vite": "^8.0.12",
|
|
64
52
|
"vite-plugin-dts": "^4.5.0",
|
|
65
53
|
"vue-tsc": "^3.2.8"
|
|
66
54
|
},
|
|
67
55
|
"peerDependencies": {
|
|
68
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
69
56
|
"aieditor": "^1.4.0",
|
|
70
57
|
"element-plus": "^2.14.0",
|
|
71
58
|
"vue": "^3.5.0"
|
package/dist/element-plus.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'element-plus'
|
package/dist/element-plus.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "element-plus";
|
package/dist/element-plus.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,t())})(this,function(){Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=require(`element-plus`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})})});
|
package/dist/icons-vue.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@element-plus/icons-vue";
|
package/dist/icons-vue.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,t())})(this,function(){Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=require(`@element-plus/icons-vue`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})})});
|
package/dist/icons.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@element-plus/icons-vue'
|