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

Implementation of Docker deployment of Django+Mysql+Redis+Gunicorn+Nginx

I. Introduction Docker technology is very popular...

A brief discussion on CSS height collapse problem

Performance For example: HTML: <div class=&quo...

VSCode Development UNI-APP Configuration Tutorial and Plugin

Table of contents Written in front Precautions De...

How to create WeChat games with CocosCreator

Table of contents 1. Download WeChat developer to...

Summary of Mysql common benchmark commands

mysqlslap Common parameter description –auto-gene...

Pure HTML+CSS to achieve Element loading effect

This is the effect of the Element UI loading comp...

Introduction to TypeScript interfaces

Table of contents 1. Interface definition 2. Attr...

Sample code for using CSS to write a textured gradient background image

The page length in the project is about 2000px or...

Detailed implementation plan of Vue front-end exporting Excel files

Table of contents 1. Technology Selection 2. Tech...

Storage engine and log description based on MySQL (comprehensive explanation)

1.1 Introduction to storage engines 1.1.1 File sy...

Native js to realize the upload picture control

This article example shares the specific code of ...

MySQL table name case selection

Table of contents 1. Parameters that determine ca...

A detailed introduction to the netstat command in Linux

Table of contents 1. Introduction 2. Output Infor...