博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vue组件引入scss变量_如何将SCSS与Vue.js单个文件组件一起使用
阅读量:2508 次
发布时间:2019-05-11

本文共 734 字,大约阅读时间需要 2 分钟。

vue组件引入scss变量

Using the you can enable “CSS Preprocessors” and you can choose which one to enable:

使用您可以启用“ CSS预处理程序”,还可以选择启用哪个:

Vue CLI

If you’re using a project not based upon Vue CLI, or a project that was initialized using Vue CLI but you didn’t add the CSS preprocessor support, you can add it later on using:

如果您使用的不是基于Vue CLI的项目,或者是使用Vue CLI初始化的项目,但未添加CSS预处理程序支持,则可以在以后使用以下方式添加它:

npm install --save-dev node-sass sass-loader

Inside your application components then you can use

在您的应用程序组件内部,您可以使用

and add your SCSS code in there.

并在其中添加您的SCSS代码。

If you want to keep your SCSS code in an external file, you can do that, and just import it in the script part of your component:

如果要将SCSS代码保存在外部文件中,则可以这样做,只需将其导入组件的脚本部分即可:

翻译自:

vue组件引入scss变量

转载地址:http://hoqgb.baihongyu.com/

你可能感兴趣的文章
C++实验二
查看>>
Sultan's Dowry Problem - 苏丹新娘问题
查看>>
SharePoint2010 富文本框添加图片功能的扩展
查看>>
零零碎碎的知识
查看>>
UNIX基础--用户和基本账户管理
查看>>
设计模式
查看>>
5.0以上机器XPOSED框架安装流程
查看>>
静态方法与非静态方法
查看>>
[转]iOS进阶路线以及进阶书籍
查看>>
期货监管机构,国际著名。
查看>>
vim编程技巧
查看>>
Activator.CreateInstance 方法 (Type) 的用法
查看>>
我的将军啊
查看>>
openstack mariadb 容器无法启动问题解决方法
查看>>
实例的初始化过程: new 对象
查看>>
10.02 一个简单的串口的初始化程序
查看>>
Ant学习笔记
查看>>
vc++ 在程序中运行另一个程序的方法
查看>>
Python面向对象编程及内置方法
查看>>
HTML5 Web Storage
查看>>