10 changed files with 525 additions and 46 deletions
@ -1,3 +1,6 @@ |
|||||
html,body,#app{ |
html,body,#app{ |
||||
height: 100%; |
height: 100%; |
||||
|
} |
||||
|
*{ |
||||
|
user-select: none; |
||||
} |
} |
@ -1,5 +1,35 @@ |
|||||
<template> |
<template> |
||||
<header> |
<header> |
||||
header |
<slot></slot> |
||||
|
<a-button @click="chexiao">撤销</a-button> |
||||
|
<a-button @click="cz">重做</a-button> |
||||
</header> |
</header> |
||||
</template> |
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: {}, |
||||
|
mounted() { |
||||
|
// console.log(subComp._Ctor[0]()); |
||||
|
// console.log(subComp.render()); |
||||
|
// this.$slots.default = []; |
||||
|
// this.$slots.default.push(subComp.render()); |
||||
|
// this.$parent.$forceUpdate() |
||||
|
}, |
||||
|
methods: { |
||||
|
cz() { |
||||
|
this.$event.$emit( |
||||
|
"@editor:publish:cz", |
||||
|
// this.currentDetail, |
||||
|
// this.currentIndex |
||||
|
); |
||||
|
}, |
||||
|
chexiao() { |
||||
|
this.$event.$emit( |
||||
|
"@editor:publish:chexiao", |
||||
|
// this.currentDetail, |
||||
|
// this.currentIndex |
||||
|
); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
@ -0,0 +1,17 @@ |
|||||
|
<template> |
||||
|
<div>sub</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
text: 'sadas', |
||||
|
created () { |
||||
|
console.log('created'); |
||||
|
// console.log(this); |
||||
|
// console.log(this.$parent); |
||||
|
// this.$parent.$slots.default = []; |
||||
|
// this.$parent.$slots.default.push(this.$vnode); |
||||
|
this.$parent.$slots = {default: [this.$vnode]} |
||||
|
console.log(this.$vnode); |
||||
|
} |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue