arco-design-vue
arco-design-vue copied to clipboard
请问arco组件怎么使用viewport单位做多窗口适配?
trafficstars
- [ ] I'm sure this does not appear in the issue list of the repository
Basic Info
- Package Name And Version: @arco-design/[email protected]
- Framework version: "vue": "^3.4.21"
- Browser: chrome128.0.0.0
Steps to reproduce
例如:a-layout-sider,我给定了:width: 102,这个如何转为viewport单位?
<a-layout-sider :width="102"><Menu /></a-layout-sider>
<a-image width="100" :src="item.photo" />
上面只是提供了一个案例,arco中的ui组件大部分场景下都提供了:width这种属性,而且这些属性只支持number类型,我无法通过自定义函数来将单位转换为viewport,例如:a-image、输入框、icon等,有些地方是可以通过属性手动设置,有些地方没法设置大小,请问这种多端兼容有解决方案吗?