3***@qq.com
3***@qq.com
  • 发布:2025-11-28 16:21
  • 更新:2025-11-28 16:54
  • 阅读:47

uniapp 使用原生弹框 设置不了字体大小

分类:uni-app

customDialogBox.draw([{
tag: 'font',
id: 'dialogContentText',
text: val || '默认内容',
position: {
top: '40px', // 调整位置,避免遮挡
left: '20px',
width: 'calc(100% - 40px)', // 自适应宽度
height: '120px' // 增大高度,容纳大字体
},
styles: {
fontSize: “50px”,
color: '#333333',
textAlign: 'center',
lineHeight: 50 // 行高也要纯数字
}
}]);

设置fontSize没有效果 是什么原因啊

2025-11-28 16:21 负责人:无 分享
已邀请:
3***@qq.com

3***@qq.com (作者)

使用的是 uniapp vue2

蔡cai

蔡cai - 开发的插件:https://ask.dcloud.net.cn/article/41539

customDialogBox.draw是啥

木杉丶

木杉丶 - 你喜或悲,他也都在那里

text: "默认内容",
textStyles: {
size: '14px',
color: "#FFF",
lineSpacing: "0%",
whiteSpace: "normal"
} 这样的吧

要回复问题请先登录注册