摘要: getRandomNumber(min, max) { return Math.floor(Math.random() * (max - min + 1) + min) // 返回 [min, max] }, shuffle(arr) { let _arr = arr.slice() // 浅复制 阅读全文
posted @ 2021-06-02 23:15 吴小明- 阅读(62) 评论(0) 推荐(0) 编辑
摘要: console.time("加载时间") // …… console.timeEnd("加载时间") 阅读全文
posted @ 2021-06-02 22:59 吴小明- 阅读(369) 评论(0) 推荐(0) 编辑
摘要: const path = require('path') module.exports = { lintOnSave: false, // 是否在开发环境下每次保存代码时都启用 eslint 验证 // chainWebpack: (config) => { // config.resolve.al 阅读全文
posted @ 2021-06-02 21:45 吴小明- 阅读(2311) 评论(0) 推荐(1) 编辑
摘要: handleCopyName() { let str = this.temp.part1.realname this.copy(str) }, copy(str) { const save = (e) => { e.clipboardData.setData('text/plain', str) e 阅读全文
posted @ 2021-06-02 16:47 吴小明- 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1、下载 npm install clipboard --save 2、在需要复制的组件中引入 import Clipboard from 'clipboard' 也可以在main.js中引入: import Clipboard from 'clipboard' Vue.prototype.$cli 阅读全文
posted @ 2021-06-02 16:32 吴小明- 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1、下载: npm install --save v-clipboard 2、组件中引入(或者在main.js中全局引入) import Vue from 'vue' import Clipboard from 'v-clipboard' Vue.use(Clipboard) 3、在按钮标签中加载指 阅读全文
posted @ 2021-06-02 16:03 吴小明- 阅读(332) 评论(0) 推荐(0) 编辑