Add option to show editor by default while still having the option to show preview
This commit is contained in:
parent
e945c663b4
commit
06f055a251
|
@ -54,6 +54,10 @@
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
previewIsDefault: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -210,8 +214,11 @@
|
|||
},
|
||||
beforeMount() {
|
||||
this.text = this.value
|
||||
if (this.hasPreview) {
|
||||
this.$nextTick(this.renderPreview)
|
||||
|
||||
if (this.previewIsDefault) {
|
||||
if (this.hasPreview) {
|
||||
this.$nextTick(this.renderPreview)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<editor
|
||||
placeholder="Label description"
|
||||
v-model="labelEditLabel.description"
|
||||
@change="editLabelSubmit"
|
||||
:preview-is-default="false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in New Issue
Block a user