Open thinkingOfBetty opened 2 years ago
When introducing UPLOAD components separately in the project, you also need to introduce additional three components of Progress, Button, and Icon. For users, the cost is relatively high.
It is expected that when the upload component is introduced, a complete style file can be provided to introduce
1
按需加载可以参考idux文档配置插件:https://idux.site/docs/getting-started/zh#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD 然后不需要再文件中引入任何idux的组件和样式了
// vite.config
import { IduxResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
export default {
plugins: [
/* ... */
Components({
resolvers: [IduxResolver()],
// 可以通过指定 `importStyle` 来按需加载 css 或 less 代码
// 别忘了移除掉 idux.ts 中的样式导入代码
// resolvers: [IduxResolver({ importStyle: 'css' })],
}),
]
}
What problem does this feature solve?
在项目中单独引入upload组件时还需要额外引入progress、button、icon这三个组件的样式,这对使用者来说,成本比较高
What does the proposed API look like?
期望引入upload组件时可以提供一个完整的样式文件引入