安装:2种方式
项目外执行
tnpm init vite-app 项目名
yarn create vite-app 项目名
创建react项目:创建个目录,目录中执行
tnpm init vite-app --template react
yarn create vite-app --template react
安装sass
yarn add -D sass
使用sass
<style lang="scss">
使用ts
<script lang="ts">
使用jsx
template中: <A1 /> script中: import A1 from "./a1"; export default的components中加入组件名 components: { A1, },