zhytech-ui-mobile 1.0.0
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 +71 -0
- package/dist/build/h5/static/iconfont/iconfont.css +27 -0
- package/dist/build/h5/static/iconfont/iconfont.ttf +0 -0
- package/dist/build/h5/static/iconfont/iconfont.woff +0 -0
- package/dist/build/h5/static/iconfont/iconfont.woff2 +0 -0
- package/dist/build/h5/static/scss/actionSheet.scss +12 -0
- package/dist/build/h5/static/scss/button.scss +3 -0
- package/dist/build/h5/static/scss/checkbox.scss +35 -0
- package/dist/build/h5/static/scss/form.scss +18 -0
- package/dist/build/h5/static/scss/index.scss +7 -0
- package/dist/build/h5/static/scss/input.scss +15 -0
- package/dist/build/h5/static/scss/picker.scss +13 -0
- package/dist/build/h5/static/scss/radio.scss +33 -0
- package/dist/build/h5/style.css +1 -0
- package/dist/build/h5/zhytech-ui-mobile.es.js +19661 -0
- package/dist/build/h5/zhytech-ui-mobile.umd.js +1 -0
- package/dist/dev/true/style.css +455 -0
- package/dist/dev/true/zhytech-ui-mobile.es.js +3440 -0
- package/dist/dev/true/zhytech-ui-mobile.umd.js +3443 -0
- package/package.json +99 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# zhytechUI Mobile
|
|
2
|
+
|
|
3
|
+
> ### 简介
|
|
4
|
+
一个基于Vue3 + wot-design-uni + TypeScript + unocss封装的前端UI组件库
|
|
5
|
+
|
|
6
|
+
[在线演示](http://60.205.113.132:7006/)
|
|
7
|
+
> ### 组件列表
|
|
8
|
+
#### 1、dynamicRenderer
|
|
9
|
+
动态表单渲染组件:
|
|
10
|
+
支持**基础组件**(文本、输入框、单选框、复选框、数字框、日期、时间)、**高级组件**(文件上传、图片上传)、**应用组件**(质控评分、公司人员选择组件、公司岗位选择组件)、**布局组件**(分组、标签页)。
|
|
11
|
+
|
|
12
|
+
> ### 使用说明
|
|
13
|
+
#### 1、安装
|
|
14
|
+
```ts
|
|
15
|
+
npm i zhytech-ui-mobile -S
|
|
16
|
+
```
|
|
17
|
+
更新本版
|
|
18
|
+
```ts
|
|
19
|
+
npm i zhytech-ui-mobile@latest -S
|
|
20
|
+
```
|
|
21
|
+
#### 2、引入使用
|
|
22
|
+
1)、按需引入:在要使用的页面添加下面代码即可
|
|
23
|
+
```ts
|
|
24
|
+
import { ZhyFormRenderer } from "zhytech-ui-mobile"
|
|
25
|
+
import "zhytech-ui-mobile/dist/style.css";
|
|
26
|
+
```
|
|
27
|
+
2)、全局引入:在main.ts中引入,在项目内任何页面都不需要单独引入
|
|
28
|
+
```ts
|
|
29
|
+
import zhytechUIMobile from "zhytech-ui-mobile";
|
|
30
|
+
import "zhytech-ui-mobile/dist/style.css";
|
|
31
|
+
createApp(app).use(zhytechUIMobile)
|
|
32
|
+
```
|
|
33
|
+
#### 2、主题(V 1.1.0)
|
|
34
|
+
目前支持传入主题色,默认主题色`#4d80f0` 设置方法如下:
|
|
35
|
+
2.1、在全局引入时设置主题色
|
|
36
|
+
```ts
|
|
37
|
+
// 在main.ts中引入
|
|
38
|
+
const theme = { colorTheme: "#ff0000" };
|
|
39
|
+
createApp(app)use(zhytechUiMobile, { theme });
|
|
40
|
+
```
|
|
41
|
+
2.2、动态设置组件库主题色,使用提供的setTheme方法设置
|
|
42
|
+
```ts
|
|
43
|
+
// 在需要的地方设置
|
|
44
|
+
import { setTheme } from "zhytech-ui-mobile";
|
|
45
|
+
setTheme("dark");
|
|
46
|
+
```
|
|
47
|
+
#### 3、使用组件
|
|
48
|
+
```html
|
|
49
|
+
<zhy-form-designer :formData="formData"></zhy-form-designer>
|
|
50
|
+
```
|
|
51
|
+
#### 4、使用组件提供的类型
|
|
52
|
+
```ts
|
|
53
|
+
import type { batchAddComponentParam, dynamicFormData, uploadOption } from "zhytech-ui-mobile";
|
|
54
|
+
```
|
|
55
|
+
> #### 注意:
|
|
56
|
+
|
|
57
|
+
1)、此组件库提供的所有组件在使用时均需要添加**zhy**前缀,如:zhy-form-renderer
|
|
58
|
+
|
|
59
|
+
2)、此组件css样式依赖scss开发,使用者项目还需要添加scss依赖。
|
|
60
|
+
|
|
61
|
+
> #### 版本更新清单:
|
|
62
|
+
|
|
63
|
+
**V 1.0.0**
|
|
64
|
+
```html
|
|
65
|
+
1.……………………
|
|
66
|
+
2.……………………
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> #### 后续计划:
|
|
70
|
+
|
|
71
|
+
此组件库目前还处于雏形,后续会继续添加组件
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "iconfont"; /* Project id 5013457 */
|
|
3
|
+
src: url('iconfont.woff2?t=1756949533339') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1756949533339') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1756949533339') format('truetype');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.iconfont {
|
|
9
|
+
font-family: "iconfont" !important;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.zhy-tip:before {
|
|
17
|
+
content: "\e6bf";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.zhy-form:before {
|
|
21
|
+
content: "\e643";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.zhy-examination:before {
|
|
25
|
+
content: "\e635";
|
|
26
|
+
}
|
|
27
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.zhy.wd-checkbox-group {
|
|
2
|
+
.wd-checkbox {
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
width: auto;
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
margin-top: 8px;
|
|
7
|
+
&.is-inline {
|
|
8
|
+
margin-right: 15px;
|
|
9
|
+
}
|
|
10
|
+
// &.is-disabled {
|
|
11
|
+
// &.is-checked {
|
|
12
|
+
// .wd-checkbox__shape {
|
|
13
|
+
// border-color: var(--wot-color-primary);
|
|
14
|
+
// background-color: var(--wot-color-primary);
|
|
15
|
+
// }
|
|
16
|
+
// }
|
|
17
|
+
// .wd-checkbox__shape {
|
|
18
|
+
// background: unset;
|
|
19
|
+
// color: #ffffff;
|
|
20
|
+
// }
|
|
21
|
+
// }
|
|
22
|
+
.wd-checkbox__shape {
|
|
23
|
+
vertical-align: top;
|
|
24
|
+
}
|
|
25
|
+
.wd-checkbox__label {
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
width: calc(100% - 21px);
|
|
28
|
+
margin-left: 5px;
|
|
29
|
+
margin-top: -3px;
|
|
30
|
+
.wd-checkbox__txt {
|
|
31
|
+
white-space: normal;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.zhy.wd-form {
|
|
2
|
+
.zhy.wd-cell {
|
|
3
|
+
padding-left: 0;
|
|
4
|
+
.wd-cell__wrapper {
|
|
5
|
+
&.is-vertical {
|
|
6
|
+
padding: 5px;
|
|
7
|
+
.wd-cell__right {
|
|
8
|
+
margin-top: 0;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.wd-cell__right {
|
|
12
|
+
.wd-cell__value.wd-cell__value--right {
|
|
13
|
+
text-align: left;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.zhy.wd-input {
|
|
2
|
+
padding: 0 10px;
|
|
3
|
+
margin-top: 4px;
|
|
4
|
+
border-radius: 6px;
|
|
5
|
+
border: 1px solid #999999;
|
|
6
|
+
&::after {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
&.is-disabled {
|
|
10
|
+
background-color: #f8f8f8;
|
|
11
|
+
.uni-input-input:disabled {
|
|
12
|
+
color: #000000;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.zhy.wd-picker {
|
|
2
|
+
.wd-picker__toolbar {
|
|
3
|
+
height: 45px;
|
|
4
|
+
background-color: var(--wot-color-theme, #4d80f0);
|
|
5
|
+
.wd-picker__action {
|
|
6
|
+
padding: 0 15px;
|
|
7
|
+
color: #ffffff;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
.wd-picker-view-column__item.wd-picker-view-column__item--active {
|
|
11
|
+
background-color: #fffacd;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.zhy.wd-radio-group {
|
|
2
|
+
.wd-radio {
|
|
3
|
+
margin-top: 8px;
|
|
4
|
+
&.is-inline {
|
|
5
|
+
margin-right: 15px;
|
|
6
|
+
}
|
|
7
|
+
&.is-dot.icon-placement-left {
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
width: auto;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
.wd-radio__label {
|
|
12
|
+
text-align: left;
|
|
13
|
+
width: calc(100% - 21px);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
// &.is-disabled {
|
|
17
|
+
// &.is-checked {
|
|
18
|
+
// .wd-radio__shape {
|
|
19
|
+
// border-color: var(--wot-color-primary);
|
|
20
|
+
// background-color: var(--wot-color-primary);
|
|
21
|
+
// }
|
|
22
|
+
// }
|
|
23
|
+
// .wd-radio__shape {
|
|
24
|
+
// background: unset;
|
|
25
|
+
// color: #ffffff;
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
28
|
+
.wd-radio__shape {
|
|
29
|
+
margin-top: 2px;
|
|
30
|
+
margin-right: 5px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|