Skip to content

Commit f4070f2

Browse files
committed
1. 新增自定义主题功能:[自定义主题](https://www.uviewui.com/guide/theme.html)
2. 更新readme.md 3. 优化row组价可能存在边距错误的问题 4. button组件新增data-name参数 5. 优化演示项目的样式表现 6. field组件新增icon-style参数 7. icon组件color参数可以接受primary,sucees,error,info,warning主题色值
1 parent 5874cf8 commit f4070f2

File tree

11 files changed

+27
-10
lines changed

11 files changed

+27
-10
lines changed

common/demo.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/* #ifndef APP-NVUE */
2+
view,
3+
text {
4+
box-sizing: border-box;
5+
}
6+
/* #endif */
17

28
/* start--演示页面使用的统一样式--start */
39
.u-demo {

pages/componentsA/icon/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@
628628
flex: 0 0 33.33333333%;
629629
justify-content: center;
630630
overflow: hidden;
631-
padding: 0 6rpx;
632631
}
633632
634633
.u-icon-name {

pages/componentsC/button/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view class="u-demo-wrap">
44
<view class="u-demo-title">演示效果</view>
55
<view class="u-demo-area">
6-
<u-button @click="btnClick" :loading="loading" :plain="plain" :shape="shape" :size="size" :ripple="ripple" :hairLine="hairLine" :type="type">山川异域,风月同天</u-button>
6+
<u-button @click="btnClick" data-name="3333" :loading="loading" :plain="plain" :shape="shape" :size="size" :ripple="ripple" :hairLine="hairLine" :type="type">山川异域,风月同天</u-button>
77
</view>
88
</view>
99
<view class="u-config-wrap">

pages/componentsC/test/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<view class="">
3+
4+
</view>
5+
</template>

uview-ui/components/u-button/u-button.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
@tap.stop="click($event)"
3434
:hover-class="getHoverClass"
3535
:loading="loading"
36-
data-name="dataName"
3736
>
3837
<slot></slot>
3938
<view

uview-ui/components/u-field/u-field.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
flex: labelPosition == 'left' ? `0 0 ${labelWidth}rpx` : '1'
77
}">
88
<view class="u-icon-wrap" v-if="icon">
9-
<u-icon size="32" :name="icon" :color="iconColor" class="u-icon"></u-icon>
9+
<u-icon size="32" :custom-style="iconStyle" :name="icon" :color="iconColor" class="u-icon"></u-icon>
1010
</view>
1111
<slot name="icon"></slot>
1212
<text class="u-label-text" :class="[this.$slots.icon || icon ? 'u-label-left-gap' : '']">{{ label }}</text>
@@ -162,6 +162,13 @@ export default {
162162
clearSize: {
163163
type: [Number, String],
164164
default: 30
165+
},
166+
// lable左边的图标样式,对象形式
167+
iconStyle: {
168+
type: Object,
169+
default() {
170+
return {}
171+
}
165172
}
166173
},
167174
inject: ['uCellGroup'],

uview-ui/components/u-icon/u-icon.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* @property {String} label 图标右侧的label文字(默认28)
2424
* @property {String} label-pos label文字相对于图标的位置,只能right或bottom(默认right)
2525
* @property {String} label-color label字体颜色(默认#606266)
26+
* @property {Object} custom-style icon的样式,对象形式
2627
* @property {String | Number} margin-left label在右侧时与图标的距离,单位rpx(默认6)
2728
* @property {String | Number} margin-top label在下方时与图标的距离,单位rpx(默认6)
2829
* @property {String} label-pos label相对于图标的位置,只能right或bottom(默认right)

uview-ui/iconfont.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
}
99
/* #endif */
1010

11-
/* 支付宝,百度,头条小程序目前读取大的本地字体文件,导致无法显示图标,故用在线加载的方式-2020-05-12 */
12-
/* #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || H5 */
11+
/* 支付宝,百度,头条,QQ小程序,以及H5在部分浏览器目前读取大的本地字体文件,导致无法显示图标,故用在线加载的方式-2020-06-24 */
12+
/* #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || H5 || MP-QQ */
1313
@font-face {
1414
font-family: "uicon-iconfont";
1515
src: url('//at.alicdn.com/t/font_1529455_k9eg3z8m98');

uview-ui/libs/config/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 此版本发布于2020-06-19
2-
let version = '1.3.61';
1+
// 此版本发布于2020-06-25
2+
let version = '1.3.9';
33

44
export default {
55
v: version,

uview-ui/libs/css/style.components.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ image {
66
will-change: transform;
77
}
88

9+
// 在weex,也即nvue中,所有元素默认为border-box
910
view,
1011
text {
1112
box-sizing: border-box;
12-
flex-direction: row;
1313
}
1414
/* #endif */

uview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uview-ui",
3-
"version": "1.3.8",
3+
"version": "1.3.9",
44
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
55
"main": "index.js",
66
"keywords": ["uview", "uView", "uni-app", "uni-app ui", "uniapp", "uviewui", "uview ui", "uviewUI", "uViewui", "uViewUI", "uView UI", "uni ui", "uni UI", "uniapp ui", "ui", "UI框架", "uniapp ui框架", "uniapp UI"],

0 commit comments

Comments
 (0)