自定义组件不能添加字体图标,如果添加了会报错, 因为自定义组件只能有类选择器不能有@font-face 选择器 如:
@font-face {
font-family: 'iconfont';
src: url('./iconfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
line-height: 1;
}
这样会报: VM4758:2 Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./pages/iconfont/iconfont.wxss:3:1)This wxss file is ignored. 的错
支持了的。
感谢反馈,我们会考虑之后追加 @font-face 支持。
现在是不是支持了?我在ios测试版可以用