File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "name" : " uView" ,
33 "appid" : " __UNI__60F4B81" ,
44 "description" : " 多平台快速开发的UI框架" ,
5- "versionName" : " 1.5.2 " ,
5+ "versionName" : " 1.5.3 " ,
66 "versionCode" : " 100" ,
77 "transformPx" : false ,
88 "app-plus" : {
Original file line number Diff line number Diff line change 66 "current" : 0 , //当前激活的模式(list 的索引项)
77 "list" : [{
88 "name" : " test" , //模式名称
9- "path" : " pages/componentsC/test /index" , //启动页面,必选
9+ "path" : " pages/componentsB/readMore /index" , //启动页面,必选
1010 "query" : " id=1&name=2" //启动参数,在页面的onLoad函数里面得到
1111 }]
1212 },
Original file line number Diff line number Diff line change 1010 v-model =" show"
1111 :defaultRegion =" defaultRegion"
1212 :params =" params"
13+ end-year =" 2030"
1314 @confirm =" confirm"
1415 :defaultSelector =" defaultSelector"
1516 :range =" range"
Original file line number Diff line number Diff line change 33 <view class =" u-demo-wrap" >
44 <view class =" u-demo-title" >演示效果</view >
55 <view class =" u-demo-area" >
6- <u-read-more :toggle =" toggle" :show-height =" showHeight" >
6+ <u-read-more :toggle =" toggle" :show-height =" showHeight" ref =" uReadMore" >
7+ <!-- u-parse组件在微信小程序渲染慢,支付宝小程序rich-text不支持nodes属性 -->
8+ <!-- #ifdef MP-ALIPAY -->
9+ <u-parse :html =" content" ></u-parse >
10+ <!-- #endif -->
11+ <!-- #ifndef MP-ALIPAY -->
712 <rich-text :nodes =" content" ></rich-text >
13+ <!-- #endif -->
814 </u-read-more >
915 </view >
1016 </view >
Original file line number Diff line number Diff line change 11<template >
22 <view class =" u-content" >
3- <u-parse :html = " content " show-with-animation ></u-parse >
3+ <u-dropdown-list ></u-dropdown-list >
44 </view >
55</template >
66
Original file line number Diff line number Diff line change @@ -363,4 +363,8 @@ export default {
363363.u-input-class {
364364 font-size : 28 rpx;
365365}
366+
367+ .u-button-wrap {
368+ margin-left : 8 rpx;
369+ }
366370 </style >
Original file line number Diff line number Diff line change 1818 ></image >
1919 <view v-if =" showLoading && loading" class =" u-image__loading" :style =" {
2020 borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius),
21+ backgroundColor: this.bgColor
2122 }" >
2223 <slot v-if =" $slots.loading" name =" loading" />
2324 <u-icon v-else :name =" loadingIcon" ></u-icon >
@@ -108,6 +109,11 @@ export default {
108109 duration: {
109110 type: [String , Number ],
110111 default: 500
112+ },
113+ // 背景颜色,用于深色页面加载图片时,为了和背景色融合
114+ bgColor: {
115+ type: String ,
116+ default: ' #f3f4f6'
111117 }
112118 },
113119 data () {
@@ -189,7 +195,6 @@ export default {
189195@import ' ../../libs/css/style.components.scss' ;
190196
191197.u-image {
192- background-color : $u-bg-color ;
193198 position : relative ;
194199 transition : opacity 0.5s ease-in-out ;
195200
Original file line number Diff line number Diff line change @@ -330,6 +330,9 @@ export default {
330330 },
331331 // 生成递进的数组
332332 generateArray : function (start , end ) {
333+ // 转为数值格式,否则用户给end-year等传递字符串值时,下面的end+1会导致字符串拼接,而不是相加
334+ start = Number (start);
335+ end = Number (end);
333336 end = end > start ? end : start;
334337 // 生成数组,获取其中的索引,并剪出来
335338 return [... Array (end + 1 ).keys ()].slice (start);
Original file line number Diff line number Diff line change 9999 };
100100 },
101101 mounted () {
102- this .init ();
102+ this .$nextTick (function (){
103+ this .init ();
104+ })
103105 },
104106 methods: {
105107 init () {
Original file line number Diff line number Diff line change @@ -137,11 +137,11 @@ export default {
137137 index = this .leftList .findIndex (val => val[this .idKey ] == id);
138138 if (index != - 1 ) {
139139 // 如果index不等于-1,说明已经找到了要找的id,修改对应key的值
140- this .leftList [key] = value;
140+ this .leftList [index][ key] = value;
141141 } else {
142142 // 同理于上方面的方法
143143 index = this .rightList .findIndex (val => val[this .idKey ] == id);
144- if (index != - 1 ) this .leftList [key] = value;
144+ if (index != - 1 ) this .rightList [index] [key] = value;
145145 }
146146 // 修改父组件的数据中的对应id的条目
147147 index = this .value .findIndex (val => val[this .idKey ] == id);
You can’t perform that action at this time.
0 commit comments