<view class="content">
<page-head :title="title"></page-head>
<view class="uni-padding-wrap">
<view class="uni-title uni-common-mt">
数组类型
<text>\nnodes属性为Array</text>
</view>
<view class="uni-common-mt" style="background:#FFF; padding:20rpx;">
<rich-text :nodes="nodes"></rich-text>
</view>
<!-- #ifndef MP-ALIPAY -->
<view class="uni-title uni-common-mt">
字符串类型
<text>\nnodes属性为String</text>
</view>
<view class="uni-common-mt" style="background:#FFF; padding:20rpx;">
<rich-text :nodes="strings"></rich-text>
</view>
<!-- #endif -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'rich-text',
nodes: [{
name: 'div',
attrs: {
class: 'div-class',
style: 'line-height: 60px; color: red; text-align:center;height: 200px;'
},
children: [{
type: 'text',
text: 'Hello uni-app!'
}]
}],
strings: '<div style="text-align:center;"><img src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/ceb770c0-5164-11eb-8a36-ebb87efcf8c0.png"/></div>'
}
}
}
</script>

- 发布:2023-01-18 16:51
- 更新:2023-01-29 22:47
- 阅读:403
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 12.1
HBuilderX类型: 正式
HBuilderX版本号: 3.6.18
手机系统: iOS
手机系统版本号: iOS 15
手机厂商: 模拟器
手机机型: iphone13 pro max
页面类型: nvue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
app-nvue,直接运行就能看到
app-nvue,直接运行就能看到
预期结果:
运行结果line-height,background-color等生效
运行结果line-height,background-color等生效
实际结果:
实际是只有color有效,line-height,background-color等无效,在h5中有效,在app中无效。
实际是只有color有效,line-height,background-color等无效,在h5中有效,在app中无效。
bug描述:
rich-text在app-nvue上line-height,background-color等都不生生效,只有color有效。
布朗
啥时候能修复呢?
2023-06-13 16:55
海角
啥时候修复 很多属性不能用 nvue里面
2024-05-31 16:24