判断数据是否为空
使用vite.config.ts中
import myVitePlugin from '@yll10243/vite-plugin-unplugin-css';
myVitePlugin({
resolves: [{
libraryName: 'element-plus', //第三方的模板
ensureStyleFile: true, //
esModule: true, //非css后缀需开启,默认false
resolveStyle: (name) => {
return `element-plus/theme-chalk/${name}.css`
},
libraryNameChangeCase: "paramCase", //camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
// base: 'element-plus/theme-chalk/base.css', //全局的css样式,可以放在main.ts(js)中引入,防止多次重复引入
}]
})
myVitePlugin({
resolves: [
{
ensureStyleFile: true,
libraryName: 'ant-design-vue',
esModule: true,
resolveStyle: (name) => {
return `ant-design-vue/es/${name}/style/index`
},
}
]
})
myVitePlugin({
resolves: [
{
libraryName: 'antd',
esModule: true,
resolveStyle: (name) => {
return `antd/es/${name}/style/index`
}
},
]
})
myVitePlugin({
resolves: [
{
libraryName: 'vant',
esModule: true,
resolveStyle: (name) => {
return `vant/es/${name}/style`
},
}
]
})