JavaScript/vue.js/element-ui:修订间差异
来自康健生活
| 第14行: | 第14行: | ||
实现一 | 实现一 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
import Vue from "vue" | |||
import {Input} from "element-ui" | |||
... | |||
methods: { | |||
putComment (event){ | |||
let CommentTextarea = Vue.extend(Input) | |||
let showCommentTextarea = new CommentTextarea({ | |||
propsData:{ | |||
type:"textarea" | |||
} | |||
}).$mount() | |||
event.target.parentNode.parentNode.parentNode.insertBefore(showCommentTextarea.$el, null); | |||
}, | |||
</syntaxhighlight> | </syntaxhighlight> | ||