摘要: 1. Vue3全局组件注册 components文件夹下新建index.js文件,统一引入需要注册的组件 import CustomCheck from "./CustomCheck.vue"; import CustomDialog from "./CustomDialog.vue"; const 阅读全文
posted @ 2022-12-19 14:55 Li_pk 阅读(410) 评论(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 阅读(37) 评论(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 阅读(1644) 评论(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 阅读(259) 评论(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 阅读(452) 评论(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 阅读(47) 评论(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 阅读(115) 评论(0) 推荐(0)
摘要: 1. clipboard.js 官网地址 插件描述:clipboard.js 实现了纯 JavaScript (无 Flash)的浏览器内容复制到系统剪贴板的功能。可以在浏览器和 Node 环境中使用。支持 Chrome 42+、Firefox 41+、IE 9+、Opera 29+ 阅读全文
posted @ 2022-11-18 09:55 Li_pk 阅读(28) 评论(0) 推荐(0)
摘要: Array.of() Array.of() 方法通过可变数量的参数创建一个新的 Array 实例,而不考虑参数的数量或类型。这个方法用于替代在 ES6之前常用的 Array.prototype.slice.call(arguments), Array.of() 和 Array() 构造函数之间的区别 阅读全文
posted @ 2022-11-15 11:08 Li_pk 阅读(110) 评论(0) 推荐(0)
摘要: 1. 实现数据的变化趋势箭头后缀 2. css样式代码 .arrowUp, .arrowDown { position: relative; display: inline-block; } /* 字体颜色 */ .arrowUp { color: #00ae2b; } .arrowDown { c 阅读全文
posted @ 2022-11-11 09:58 Li_pk 阅读(150) 评论(0) 推荐(0)