wxml中的attribute是否能支持换行?
发布于 5 年前 作者 yang76 10303 次浏览 来自 问答
在开发过程中会使用prettier对wxml格式化,但是由于wxml中的attribute不支持换行,在一些比较长的表达式中需要手动加prettier-ignore

希望可以这样写也不报错:

class="grid fw {{ x.month === month ? '' : 'notCurrent' }} {{ x.date === today ? 'today' : '' }} {{
   x.date == beSelectDate ? 'choice' : ''
}}"
回到顶部