Commit 582557e5 authored by wlxuqu's avatar wlxuqu

1. 新增man,woman,level三个图标,修复某些图标缺失的问题

2. 修复section组件showLine参数无法隐藏左边竖条的问题
parent bb453ec0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "uView", "name" : "uView",
"appid" : "__UNI__60F4B81", "appid" : "__UNI__60F4B81",
"description" : "多平台快速开发的UI框架", "description" : "多平台快速开发的UI框架",
"versionName" : "1.5.6", "versionName" : "1.5.7",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true, "usingComponents" : true,
"component2": true "component2" : true
}, },
"mp-baidu" : { "mp-baidu" : {
"usingComponents" : true, "usingComponents" : true,
......
...@@ -14,6 +14,15 @@ ...@@ -14,6 +14,15 @@
data() { data() {
return { return {
iconList: [ iconList: [
{
name: 'level'
},
{
name: 'woman'
},
{
name: 'man'
},
{ {
name: 'arrow-left-double' name: 'arrow-left-double'
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="u-demo-wrap"> <view class="u-demo-wrap">
<view class="u-demo-title">演示效果</view> <view class="u-demo-title">演示效果</view>
<view class="u-demo-area"> <view class="u-demo-area">
<u-section :title="title" :right="right" :bold="bold" :color="color"></u-section> <u-section :title="title" :right="right" :bold="bold" :color="color" :show-line="false"></u-section>
</view> </view>
</view> </view>
<view class="u-config-wrap"> <view class="u-config-wrap">
......
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
fontSize: this.size == 'inherit' ? 'inherit' : this.$u.addUnit(this.size), fontSize: this.size == 'inherit' ? 'inherit' : this.$u.addUnit(this.size),
fontWeight: this.bold ? 'bold' : 'normal', fontWeight: this.bold ? 'bold' : 'normal',
// 安卓和iOS各需要设置一个到顶部的距离,才能更好的垂直居中 // 安卓和iOS各需要设置一个到顶部的距离,才能更好的垂直居中
top: this.top === '' ? (this.$u.os == 'ios' ? '2rpx' : '4rpx') : 0 top: this.top === '' ? (this.$u.os == 'ios' ? '2rpx' : '4rpx') : this.$u.addUnit(this.top)
}; };
// 非主题色值时,才当作颜色值 // 非主题色值时,才当作颜色值
if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color; if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color;
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<script> <script>
import Emitter from '../../libs/util/emitter.js'; import Emitter from '../../libs/util/emitter.js';
/** /**
* input 输入框 * input 输入框
* @description 此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。 * @description 此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
* @tutorial http://uviewui.com/components/input.html * @tutorial http://uviewui.com/components/input.html
......
/** /**
* html 解析器 * html 解析器
* @tutorial https://github.com/jin-yufeng/Parser * @tutorial https://github.com/jin-yufeng/Parser
* @version 20200719 * @version 20200728
* @author JinYufeng * @author JinYufeng
* @listens MIT * @listens MIT
*/ */
...@@ -102,9 +102,16 @@ MpHtmlParser.prototype.setText = function() { ...@@ -102,9 +102,16 @@ MpHtmlParser.prototype.setText = function() {
} }
if (!this.pre) { if (!this.pre) {
// 合并空白符 // 合并空白符
var tmp = []; var flag, tmp = [];
for (let i = text.length, c; c = text[--i];) for (let i = text.length, c; c = text[--i];)
if (!blankChar[c] || (!blankChar[tmp[0]] && (c = ' '))) tmp.unshift(c); if (!blankChar[c]) {
tmp.unshift(c);
if (!flag) flag = 1;
} else {
if (tmp[0] != ' ') tmp.unshift(' ');
if (c == '\n' && flag == void 0) flag = 0;
}
if (flag == 0) return;
text = tmp.join(''); text = tmp.join('');
} }
this.siblings().push({ this.siblings().push({
...@@ -119,6 +126,7 @@ MpHtmlParser.prototype.setNode = function() { ...@@ -119,6 +126,7 @@ MpHtmlParser.prototype.setNode = function() {
attrs: this.attrs attrs: this.attrs
}, },
close = cfg.selfClosingTags[node.name]; close = cfg.selfClosingTags[node.name];
if (this.options.nodes.length) node.type = 'node';
this.attrs = {}; this.attrs = {};
if (!cfg.ignoreTags[node.name]) { if (!cfg.ignoreTags[node.name]) {
// 处理属性 // 处理属性
...@@ -189,6 +197,7 @@ MpHtmlParser.prototype.setNode = function() { ...@@ -189,6 +197,7 @@ MpHtmlParser.prototype.setNode = function() {
attrs.height = void 0; attrs.height = void 0;
} }
} }
if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
attrs.source = []; attrs.source = [];
if (attrs.src) { if (attrs.src) {
attrs.source.push(attrs.src); attrs.source.push(attrs.src);
...@@ -217,8 +226,7 @@ MpHtmlParser.prototype.setNode = function() { ...@@ -217,8 +226,7 @@ MpHtmlParser.prototype.setNode = function() {
if (info.length < 2) continue; if (info.length < 2) continue;
let key = info[0].trim().toLowerCase(), let key = info[0].trim().toLowerCase(),
value = info.slice(1).join(':').trim(); value = info.slice(1).join(':').trim();
if (value.includes('-webkit') || value.includes('-moz') || value.includes('-ms') || value.includes('-o') || value.includes( if (value[0] == '-' || value.includes('safe'))
'safe'))
style += `;${key}:${value}`; style += `;${key}:${value}`;
else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import'))
styleObj[key] = value; styleObj[key] = value;
...@@ -359,13 +367,6 @@ MpHtmlParser.prototype.popNode = function(node) { ...@@ -359,13 +367,6 @@ MpHtmlParser.prototype.popNode = function(node) {
// 替换一些标签名 // 替换一些标签名
if (cfg.blockTags[node.name]) node.name = 'div'; if (cfg.blockTags[node.name]) node.name = 'div';
else if (!cfg.trustTags[node.name]) node.name = 'span'; else if (!cfg.trustTags[node.name]) node.name = 'span';
// 去除块标签前后空串
if (node.name == 'div' || node.name == 'p' || node.name[0] == 't') {
if (len > 1 && siblings[len - 2].text == ' ')
siblings.splice(--len - 1, 1);
if (childs.length && childs[childs.length - 1].text == ' ')
childs.pop();
}
// 处理列表 // 处理列表
if (node.c && (node.name == 'ul' || node.name == 'ol')) { if (node.c && (node.name == 'ul' || node.name == 'ol')) {
if ((node.attrs.style || '').includes('list-style:none')) { if ((node.attrs.style || '').includes('list-style:none')) {
......
/* 配置文件 */ /* 配置文件 */
// #ifdef MP-WEIXIN var cfg = {
const canIUse = wx.canIUse('editor'); // 高基础库标识,用于兼容
// #endif
module.exports = {
// 出错占位图 // 出错占位图
errorImg: null, errorImg: null,
// 过滤器函数 // 过滤器函数
...@@ -32,41 +29,15 @@ module.exports = { ...@@ -32,41 +29,15 @@ module.exports = {
blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'), blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'), boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
// 块级标签,将被转为 div // 块级标签,将被转为 div
blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,section' + ( blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
// #ifdef MP-WEIXIN
canIUse ? '' :
// #endif
',pre')),
// 将被移除的标签 // 将被移除的标签
ignoreTags: makeMap( ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
'area,base,canvas,frame,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'
// #ifdef MP-WEIXIN
+ (canIUse ? ',rp' : '')
// #endif
// #ifndef APP-PLUS
+ ',iframe'
// #endif
),
// 只能被 rich-text 显示的标签 // 只能被 rich-text 显示的标签
richOnlyTags: makeMap('a,colgroup,fieldset,legend,table' richOnlyTags: makeMap('a,colgroup,fieldset,legend,table'),
// #ifdef MP-WEIXIN
+ (canIUse ? ',bdi,bdo,caption,rt,ruby' : '')
// #endif
),
// 自闭合的标签 // 自闭合的标签
selfClosingTags: makeMap( selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
'area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'
),
// 信任的标签 // 信任的标签
trustTags: makeMap( trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
'a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'
// #ifdef MP-WEIXIN
+ (canIUse ? ',bdi,bdo,caption,pre,rt,ruby' : '')
// #endif
// #ifdef APP-PLUS
+ ',embed,iframe'
// #endif
),
// 默认的标签样式 // 默认的标签样式
userAgentStyles: { userAgentStyles: {
address: 'font-style:italic', address: 'font-style:italic',
...@@ -91,3 +62,19 @@ function makeMap(str) { ...@@ -91,3 +62,19 @@ function makeMap(str) {
map[list[i]] = true; map[list[i]] = true;
return map; return map;
} }
// #ifdef MP-WEIXIN
if (wx.canIUse('editor')) {
cfg.blockTags.pre = void 0;
cfg.ignoreTags.rp = true;
Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
}
// #endif
// #ifdef APP-PLUS
cfg.ignoreTags.iframe = void 0;
Object.assign(cfg.trustTags, makeMap('embed,iframe'));
// #endif
module.exports = cfg;
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<block v-for="(n, i) in nodes" v-bind:key="i"> <block v-for="(n, i) in nodes" v-bind:key="i">
<!--图片--> <!--图片-->
<view v-if="n.name=='img'" :class="'_img '+n.attrs.class" :style="n.attrs.style" :data-attrs="n.attrs" @tap="imgtap"> <view v-if="n.name=='img'" :class="'_img '+n.attrs.class" :style="n.attrs.style" :data-attrs="n.attrs" @tap="imgtap">
<rich-text v-if="controls[i]!=0" :nodes="[{attrs:{src:loading&&(controls[i]||0)<2?loading:(lazyLoad&&!controls[i]?placeholder:(controls[i]==3?errorImg:n.attrs.src||'')),alt:n.attrs.alt||'',width:n.attrs.width||'',style:'-webkit-touch-callout:none;max-width:100%;display:block'+(n.attrs.height?';height:'+n.attrs.height:'')},name:'img'}]" /> <rich-text v-if="ctrl[i]!=0" :nodes="[{attrs:{src:loading&&(ctrl[i]||0)<2?loading:(lazyLoad&&!ctrl[i]?placeholder:(ctrl[i]==3?errorImg:n.attrs.src||'')),alt:n.attrs.alt||'',width:n.attrs.width||'',style:'-webkit-touch-callout:none;max-width:100%;display:block'+(n.attrs.height?';height:'+n.attrs.height:'')},name:'img'}]" />
<image class="_image" :src="lazyLoad&&!controls[i]?placeholder:n.attrs.src" :lazy-load="lazyLoad" <image class="_image" :src="lazyLoad&&!ctrl[i]?placeholder:n.attrs.src" :lazy-load="lazyLoad"
:show-menu-by-longpress="!n.attrs.ignore" :data-i="i" :data-index="n.attrs.i" data-source="img" @load="loadImg" :show-menu-by-longpress="!n.attrs.ignore" :data-i="i" :data-index="n.attrs.i" data-source="img" @load="loadImg"
@error="error" /> @error="error" />
</view> </view>
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<text v-else-if="n.name=='br'">\n</text> <text v-else-if="n.name=='br'">\n</text>
<!--#endif--> <!--#endif-->
<!--视频--> <!--视频-->
<view v-else-if="((n.lazyLoad&&!n.attrs.autoplay)||(n.name=='video'&&!loadVideo))&&controls[i]==undefined" :id="n.attrs.id" :class="'_video '+(n.attrs.class||'')" <view v-else-if="((n.lazyLoad&&!n.attrs.autoplay)||(n.name=='video'&&!loadVideo))&&ctrl[i]==undefined" :id="n.attrs.id" :class="'_video '+(n.attrs.class||'')"
:style="n.attrs.style" :data-i="i" @tap="_loadVideo" /> :style="n.attrs.style" :data-i="i" @tap="_loadVideo" />
<video v-else-if="n.name=='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay||controls[i]==0" <video v-else-if="n.name=='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay||ctrl[i]==0"
:controls="!n.attrs.autoplay||n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.attrs.source[controls[i]||0]" :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.attrs.source[ctrl[i]||0]"
:unit-id="n.attrs['unit-id']" :data-id="n.attrs.id" :data-i="i" data-source="video" @error="error" @play="play" /> :unit-id="n.attrs['unit-id']" :data-id="n.attrs.id" :data-i="i" data-source="video" @error="error" @play="play" />
<!--音频--> <!--音频-->
<audio v-else-if="n.name=='audio'" :ref="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" <audio v-else-if="n.name=='audio'" :ref="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author"
:autoplay="n.attrs.autoplay" :controls="!n.attrs.autoplay||n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster"
:src="n.attrs.source[controls[i]||0]" :data-i="i" :data-id="n.attrs.id" data-source="audio" :src="n.attrs.source[ctrl[i]||0]" :data-i="i" :data-id="n.attrs.id" data-source="audio"
@error.native="error" @play.native="play" /> @error.native="error" @play.native="play" />
<!--链接--> <!--链接-->
<view v-else-if="n.name=='a'" :id="n.attrs.id" :class="'_a '+(n.attrs.class||'')" hover-class="_hover" :style="n.attrs.style" <view v-else-if="n.name=='a'" :id="n.attrs.id" :class="'_a '+(n.attrs.class||'')" hover-class="_hover" :style="n.attrs.style"
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<!--广告--> <!--广告-->
<!--<ad v-else-if="n.name=='ad'" :class="n.attrs.class" :style="n.attrs.style" :unit-id="n.attrs['unit-id']" :appid="n.attrs.appid" :apid="n.attrs.apid" :type="n.attrs.type" :adpid="n.attrs.adpid" data-source="ad" @error="error" />--> <!--<ad v-else-if="n.name=='ad'" :class="n.attrs.class" :style="n.attrs.style" :unit-id="n.attrs['unit-id']" :appid="n.attrs.appid" :apid="n.attrs.apid" :type="n.attrs.type" :adpid="n.attrs.adpid" data-source="ad" @error="error" />-->
<!--列表--> <!--列表-->
<view v-else-if="n.name=='li'" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:flex'"> <view v-else-if="n.name=='li'" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:flex;flex-direction:row'">
<view v-if="n.type=='ol'" class="_ol-bef">{{n.num}}</view> <view v-if="n.type=='ol'" class="_ol-bef">{{n.num}}</view>
<view v-else class="_ul-bef"> <view v-else class="_ul-bef">
<view v-if="n.floor%3==0" class="_ul-p1"></view> <view v-if="n.floor%3==0" class="_ul-p1"></view>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
name: 'trees', name: 'trees',
data() { data() {
return { return {
controls: [], ctrl: [],
placeholder: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="225"/>', placeholder: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="225"/>',
errorImg, errorImg,
loadVideo: typeof plus == 'undefined', loadVideo: typeof plus == 'undefined',
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
if (res.intersectionRatio) { if (res.intersectionRatio) {
for (var j = this.nodes.length; j--;) for (var j = this.nodes.length; j--;)
if (this.nodes[j].name == 'img') if (this.nodes[j].name == 'img')
this.$set(this.controls, j, 1); this.$set(this.ctrl, j, 1);
this.observer.disconnect(); this.observer.disconnect();
} }
}) })
...@@ -184,23 +184,23 @@ ...@@ -184,23 +184,23 @@
}, },
loadImg(e) { loadImg(e) {
var i = e.currentTarget.dataset.i; var i = e.currentTarget.dataset.i;
if (this.lazyLoad && !this.controls[i]) { if (this.lazyLoad && !this.ctrl[i]) {
// #ifdef QUICKAPP-WEBVIEW // #ifdef QUICKAPP-WEBVIEW
this.$set(this.controls, i, 0); this.$set(this.ctrl, i, 0);
this.$nextTick(function() { this.$nextTick(function() {
// #endif // #endif
// #ifndef APP-PLUS // #ifndef APP-PLUS
this.$set(this.controls, i, 1); this.$set(this.ctrl, i, 1);
// #endif // #endif
// #ifdef QUICKAPP-WEBVIEW // #ifdef QUICKAPP-WEBVIEW
}) })
// #endif // #endif
} else if (this.loading && this.controls[i] != 2) { } else if (this.loading && this.ctrl[i] != 2) {
// #ifdef QUICKAPP-WEBVIEW // #ifdef QUICKAPP-WEBVIEW
this.$set(this.controls, i, 0); this.$set(this.ctrl, i, 0);
this.$nextTick(function() { this.$nextTick(function() {
// #endif // #endif
this.$set(this.controls, i, 2); this.$set(this.ctrl, i, 2);
// #ifdef QUICKAPP-WEBVIEW // #ifdef QUICKAPP-WEBVIEW
}) })
// #endif // #endif
...@@ -258,14 +258,14 @@ ...@@ -258,14 +258,14 @@
i = target.dataset.i; i = target.dataset.i;
if (source == 'video' || source == 'audio') { if (source == 'video' || source == 'audio') {
// 加载其他 source // 加载其他 source
var index = this.controls[i] ? this.controls[i].i + 1 : 1; var index = this.ctrl[i] ? this.ctrl[i].i + 1 : 1;
if (index < this.nodes[i].attrs.source.length) if (index < this.nodes[i].attrs.source.length)
this.$set(this.controls, i, index); this.$set(this.ctrl, i, index);
if (e.detail.__args__) if (e.detail.__args__)
e.detail = e.detail.__args__[0]; e.detail = e.detail.__args__[0];
} else if (errorImg && source == 'img') { } else if (errorImg && source == 'img') {
this.top.imgList.setItem(target.dataset.index, errorImg); this.top.imgList.setItem(target.dataset.index, errorImg);
this.$set(this.controls, i, 3); this.$set(this.ctrl, i, 3);
} }
this.top && this.top.$emit('error', { this.top && this.top.$emit('error', {
source, source,
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
}); });
}, },
_loadVideo(e) { _loadVideo(e) {
this.$set(this.controls, e.target.dataset.i, 0); this.$set(this.ctrl, e.target.dataset.i, 0);
} }
} }
} }
...@@ -407,12 +407,13 @@ ...@@ -407,12 +407,13 @@
} }
._ul-bef { ._ul-bef {
display: block;
margin: 0 12px 0 23px; margin: 0 12px 0 23px;
line-height: normal; line-height: normal;
} }
._ol-bef, ._ol-bef,
._ul_bef { ._ul-bef {
flex: none; flex: none;
user-select: none; user-select: none;
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
* @event {Function} imgtap 图片点击事件 * @event {Function} imgtap 图片点击事件
* @event {Function} linkpress 链接点击事件 * @event {Function} linkpress 链接点击事件
* @author JinYufeng * @author JinYufeng
* @version 20200719 * @version 20200728
* @listens MIT * @listens MIT
*/ */
export default { export default {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
// 形状,square为方形,circle为原型 // 形状,square为方形,circle为原型
shape: { shape: {
type: String, type: String,
default: 'square' default: 'circle'
}, },
// 图标的大小,单位rpx // 图标的大小,单位rpx
iconSize: { iconSize: {
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
}, },
iconClass() { iconClass() {
let classes = []; let classes = [];
classes.push('u-radio__icon-wrap--' + this.shape); classes.push('u-radio__icon-wrap--' + this.elShape);
if (this.name == this.parent.value) classes.push('u-radio__icon-wrap--checked'); if (this.name == this.parent.value) classes.push('u-radio__icon-wrap--checked');
if (this.elDisabled) classes.push('u-radio__icon-wrap--disabled'); if (this.elDisabled) classes.push('u-radio__icon-wrap--disabled');
if (this.name == this.parent.value && this.elDisabled) classes.push( if (this.name == this.parent.value && this.elDisabled) classes.push(
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}" :class="{ }" :class="{
'u-section--line': showLine 'u-section--line': showLine
}"> }">
<view class="u-section__title__icon-wrap u-flex" :style="[lineStyle]"> <view class="u-section__title__icon-wrap u-flex" :style="[lineStyle]" v-if="showLine">
<u-icon top="0" name="column-line" :size="fontSize * 1.25" bold :color="lineColor ? lineColor : color"></u-icon> <u-icon top="0" name="column-line" :size="fontSize * 1.25" bold :color="lineColor ? lineColor : color"></u-icon>
</view> </view>
<text class="u-flex u-section__title__text">{{title}}</text> <text class="u-flex u-section__title__text">{{title}}</text>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
}, },
fontSize: { fontSize: {
type: [Number, String], type: [Number, String],
default: 32 default: 28
}, },
// 主标题是否加粗 // 主标题是否加粗
bold: { bold: {
......
<template> <template>
<view class="u-switch" :class="[value == true ? 'u-switch--on' : '', disabled ? 'u-switch--disabled' : '']" @tap="onClick" <view class="u-switch" :class="[value == true ? 'u-switch--on' : '', disabled ? 'u-switch--disabled' : '']" @tap="onClick"
:style="[switchStyle]"> :style="[switchStyle]">
<view class="u-switch__node node-class"> <view class="u-switch__node node-class" :style="{
width: $u.addUnit(this.size),
height: $u.addUnit(this.size)
}">
<u-loading :show="loading" class="u-switch__loading" :size="size * 0.6" :color="loadingColor" /> <u-loading :show="loading" class="u-switch__loading" :size="size * 0.6" :color="loadingColor" />
</view> </view>
</view> </view>
...@@ -128,8 +131,6 @@ ...@@ -128,8 +131,6 @@
left: 0; left: 0;
border-radius: 100%; border-radius: 100%;
z-index: 1; z-index: 1;
width: 1em;
height: 1em;
background-color: #fff; background-color: #fff;
background-color: #fff; background-color: #fff;
box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05); box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
}, },
created() { created() {
// 是否隐藏原生tabbar // 是否隐藏原生tabbar
if(this.borderTop) uni.hideTabBar(); if(this.hideTabBar) uni.hideTabBar();
// 获取引入了u-tabbar页面的路由地址,该地址没有路径前面的"/" // 获取引入了u-tabbar页面的路由地址,该地址没有路径前面的"/"
let pages = getCurrentPages(); let pages = getCurrentPages();
// 页面栈中的最后一个即为项为当前页面,route属性为页面路径 // 页面栈中的最后一个即为项为当前页面,route属性为页面路径
......
/* #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO */ /* #ifdef APP-PLUS */
@font-face { @font-face {
font-family: "uicon-iconfont"; font-family: "uicon-iconfont";
font-weight: normal; font-weight: normal;
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
/* #endif */ /* #endif */
/* 支付宝,百度,头条小程序目前读取大的本地字体文件,导致无法显示图标,故用在线加载的方式-2020-05-12 */ /* 支付宝,百度,头条小程序目前读取大的本地字体文件,导致无法显示图标,故用在线加载的方式-2020-05-12 */
/* #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO */ /* #ifndef APP-PLUS */
@font-face { @font-face {
font-family: "uicon-iconfont"; font-family: "uicon-iconfont";
src: url('//at.alicdn.com/t/font_1529455_a1l807px8qd'); src: url('//at.alicdn.com/t/font_1529455_a1l807px8qd');
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
align-items: center; align-items: center;
} }
.uicon-column-line:before {
content: "\e68e";
}
.uicon-level:before { .uicon-level:before {
content: "\e693"; content: "\e693";
} }
...@@ -54,100 +50,104 @@ ...@@ -54,100 +50,104 @@
content: "\e697"; content: "\e697";
} }
.uicon-arrow-left-double:before { .uicon-column-line:before {
content: "\e68c"; content: "\e68e";
} }
.uicon-arrow-right-double:before { .uicon-empty-page:before {
content: "\e68d"; content: "\e627";
} }
.uicon-youjiantou:before { .uicon-empty-data:before {
content: "\e602"; content: "\e62f";
} }
.uicon-red-packet:before { .uicon-empty-car:before {
content: "\e691"; content: "\e602";
} }
.uicon-red-packet-fill:before { .uicon-empty-order:before {
content: "\e690"; content: "\e639";
} }
.uicon-order:before { .uicon-empty-address:before {
content: "\e68f"; content: "\e646";
} }
.uicon-checkbox-mark:before { .uicon-empty-message:before {
content: "\e6a8"; content: "\e6a9";
} }
.uicon-arrow-up-fill:before { .uicon-empty-search:before {
content: "\e6b0"; content: "\e664";
} }
.uicon-arrow-down-fill:before { .uicon-empty-favor:before {
content: "\e600"; content: "\e67c";
} }
.uicon-zanwushouhuodizhisvg_huaban:before { .uicon-empty-coupon:before {
content: "\e6d5"; content: "\e682";
} }
.uicon-empty-wifi:before { .uicon-empty-history:before {
content: "\e639"; content: "\e684";
} }
.uicon-empty-history:before { .uicon-empty-permission:before {
content: "\e68b"; content: "\e686";
} }
.uicon-empty-message:before { .uicon-empty-news:before {
content: "\e687"; content: "\e687";
} }
.uicon-empty-permission:before { .uicon-empty-wifi:before {
content: "\e686"; content: "\e688";
} }
.uicon-empty-search:before { .uicon-empty-list:before {
content: "\e627"; content: "\e68b";
} }
.uicon-empty-page:before { .uicon-arrow-left-double:before {
content: "\e62f"; content: "\e68c";
} }
.uicon-empty-address:before { .uicon-arrow-right-double:before {
content: "\e646"; content: "\e68d";
} }
.uicon-empty-favor:before { .uicon-red-packet:before {
content: "\e664"; content: "\e691";
} }
.uicon-empty-coupon:before { .uicon-red-packet-fill:before {
content: "\e6af"; content: "\e690";
} }
.uicon-empty-data:before { .uicon-order:before {
content: "\e67c"; content: "\e68f";
} }
.uicon-mepty-order:before { .uicon-nav-back-arrow:before {
content: "\e7c8"; content: "\e67f";
} }
.uicon-empty-car:before { .uicon-nav-back:before {
content: "\e682"; content: "\e683";
} }
.uicon-empty-list:before { .uicon-checkbox-mark:before {
content: "\e684"; content: "\e6a8";
} }
.uicon-empty-news:before { .uicon-arrow-up-fill:before {
content: "\e6e8"; content: "\e6b0";
}
.uicon-arrow-down-fill:before {
content: "\e600";
} }
.uicon-backspace:before { .uicon-backspace:before {
......
// 此版本发布于2020-07-28 // 此版本发布于2020-07-29
let version = '1.5.6'; let version = '1.5.7';
export default { export default {
v: version, v: version,
......
{ {
"name": "uview-ui", "name": "uview-ui",
"version": "1.5.6", "version": "1.5.7",
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水", "description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
"main": "index.js", "main": "index.js",
"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"], "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"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment