$ npm install babel-plugin-syntax-jsx babel-plugin-transform-vue-jsx babel-helper-vue-jsx-merge-props babel-preset-env –save-dev
npm i babel-plugin-jsx-v-model –save-dev
.babelrc
“plugins”: [“transform-runtime”,”transform-vue-jsx”, “jsx-v-model”],
All of onXXX are considered events, nativeOnXXX is a native event, and domPropsXXX is a Dom property.
Note that some of the props properties of the iView pit wall start with ON, which is considered an event, but it’s actually a props property that makes vue not listen
"@ Babel/core", "^ 7.5.5", "@ Babel/plugin - transform - runtime" : "^ 7.5.5", "@ Babel/preset - env" : "^ 7.5.5 @", "Babel/preset - react" : "^ 7.0.0", "@ Babel/preset - stage - 0" : "^ 7.0.0", "Babel - loader" : "^ 8.0.6",Copy the code
.babelrc
"plugins": ["@babel/transform-runtime"]
Copy the code