Comments (5)
因为修复一个 bug,把这个 issue 修好了!
scss 中可以使用注释的方式来达到你要的效果(import 中的文件不合并到一个文件,而是把它保留原有文件)
/*! @import "path/to/your/file.scss"; */
注意:注释格式只能如上面示例的样式,最后也需要有个分号,且一个注释中只能写一个 import
这个功能我还没有公开。
from minapp.
这是sass的功能,没办法,除非你用 css 或 wxss 就可以复用。
或者你把公用的样式放在 app.sass中,这样都不用 import
或者你在公用的 sass 中只放 mixin
from minapp.
公共样式放到 app.scss 中,这些公共样式是不能用在自定义组件的。是否可以考虑通过 loader 和注释的方式将 wxss 引入到自定义组件里面?
from minapp.
或者可以给一个选项,自定义组件的 wxss 默认 import "app.wxss"
from minapp.
@Allenice 想尝试做的,确实也可以做到,但实现方法不是很好,有点 hack,打算算了。
用 sass 的话就考虑在公共的地方用 mixin 吧,不要在公共的 sass 中写具体的 class
from minapp.
Related Issues (20)
- 原生开发过程中如何使用wxp? HOT 3
- wx/wxp缺少拓展接口支持 HOT 2
- Interface 'BaseComponent<D, A>' cannot simultaneously extend types 'Component' and 'Options' HOT 1
- 接口“BaseComponent<D, A>”不能同时扩展类型“Component”和“Options”。“Component”和“Options”类型的命名属性“properties”不完全相同
- Promise<any>不存在finally属性 HOT 3
- <feature request> Page增加watch功能
- example 跑不起来 HOT 2
- 通过配置或者约定配置获取自定义组件描述配置 HOT 5
- Featuring minapp in Docusaurus HOT 1
- 初始化项目时,Style Lauguage选择less,会报错 HOT 2
- UglifyJsPlugin 造成WXS报错 HOT 1
- BaseApp获取不到新增page的URL HOT 1
- 可以增加不输入"<"都触发标签名的补全吗?
- 请教一些关于 webpack 问题~ HOT 2
- 引入vant-weapp 或其他外部组件
- 请教一下:导航栏 中文显示乱码的问题 HOT 2
- 已有项目如何安装
- 如何在mina里接入alt数据监控
- 为什么.vsvode/settings.json中的忽略了packages HOT 2
- 本地图片资源的问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minapp.