12 2022 档案

摘要:1. Vue3全局组件注册 components文件夹下新建index.js文件,统一引入需要注册的组件 import CustomCheck from "./CustomCheck.vue"; import CustomDialog from "./CustomDialog.vue"; const 阅读全文
posted @ 2022-12-19 14:55 Li_pk 阅读(373) 评论(0) 推荐(0) 编辑
摘要:1、console.table 将数据以表格的形式显示。 这个方法需要一个必须参数 data,data 必须是一个数组或者是一个对象;还可以使用一个可选参数 columns。 // Output an array of objects as a table const users = [ { id: 阅读全文
posted @ 2022-12-08 14:48 Li_pk 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1. 安装 qrcode.vue 仓库地址 // vue2 安装1.x版本、vue3 安装3.x版本 npm install --save qrcode.vue // 或 yarn add qrcode.vue 2. 使用 // 使用 import { createApp } from 'vue' 阅读全文
posted @ 2022-12-05 16:59 Li_pk 阅读(1577) 评论(0) 推荐(0) 编辑
摘要:1. 防抖 debounce(func, delay = 500) { let _this = this; let args = arguments; return (function () { if (_this.timeout) { clearTimeout(_this.timeout); } 阅读全文
posted @ 2022-12-02 17:28 Li_pk 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1. 安装jsencrypt npm install jsencrypt 2. 引入jsencrypt // 全局引入 import JSEncrypt from "jsencrypt"; Vue.prototype.$jsEncrypt = JSEncrypt; // 局部引入 import JS 阅读全文
posted @ 2022-12-02 10:46 Li_pk 阅读(438) 评论(0) 推荐(0) 编辑
摘要:### 1. 路由跳转 ``` ``` ### 2. 注册全局property ``` // main.js import utils from "./utils/utils.js"; app.config.globalProperties.$utils = utils; ``` ### 3. 通过 阅读全文
posted @ 2022-12-01 17:46 Li_pk 阅读(38) 评论(0) 推荐(0) 编辑
摘要:1. 搭建项目 使用 NPM: npm create vite@latest 使用 Yarn: yarn create vite 使用 PNPM: pnpm create vite 构建一个 Vite + Vue 项目 # npm 6.x npm create vite@latest my-vue- 阅读全文
posted @ 2022-12-01 16:28 Li_pk 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示