uview-plus 3.1.47 → 3.1.49
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 +10 -10
- package/changelog.md +6 -0
- package/components/u-back-top/u-back-top.vue +1 -1
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/u-checkbox.vue +1 -1
- package/components/u-count-down/u-count-down.vue +1 -1
- package/components/u-datetime-picker/props.js +13 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +22 -3
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/u-index-list.vue +1 -1
- package/components/u-input/u-input.vue +10 -4
- package/components/u-number-box/u-number-box.vue +21 -1
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-transition/u-transition.vue +1 -1
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +1 -5
- package/libs/css/flex.scss +30 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
[](https://github.com/ijry/uview-plus)
|
|
8
8
|
[](https://github.com/ijry/uview-plus)
|
|
9
9
|
[](https://github.com/ijry/uview-plus/issues)
|
|
10
|
-
[](https://gitee.com/
|
|
10
|
+
[](https://gitee.com/jry/uview-plus/releases)
|
|
11
11
|
[](https://en.wikipedia.org/wiki/MIT_License)
|
|
12
12
|
|
|
13
13
|
## 说明
|
|
14
14
|
|
|
15
15
|
uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
|
|
16
16
|
|
|
17
|
-
## [官方文档:https://
|
|
17
|
+
## [官方文档:https://uview-plus.jiangruyi.com](https://uview-plus.jiangruyi.com)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
## 预览
|
|
@@ -22,18 +22,18 @@ uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的
|
|
|
22
22
|
您可以通过**微信**扫码,查看最佳的演示效果。
|
|
23
23
|
<br>
|
|
24
24
|
<br>
|
|
25
|
-
<img src="https://
|
|
25
|
+
<img src="https://uview-plus.jiangruyi.com/common/h5_qrcode.png" width="220" height="220" >
|
|
26
26
|
|
|
27
27
|
## 链接
|
|
28
28
|
|
|
29
|
-
- [官方文档](https://
|
|
30
|
-
- [更新日志](https://
|
|
31
|
-
- [升级指南](https://
|
|
32
|
-
- [关于我们](https://
|
|
29
|
+
- [官方文档](https://uview-plus.jiangruyi.com)
|
|
30
|
+
- [更新日志](https://uview-plus.jiangruyi.com/components/changelog.html)
|
|
31
|
+
- [升级指南](https://uview-plus.jiangruyi.com/components/changeGuide.html)
|
|
32
|
+
- [关于我们](https://uview-plus.jiangruyi.com/cooperation/about.html)
|
|
33
33
|
|
|
34
34
|
## 交流反馈
|
|
35
35
|
|
|
36
|
-
欢迎加入我们的QQ群交流反馈:[点此跳转](https://
|
|
36
|
+
欢迎加入我们的QQ群交流反馈:[点此跳转](https://uview-plus.jiangruyi.com/components/addQQGroup.html)
|
|
37
37
|
|
|
38
38
|
## 关于PR
|
|
39
39
|
|
|
@@ -44,11 +44,11 @@ uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的
|
|
|
44
44
|
|
|
45
45
|
#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?name=uview-plus](https://ext.dcloud.net.cn/plugin?name=uview-plus)
|
|
46
46
|
|
|
47
|
-
请通过[官网安装文档](https://
|
|
47
|
+
请通过[官网安装文档](https://uview-plus.jiangruyi.com/components/install.html)了解更详细的内容
|
|
48
48
|
|
|
49
49
|
## 快速上手
|
|
50
50
|
|
|
51
|
-
请通过[快速上手](https://
|
|
51
|
+
请通过[快速上手](https://uview-plus.jiangruyi.com/components/quickstart.html)了解更详细的内容
|
|
52
52
|
|
|
53
53
|
## 使用方法
|
|
54
54
|
配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
|
package/changelog.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/**
|
|
34
34
|
* backTop 返回顶部
|
|
35
35
|
* @description 本组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
|
|
36
|
-
* @tutorial https://
|
|
36
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/backTop.html
|
|
37
37
|
*
|
|
38
38
|
* @property {String} mode 返回顶部的形状,circle-圆形,square-方形 (默认 'circle' )
|
|
39
39
|
* @property {String} icon 自定义图标 (默认 'arrow-upward' ) 见官方文档示例
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* badge 徽标数
|
|
16
16
|
* @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
|
|
17
|
-
* @tutorial https://
|
|
17
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/badge.html
|
|
18
18
|
*
|
|
19
19
|
* @property {Boolean} isDot 是否显示圆点 (默认 false )
|
|
20
20
|
* @property {String | Number} value 显示的内容
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
/**
|
|
75
75
|
* keyboard 键盘组件
|
|
76
76
|
* @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
|
|
77
|
-
* @tutorial https://
|
|
77
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/keyboard.html
|
|
78
78
|
* @property {Boolean} random 是否打乱键盘的顺序
|
|
79
79
|
* @event {Function} change 点击键盘触发
|
|
80
80
|
* @event {Function} backspace 点击退格键触发
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
/**
|
|
52
52
|
* cell 单元格
|
|
53
53
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
|
|
54
|
-
* @tutorial https://
|
|
54
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/cell.html
|
|
55
55
|
* @property {String | Number} title 标题
|
|
56
56
|
* @property {String | Number} label 标题下方的描述信息
|
|
57
57
|
* @property {String | Number} value 右侧的内容
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
/**
|
|
20
20
|
* cellGroup 单元格
|
|
21
21
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
|
|
22
|
-
* @tutorial https://
|
|
22
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/cell.html
|
|
23
23
|
*
|
|
24
24
|
* @property {String} title 分组标题
|
|
25
25
|
* @property {Boolean} border 是否显示外边框 (默认 true )
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
/**
|
|
39
39
|
* checkbox 复选框
|
|
40
40
|
* @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
|
|
41
|
-
* @tutorial https://
|
|
41
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/checkbox.html
|
|
42
42
|
* @property {String | Number | Boolean} name checkbox组件的标示符
|
|
43
43
|
* @property {String} shape 形状,square为方形,circle为圆型
|
|
44
44
|
* @property {String | Number} size 整体的大小
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/**
|
|
19
19
|
* u-count-down 倒计时
|
|
20
20
|
* @description 该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
|
|
21
|
-
* @tutorial https://
|
|
21
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/countDown.html
|
|
22
22
|
* @property {String | Number} time 倒计时时长,单位ms (默认 0 )
|
|
23
23
|
* @property {String} format 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 (默认 'HH:mm:ss' )
|
|
24
24
|
* @property {Boolean} autoStart 是否自动开始倒计时 (默认 true )
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
+
// 是否显示input
|
|
4
|
+
hasInput: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: () => false
|
|
7
|
+
},
|
|
8
|
+
placeholder: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: () => '请选择'
|
|
11
|
+
},
|
|
12
|
+
format: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: () => 'YYYY-MM-DD HH:mm'
|
|
15
|
+
},
|
|
3
16
|
// 是否打开组件
|
|
4
17
|
show: {
|
|
5
18
|
type: Boolean,
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<view v-if="hasInput">
|
|
3
|
+
<u-input
|
|
4
|
+
:placeholder="placeholder"
|
|
5
|
+
border="surround"
|
|
6
|
+
v-model="inputValue"
|
|
7
|
+
@click="showByClickInput = !showByClickInput"
|
|
8
|
+
></u-input>
|
|
9
|
+
</view>
|
|
2
10
|
<u-picker
|
|
3
11
|
ref="picker"
|
|
4
|
-
:show="show"
|
|
12
|
+
:show="show || (hasInput && showByClickInput)"
|
|
5
13
|
:popupMode="popupMode"
|
|
6
14
|
:closeOnClickOverlay="closeOnClickOverlay"
|
|
7
15
|
:columns="columns"
|
|
@@ -43,7 +51,7 @@
|
|
|
43
51
|
* @tutorial https://ijry.github.io/uview-plus/components/datetimePicker.html
|
|
44
52
|
* @property {Boolean} show 用于控制选择器的弹出与收起 ( 默认 false )
|
|
45
53
|
* @property {Boolean} showToolbar 是否显示顶部的操作栏 ( 默认 true )
|
|
46
|
-
* @property {String | Number}
|
|
54
|
+
* @property {String | Number} modelValue 绑定值
|
|
47
55
|
* @property {String} title 顶部标题
|
|
48
56
|
* @property {String} mode 展示格式 mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 ( 默认 ‘datetime )
|
|
49
57
|
* @property {Number} maxDate 可选的最大时间 默认值为后10年
|
|
@@ -74,6 +82,9 @@
|
|
|
74
82
|
mixins: [mpMixin, mixin, props],
|
|
75
83
|
data() {
|
|
76
84
|
return {
|
|
85
|
+
// 原来的日期选择器不方便,这里增加一个hasInput选项支持类似element的自带输入框的功能。
|
|
86
|
+
inputValue: '', // 表单显示值
|
|
87
|
+
showByClickInput: false, // 是否在hasInput模式下显示日期选择弹唱
|
|
77
88
|
columns: [],
|
|
78
89
|
innerDefaultIndex: [],
|
|
79
90
|
innerFormatter: (type, value) => value
|
|
@@ -88,6 +99,7 @@
|
|
|
88
99
|
// #ifdef VUE3
|
|
89
100
|
modelValue(newValue) {
|
|
90
101
|
this.init()
|
|
102
|
+
this.inputValue = dayjs(newValue).format(this.format || 'YYYY-MM-DD HH:mm')
|
|
91
103
|
},
|
|
92
104
|
// #endif
|
|
93
105
|
// #ifdef VUE2
|
|
@@ -133,6 +145,9 @@
|
|
|
133
145
|
},
|
|
134
146
|
// 点击工具栏的取消按钮
|
|
135
147
|
cancel() {
|
|
148
|
+
if (this.hasInput) {
|
|
149
|
+
this.showByClickInput = false
|
|
150
|
+
}
|
|
136
151
|
this.$emit('cancel')
|
|
137
152
|
},
|
|
138
153
|
// 点击工具栏的确定按钮
|
|
@@ -141,12 +156,16 @@
|
|
|
141
156
|
value: this.innerValue,
|
|
142
157
|
mode: this.mode
|
|
143
158
|
})
|
|
159
|
+
this.inputValue = dayjs(this.innerValue).format(this.format || 'YYYY-MM-DD HH:mm')
|
|
144
160
|
// #ifdef VUE3
|
|
145
161
|
this.$emit('update:modelValue', this.innerValue)
|
|
146
162
|
// #endif
|
|
147
163
|
// #ifdef VUE2
|
|
148
164
|
this.$emit('input', this.innerValue)
|
|
149
165
|
// #endif
|
|
166
|
+
if (this.hasInput) {
|
|
167
|
+
this.showByClickInput = false
|
|
168
|
+
}
|
|
150
169
|
},
|
|
151
170
|
//用正则截取输出值,当出现多组数字时,抛出错误
|
|
152
171
|
intercept(e,type){
|
|
@@ -214,7 +233,7 @@
|
|
|
214
233
|
setTimeout(() => {
|
|
215
234
|
this.updateIndexs(value)
|
|
216
235
|
}, 0);
|
|
217
|
-
|
|
236
|
+
|
|
218
237
|
},
|
|
219
238
|
// 更新索引
|
|
220
239
|
updateIndexs(value) {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
/**
|
|
71
71
|
* Image 图片
|
|
72
72
|
* @description 此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
|
|
73
|
-
* @tutorial https://
|
|
73
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/image.html
|
|
74
74
|
* @property {String} src 图片地址
|
|
75
75
|
* @property {String} mode 裁剪模式,见官网说明 (默认 'aspectFill' )
|
|
76
76
|
* @property {String | Number} width 宽度,单位任意,如果为数值,则为px单位 (默认 '300' )
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/**
|
|
34
34
|
* IndexAnchor 列表锚点
|
|
35
35
|
* @description
|
|
36
|
-
* @tutorial https://
|
|
36
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
|
|
37
37
|
* @property {String | Number} text 列表锚点文本内容
|
|
38
38
|
* @property {String} color 列表锚点文字颜色 ( 默认 '#606266' )
|
|
39
39
|
* @property {String | Number} size 列表锚点文字大小,单位默认px ( 默认 14 )
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
/**
|
|
111
111
|
* IndexList 索引列表
|
|
112
112
|
* @description 通过折叠面板收纳内容区域
|
|
113
|
-
* @tutorial https://
|
|
113
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
|
|
114
114
|
* @property {String} inactiveColor 右边锚点非激活的颜色 ( 默认 '#606266' )
|
|
115
115
|
* @property {String} activeColor 右边锚点激活的颜色 ( 默认 '#5677fc' )
|
|
116
116
|
* @property {Array} indexList 索引字符列表,数组形式
|
|
@@ -82,7 +82,7 @@ import mixin from '../../libs/mixin/mixin.js';
|
|
|
82
82
|
/**
|
|
83
83
|
* Input 输入框
|
|
84
84
|
* @description 此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
|
|
85
|
-
* @tutorial https://
|
|
85
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/input.html
|
|
86
86
|
* @property {String | Number} value 输入的值
|
|
87
87
|
* @property {String} type 输入框类型,见上方说明 ( 默认 'text' )
|
|
88
88
|
* @property {Boolean} fixed 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 ( 默认 false )
|
|
@@ -148,10 +148,13 @@ export default {
|
|
|
148
148
|
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
149
149
|
if (
|
|
150
150
|
this.firstChange === false &&
|
|
151
|
-
this.changeFromInner === false
|
|
151
|
+
this.changeFromInner === false
|
|
152
152
|
) {
|
|
153
153
|
this.valueChange();
|
|
154
|
-
} else {
|
|
154
|
+
} else {
|
|
155
|
+
// 尝试调用u-form的验证方法
|
|
156
|
+
uni.$u.formValidate(this, "change");
|
|
157
|
+
}
|
|
155
158
|
/* #endif */
|
|
156
159
|
this.firstChange = false;
|
|
157
160
|
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
@@ -171,7 +174,10 @@ export default {
|
|
|
171
174
|
this.changeFromInner === false
|
|
172
175
|
) {
|
|
173
176
|
this.valueChange();
|
|
174
|
-
} else {
|
|
177
|
+
} else {
|
|
178
|
+
// 尝试调用u-form的验证方法
|
|
179
|
+
uni.$u.formValidate(this, "change");
|
|
180
|
+
}
|
|
175
181
|
/* #endif */
|
|
176
182
|
this.firstChange = false;
|
|
177
183
|
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
@@ -30,6 +30,21 @@
|
|
|
30
30
|
</view>
|
|
31
31
|
|
|
32
32
|
<slot name="input">
|
|
33
|
+
<!-- #ifdef MP-WEIXIN -->
|
|
34
|
+
<input
|
|
35
|
+
:disabled="disabledInput || disabled"
|
|
36
|
+
:cursor-spacing="getCursorSpacing"
|
|
37
|
+
:class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
|
|
38
|
+
:value="currentValue"
|
|
39
|
+
class="u-number-box__input"
|
|
40
|
+
@blur="onBlur"
|
|
41
|
+
@focus="onFocus"
|
|
42
|
+
@input="onInput"
|
|
43
|
+
type="number"
|
|
44
|
+
:style="[inputStyle]"
|
|
45
|
+
/>
|
|
46
|
+
<!-- #endif -->
|
|
47
|
+
<!-- #ifndef MP-WEIXIN -->
|
|
33
48
|
<input
|
|
34
49
|
:disabled="disabledInput || disabled"
|
|
35
50
|
:cursor-spacing="getCursorSpacing"
|
|
@@ -42,6 +57,7 @@
|
|
|
42
57
|
type="number"
|
|
43
58
|
:style="[inputStyle]"
|
|
44
59
|
/>
|
|
60
|
+
<!-- #endif -->
|
|
45
61
|
</slot>
|
|
46
62
|
<view
|
|
47
63
|
class="u-number-box__slot"
|
|
@@ -81,7 +97,7 @@
|
|
|
81
97
|
/**
|
|
82
98
|
* numberBox 步进器
|
|
83
99
|
* @description 该组件一般用于商城购物选择物品数量的场景。
|
|
84
|
-
* @tutorial https://
|
|
100
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/numberBox.html
|
|
85
101
|
* @property {String | Number} name 步进器标识符,在change回调返回
|
|
86
102
|
* @property {String | Number} value 用于双向绑定的值,初始化时设置设为默认min值(最小值) (默认 0 )
|
|
87
103
|
* @property {String | Number} min 最小值 (默认 1 )
|
|
@@ -295,6 +311,10 @@
|
|
|
295
311
|
}
|
|
296
312
|
formatted = this.format(formatted)
|
|
297
313
|
this.emitChange(formatted);
|
|
314
|
+
// #ifdef MP-WEIXIN
|
|
315
|
+
return formatted
|
|
316
|
+
// #endif
|
|
317
|
+
|
|
298
318
|
},
|
|
299
319
|
// 发出change事件
|
|
300
320
|
emitChange(value) {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* StatbusBar 状态栏占位
|
|
16
16
|
* @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
|
|
17
|
-
* @tutorial https://
|
|
17
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/statusBar.html
|
|
18
18
|
* @property {String} bgColor 背景色 (默认 'transparent' )
|
|
19
19
|
* @property {String | Object} customStyle 自定义样式
|
|
20
20
|
* @example <u-status-bar></u-status-bar>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* Steps 步骤条
|
|
16
16
|
* @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
|
|
17
|
-
* @tutorial https://
|
|
17
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/steps.html
|
|
18
18
|
* @property {String} direction row-横向,column-竖向 (默认 'row' )
|
|
19
19
|
* @property {String | Number} current 设置当前处于第几步 (默认 0 )
|
|
20
20
|
* @property {String} activeColor 激活状态颜色 (默认 '#3c9cff' )
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
/**
|
|
57
57
|
* StepsItem 步骤条的子组件
|
|
58
58
|
* @description 本组件需要和u-steps配合使用
|
|
59
|
-
* @tutorial https://
|
|
59
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/steps.html
|
|
60
60
|
* @property {String} title 标题文字
|
|
61
61
|
* @property {String} current 描述文本
|
|
62
62
|
* @property {String | Number} iconSize 图标大小 (默认 17 )
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
/**
|
|
137
137
|
* upload 上传
|
|
138
138
|
* @description 该组件用于上传图片场景
|
|
139
|
-
* @tutorial https://
|
|
139
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/upload.html
|
|
140
140
|
* @property {String} accept 接受的文件类型, 可选值为all media image file video (默认 'image' )
|
|
141
141
|
* @property {String | Array} capture 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头(默认 ['album', 'camera'] )
|
|
142
142
|
* @property {Boolean} compressed 当accept为video时生效,是否压缩视频,默认为true(默认 true )
|
package/index.js
CHANGED
|
@@ -43,7 +43,7 @@ const $u = {
|
|
|
43
43
|
test,
|
|
44
44
|
type: ['primary', 'success', 'error', 'warning', 'info'],
|
|
45
45
|
http: new Request(),
|
|
46
|
-
config, //
|
|
46
|
+
config, // uview-plus配置信息相关,比如版本号
|
|
47
47
|
zIndex,
|
|
48
48
|
debounce,
|
|
49
49
|
throttle,
|
|
@@ -68,10 +68,6 @@ const install = (Vue) => {
|
|
|
68
68
|
// #ifndef APP-NVUE
|
|
69
69
|
// 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
|
|
70
70
|
Vue.config.globalProperties.$u = $u
|
|
71
|
-
// 暂时兼容vue2的$nextTick写法
|
|
72
|
-
Vue.config.globalProperties.$nextTick = (cb) => {
|
|
73
|
-
cb();
|
|
74
|
-
}
|
|
75
71
|
Vue.mixin(mixin)
|
|
76
72
|
// #endif
|
|
77
73
|
}
|
package/libs/css/flex.scss
CHANGED
|
@@ -85,40 +85,40 @@
|
|
|
85
85
|
|
|
86
86
|
// 自动伸缩
|
|
87
87
|
.u-flex-fill {
|
|
88
|
-
flex: 1 1 auto
|
|
88
|
+
flex: 1 1 auto;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// 边界自动伸缩
|
|
92
92
|
.u-margin-top-auto,
|
|
93
93
|
.u-m-t-auto {
|
|
94
|
-
margin-top: auto !important
|
|
94
|
+
margin-top: auto !important;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.u-margin-right-auto,
|
|
98
98
|
.u-m-r-auto {
|
|
99
|
-
margin-right: auto !important
|
|
99
|
+
margin-right: auto !important;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.u-margin-bottom-auto,
|
|
103
103
|
.u-m-b-auto {
|
|
104
|
-
margin-bottom: auto !important
|
|
104
|
+
margin-bottom: auto !important;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.u-margin-left-auto,
|
|
108
108
|
.u-m-l-auto {
|
|
109
|
-
margin-left: auto !important
|
|
109
|
+
margin-left: auto !important;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.u-margin-center-auto,
|
|
113
113
|
.u-m-c-auto {
|
|
114
114
|
margin-left: auto !important;
|
|
115
|
-
margin-right: auto !important
|
|
115
|
+
margin-right: auto !important;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.u-margin-middle-auto,
|
|
119
119
|
.u-m-m-auto {
|
|
120
120
|
margin-top: auto !important;
|
|
121
|
-
margin-bottom: auto !important
|
|
121
|
+
margin-bottom: auto !important;
|
|
122
122
|
}
|
|
123
123
|
/* #endif */
|
|
124
124
|
|
|
@@ -134,54 +134,54 @@
|
|
|
134
134
|
|
|
135
135
|
// 主轴起点对齐
|
|
136
136
|
.u-flex-start {
|
|
137
|
-
justify-content: flex-start
|
|
137
|
+
justify-content: flex-start;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// 主轴中间对齐
|
|
141
141
|
.u-flex-center {
|
|
142
|
-
justify-content: center
|
|
142
|
+
justify-content: center;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// 主轴终点对齐
|
|
146
146
|
.u-flex-end {
|
|
147
|
-
justify-content: flex-end
|
|
147
|
+
justify-content: flex-end;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// 主轴等比间距
|
|
151
151
|
.u-flex-between {
|
|
152
|
-
justify-content: space-between
|
|
152
|
+
justify-content: space-between;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// 主轴均分间距
|
|
156
156
|
.u-flex-around {
|
|
157
|
-
justify-content: space-around
|
|
157
|
+
justify-content: space-around;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// 交叉轴起点对齐
|
|
161
161
|
.u-flex-items-start {
|
|
162
|
-
align-items: flex-start
|
|
162
|
+
align-items: flex-start;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// 交叉轴中间对齐
|
|
166
166
|
.u-flex-items-center {
|
|
167
|
-
align-items: center
|
|
167
|
+
align-items: center;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
// 交叉轴终点对齐
|
|
171
171
|
.u-flex-items-end {
|
|
172
|
-
align-items: flex-end
|
|
172
|
+
align-items: flex-end;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
// 交叉轴第一行文字基线对齐
|
|
176
176
|
.u-flex-items-baseline {
|
|
177
177
|
/* #ifndef APP-NVUE */
|
|
178
|
-
align-items: baseline
|
|
178
|
+
align-items: baseline;
|
|
179
179
|
/* #endif */
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// 交叉轴方向拉伸对齐
|
|
183
183
|
.u-flex-items-stretch {
|
|
184
|
-
align-items: stretch
|
|
184
|
+
align-items: stretch;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
|
|
@@ -189,54 +189,54 @@
|
|
|
189
189
|
|
|
190
190
|
// 子元素交叉轴起点对齐
|
|
191
191
|
.u-flex-self-start {
|
|
192
|
-
align-self: flex-start
|
|
192
|
+
align-self: flex-start;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
// 子元素交叉轴居中对齐
|
|
196
196
|
.u-flex-self-center {
|
|
197
|
-
align-self: center
|
|
197
|
+
align-self: center;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
// 子元素交叉轴终点对齐
|
|
201
201
|
.u-flex-self-end {
|
|
202
|
-
align-self: flex-end
|
|
202
|
+
align-self: flex-end;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
// 子元素交叉轴第一行文字基线对齐
|
|
206
206
|
.u-flex-self-baseline {
|
|
207
|
-
align-self: baseline
|
|
207
|
+
align-self: baseline;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
// 子元素交叉轴方向拉伸对齐
|
|
211
211
|
.u-flex-self-stretch {
|
|
212
|
-
align-self: stretch
|
|
212
|
+
align-self: stretch;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// 多轴交叉时的对齐方式
|
|
216
216
|
|
|
217
217
|
// 起点对齐
|
|
218
218
|
.u-flex-content-start {
|
|
219
|
-
align-content: flex-start
|
|
219
|
+
align-content: flex-start;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
// 居中对齐
|
|
223
223
|
.u-flex-content-center {
|
|
224
|
-
align-content: center
|
|
224
|
+
align-content: center;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// 终点对齐
|
|
228
228
|
.u-flex-content-end {
|
|
229
|
-
align-content: flex-end
|
|
229
|
+
align-content: flex-end;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
// 两端对齐
|
|
233
233
|
.u-flex-content-between {
|
|
234
|
-
align-content: space-between
|
|
234
|
+
align-content: space-between;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
// 均分间距
|
|
238
238
|
.u-flex-content-around {
|
|
239
|
-
align-content: space-around
|
|
239
|
+
align-content: space-around;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
// 全部居中对齐
|
|
@@ -244,17 +244,17 @@
|
|
|
244
244
|
justify-content: center;
|
|
245
245
|
align-items: center;
|
|
246
246
|
align-self: center;
|
|
247
|
-
align-content: center
|
|
247
|
+
align-content: center;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// 是否可以放大
|
|
251
251
|
.u-flex-grow {
|
|
252
|
-
flex-grow: 1
|
|
252
|
+
flex-grow: 1;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
// 是否可以缩小
|
|
256
256
|
.u-flex-shrink {
|
|
257
|
-
flex-shrink: 1
|
|
257
|
+
flex-shrink: 1;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
// 定义内外边距,历遍1-80
|