vue jsx 语法与 react jsx 还是有些不一样,在这里记录下。
@H_404_3@
);
} else {
component = (
@H_404_3@
);
}
var ul = (
{ul}
};
})
// 属性
console.log()}>
// 自定义指令
let directives = [{name: 'prod-img',value: params.row.skn,modifiers: {skn: true}} ];
return (
// 属性展开
@H_404_3@
);
// 自定义过滤器
不建议使用,直接当函数使用
foo(something)
// methods
this.foo()
// model
(params.row.factoryCode = val)}
style={{width: '100%'}}>
// 自定义事件
return (
// event 绑定
);
//三元运算
-
{component}
{i == 1 ? 'True!' : 'False'}
菜鸟教程
{/*注释...*/} @H_404_3@ // html{{_html: '
Hello World!!
'}}@H_404_3@ // h函数写法 return h('Input',{ props: { value: params.row.buyingNums },on: { input: val => { params.row.buyingNums = val; },'on-blur': () => { this.update(params); } } }); // 所有的事件监听必须以on开头,然后字母大写 // template // jsx this.click()}> @H_404_3@好了,下面看下vue.js 使用jsx语法的方法
1、创建一个测试的组件
},render(h){
return
return