y-admin-ui 0.0.2
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/LICENSE +21 -0
- package/README.md +50 -0
- package/global.d.ts +138 -0
- package/lib/favicon.ico +0 -0
- package/lib/index.2c61de1f.js +6 -0
- package/lib/index.d23b5852.js +24736 -0
- package/lib/index.d23b5852.js.gz +0 -0
- package/lib/index.fcb0faf9.js +182 -0
- package/lib/style.css +1 -0
- package/lib/style.css.gz +0 -0
- package/lib/y-admin-ui.js +13 -0
- package/lib/y-admin-ui.umd.cjs +32 -0
- package/package.json +94 -0
- package/typings/index.d.ts +163 -0
package/package.json
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
{
|
2
|
+
"name": "y-admin-ui",
|
3
|
+
"version": "0.0.2",
|
4
|
+
"description": "y-admin-ui 基于Element-plus二次封装基础组件文档",
|
5
|
+
"author": "yaochengjian",
|
6
|
+
"license": "MIT",
|
7
|
+
"private": false,
|
8
|
+
"main": "lib/y-admin-ui.umd.cjs",
|
9
|
+
"module": "lib/y-admin-ui.umd.cjs",
|
10
|
+
"types": "lib/index.d.ts",
|
11
|
+
"type": "module",
|
12
|
+
"files": [
|
13
|
+
"package.json",
|
14
|
+
"README.md",
|
15
|
+
"LICENSE",
|
16
|
+
"lib",
|
17
|
+
"typings",
|
18
|
+
"global.d.ts"
|
19
|
+
],
|
20
|
+
"scripts": {
|
21
|
+
"lib": "rimraf lib && vite build",
|
22
|
+
"deploy": "deploy.sh",
|
23
|
+
"pub": "npm publish --registry=https://registry.npmjs.org/",
|
24
|
+
"prettier": "prettier --write \"packages/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
25
|
+
"docs:prettier": "prettier --write \"docs/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
26
|
+
"docs:dev": "vitepress dev docs",
|
27
|
+
"docs:build": "vitepress build docs"
|
28
|
+
},
|
29
|
+
"devDependencies": {
|
30
|
+
"@element-plus/icons-vue": "^2.0.10",
|
31
|
+
"@rollup/plugin-replace": "^5.0.5",
|
32
|
+
"@rollup/plugin-terser": "^0.4.4",
|
33
|
+
"@types/node": "18.7.18",
|
34
|
+
"@types/nprogress": "^0.2.0",
|
35
|
+
"@types/path-browserify": "^1.0.0",
|
36
|
+
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
37
|
+
"@typescript-eslint/parser": "^5.40.0",
|
38
|
+
"@vitejs/plugin-vue": "^3.1.0",
|
39
|
+
"@vitejs/plugin-vue-jsx": "^2.0.1",
|
40
|
+
"@vue/shared": "^3.3.13",
|
41
|
+
"@vueuse/core": "^9.13.0",
|
42
|
+
"axios": "^1.1.2",
|
43
|
+
"chalk": "^5.2.0",
|
44
|
+
"consola": "^3.1.0",
|
45
|
+
"echarts": "^5.4.3",
|
46
|
+
"element-plus": "^2.7.8",
|
47
|
+
"escape-html": "^1.0.3",
|
48
|
+
"eslint": "^8.25.0",
|
49
|
+
"eslint-config-prettier": "^8.5.0",
|
50
|
+
"eslint-plugin-prettier": "^4.2.1",
|
51
|
+
"eslint-plugin-vue": "^9.6.0",
|
52
|
+
"jsencrypt": "3.0.0-rc.1",
|
53
|
+
"markdown-it": "^13.0.1",
|
54
|
+
"markdown-it-container": "^3.0.0",
|
55
|
+
"minimist": "^1.2.8",
|
56
|
+
"normalize.css": "^8.0.1",
|
57
|
+
"npm-run-all": "^4.1.5",
|
58
|
+
"nprogress": "^0.2.0",
|
59
|
+
"path-browserify": "^1.0.1",
|
60
|
+
"pinia": "^2.0.23",
|
61
|
+
"pinia-plugin-persistedstate": "^2.3.0",
|
62
|
+
"prettier": "^2.7.1",
|
63
|
+
"prismjs": "^1.29.0",
|
64
|
+
"rollup-plugin-visualizer": "^5.8.2",
|
65
|
+
"sass": "^1.55.0",
|
66
|
+
"sass-loader": "^13.1.0",
|
67
|
+
"sortablejs": "^1.15.0",
|
68
|
+
"typescript": "^4.6.4",
|
69
|
+
"unocss": "^0.51.13",
|
70
|
+
"unplugin-auto-import": "^0.11.2",
|
71
|
+
"vite": "^3.1.0",
|
72
|
+
"vite-plugin-compression": "^0.5.1",
|
73
|
+
"vite-plugin-dts": "^1.7.3",
|
74
|
+
"vite-plugin-vue-setup-extend": "^0.4.0",
|
75
|
+
"vitepress": "1.0.0-alpha.75",
|
76
|
+
"vue": "3.3.4",
|
77
|
+
"vue-i18n": "^9.10.2",
|
78
|
+
"vue-router": "^4.1.5",
|
79
|
+
"vue-tsc": "^0.40.4",
|
80
|
+
"vuedraggable": "^4.1.0"
|
81
|
+
},
|
82
|
+
"keywords": [
|
83
|
+
"element-ui",
|
84
|
+
"element-plus",
|
85
|
+
"vite",
|
86
|
+
"vite3",
|
87
|
+
"vitepress",
|
88
|
+
"vue",
|
89
|
+
"vue3",
|
90
|
+
"二次封装组件",
|
91
|
+
"封装组件",
|
92
|
+
"components"
|
93
|
+
]
|
94
|
+
}
|
@@ -0,0 +1,163 @@
|
|
1
|
+
|
2
|
+
declare interface AnyObject {
|
3
|
+
[key: string]: any;
|
4
|
+
}
|
5
|
+
/* TForm */
|
6
|
+
declare namespace FormTypes {
|
7
|
+
interface FormOpts {
|
8
|
+
ref: any; // 表单实例
|
9
|
+
labelPosition?: string; // label对齐方式
|
10
|
+
labelWidth?: string; // label宽度
|
11
|
+
btnSlotName?: string; // 按钮插槽名称
|
12
|
+
formData: AnyObject; // 表单数据
|
13
|
+
fieldList: FieldList[]; // 表单项
|
14
|
+
rules?: any; // 表单验证规则
|
15
|
+
listTypeInfo?: any; // 下拉框数据
|
16
|
+
operatorList?: OperatorList[]; // 操作按钮
|
17
|
+
}
|
18
|
+
interface FieldList {
|
19
|
+
isHideItem?: boolean; // 是否隐藏
|
20
|
+
label?: string; // label
|
21
|
+
value?: string; // 字段名
|
22
|
+
labelSlotName?: string; // label插槽名称
|
23
|
+
labelRender?: (...ags: any[]) => any; // label render渲染
|
24
|
+
className?: string; // 表单项class
|
25
|
+
isTrim?: boolean; // el-input 是否去除空格
|
26
|
+
rules?: any; // 表单项验证规则
|
27
|
+
widthSize?: number; // 表单项宽度
|
28
|
+
slotName?: string; // 表单输入框插槽名称
|
29
|
+
textShow?: boolean; // 是否文本展示
|
30
|
+
textValue?: string; // 文本展示值
|
31
|
+
isSelfCom?: boolean; // 是否自定义组件
|
32
|
+
type?: string; // 表单类型
|
33
|
+
ref?: string; // 表单组件实例
|
34
|
+
list?: string; // 下拉框数据变量名称
|
35
|
+
arrLabel?: string; // 下拉框label字段
|
36
|
+
arrKey?: string; // 下拉框value字段
|
37
|
+
event?: string; // 触发handleEvent事件的标识
|
38
|
+
comp?: any; // 组件名称
|
39
|
+
placeholder?: string; // 提示语
|
40
|
+
bind?: any; // 绑定数据(Objec or Function(formData))
|
41
|
+
width?: string; // 组件宽度
|
42
|
+
prepend?: string; // el-input输入框前置内容
|
43
|
+
append?: string; // el-input输入框后置内容
|
44
|
+
childSlotName?: string; // 子组件插槽名称
|
45
|
+
eventHandle?: AnyObject; // 事件处理函数
|
46
|
+
}
|
47
|
+
interface OperatorList {
|
48
|
+
label?: string; // 按钮名称
|
49
|
+
fun?: (val: any) => void; // 按钮点击事件
|
50
|
+
bind?: AnyObject; // 绑定数据
|
51
|
+
isHideBtn?: boolean; // 是否隐藏按钮
|
52
|
+
render?: (...ags: any[]) => any; // render函数
|
53
|
+
}
|
54
|
+
}
|
55
|
+
/* TQueryCondition */
|
56
|
+
declare namespace QueryTypes {
|
57
|
+
interface Opts {
|
58
|
+
[key: string]: {
|
59
|
+
label: string; // 列名
|
60
|
+
comp: string; // 组件名
|
61
|
+
span?: number; // 表单栅格
|
62
|
+
bind?: any; // 绑定值
|
63
|
+
defaultVal?: any; // 默认值
|
64
|
+
isSelfCom?: boolean; // 是否是自定义组件
|
65
|
+
type?: string; // 组件类型
|
66
|
+
list?: string; // 下拉列表变量名
|
67
|
+
listTypeInfo?: any; // 下拉列表数据源
|
68
|
+
arrLabel?: string; // 下拉列表label
|
69
|
+
arrKey?: string; // 下拉列表value
|
70
|
+
eventHandle?: any; // 事件处理函数 };
|
71
|
+
};
|
72
|
+
}
|
73
|
+
}
|
74
|
+
/* TTable */
|
75
|
+
declare namespace TableTypes {
|
76
|
+
interface Table {
|
77
|
+
border?: boolean; // 是否显示边框
|
78
|
+
firstColumn?: any[] | AnyObject; // 第一列数据
|
79
|
+
rules?: AnyObject; // 表单验证规则
|
80
|
+
listTypeInfo?: any; // 字典过滤
|
81
|
+
operator?: any; // 操作按钮
|
82
|
+
operatorConfig?: AnyObject; // 操作列配置
|
83
|
+
currentPage?: Number; // 当前页码
|
84
|
+
pageSize?: Number; // 每页条数
|
85
|
+
total?: Number; // 总条数
|
86
|
+
layout?: string; // 分页布局
|
87
|
+
prevText?: string; // 上一页文本
|
88
|
+
nextText?: string; // 下一页文本
|
89
|
+
size?: string; // 分页尺寸
|
90
|
+
data: any[]; // 表格数据
|
91
|
+
columns: Columns[]; // 表格列
|
92
|
+
}
|
93
|
+
interface Columns {
|
94
|
+
prop?: string; // 列字段
|
95
|
+
label?: string; // 列标题
|
96
|
+
width?: string | number; // 列宽度
|
97
|
+
minWidth?: string | number; // 列最小宽度
|
98
|
+
align?: string; // 列对齐方式
|
99
|
+
fixed?: string; // 列固定
|
100
|
+
type?: string; // 列类型
|
101
|
+
sortable?: any; // 列是否可排序
|
102
|
+
sort?: any; // 列排序方式
|
103
|
+
isShowCol?: boolean | Function; // 列是否显示
|
104
|
+
isShowHidden?: boolean;
|
105
|
+
align?: string; // 列对齐方式
|
106
|
+
fixed?: string; // 列固定
|
107
|
+
bind?: AnyObject; // el-table-column 属性
|
108
|
+
headerRequired?: boolean; // 表头是否显示必填红点
|
109
|
+
renderHeader?: (...ags: any[]) => any; // 自定义表头
|
110
|
+
render?: (...ags: any[]) => any; // 自定义列内容
|
111
|
+
slotName?: string; // 自定义列内容插槽
|
112
|
+
canEdit?: boolean; // 是否可编辑
|
113
|
+
isClickEdit?: boolean; // 是否点击编辑
|
114
|
+
isShowEditIcon?: boolean; // 是否显示编辑图标
|
115
|
+
configEdit?: ConfigEdit; // 编辑配置
|
116
|
+
filters?: Filters; // 字典过滤
|
117
|
+
children?: any[]; // 子列
|
118
|
+
}
|
119
|
+
interface Filters {
|
120
|
+
list: string; // 字典列表
|
121
|
+
key: string; // 字典key
|
122
|
+
label: string; // 字典label
|
123
|
+
}
|
124
|
+
interface ConfigEdit {
|
125
|
+
rules?: any; // 校验规则
|
126
|
+
editSlotName?: string; // 编辑插槽
|
127
|
+
isSelfCom?: boolean; // 是否自定义组件
|
128
|
+
bind?: any; // 组件属性(Objec or Function)
|
129
|
+
editComponent?: any; // 编辑组件
|
130
|
+
placeholder?: string; // 占位符
|
131
|
+
width?: string | number; // 编辑框宽度
|
132
|
+
type?: string; // 编辑框类型
|
133
|
+
prepend?: string; // el-input前缀
|
134
|
+
append?: string; // el-input后缀
|
135
|
+
ref?: string; // ref
|
136
|
+
isShowTips?: boolean; // 是否显示tips
|
137
|
+
label?: string; // label
|
138
|
+
list?: string; // 下拉数据字段名称
|
139
|
+
arrLabel?: string; // 下拉数据label字段名称
|
140
|
+
arrKey?: string; // 下拉数据value字段名称
|
141
|
+
event?: string; // 触发handleEvent事件的标识
|
142
|
+
eventHandle?: any; // 事件处理
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
/* Vite */
|
148
|
+
declare type Recordable<T = any> = Record<string, T>;
|
149
|
+
|
150
|
+
/* __APP_INFO__ */
|
151
|
+
declare const __APP_INFO__: {
|
152
|
+
pkg: {
|
153
|
+
name: string;
|
154
|
+
version: string;
|
155
|
+
dependencies: Recordable<string>;
|
156
|
+
devDependencies: Recordable<string>;
|
157
|
+
};
|
158
|
+
lastBuildTime: string;
|
159
|
+
};
|
160
|
+
// Map声明全局变量
|
161
|
+
declare interface TypeMap {
|
162
|
+
[key: string]: { type: string; val: string };
|
163
|
+
}
|