@kengic/uni 0.6.2 → 0.6.3-beta.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/dist/service/http-client.ts +4 -0
- package/dist/uni/uni-ui/uni-card/uni-card.vue +10 -2
- package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +4 -4
- package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +35 -33
- package/dist/uni/uni-ui/uni-icons/uni-icons.vue +22 -13
- package/dist/uni/uni-ui/uni-icons/uniicons.css +32 -31
- package/dist/uni/uni-ui/uni-icons/uniicons.ttf +0 -0
- package/dist/uni/uni-ui/uni-icons/uniicons_file.ts +664 -0
- package/dist/uni/uni-ui/uni-icons/uniicons_file_vue.js +649 -0
- package/package.json +5 -4
|
@@ -11,8 +11,12 @@ uni.addInterceptor('request', {
|
|
|
11
11
|
uni.showLoading({});
|
|
12
12
|
|
|
13
13
|
const appStore = useAppStore();
|
|
14
|
+
|
|
14
15
|
args.header['Authorization'] = appStore.getToken;
|
|
16
|
+
// TODO 支持其他语言
|
|
17
|
+
args.header['Accept-Language'] = 'zh_CN'.replace('_', '-');
|
|
15
18
|
args.header['X-Access-Token'] = appStore.getToken;
|
|
19
|
+
|
|
16
20
|
if (!args.url?.startsWith('http')) {
|
|
17
21
|
args.url = appStore.getApiUrl + args.url;
|
|
18
22
|
}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
$uni-base-color: #6a6a6a !default;
|
|
135
135
|
$uni-secondary-color: #909399 !default;
|
|
136
136
|
$uni-spacing-sm: 8px !default;
|
|
137
|
-
$uni-border-color:
|
|
137
|
+
$uni-border-color: #e5e5e5;
|
|
138
138
|
$uni-shadow: $uni-shadow-base;
|
|
139
139
|
$uni-card-title: 15px;
|
|
140
140
|
$uni-cart-title-color: $uni-main-color;
|
|
@@ -147,7 +147,14 @@
|
|
|
147
147
|
margin: $uni-card-spacing;
|
|
148
148
|
border-radius: 4px;
|
|
149
149
|
overflow: hidden;
|
|
150
|
-
font-family:
|
|
150
|
+
font-family:
|
|
151
|
+
Helvetica Neue,
|
|
152
|
+
Helvetica,
|
|
153
|
+
PingFang SC,
|
|
154
|
+
Hiragino Sans GB,
|
|
155
|
+
Microsoft YaHei,
|
|
156
|
+
SimSun,
|
|
157
|
+
sans-serif;
|
|
151
158
|
background-color: #fff;
|
|
152
159
|
flex: 1;
|
|
153
160
|
|
|
@@ -174,6 +181,7 @@
|
|
|
174
181
|
align-items: center;
|
|
175
182
|
padding: $uni-card-spacing;
|
|
176
183
|
overflow: hidden;
|
|
184
|
+
background: #fafafa;
|
|
177
185
|
|
|
178
186
|
.uni-card__header-box {
|
|
179
187
|
/* #ifndef APP-NVUE */
|
|
@@ -561,8 +561,8 @@
|
|
|
561
561
|
|
|
562
562
|
.ant-design--caret-down-filled {
|
|
563
563
|
display: inline-block;
|
|
564
|
-
width:
|
|
565
|
-
height:
|
|
564
|
+
width: 12px;
|
|
565
|
+
height: 12px;
|
|
566
566
|
background-repeat: no-repeat;
|
|
567
567
|
background-size: 100% 100%;
|
|
568
568
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%2300000040' d='M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35'/%3E%3C/svg%3E");
|
|
@@ -570,8 +570,8 @@
|
|
|
570
570
|
|
|
571
571
|
.ant-design--caret-up-filled {
|
|
572
572
|
display: inline-block;
|
|
573
|
-
width:
|
|
574
|
-
height:
|
|
573
|
+
width: 12px;
|
|
574
|
+
height: 12px;
|
|
575
575
|
background-repeat: no-repeat;
|
|
576
576
|
background-size: 100% 100%;
|
|
577
577
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath fill='%2300000040' d='M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35'/%3E%3C/svg%3E");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="uni-easyinput" :class="{ 'uni-easyinput-error': msg }" :style="boxStyle">
|
|
3
3
|
<view class="uni-easyinput__content" :class="inputContentClass" :style="inputContentStyle">
|
|
4
4
|
<uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc" @click="onClickIcon('prefix')" size="16"></uni-icons>
|
|
5
|
-
<slot name="left"
|
|
5
|
+
<slot name="left"></slot>
|
|
6
6
|
<!-- #ifdef MP-ALIPAY -->
|
|
7
7
|
<textarea
|
|
8
8
|
:enableNative="enableNative"
|
|
@@ -134,28 +134,28 @@
|
|
|
134
134
|
* Easyinput 输入框
|
|
135
135
|
* @description 此组件可以实现表单的输入与校验,包括 "text" 和 "textarea" 类型。
|
|
136
136
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3455
|
|
137
|
-
* @property {String}
|
|
138
|
-
* @property {String }
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* @property {Boolean}
|
|
146
|
-
* @property {Boolean}
|
|
147
|
-
* @property {String }
|
|
148
|
-
* @property {String }
|
|
149
|
-
* @property {Boolean}
|
|
150
|
-
* @property {Boolean}
|
|
151
|
-
* @property {Number }
|
|
152
|
-
* @property {String }
|
|
153
|
-
* @property {Number }
|
|
154
|
-
* @property {String}
|
|
155
|
-
* @property {String}
|
|
156
|
-
* @property {String}
|
|
157
|
-
* @property {Boolean}
|
|
158
|
-
* @property {Boolean}
|
|
137
|
+
* @property {String} value 输入内容
|
|
138
|
+
* @property {String } type 输入框的类型(默认text) password/text/textarea/..
|
|
139
|
+
* @value text 文本输入键盘
|
|
140
|
+
* @value textarea 多行文本输入键盘
|
|
141
|
+
* @value password 密码输入键盘
|
|
142
|
+
* @value number 数字输入键盘,注意iOS上app-vue弹出的数字键盘并非9宫格方式
|
|
143
|
+
* @value idcard 身份证输入键盘,信、支付宝、百度、QQ小程序
|
|
144
|
+
* @value digit 带小数点的数字键盘 ,App的nvue页面、微信、支付宝、百度、头条、QQ小程序支持
|
|
145
|
+
* @property {Boolean} clearable 是否显示右侧清空内容的图标控件,点击可清空输入框内容(默认true)
|
|
146
|
+
* @property {Boolean} autoHeight 是否自动增高输入区域,type为textarea时有效(默认true)
|
|
147
|
+
* @property {String } placeholder 输入框的提示文字
|
|
148
|
+
* @property {String } placeholderStyle placeholder的样式(内联样式,字符串),如"color: #ddd"
|
|
149
|
+
* @property {Boolean} focus 是否自动获得焦点(默认false)
|
|
150
|
+
* @property {Boolean} disabled 是否禁用(默认false)
|
|
151
|
+
* @property {Number } maxlength 最大输入长度,设置为 -1 的时候不限制最大长度(默认140)
|
|
152
|
+
* @property {String } confirmType 设置键盘右下角按钮的文字,仅在type="text"时生效(默认done)
|
|
153
|
+
* @property {Number } clearSize 清除图标的大小,单位px(默认15)
|
|
154
|
+
* @property {String} prefixIcon 输入框头部图标
|
|
155
|
+
* @property {String} suffixIcon 输入框尾部图标
|
|
156
|
+
* @property {String} primaryColor 设置主题色(默认#2979ff)
|
|
157
|
+
* @property {Boolean} trim 是否自动去除两端的空格
|
|
158
|
+
* @property {Boolean} cursorSpacing 指定光标与键盘的距离,单位 px
|
|
159
159
|
* @property {Boolean} ajust-position 当键盘弹起时,是否上推内容,默认值:true
|
|
160
160
|
* @value both 去除两端空格
|
|
161
161
|
* @value left 去除左侧空格
|
|
@@ -164,14 +164,14 @@
|
|
|
164
164
|
* @value end 去除右侧空格
|
|
165
165
|
* @value all 去除全部空格
|
|
166
166
|
* @value none 不去除空格
|
|
167
|
-
* @property {Boolean}
|
|
168
|
-
* @property {Boolean}
|
|
169
|
-
* @property {Object}
|
|
170
|
-
* @event {Function}
|
|
171
|
-
* @event {Function}
|
|
172
|
-
* @event {Function}
|
|
173
|
-
* @event {Function}
|
|
174
|
-
* @event {Function}
|
|
167
|
+
* @property {Boolean} inputBorder 是否显示input输入框的边框(默认true)
|
|
168
|
+
* @property {Boolean} passwordIcon type=password时是否显示小眼睛图标
|
|
169
|
+
* @property {Object} styles 自定义颜色
|
|
170
|
+
* @event {Function} input 输入框内容发生变化时触发
|
|
171
|
+
* @event {Function} focus 输入框获得焦点时触发
|
|
172
|
+
* @event {Function} blur 输入框失去焦点时触发
|
|
173
|
+
* @event {Function} confirm 点击完成按钮时触发
|
|
174
|
+
* @event {Function} iconClick 点击图标时触发
|
|
175
175
|
* @example <uni-easyinput v-model="mobile"></uni-easyinput>
|
|
176
176
|
*/
|
|
177
177
|
function obj2strClass(obj) {
|
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
}
|
|
194
194
|
return style;
|
|
195
195
|
}
|
|
196
|
+
|
|
196
197
|
export default {
|
|
197
198
|
name: 'UniEasyinput',
|
|
198
199
|
emits: ['click', 'iconClick', 'update:modelValue', 'input', 'focus', 'blur', 'confirm', 'clear', 'eyes', 'change', 'keyboardheightchange'],
|
|
@@ -378,7 +379,7 @@
|
|
|
378
379
|
const paddingRight = this.type === 'password' || this.clearable || this.prefixIcon ? '' : '10px';
|
|
379
380
|
return obj2strStyle({
|
|
380
381
|
'padding-right': paddingRight,
|
|
381
|
-
'padding-left': this.prefixIcon ? '' : '
|
|
382
|
+
'padding-left': this.prefixIcon ? '' : '6px',
|
|
382
383
|
});
|
|
383
384
|
},
|
|
384
385
|
},
|
|
@@ -398,7 +399,7 @@
|
|
|
398
399
|
},
|
|
399
400
|
created() {
|
|
400
401
|
this.init();
|
|
401
|
-
// TODO 处理头条vue3 computed 不监听 inject 更改的问题(formItem.errMsg)
|
|
402
|
+
// TODO 处理头条vue3 computed 不监听 inject 更改的问题(formItem.errMsg) nnnnmmmmmmmm
|
|
402
403
|
if (this.form && this.formItem) {
|
|
403
404
|
this.$watch('formItem.errMsg', (newVal) => {
|
|
404
405
|
this.localMsg = newVal;
|
|
@@ -624,6 +625,7 @@
|
|
|
624
625
|
& ::-o-clear {
|
|
625
626
|
display: none;
|
|
626
627
|
}
|
|
628
|
+
|
|
627
629
|
/*endif*/
|
|
628
630
|
}
|
|
629
631
|
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- #ifdef APP-NVUE -->
|
|
3
|
-
<text :style="
|
|
3
|
+
<text :style="styleObj" class="uni-icons" @click="_onClick">{{ unicode }}</text>
|
|
4
4
|
<!-- #endif -->
|
|
5
5
|
<!-- #ifndef APP-NVUE -->
|
|
6
|
-
<text
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
:class="['uniui-' + type, customPrefix, customPrefix ? type : '']"
|
|
10
|
-
@click="_onClick"
|
|
11
|
-
></text>
|
|
6
|
+
<text :style="styleObj" class="uni-icons" :class="['uniui-' + type, customPrefix, customPrefix ? type : '']" @click="_onClick">
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</text>
|
|
12
9
|
<!-- #endif -->
|
|
13
10
|
</template>
|
|
14
11
|
|
|
15
12
|
<script>
|
|
16
|
-
import
|
|
13
|
+
import { fontData } from './uniicons_file_vue.js';
|
|
14
|
+
import iconUrl from './uniicons.ttf';
|
|
15
|
+
|
|
17
16
|
const getVal = (val) => {
|
|
18
17
|
const reg = /^[0-9]*$/g;
|
|
19
18
|
return typeof val === 'number' || reg.test(val) ? val + 'px' : val;
|
|
20
19
|
};
|
|
21
20
|
// #ifdef APP-NVUE
|
|
22
21
|
var domModule = weex.requireModule('dom');
|
|
23
|
-
import iconUrl from './uniicons.ttf';
|
|
24
22
|
domModule.addRule('fontFace', {
|
|
25
23
|
fontFamily: 'uniicons',
|
|
26
24
|
src: "url('" + iconUrl + "')",
|
|
@@ -57,23 +55,33 @@
|
|
|
57
55
|
type: String,
|
|
58
56
|
default: '',
|
|
59
57
|
},
|
|
58
|
+
fontFamily: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
60
62
|
},
|
|
61
63
|
data() {
|
|
62
64
|
return {
|
|
63
|
-
icons:
|
|
65
|
+
icons: fontData,
|
|
64
66
|
};
|
|
65
67
|
},
|
|
66
68
|
computed: {
|
|
67
69
|
unicode() {
|
|
68
70
|
let code = this.icons.find((v) => v.font_class === this.type);
|
|
69
71
|
if (code) {
|
|
70
|
-
return
|
|
72
|
+
return code.unicode;
|
|
71
73
|
}
|
|
72
74
|
return '';
|
|
73
75
|
},
|
|
74
76
|
iconSize() {
|
|
75
77
|
return getVal(this.size);
|
|
76
78
|
},
|
|
79
|
+
styleObj() {
|
|
80
|
+
if (this.fontFamily !== '') {
|
|
81
|
+
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
|
|
82
|
+
}
|
|
83
|
+
return `color: ${this.color}; font-size: ${this.iconSize};`;
|
|
84
|
+
},
|
|
77
85
|
},
|
|
78
86
|
methods: {
|
|
79
87
|
_onClick() {
|
|
@@ -85,10 +93,11 @@
|
|
|
85
93
|
|
|
86
94
|
<style lang="scss">
|
|
87
95
|
/* #ifndef APP-NVUE */
|
|
88
|
-
@import 'uniicons.css';
|
|
96
|
+
@import './uniicons.css';
|
|
97
|
+
|
|
89
98
|
@font-face {
|
|
90
99
|
font-family: uniicons;
|
|
91
|
-
src: url('uniicons.ttf')
|
|
100
|
+
src: url('./uniicons.ttf');
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
/* #endif */
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
.uniui-cart-filled:before {
|
|
3
|
+
content: "\e6d0";
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.uniui-gift-filled:before {
|
|
7
|
+
content: "\e6c4";
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
.uniui-color:before {
|
|
2
11
|
content: "\e6cf";
|
|
3
12
|
}
|
|
@@ -58,10 +67,6 @@
|
|
|
58
67
|
content: "\e6c3";
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
.uniui-gift-filled:before {
|
|
62
|
-
content: "\e6c4";
|
|
63
|
-
}
|
|
64
|
-
|
|
65
70
|
.uniui-fire-filled:before {
|
|
66
71
|
content: "\e6c5";
|
|
67
72
|
}
|
|
@@ -82,6 +87,18 @@
|
|
|
82
87
|
content: "\e698";
|
|
83
88
|
}
|
|
84
89
|
|
|
90
|
+
.uniui-arrowthinleft:before {
|
|
91
|
+
content: "\e6d2";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.uniui-arrowthinup:before {
|
|
95
|
+
content: "\e6d3";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.uniui-arrowthindown:before {
|
|
99
|
+
content: "\e6d4";
|
|
100
|
+
}
|
|
101
|
+
|
|
85
102
|
.uniui-back:before {
|
|
86
103
|
content: "\e6b9";
|
|
87
104
|
}
|
|
@@ -94,55 +111,43 @@
|
|
|
94
111
|
content: "\e6bb";
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
.uniui-arrowthinright:before {
|
|
98
|
-
content: "\e6bb";
|
|
99
|
-
}
|
|
100
|
-
|
|
101
114
|
.uniui-arrow-left:before {
|
|
102
115
|
content: "\e6bc";
|
|
103
116
|
}
|
|
104
117
|
|
|
105
|
-
.uniui-arrowthinleft:before {
|
|
106
|
-
content: "\e6bc";
|
|
107
|
-
}
|
|
108
|
-
|
|
109
118
|
.uniui-arrow-up:before {
|
|
110
119
|
content: "\e6bd";
|
|
111
120
|
}
|
|
112
121
|
|
|
113
|
-
.uniui-arrowthinup:before {
|
|
114
|
-
content: "\e6bd";
|
|
115
|
-
}
|
|
116
|
-
|
|
117
122
|
.uniui-arrow-down:before {
|
|
118
123
|
content: "\e6be";
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
.uniui-
|
|
122
|
-
content: "\
|
|
126
|
+
.uniui-arrowthinright:before {
|
|
127
|
+
content: "\e6d1";
|
|
123
128
|
}
|
|
124
129
|
|
|
125
|
-
.uniui-
|
|
130
|
+
.uniui-down:before {
|
|
126
131
|
content: "\e6b8";
|
|
127
132
|
}
|
|
128
133
|
|
|
129
|
-
.uniui-
|
|
134
|
+
.uniui-bottom:before {
|
|
130
135
|
content: "\e6b8";
|
|
131
136
|
}
|
|
132
137
|
|
|
133
|
-
.uniui-
|
|
134
|
-
content: "\
|
|
138
|
+
.uniui-arrowright:before {
|
|
139
|
+
content: "\e6d5";
|
|
135
140
|
}
|
|
136
141
|
|
|
137
|
-
.uniui-
|
|
142
|
+
.uniui-right:before {
|
|
138
143
|
content: "\e6b5";
|
|
139
144
|
}
|
|
140
145
|
|
|
141
|
-
.uniui-
|
|
146
|
+
.uniui-up:before {
|
|
142
147
|
content: "\e6b6";
|
|
143
148
|
}
|
|
144
149
|
|
|
145
|
-
.uniui-
|
|
150
|
+
.uniui-top:before {
|
|
146
151
|
content: "\e6b6";
|
|
147
152
|
}
|
|
148
153
|
|
|
@@ -150,8 +155,8 @@
|
|
|
150
155
|
content: "\e6b7";
|
|
151
156
|
}
|
|
152
157
|
|
|
153
|
-
.uniui-
|
|
154
|
-
content: "\
|
|
158
|
+
.uniui-arrowup:before {
|
|
159
|
+
content: "\e6d6";
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
.uniui-eye:before {
|
|
@@ -638,10 +643,6 @@
|
|
|
638
643
|
content: "\e627";
|
|
639
644
|
}
|
|
640
645
|
|
|
641
|
-
.uniui-cart-filled:before {
|
|
642
|
-
content: "\e629";
|
|
643
|
-
}
|
|
644
|
-
|
|
645
646
|
.uniui-checkbox:before {
|
|
646
647
|
content: "\e62b";
|
|
647
648
|
}
|
|
Binary file
|