view-ui-plus
npm install view-ui-plus --save
babel-plugin-import
npm install babel-plugin-import --save-dev
babel.config.js
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
// ——————————这里
plugins: [
[
'import',
{
'libraryName': 'view-ui-plus',
'libraryDirectory': 'src/components',
},
'view-ui-plus',
]
],
};
view-ui-plus
import { Split } from 'view-ui-plus';
export default {
components: { Split },
data() {
return {}
}
}