mirror of
https://github.com/sahadev/vue-component-creater-ui.git
synced 2025-09-28 07:13:21 +08:00
feat: 支持单文件二次编辑
This commit is contained in:
@@ -84,11 +84,16 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
prettyCode() {
|
||||
return prettier.format(this.rawCode, {
|
||||
parser: "html",
|
||||
plugins: [parserHtml],
|
||||
vueIndentScriptAndStyle: true,
|
||||
});
|
||||
try {
|
||||
return prettier.format(this.rawCode, {
|
||||
parser: "html",
|
||||
plugins: [parserHtml],
|
||||
vueIndentScriptAndStyle: true,
|
||||
});
|
||||
} catch (error) {
|
||||
return this.rawCode;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
formatCode() {
|
||||
|
Reference in New Issue
Block a user