Sample code using scss in uni-app

Sample code using scss in uni-app

Pitfalls encountered

I spent the whole afternoon solving the pitfalls of using scss in uni-app. First of all, let me talk about my problem. I couldn't use @mixin when using scss, and then Baidu used various methods to debug:

Code writing problem (it is not feasible to follow the official website's writing method completely): Official website demo

Browser problem (Firefox doesn't work).

Syntax version problem (changing the writing method does not work): SCSS does not work with mixin, and the browser cannot compile it

The plugin is not installed (reinstalling still doesn't work).

Changed <style type='css'> to scss, still doesn't work.

Using the new scss syntax doesn't work yet

I couldn't figure it out for the whole afternoon. With no other choice, I thought of trying the method of installing scss in Vue, and it actually worked.

It should be noted that it cannot be introduced globally, but can only be introduced page by page. I am also drunk.

Summarize:

uni-app is made based on vue. Next time if you want to install/import something, try it with vue first. If it doesn’t work, try uni-app.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  Comprehensive website assessment solution

>>:  A brief analysis of the function calling process under the ARM architecture

Recommend

Discussion on the problem of iframe node initialization

Today I suddenly thought of reviewing the producti...

Detailed explanation of how to use element-plus in Vue3

Table of contents 1. Installation 2. Import in ma...

MySQL 8.0 can now handle JSON

Table of contents 1. Brief Overview 2. JSON basic...

MySQL data aggregation and grouping

We often need to summarize data without actually ...

Summary of React's way of creating components

Table of contents 1. Create components using func...

How to configure nginx to return text or json

Sometimes when requesting certain interfaces, you...

How to completely uninstall node and npm on mac

npm uninstall sudo npm uninstall npm -g If you en...

Implementation of docker view container log command

Why should we read the log? For example, if the c...

Implementing carousel with native JavaScript

This article shares the specific code for impleme...

Usage of mysql timestamp

Preface: Timestamp fields are often used in MySQL...

How to use echarts to visualize components in Vue

echarts component official website address: https...

JavaScript uses promise to handle multiple repeated requests

1. Why write this article? You must have read a l...

How to use http and WebSocket in CocosCreator

Table of contents 1. HttpGET 2. HTTP POST WebSock...

Detailed explanation of Docker container data volumes

What is Let’s first look at the concept of Docker...