this.$msgbox({
title: "选择",
message: (
<com1
figs={this.figs}
on-selected={this.new_selected}
></com1>
),
showCancelButton: false,
showConfirmButton: false,
});
运行报错 Syntax Error: Unexpected token (89:20)
参考:
https://github.com/vuejs/babel-plugin-transform-vue-jsx
npm install\
babel-plugin-syntax-jsx\
babel-plugin-transform-vue-jsx\
babel-helper-vue-jsx-merge-props\
babel-preset-env\
--save-dev
在项目文件夹中创建.babelrc文件
{
"presets": ["env"],
"plugins": ["transform-vue-jsx"]
}