weex Android 空白,Weex H5显示正常,android和ios皆显示一片空白,为什么呢?

本文讨论了一个在H5中正常显示的步骤条组件,在iOS和Android平台上空白显示的问题。开发者在尝试解决安卓和iOS设备显示问题时,详细介绍了组件结构、代码实现及调用方式,寻求帮助以找到可能的原因和解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一个步骤条组件,分为两个模块,一个为 Step-Item,一个为 Step,代码如下所示。

{{ currentStepNumber }}

{{ title }}

{{ description }}

export default {

name: 'o-step-item',

props: {

title: String,

description: String,

stepNumber: Number,

stepLast: Boolean,

status: String

},

data () {

return {

currentStatus: 'wait',

currentStepNumber: 0,

currentStepLast: false

}

},

created () {

this.currentStatus = this.status

this.currentStepNumber = this.stepNumber

this.currentStepLast = this.stepLast

}

}

export default {

name: 'o-step',

props: {

value: Number

},

data () {

return {

current: 0

}

},

created () {

this.current = this.value

},

mounted () {

this._mapPropsToChildComponent()

},

watch: {

value (val) {

this.current = val

},

current (val) {

this._mapPropsToChildComponent()

this.$emit('input', val)

}

},

methods: {

_mapPropsToChildComponent () {

const _this = this

const children = this.$children[0].$children

const length = children.length - 1

children.forEach((child, index) => {

child.currentStepNumber = (index + 1).toString()

child.currentStepLast = index === length

if (index === _this.current) {

child.currentStatus = 'process'

} else if (index < _this.current) {

child.currentStatus = 'finish'

} else {

child.currentStatus = 'wait'

}

})

}

}

}

然后,调用组件代码如下:

Next

export default {

data () {

return {

step: 0

}

},

methods: {

next () {

this.step++

}

}

}

在H5显示正常,但是 android和 IOS 都是一片空白,为什么呢?困惑了两天了希望得到帮助,谢谢。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值