Commit c4ab4f73 authored by wlxuqu's avatar wlxuqu

优化组件逻辑

parent 7acf3daa
...@@ -162,14 +162,18 @@ export default { ...@@ -162,14 +162,18 @@ export default {
}; };
}, },
watch: { watch: {
src(n) { src: {
immediate: true,
handler (n) {
if(!n) { if(!n) {
// 如果传入null或者'',或者false,或者undefined,标记为错误状态 // 如果传入null或者'',或者false,或者undefined,标记为错误状态
this.isError = true; this.isError = true;
this.loading = false;
} else { } else {
this.isError = false; this.isError = false;
} }
} }
}
}, },
computed: { computed: {
wrapStyle() { wrapStyle() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class=""> <view class="">
<view class="u-content" :class="[elId]" :style="{ <view class="u-content" :class="[elId]" :style="{
height: isLongContent && !showMore ? showHeight + 'rpx' : 'auto', height: isLongContent && !showMore ? showHeight + 'rpx' : 'auto',
textIndent: this.textIndent textIndent: textIndent
}"> }">
<slot></slot> <slot></slot>
</view> </view>
......
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