Skip to content

Commit

Permalink
update: 完善 text 嵌套的告警信息
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyucoding committed Jan 23, 2019
1 parent 49aac35 commit 372c240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/core/view/components/image/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<uni-image v-on="$listeners">
<div :style="modeStyle" />
<img :src="realImagePath">
<v-uni-resize-sensor
ref="sensor"
@resize="_resize" />
</uni-image>
</template>
<script>
Expand Down
6 changes: 1 addition & 5 deletions src/core/view/components/text/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ export default {
})
} else {
if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') {
console.warn('text 组件中只允许嵌套 text 组件,不支持其它组件或自定义组件。')
console.warn('<text> 组件内只支持嵌套 <text>,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异')
}
nodeList.push(vnode)
}
// TODO 这个方案有漏洞,需要完善组件嵌套的情况。
// else if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-text') {
// nodeList.push(vnode)
// }
})
return createElement('uni-text', {
on: this.$listeners,
Expand Down

0 comments on commit 372c240

Please sign in to comment.