sadais-piui 1.1.2-beta → 1.2.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/CHANGELOG.md +482 -240
- package/components/pi-bottom-bar/index.vue +11 -2
- package/components/pi-circle-progress/index.vue +196 -173
- package/components/pi-count-up/index.vue +68 -62
- package/components/pi-dropdown/components/dropdown-tab.vue +62 -0
- package/components/pi-dropdown/index.vue +152 -151
- package/components/pi-dropdown-item/index.vue +169 -41
- package/components/pi-form-item/index.vue +13 -1
- package/components/pi-img-cropper/index.vue +20 -16
- package/components/pi-img-cropper/touch.js +5 -3
- package/components/pi-input/index.vue +9 -2
- package/components/pi-notify/index.vue +132 -48
- package/components/pi-popup/index.vue +1 -3
- package/components/pi-select/index.vue +2 -2
- package/components/pi-steps/index.vue +141 -96
- package/components/pi-switch/index.vue +2 -3
- package/components/pi-tabs/index.vue +1 -2
- package/components/pi-upload-img/index.vue +104 -32
- package/config/bottomBar.js +1 -0
- package/config/checkbox.js +1 -1
- package/config/circleProgress.js +13 -0
- package/config/countUp.js +13 -0
- package/config/dropdown.js +17 -8
- package/config/dropdownItem.js +23 -5
- package/config/form.js +3 -3
- package/config/imgCropper.js +4 -2
- package/config/notify.js +6 -2
- package/config/steps.js +10 -5
- package/config/{upload-img.js → uploadImg.js} +6 -3
- package/index.js +2 -2
- package/package.json +3 -3
- package/scss/variable.scss +1 -1
package/config/dropdown.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import mask from './mask'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
mask
|
|
11
|
-
|
|
4
|
+
// 自定义样式类,字符串形式('')
|
|
5
|
+
customClass: '',
|
|
6
|
+
// 内容自定义样式,对象形式(默认值:{})
|
|
7
|
+
customStyle: {},
|
|
8
|
+
contentStyle: {},
|
|
9
|
+
// 弹窗蒙层的配置,默认选项请参照mask
|
|
10
|
+
mask: {
|
|
11
|
+
...mask,
|
|
12
|
+
zIndex: 100
|
|
13
|
+
},
|
|
14
|
+
activeColor: null, // 默认选中色
|
|
15
|
+
itemHeight: null, // 行高(默认:'110rpx')
|
|
16
|
+
keyField: null, // 选项id字段,默认为id
|
|
17
|
+
displayField: null, // 选项显示字段,默认为text
|
|
18
|
+
disabledField: null, // 选项禁用字段,默认为disabled
|
|
19
|
+
selectedImg: null, // 选中图标的配置
|
|
20
|
+
selectedCheckbox: null // 选中复选框配置
|
|
12
21
|
}
|
package/config/dropdownItem.js
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
import icon from './icon'
|
|
2
|
+
import img from './img'
|
|
3
|
+
import checkbox from './checkbox'
|
|
4
|
+
|
|
1
5
|
export default {
|
|
2
|
-
option: [], // 选项列表,默认([])
|
|
3
6
|
customClass: '', // 自定义样式类,字符串形式('')
|
|
4
|
-
customStyle: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
customStyle: {}, // 自定义样式,对象形式(默认值:{})
|
|
8
|
+
showIcon: false, // 是否显示图标,默认值 false
|
|
9
|
+
iconOption: {
|
|
10
|
+
...icon,
|
|
11
|
+
size: 36
|
|
12
|
+
}, // 图标配置
|
|
13
|
+
title: '',
|
|
14
|
+
disabled: false, // 是否禁用
|
|
15
|
+
option: [], // 选项列表,默认([])
|
|
16
|
+
itemHeight: 110, // 行高(默认:'110rpx')
|
|
17
|
+
keyField: 'id', // 选项id字段,默认为id
|
|
18
|
+
displayField: 'text', // 选项显示字段,默认为text
|
|
19
|
+
disabledField: 'disabled', // 选项禁用字段,默认为disabled
|
|
20
|
+
selectedImg: img, // 选中图标的配置
|
|
21
|
+
selectedCheckbox: {
|
|
22
|
+
...checkbox,
|
|
23
|
+
shape: 'round',
|
|
24
|
+
activeMode: 'fill-circle'
|
|
25
|
+
} // 选中复选框配置
|
|
8
26
|
}
|
package/config/form.js
CHANGED
|
@@ -14,9 +14,9 @@ export default {
|
|
|
14
14
|
inputAlign: null, // 表单输入区域 label 对齐方式,可选值为 left center right
|
|
15
15
|
wrap: null, // 是否以换行样式显示表单
|
|
16
16
|
labelWrapBorder: null, // wrap样式label是否显示边框
|
|
17
|
-
colon:
|
|
18
|
-
disabled:
|
|
19
|
-
border:
|
|
17
|
+
colon: null, // 是否在 label 后面添加冒号
|
|
18
|
+
disabled: null, // 是否禁用
|
|
19
|
+
border: null, // 是否显示边框
|
|
20
20
|
errorType: 'message',
|
|
21
21
|
showRightIcon: null, // 是否显示右边icon,默认是箭头(可以自定义设置成其他图标)
|
|
22
22
|
rightIcon: {
|
package/config/imgCropper.js
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
customClass: '',
|
|
6
6
|
// 图片src
|
|
7
7
|
src: '',
|
|
8
|
-
|
|
8
|
+
// 图片格式
|
|
9
9
|
fileType: 'png',
|
|
10
10
|
// 图片质量
|
|
11
11
|
quality: 1,
|
|
@@ -20,5 +20,7 @@ export default {
|
|
|
20
20
|
// 是否禁止旋转
|
|
21
21
|
disableRotate: false,
|
|
22
22
|
// 放大裁剪窗口的倍数
|
|
23
|
-
canvasZoom: 1
|
|
23
|
+
canvasZoom: 1,
|
|
24
|
+
// 遮罩层背景颜色
|
|
25
|
+
maskBackground: 'rgba(0, 0, 0, .5)'
|
|
24
26
|
}
|
package/config/notify.js
CHANGED
|
@@ -2,8 +2,12 @@ export default {
|
|
|
2
2
|
customStyle: {}, // 自定义样式,对象形式(默认值:{})
|
|
3
3
|
customClass: '', // 自定义样式类,字符串形式('')
|
|
4
4
|
message: '', // 显示的消息文本(默认值:'')
|
|
5
|
-
type: '
|
|
5
|
+
type: 'primary', // 类型: 'primary'-主要通知` `'success'-成功通知` `'danger'-危险通知` `'warning'-警告通知` `'info'-消息通知
|
|
6
6
|
duration: 3000, // 展示时长,默认 3000ms
|
|
7
7
|
color: '', // 自定义颜色消息通知文本(默认值:'')
|
|
8
|
-
bgColor: '' // 自定义背景色消息通知文本(默认值:'')
|
|
8
|
+
bgColor: '', // 自定义背景色消息通知文本(默认值:'')
|
|
9
|
+
zIndex: 9999, // 通知 z-index
|
|
10
|
+
appendToBody: true, // 是否挂载到body下,防止嵌套层级无法遮罩的问题(仅H5环境生效)
|
|
11
|
+
autoHide: true, // 是否自动隐藏,默认 true
|
|
12
|
+
singleLine: false // 是否单行显示,默认 false
|
|
9
13
|
}
|
package/config/steps.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import icon from './icon'
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
customClass: '', // 自定义样式类,字符串形式('')
|
|
3
5
|
customStyle: {}, // 自定义样式,对象形式(默认值:{})
|
|
4
6
|
items: [], // 选项列表,默认([])
|
|
5
7
|
mode: 'dot', // 步骤条的类型,默认('dot')
|
|
6
|
-
activeColor: '
|
|
7
|
-
color: '#
|
|
8
|
-
currentColor: '#
|
|
9
|
-
icon: 'check', // 选中图标
|
|
8
|
+
activeColor: '', // 激活步骤的颜色
|
|
9
|
+
color: '#cccccc', // 未激活的颜色
|
|
10
|
+
currentColor: '#666666', // 当前步骤的颜色
|
|
10
11
|
direction: 'row', // 排列方向
|
|
11
12
|
size: '24', // 图标大小
|
|
12
13
|
itemStyle: {}, // 行样式(默认:'{}')
|
|
13
|
-
itemClass: '' // 行样式(默认:'')
|
|
14
|
+
itemClass: '', // 行样式(默认:'')
|
|
15
|
+
icon: {
|
|
16
|
+
...icon,
|
|
17
|
+
size: 40
|
|
18
|
+
} // 图标配置
|
|
14
19
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:29:02
|
|
4
|
-
* @LastEditTime: 2021-11-
|
|
4
|
+
* @LastEditTime: 2021-11-17 10:07:54
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传
|
|
7
|
-
* @FilePath: /piui-
|
|
7
|
+
* @FilePath: /piui-awesome/src/piui/config/upload-img.js
|
|
8
8
|
*/
|
|
9
9
|
import icon from './icon.js'
|
|
10
|
+
import cropOption from './imgCropper.js'
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
customClass: '', // 自定义样式类,字符串形式('')
|
|
@@ -34,7 +35,8 @@ export default {
|
|
|
34
35
|
disabled: false, // 是否禁用上传
|
|
35
36
|
maxCount: 9, // 上传文件的最大数量
|
|
36
37
|
uploadText: '', // 上传区域文字提示
|
|
37
|
-
|
|
38
|
+
crop: false, // 当maxCount设置为1的时候,可开启裁剪
|
|
39
|
+
cropOption, // 裁剪配置
|
|
38
40
|
// 上传区域图标
|
|
39
41
|
uploadIcon: {
|
|
40
42
|
...icon,
|
|
@@ -56,5 +58,6 @@ export default {
|
|
|
56
58
|
}
|
|
57
59
|
},
|
|
58
60
|
beforeUpload: null, // 上传之前的钩子
|
|
61
|
+
onProgress: null, // 文件上传时的钩子
|
|
59
62
|
beforeRemove: null // 删除之前的钩子
|
|
60
63
|
}
|
package/index.js
CHANGED
|
@@ -30,9 +30,9 @@ const install = function(Vue, config = {}) {
|
|
|
30
30
|
// #ifndef APP-PLUS
|
|
31
31
|
console.group && console.group('piui')
|
|
32
32
|
|
|
33
|
-
console.log('%cpiui 已安装,教程:https://
|
|
33
|
+
console.log('%cpiui 已安装,教程:https://piui.sadais.com/docs/components/Config.html', logStyle)
|
|
34
34
|
console.log('%cpiui 组件全局配置:', logStyle, piConfig)
|
|
35
|
-
console.log('%cpiui tools
|
|
35
|
+
console.log('%cpiui tools 已挂载,使用方式 this.$pi.xxx:', logStyle, tools)
|
|
36
36
|
|
|
37
37
|
console.groupEnd && console.groupEnd('piui')
|
|
38
38
|
// #endif
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sadais-piui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "piui组件库",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"changelog": "
|
|
7
|
+
"changelog": "npx gitmoji-changelog"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/sadais-org/piui.git"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@sadais/piui-tool": "^0.0.
|
|
14
|
+
"@sadais/piui-tool": "^0.0.18"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"piui sadais-piui"
|
package/scss/variable.scss
CHANGED
|
@@ -11,7 +11,7 @@ $pi-upload-radius: 120rpx !default; // 文件上传正方形半径
|
|
|
11
11
|
|
|
12
12
|
// 动画
|
|
13
13
|
$pi-animation-duration: 0.3s !default; // 动画执行时长
|
|
14
|
-
$pi-animation-timing-function:
|
|
14
|
+
$pi-animation-timing-function: ease !default; // 动画执行函数
|
|
15
15
|
|
|
16
16
|
// 颜色
|
|
17
17
|
$pi-font-color: #333333 !default; // 文字颜色
|