在 WebStorm 中更改新 .vue 文件中的标准方案
Change Standard Scheme in new .vue file in WebStorm
我正在使用 WebStorm 2021.2.1 和 Vue.js 以及 TypeScript 和 vue-property-decorator
。
当我创建一个新的 .vue
文件时,WebStorm 使用如下标准方案创建文件:
<script>
export default {
name: "NewComponent",
};
</script>
<style scoped></style>
如何将组件的样式更改为自动如下所示?
<script lang=ts>
import { Component, Vue } from "vue-property-decorator";
@Component
export default class NewComponent extends Vue {
name = "NewComponent"
};
</script>
<style scoped></style>
据我了解,您想创建一个新的文件模板。在这种情况下,这应该对您有所帮助:File templates
File templates are specifications of the default contents for new files that you create. Depending on the type of file you are creating, templates provide initial code and formatting expected in all files of that type (according to industry or language standards, your corporate policy, or for other reasons).
我正在使用 WebStorm 2021.2.1 和 Vue.js 以及 TypeScript 和 vue-property-decorator
。
当我创建一个新的 .vue
文件时,WebStorm 使用如下标准方案创建文件:
<script>
export default {
name: "NewComponent",
};
</script>
<style scoped></style>
如何将组件的样式更改为自动如下所示?
<script lang=ts>
import { Component, Vue } from "vue-property-decorator";
@Component
export default class NewComponent extends Vue {
name = "NewComponent"
};
</script>
<style scoped></style>
据我了解,您想创建一个新的文件模板。在这种情况下,这应该对您有所帮助:File templates
File templates are specifications of the default contents for new files that you create. Depending on the type of file you are creating, templates provide initial code and formatting expected in all files of that type (according to industry or language standards, your corporate policy, or for other reasons).