add NodeViewWrapper and NodeViewContent to vue-2

This commit is contained in:
Philipp Kühn
2021-03-05 10:18:44 +01:00
parent 27b55a2c53
commit 983b56a5f2
10 changed files with 127 additions and 80 deletions

View File

@@ -0,0 +1,30 @@
import Vue from 'vue'
export const NodeViewWrapper = Vue.extend({
props: {
as: {
type: String,
default: 'div',
},
},
inject: ['onDragStart'],
render(createElement) {
return createElement(
this.as, {
style: {
whiteSpace: 'normal',
},
attrs: {
'data-node-view-wrapper': '',
},
on: {
// @ts-ignore
dragstart: this.onDragStart,
},
},
this.$slots.default,
)
},
})