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

Extract specific file paths in folders based on Linux commands

Recently, there is a need to automatically search...

How to make React components full screen

introduce This article is based on React + antd t...

How to purchase and initially build a server

I haven't worked with servers for a while. No...

Docker container log analysis

View container logs First, use docker run -it --r...

MySQL 8.0.11 Installation Guide for Mac

MAC installs mysql8.0, the specific contents are ...

A brief discussion on MySQL temporary tables and derived tables

About derived tables When the main query contains...

Vue implements start time and end time range query

This article shares with you how to query the sta...

4 solutions to CSS browser compatibility issues

Front-end is a tough job, not only because techno...

MySQL View Principle Analysis

Table of contents Updatable Views Performance of ...

Introduction to root directory expansion under Linux system

1. Check Linux disk status df -lh The lsblk comma...

Copy and paste is the enemy of packaging

Before talking about OO, design patterns, and the ...

A brief discussion on the implementation of fuzzy query using wildcards in MySQL

In the MySQL database, when we need fuzzy query, ...

Solution to the error when installing Docker on CentOS version

1. Version Information # cat /etc/system-release ...

How to configure SSL for koa2 service

I. Introduction 1: SSL Certificate My domain name...

Brief introduction and usage of Table and div

Web front end 1 Student ID Name gender age 01 Zha...