In the pit of

I spent the whole afternoon trying to solve the problem of using SCSS in uni-app. First of all, I can’t use @mixin when using SCSS. Then I can debug it in various ways:

  1. Code writing problem (completely according to the official website to write the method is not feasible) : official website demo
  2. Browser problem (not firefox).
  3. Syntax version problem: SCSS using mixins does not work and the browser cannot compile
  4. The plugin is not installed (reloading still doesn’t work).
  5. Setting lang in style to SCSS still doesn’t work.
  6. Using the new SCSS syntax still doesn’t work

The whole afternoon is really not out, no way, thinking directly with vUE in the installation of SCSS method to try to operate, the result is true.

Conclusion:

  • Uni-app is based on vue, next time you want to install/introduce something, you need to use vue first, if not, then press the operation of uni-app.