PhpStorm 中单个文件组件 Vue.js 中的 Lint SCSS/SASS
Lint SCSS/SASS in single file components Vue.js in PhpStorm
我正在使用 Vue.js 和单一文件组件方法。我的 IDE 是 PhpStorm,我想找到一种方法,使 .vue
文件中 <style></style>
中包含的 SCSS 得到很好的识别。
目前看起来像我附上的图片 -- 我不知道它是要安装的插件还是要更改 PhpStorm 中的设置。
<template>
...
</template>
<script>
export default {
name: 'Tree',
components: {
},
}
</script>
<style lang="scss">
... My SASS / SCSS / CSS
</style>
我自己找到了答案:
您需要添加 rel="stylesheet/scss"
使其看起来像
<style lang="sass" rel="stylesheet/scss"></style>
或
<style lang="scss" rel="stylesheet/scss"></style>
我发现您的解决方案没有帮助。使用 type="text/scss"
似乎为我解决了这个问题,但如果其他人有问题的话。
就我而言,两者都不起作用。
尝试使用以下方法进行修复。
<style lang="scss" rel="stylesheet/scss" type="text/scss">
我正在使用 Vue.js 和单一文件组件方法。我的 IDE 是 PhpStorm,我想找到一种方法,使 .vue
文件中 <style></style>
中包含的 SCSS 得到很好的识别。
目前看起来像我附上的图片 -- 我不知道它是要安装的插件还是要更改 PhpStorm 中的设置。
<template>
...
</template>
<script>
export default {
name: 'Tree',
components: {
},
}
</script>
<style lang="scss">
... My SASS / SCSS / CSS
</style>
我自己找到了答案:
您需要添加 rel="stylesheet/scss"
使其看起来像
<style lang="sass" rel="stylesheet/scss"></style>
或
<style lang="scss" rel="stylesheet/scss"></style>
我发现您的解决方案没有帮助。使用 type="text/scss"
似乎为我解决了这个问题,但如果其他人有问题的话。
就我而言,两者都不起作用。
尝试使用以下方法进行修复。
<style lang="scss" rel="stylesheet/scss" type="text/scss">