Giter Club home page Giter Club logo

Comments (5)

qiu8310 avatar qiu8310 commented on June 6, 2024 1

因为修复一个 bug,把这个 issue 修好了!

scss 中可以使用注释的方式来达到你要的效果(import 中的文件不合并到一个文件,而是把它保留原有文件)

/*! @import "path/to/your/file.scss"; */

注意:注释格式只能如上面示例的样式,最后也需要有个分号,且一个注释中只能写一个 import

这个功能我还没有公开。

from minapp.

qiu8310 avatar qiu8310 commented on June 6, 2024

这是sass的功能,没办法,除非你用 css 或 wxss 就可以复用。

或者你把公用的样式放在 app.sass中,这样都不用 import
或者你在公用的 sass 中只放 mixin

from minapp.

Allenice avatar Allenice commented on June 6, 2024

公共样式放到 app.scss 中,这些公共样式是不能用在自定义组件的。是否可以考虑通过 loader 和注释的方式将 wxss 引入到自定义组件里面?

from minapp.

Allenice avatar Allenice commented on June 6, 2024

或者可以给一个选项,自定义组件的 wxss 默认 import "app.wxss"

from minapp.

qiu8310 avatar qiu8310 commented on June 6, 2024

@Allenice 想尝试做的,确实也可以做到,但实现方法不是很好,有点 hack,打算算了。

用 sass 的话就考虑在公共的地方用 mixin 吧,不要在公共的 sass 中写具体的 class

from minapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.