zhytech-ui 1.0.4 → 1.0.6

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 CHANGED
@@ -1,46 +1,36 @@
1
1
  # zhytechUI
2
-
3
- This template should help get you started developing with Vue 3 in Vite.
4
-
5
- ## Recommended IDE Setup
6
-
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
- ## Type Support for `.vue` Imports in TS
10
-
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
-
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19
-
20
- ## Customize configuration
21
-
22
- See [Vite Configuration Reference](https://vitejs.dev/config/).
23
-
24
- ## Project Setup
25
-
26
- ```sh
27
- npm install
2
+ **介绍:一个基于Vue3 + ElementPlus + TypeScript封装的公司内部组件库**
3
+
4
+ **组件列表:**
5
+ > ### dynamicForm
6
+ 此组件为动态表单组件,目前包含基础组件:文本、输入框、单选框、复选框、评分、文件上传、图片上传;高级组件:分组面板、公司人员选择组件、公司岗位选择组件。
7
+ 通过拖拽设计表单或试卷,以减少开发时间,此组件提供一个表单设计器和表单渲染器。
8
+
9
+ > ### dynamicFilter
10
+ 此组件为动态条件组件,支持传入多组项目、支持不同项目自定义不同的条件,支持子条件,支持无限嵌套
11
+
12
+ ### 使用说明
13
+ ##### 1、安装
14
+ ```ts
15
+ npm i zhytech-ui -S
28
16
  ```
29
-
30
- ### Compile and Hot-Reload for Development
31
-
32
- ```sh
33
- npm run dev
17
+ 更新本版
18
+ ```ts
19
+ npm i zhytech-ui@latest -S
34
20
  ```
35
-
36
- ### Type-Check, Compile and Minify for Production
37
-
38
- ```sh
39
- npm run build
21
+ ##### 2、引入使用
22
+ 1)、按需引入:在要使用的页面添加下面代码即可
23
+ ```ts
24
+ import { dynamicFormData,dynamicFilter } from "zhytech-ui"
25
+ ```
26
+ 2)、全局引入:在项目内任何页面都不需要单独引入
27
+ ```ts
28
+ import zhytechUI from "zhytech-ui";
29
+ createApp(app).use(zhytechUI)
40
30
  ```
41
31
 
42
- ### Lint with [ESLint](https://eslint.org/)
32
+ **注意:此组件css样式依赖scss开发,使用者项目还需要添加scss依赖**
43
33
 
44
- ```sh
45
- npm run lint
46
- ```
34
+
35
+ > #### 后续计划:
36
+ 此组件还是一个雏形,后续会继续添加组件
@@ -0,0 +1,76 @@
1
+ export declare function useUtils(): {
2
+ /**
3
+ * @description: 计算表达式,实现eval函数功能,解决使用eval时编译报错
4
+ * @param expression
5
+ * @return
6
+ */
7
+ computedExpression: (expression: string) => any;
8
+ /**
9
+ * @description: 生成项目临时ID
10
+ * @param prefix 前缀
11
+ * @return
12
+ */
13
+ getTempID(prefix?: string): string;
14
+ /**
15
+ * @description: 解决JSON.stringify和JSON.parse不能转换RegExp的问题
16
+ * @param jsonStr
17
+ * @return
18
+ */
19
+ parseJson: (jsonStr: string) => any;
20
+ /**
21
+ * @description: json对象转json字符串
22
+ * @param json
23
+ * @return
24
+ */
25
+ stringifyJson: (jsonObject: object) => string;
26
+ /**
27
+ * @description: 克隆对象
28
+ * @param jsonObject
29
+ * @return
30
+ */
31
+ clone(jsonObject: any): any;
32
+ /**
33
+ * @description: 判断参数是否为空
34
+ * @param T param
35
+ * @return
36
+ */
37
+ isEmpty: <T>(param: T) => boolean;
38
+ /**
39
+ * @description: 判断参数是否为空
40
+ * @param T obj
41
+ * @return
42
+ */
43
+ removeEmptyAttribute(obj: Object): Object;
44
+ /**
45
+ * @description: 检查上传的文件是否合法
46
+ * @param file 要上传的文件
47
+ * @param files 已上传的文件
48
+ * @param size 文件限制大小
49
+ * @param unit 文件限制大小的单位
50
+ * @param isImage 是否为图片
51
+ * @return
52
+ */
53
+ checkFile(file: any, files: [], size: number, unit: string, isImage: boolean): boolean;
54
+ /**
55
+ * @description: 根据传入值获取:①对应节点所在的各级菜单的值所组成的数组(多选为二维数组)②对应节点的对象(多选为对象数组)
56
+ * @param selectVale 级联选择器选择的值
57
+ * @param options 级联选择器的所有数据
58
+ * @param valueName 级联选择器的数据类型value名字
59
+ * @param chilName 级联选择器的数据类型children名字
60
+ * @param multipleFlag 是否是多选
61
+ * @returns
62
+ */
63
+ getCascaderFullValue<V, L>(selectVale: V | V[], options: L[], valueName: string, chilName: string, multipleFlag?: boolean): (L | V[] | L[] | V[][])[];
64
+ /**
65
+ * 存储/读取localStorage数据
66
+ * name: localStorage的key
67
+ * value: localStorage的value
68
+ */
69
+ storage(key: string, value?: any): any;
70
+ /**
71
+ * 存储/读取sessionStorage数据
72
+ * name: localStorage的key
73
+ * value: localStorage的value
74
+ */
75
+ session(key: string, value?: any): any;
76
+ };
File without changes
@@ -0,0 +1,2 @@
1
+ declare const router: import('vue-router').Router;
2
+ export default router;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * 消息类型
3
+ */
4
+ export declare enum MessageType {
5
+ /**
6
+ * 成功消息
7
+ */
8
+ success = 0,
9
+ /**
10
+ * 警告消息
11
+ */
12
+ warning = 1,
13
+ /**
14
+ * 错误消息
15
+ */
16
+ error = 2,
17
+ /**
18
+ * 普通消息
19
+ */
20
+ info = 3
21
+ }
22
+ /**
23
+ * 过滤条件组件类型
24
+ */
25
+ export declare enum filterConditionTypes {
26
+ /**
27
+ * 等于=
28
+ */
29
+ EQUALS = "\u7B49\u4E8E",
30
+ /**
31
+ * 不等于!=
32
+ */
33
+ NOT_EQUALS = "\u4E0D\u7B49\u4E8E",
34
+ /**
35
+ * 大于>
36
+ */
37
+ GREATER_THAN = "\u5927\u4E8E",
38
+ /**
39
+ * 小于<
40
+ */
41
+ LESS_THAN = "\u5C0F\u4E8E",
42
+ /**
43
+ * 大于等于>=
44
+ */
45
+ GREATER_THAN_OR_EQUALS = "\u5927\u4E8E\u7B49\u4E8E",
46
+ /**
47
+ * 小于等于<=
48
+ */
49
+ LESS_THAN_OR_EQUALS = "\u5C0F\u4E8E\u7B49\u4E8E",
50
+ /**
51
+ * 为空
52
+ */
53
+ EMPTY = "\u4E3A\u7A7A",
54
+ /**
55
+ * 包含
56
+ */
57
+ INCLUDES = "\u5305\u542B",
58
+ /**
59
+ * 不包含
60
+ */
61
+ EXCLUDE = "\u4E0D\u5305\u542B",
62
+ /**
63
+ * 范围
64
+ */
65
+ RANGE = "\u8303\u56F4"
66
+ }
@@ -0,0 +1,10 @@
1
+ declare interface OptionView {
2
+ /**
3
+ * ID
4
+ */
5
+ key: number | string;
6
+ /**
7
+ * 文本内容
8
+ */
9
+ value: string;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhytech-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -23,9 +23,10 @@
23
23
  "license": "MIT",
24
24
  "main": "./dist/zhytech-ui.umd.js",
25
25
  "module": "./dist/zhytech-ui.es.js",
26
+ "types":"./dist/src/index.d.ts",
27
+ "style":"./dist/style.css",
26
28
  "exports": {
27
29
  ".": {
28
- "types":"./dist/src/index.d.ts",
29
30
  "import": "./dist/zhytech-ui.es.js",
30
31
  "require": "./dist/zhytech-ui.umd.js"
31
32
  }