Vue 中使用 lib-flexible 排除 treeselect 组件布局问题
在使用 lib-flexible 时,可能会影响到一些第三方组件的布局,比如 treeselect。这时可以通过在 vue.config.js 中添加 exclude 来排除 treeselect。
例如:
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compilerOptions = {
...options.compilerOptions,
isCustomElement: tag => tag === 'treeselect'
}
return options
})
}
}
这样就可以将 treeselect 排除在外,避免布局问题。
原文地址: https://www.cveoy.top/t/topic/oOMl 著作权归作者所有。请勿转载和采集!