收藏
回答

在nvue中使用rich-text,nodes中对元素添加了class,class样式没有生效?

通过style配置了background,padding属性,但是都没有生效

nodes =[
				  {
					  name:'node',
					  attrs:{
						  class:'flag-txt',
						  style:'fontSize:14px;height:24px;line-height:24px;background:#fff;color:#fc545c;padding:8px;margin:4px'
					  },
					  children:[{
						  type:'text',
						  text:item.name
					  }]
				  }
]


回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 该问答由AI生成
    2025-07-05
    有用 1
登录 后发表内容