js文件 $createElement
时间: 2024-01-15 16:38:32 浏览: 105
js操作教程
回答: 在引用中提到了使用this.$createElement方法的写法,因此在你的代码中,可以按照这样的方式来使用$createElement方法。在你的js文件中,你可以先将this.$createElement方法赋值给一个变量,比如const h = this.$createElement,然后在customRender方法中使用h来代替this.$createElement。具体来说,你可以按照如下方式修改你的代码:
```javascript
import columns from "./columns";
export default {
data() {
return {
columns: columns,
}
},
created() {
this.setOrderrNumClickEvent();
},
methods: {
setContractNumClickEvent(){
let h = this.$createElement;
this.columns<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ant design vue的customRender()方法中使用$createElement提示undefined](https://blog.csdn.net/qq_42550285/article/details/128397839)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [vue:this.$createElement方法](https://blog.csdn.net/qq_37899622/article/details/120351160)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文