style: format code for all

This commit is contained in:
LZHD
2021-07-06 01:01:42 +08:00
committed by 踏学吾痕
parent e1200f2dbe
commit 77a1a47110
114 changed files with 7068 additions and 1068 deletions

View File

@@ -6,39 +6,39 @@
</template>
<script>
import { onMounted, onBeforeUnmount, ref, reactive } from 'vue'
import WangEditor from 'wangeditor'
import { onMounted, onBeforeUnmount, ref, reactive } from "vue";
import WangEditor from "wangeditor";
export default {
name: 'editor',
name: "editor",
setup() {
const editor = ref()
const editor = ref();
const content = reactive({
html: '',
text: '',
})
html: "",
text: ""
});
let instance
let instance;
onMounted(() => {
instance = new WangEditor(editor.value)
instance = new WangEditor(editor.value);
Object.assign(instance.config, {
onchange() {
content.html = instance.txt.html()
},
})
instance.create()
})
content.html = instance.txt.html();
}
});
instance.create();
});
onBeforeUnmount(() => {
instance.destroy()
instance = null
})
instance.destroy();
instance = null;
});
return {
editor,
content,
}
},
content
};
}
};
</script>
@@ -50,4 +50,4 @@ export default {
z-index: 999 !important;
position: static;
}
</style>
</style>