摘要:
在script标签加setup属性 <script lang="ts" setup> </script> 1.不用写setup函数,组件只需要引入不需要注册,属性和方法也不需要再返回,可以直接在template模板中使用。 2. setup语法糖中新增api2.1 defineProps:子组件接收 阅读全文
摘要:
1.安装指定版本 2.改名 3.配置环境变量 阅读全文
摘要:
1. 使用vite快速创建vue3项目npm init vite-app app-name 2. npm init vue@3 阅读全文
摘要:
1.package.json { "name": "node-api", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\ 阅读全文
摘要:
1.uniapp自带vuex,不需要在安装,创建store/index.js //引入vue和vuex import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({//全局变量定义 阅读全文
摘要:
1.后台云函数 todo/index.js 'use strict'; // 查询所有 const queryAll =(collection,params)=>{ return collection.get() } // 新增 const add = (collection,data)=>{ re 阅读全文
摘要:
1. 下载 npm install docx-preview -S 2. <el-button @click="lookDocx">文件阅览</el-button> <div class="docWrap"> <div ref="file"></div> </div> import axios fr 阅读全文
摘要:
1. 添加标签 <div id="elementId" class="guizhou-map" style="width: 600px; height: 400px" ></div> 2. import * as echarts from "echarts"; import mapGeoJson f 阅读全文
摘要:
1. 安装 npm install echarts --save2. 定义标签容器 <div id="main" style="width: 600px; height: 400px"></div> 3. 引入 import * as echarts from "echarts"; 4. 柱状图 i 阅读全文
摘要:
1.安装npm install screenfull@5 --save 2.使用import screenfull from "screenfull"; screenfull.isFullscreen; // 当前页面是否全屏screenfull.isEnabled; // 当前浏览器是否支持全屏 阅读全文