Commit 8659ce32 authored by yiruiwen's avatar yiruiwen

Merge branch 'yiruiwen'

parents 103a881b 04da8d47
...@@ -7,7 +7,7 @@ text { ...@@ -7,7 +7,7 @@ text {
/* start--演示页面使用的统一样式--start */ /* start--演示页面使用的统一样式--start */
.u-demo { .u-demo {
padding: 50rpx 40rpx; padding: 25px 20px;
} }
.u-demo-wrap { .u-demo-wrap {
...@@ -15,8 +15,8 @@ text { ...@@ -15,8 +15,8 @@ text {
border-color: #ddd; border-color: #ddd;
border-style: dashed; border-style: dashed;
background-color: rgb(250, 250, 250); background-color: rgb(250, 250, 250);
padding: 40rpx 20rpx; padding: 20px 10px;
border-radius: 6px; border-radius: 3px;
} }
.u-demo-area { .u-demo-area {
...@@ -25,19 +25,19 @@ text { ...@@ -25,19 +25,19 @@ text {
.u-no-demo-here { .u-no-demo-here {
color: $u-tips-color; color: $u-tips-color;
font-size: 26rpx; font-size: 13px;
} }
.u-demo-result-line { .u-demo-result-line {
border-width: 1px; border-width: 1px;
border-color: #ddd; border-color: #ddd;
border-style: dashed; border-style: dashed;
padding: 10rpx 40rpx; padding: 5px 20px;
margin-top: 30rpx; margin-top: 30px;
border-radius: 5px; border-radius: 5px;
background-color: rgb(240, 240, 240); background-color: rgb(240, 240, 240);
color: $u-content-color; color: $u-content-color;
font-size: 32rpx; font-size: 16px;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
word-break: break-word; word-break: break-word;
display: inline-block; display: inline-block;
...@@ -49,26 +49,26 @@ text { ...@@ -49,26 +49,26 @@ text {
.u-demo-title, .u-demo-title,
.u-config-title { .u-config-title {
text-align: center; text-align: center;
font-size: 32rpx; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-bottom: 40rpx; margin-bottom: 20px;
} }
.u-config-item { .u-config-item {
margin-top: 50rpx; margin-top: 25px;
} }
.u-config-title { .u-config-title {
margin-top: 40rpx; margin-top: 20px;
padding-bottom: 10rpx; padding-bottom: 5px;
} }
.u-item-title { .u-item-title {
position: relative; position: relative;
font-size: 28rpx; font-size: 15px;
padding-left: 8px; padding-left: 8px;
line-height: 1; line-height: 1;
margin-bottom: 22rpx; margin-bottom: 11px;
} }
.u-item-title:after { .u-item-title:after {
......
...@@ -47,14 +47,14 @@ ...@@ -47,14 +47,14 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.nav-wrap { .nav-wrap {
padding: 30rpx; padding: 15px;
position: relative; position: relative;
} }
.lang { .lang {
position: absolute; position: absolute;
top: 30rpx; top: 15px;
right: 30rpx; right: 15px;
} }
.nav-title { .nav-title {
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
} }
.nav-info { .nav-info {
margin-left: 30rpx; margin-left: 15px;
} }
.nav-title__text { .nav-title__text {
...@@ -74,12 +74,12 @@ ...@@ -74,12 +74,12 @@
display: flex; display: flex;
/* #endif */ /* #endif */
color: $u-main-color; color: $u-main-color;
font-size: 50rpx; font-size: 25px;
font-weight: bold; font-weight: bold;
} }
.logo { .logo {
width: 140rpx; width: 70px;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
height: auto; height: auto;
/* #endif */ /* #endif */
...@@ -87,12 +87,12 @@ ...@@ -87,12 +87,12 @@
.nav-slogan { .nav-slogan {
color: $u-tips-color; color: $u-tips-color;
font-size: 28rpx; font-size: 14px;
} }
.nav-desc { .nav-desc {
margin-top: 20rpx; margin-top: 10px;
font-size: 28rpx; font-size: 14px;
color: $u-content-color; color: $u-content-color;
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "uView", "name" : "uView",
"appid" : "__UNI__60F4B81", "appid" : "__UNI__60F4B81",
"description" : "多平台快速开发的UI框架", "description" : "多平台快速开发的UI框架",
"versionName" : "1.7.3", "versionName" : "1.7.4",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
......
...@@ -178,6 +178,7 @@ page { ...@@ -178,6 +178,7 @@ page {
font-size: 30rpx; font-size: 30rpx;
margin-top: 5px; margin-top: 5px;
color: $u-main-color; color: $u-main-color;
word-break: break-all;
} }
.demo-tag { .demo-tag {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="u-demo-title">演示效果</view> <view class="u-demo-title">演示效果</view>
<view class="u-demo-area"> <view class="u-demo-area">
<u-number-box v-model="value" :bg-color="bgColor" :color="color" :min="0" <u-number-box v-model="value" :bg-color="bgColor" :color="color" :min="0"
:step="step" :disabled="disabled" @change="change"></u-number-box> :step="step" :disabled="disabled" @change="change" @focus="focus"></u-number-box>
</view> </view>
</view> </view>
<view class="u-config-wrap"> <view class="u-config-wrap">
...@@ -64,6 +64,9 @@ export default { ...@@ -64,6 +64,9 @@ export default {
}, },
change(e) { change(e) {
//console.log(e.value); //console.log(e.value);
},
focus() {
console.log('focus');
} }
} }
}; };
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
color: value == item.value ? activeColor : inactiveColor color: value == item.value ? activeColor : inactiveColor
}"> }">
<u-icon v-if="value == item.value" name="checkbox-mark" :color="activeColor" size="32"></u-icon> <u-icon v-if="value == item.value" name="checkbox-mark" :color="activeColor" size="32"></u-icon>
</u-cell-item> </u-cell-item>
</u-cell-group> </u-cell-group>
</view> </view>
</scroll-view> </scroll-view>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
height: { height: {
type: [Number, String], type: [Number, String],
default: 'auto' default: 'auto'
} },
}, },
data() { data() {
return { return {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="u-dropdown__menu__item__arrow" :class="{ <view class="u-dropdown__menu__item__arrow" :class="{
'u-dropdown__menu__item__arrow--rotate': index === current 'u-dropdown__menu__item__arrow--rotate': index === current
}"> }">
<u-icon :custom-style="{display: 'flex'}" name="arrow-down" size="26" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'"></u-icon> <u-icon :custom-style="{display: 'flex'}" :name="menuIcon" :size="$u.addUnit(menuIconSize)" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'"></u-icon>
</view> </view>
</view> </view>
</view> </view>
...@@ -98,6 +98,16 @@ ...@@ -98,6 +98,16 @@
borderRadius: { borderRadius: {
type: [Number, String], type: [Number, String],
default: 0 default: 0
},
// 菜单右侧的icon图标
menuIcon: {
type: String,
default: 'arrow-down'
},
// 菜单右侧图标的大小
menuIconSize: {
type: [Number, String],
default: 26
} }
}, },
data() { data() {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<u-icon name="minus" :size="size"></u-icon> <u-icon name="minus" :size="size"></u-icon>
</view> </view>
<input :disabled="disabledInput || disabled" :cursor-spacing="getCursorSpacing" :class="{ 'u-input-disabled': disabled }" <input :disabled="disabledInput || disabled" :cursor-spacing="getCursorSpacing" :class="{ 'u-input-disabled': disabled }"
v-model="inputVal" class="u-number-input" @blur="onBlur" v-model="inputVal" class="u-number-input" @blur="onBlur" @focus="onFocus"
type="number" :style="{ type="number" :style="{
color: color, color: color,
fontSize: size + 'rpx', fontSize: size + 'rpx',
...@@ -288,6 +288,10 @@ ...@@ -288,6 +288,10 @@
}) })
this.handleChange(val, 'blur'); this.handleChange(val, 'blur');
}, },
// 输入框获得焦点事件
onFocus() {
this.$emit('focus');
},
handleChange(value, type) { handleChange(value, type) {
if (this.disabled) return; if (this.disabled) return;
// 清除定时器,避免造成混乱 // 清除定时器,避免造成混乱
......
...@@ -57,7 +57,10 @@ parser.prototype.Comment = function() { ...@@ -57,7 +57,10 @@ parser.prototype.Comment = function() {
} }
parser.prototype.Ignore = function(c) { parser.prototype.Ignore = function(c) {
if (c == '{') this.floor++; if (c == '{') this.floor++;
else if (c == '}' && !--this.floor) this.state = this.Space; else if (c == '}' && !--this.floor) {
this.list = [];
this.state = this.Space;
}
} }
parser.prototype.Name = function(c) { parser.prototype.Name = function(c) {
if (cfg.blankChar[c]) { if (cfg.blankChar[c]) {
......
/** /**
* html 解析器 * html 解析器
* @tutorial https://github.com/jin-yufeng/Parser * @tutorial https://github.com/jin-yufeng/Parser
* @version 20200828 * @version 20201014
* @author JinYufeng * @author JinYufeng
* @listens MIT * @listens MIT
*/ */
...@@ -25,10 +25,7 @@ function MpHtmlParser(data, options = {}) { ...@@ -25,10 +25,7 @@ function MpHtmlParser(data, options = {}) {
// 工具函数 // 工具函数
this.bubble = () => { this.bubble = () => {
for (var i = this.STACK.length, item; item = this.STACK[--i];) { for (var i = this.STACK.length, item; item = this.STACK[--i];) {
if (cfg.richOnlyTags[item.name]) { if (cfg.richOnlyTags[item.name]) return false;
if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1;
return false;
}
item.c = 1; item.c = 1;
} }
return true; return true;
...@@ -210,12 +207,15 @@ MpHtmlParser.prototype.setNode = function() { ...@@ -210,12 +207,15 @@ MpHtmlParser.prototype.setNode = function() {
if (attrs.colspan || attrs.rowspan) if (attrs.colspan || attrs.rowspan)
for (var k = this.STACK.length, item; item = this.STACK[--k];) for (var k = this.STACK.length, item; item = this.STACK[--k];)
if (item.name == 'table') { if (item.name == 'table') {
item.c = void 0; item.flag = 1;
break; break;
} }
} }
if (attrs.align) { if (attrs.align) {
styleObj['text-align'] = attrs.align; if (node.name == 'table') {
if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';
else styleObj['float'] = attrs.align;
} else styleObj['text-align'] = attrs.align;
attrs.align = void 0; attrs.align = void 0;
} }
// 压缩 style // 压缩 style
...@@ -308,10 +308,12 @@ MpHtmlParser.prototype.remove = function(node) { ...@@ -308,10 +308,12 @@ MpHtmlParser.prototype.remove = function(node) {
// 处理 svg // 处理 svg
var handleSvg = () => { var handleSvg = () => {
var src = this.data.substring(j, this.i + 1); var src = this.data.substring(j, this.i + 1);
if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src; node.attrs.xmlns = 'http://www.w3.org/2000/svg';
var i = j; for (var key in node.attrs) {
while (this.data[j] != '<') j--; if (key == 'viewbox') src = ` viewBox="${node.attrs.viewbox}"` + src;
src = this.data.substring(j, i).replace("viewbox", "viewBox") + src; else if (key != 'style') src = ` ${key}="${node.attrs[key]}"` + src;
}
src = '<svg' + src;
var parent = this.parent(); var parent = this.parent();
if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline'))
parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style; parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
...@@ -319,7 +321,7 @@ MpHtmlParser.prototype.remove = function(node) { ...@@ -319,7 +321,7 @@ MpHtmlParser.prototype.remove = function(node) {
name: 'img', name: 'img',
attrs: { attrs: {
src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'), src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(), style: node.attrs.style,
ignore: 'T' ignore: 'T'
} }
}) })
...@@ -400,35 +402,78 @@ MpHtmlParser.prototype.popNode = function(node) { ...@@ -400,35 +402,78 @@ MpHtmlParser.prototype.popNode = function(node) {
} }
} }
} }
// 处理表格的边框 // 处理表格
if (node.name == 'table') { if (node.name == 'table') {
var padding = attrs.cellpadding, var padding = parseFloat(attrs.cellpadding),
spacing = attrs.cellspacing, spacing = parseFloat(attrs.cellspacing),
border = attrs.border; border = parseFloat(attrs.border);
if (node.c) { if (node.c) {
this.bubble(); if (isNaN(padding)) padding = 2;
attrs.style = (attrs.style || '') + ';display:table'; if (isNaN(spacing)) spacing = 2;
if (!padding) padding = 2;
if (!spacing) spacing = 2;
} }
if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`; if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`;
if (spacing) attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`; if (node.flag && node.c) {
if (border || padding || node.c) // 有 colspan 或 rowspan 且含有链接的表格转为 grid 布局实现
attrs.style = `${attrs.style || ''};${spacing ? `;grid-gap:${spacing}px` : ';border-left:0;border-top:0'}`;
var row = 1,
col = 1,
colNum,
trs = [],
children = [],
map = {};
(function f(ns) { (function f(ns) {
for (var i = 0, n; n = ns[i]; i++) { for (var i = 0; i < ns.length; i++) {
if (n.type == 'text') continue; if (ns[i].name == 'tr') trs.push(ns[i]);
var style = n.attrs.style || ''; else f(ns[i].children || []);
if (node.c && n.name[0] == 't') { }
n.c = 1; })(node.children)
style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : (n.name == 'tr' ? 'row' : 'row-group')); for (let i = 0; i < trs.length; i++) {
for (let j = 0, td; td = trs[i].children[j]; j++) {
if (td.name == 'td' || td.name == 'th') {
while (map[row + '.' + col]) col++;
var cell = {
name: 'div',
c: 1,
attrs: {
style: (td.attrs.style || '') + (border ? `;border:${border}px solid gray` + (spacing ? '' :
';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '')
},
children: td.children
}
if (td.attrs.colspan) {
cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan));
if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1);
col += parseInt(td.attrs.colspan) - 1;
}
if (td.attrs.rowspan) {
cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan));
if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1);
for (var k = 1; k < td.attrs.rowspan; k++) map[(row + k) + '.' + col] = 1;
} }
children.push(cell);
col++;
}
}
if (!colNum) {
colNum = col - 1;
attrs.style += `;grid-template-columns:repeat(${colNum},auto)`
}
col = 1;
row++;
}
node.children = children;
} else {
attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`;
if (border || padding)
(function f(ns) {
for (var i = 0, n; n = ns[i]; i++) {
if (n.name == 'th' || n.name == 'td') { if (n.name == 'th' || n.name == 'td') {
if (border) style = `border:${border}px solid gray;${style}`; if (border) n.attrs.style = `border:${border}px solid gray;${n.attrs.style || ''}`;
if (padding) style = `padding:${padding}px;${style}`; if (padding) n.attrs.style = `padding:${padding}px;${n.attrs.style || ''}`;
} else f(n.children || []); } else f(n.children || []);
if (style) n.attrs.style = style;
} }
})(childs) })(childs)
}
if (this.options.autoscroll) { if (this.options.autoscroll) {
var table = Object.assign({}, node); var table = Object.assign({}, node);
node.name = 'div'; node.name = 'div';
......
...@@ -33,7 +33,7 @@ var cfg = { ...@@ -33,7 +33,7 @@ var cfg = {
// 将被移除的标签 // 将被移除的标签
ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'), ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
// 只能被 rich-text 显示的标签 // 只能被 rich-text 显示的标签
richOnlyTags: makeMap('a,colgroup,fieldset,legend,table'), richOnlyTags: makeMap('a,colgroup,fieldset,legend'),
// 自闭合的标签 // 自闭合的标签
selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'), selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
// 信任的标签 // 信任的标签
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
<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))&&ctrl[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"
:style="n.attrs.style" :data-i="i" @tap="_loadVideo" /> :class="'_video '+(n.attrs.class||'')" :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||ctrl[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.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.attrs.source[ctrl[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.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[ctrl[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"
@error.native="error" @play.native="play" /> @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"
:data-attrs="n.attrs" @tap="linkpress"> :data-attrs="n.attrs" @tap="linkpress">
...@@ -42,6 +42,10 @@ ...@@ -42,6 +42,10 @@
<trees class="_li" c="_li" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" /> <trees class="_li" c="_li" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" />
</view> </view>
<!--表格--> <!--表格-->
<view v-else-if="n.name=='table'&&n.c&&n.flag" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:grid'">
<trees v-for="(cell,n) in n.children" v-bind:key="n" :class="cell.attrs.class" :c="cell.attrs.class" :style="cell.attrs.style"
:s="cell.attrs.style" :nodes="cell.children" />
</view>
<view v-else-if="n.name=='table'&&n.c" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:table'"> <view v-else-if="n.name=='table'&&n.c" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:table'">
<view v-for="(tbody, o) in n.children" v-bind:key="o" :class="tbody.attrs.class" :style="(tbody.attrs.style||'')+(tbody.name[0]=='t'?';display:table-'+(tbody.name=='tr'?'row':'row-group'):'')"> <view v-for="(tbody, o) in n.children" v-bind:key="o" :class="tbody.attrs.class" :style="(tbody.attrs.style||'')+(tbody.name[0]=='t'?';display:table-'+(tbody.name=='tr'?'row':'row-group'):'')">
<view v-for="(tr, p) in tbody.children" v-bind:key="p" :class="tr.attrs.class" :style="(tr.attrs.style||'')+(tr.name[0]=='t'?';display:table-'+(tr.name=='tr'?'row':'cell'):'')"> <view v-for="(tr, p) in tbody.children" v-bind:key="p" :class="tr.attrs.class" :style="(tr.attrs.style||'')+(tr.name[0]=='t'?';display:table-'+(tr.name=='tr'?'row':'cell'):'')">
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
* @event {Function} imgtap 图片点击事件 * @event {Function} imgtap 图片点击事件
* @event {Function} linkpress 链接点击事件 * @event {Function} linkpress 链接点击事件
* @author JinYufeng * @author JinYufeng
* @version 20200828 * @version 20201014
* @listens MIT * @listens MIT
*/ */
export default { export default {
...@@ -529,7 +529,7 @@ ...@@ -529,7 +529,7 @@
style += '</style>'; style += '</style>';
html = style + html; html = style + html;
} }
// 处理rpx // 处理 rpx
if (html.includes('rpx')) if (html.includes('rpx'))
html = html.replace(/[0-9.]+\s*rpx/g, $ => (parseFloat($) * windowWidth / 750) + 'px'); html = html.replace(/[0-9.]+\s*rpx/g, $ => (parseFloat($) * windowWidth / 750) + 'px');
return html; return html;
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
}; };
}, },
mounted() { mounted() {
this.$nextTick(function() { this.$nextTick(() => {
this.init(); this.init();
}) })
}, },
......
// 此版本发布于2020-09-22 // 此版本发布于2020-10-13
let version = '1.7.3'; let version = '1.7.4';
export default { export default {
v: version, v: version,
......
{ {
"name": "uview-ui", "name": "uview-ui",
"version": "1.7.3", "version": "1.7.6",
"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"
],
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
......
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