according to the on-demand introduction mode provided by the official website
the import and Vue.use (iView) in the entrance should be removed from
babelrc
"plugins": ["transform-vue-jsx", "transform-runtime",[
"import", {
"libraryName": "iview",
"libraryDirectory": "src/components"
}]]
component
<template>
<div class="task-bar-wrapper">
<Button>Default</Button>
</div>
</template>
<script>
import {Button} from "iview";
export default {
components: {
Button
},
data() {
return {
}
}
}
</script>
error