摘要:效果图: // 页面执行 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>图形验证码</title> </head> <body> <div id="v_container" style="width: 200px;height
阅读全文
摘要:项目通常情况下,api封装放在src 下utils 文件下 request.js // 安装 axios cnpm install axios --save // 新建request.js// 通常项目的拦截,封装方法都封装在这里 import axios from 'axios' const in
阅读全文
摘要:使用CSS3的animation制作的动画效果的CSS集合,里面预设了很多种常用的动画(官网:https://animate.style/) // 安装 npm install animate.css (npm安装) https://unpkg.com/animate.css@3.5.2/anima
阅读全文
摘要:参考地址:https://codesandbox.io/s/condescending-butterfly-enjqpr?file=/src/App.vue <template> <div> <transition-group name="drag" class="list" tag="ul"> <
阅读全文
摘要:// vue3 写法 <component :is="componentParam[active] " /> // 引入api import { defineAsyncComponent } from 'vue' const active = ref('b') const componentPara
阅读全文
摘要:// 安装插件 // 官网:http://vue-color-picker.rxshc.com/ npm install vcolorpicker -S // main.js 中全局引入 import vcolorpicker from 'vcolorpicker' Vue.use(vcolorpi
阅读全文
摘要:// 1. 创建一个方法文件 fun.js export const copyToClipboard = (text, callback) => { if (navigator.clipboard) { // clipboard api 复制 navigator.clipboard.writeTex
阅读全文
摘要:Math.random()*10 //生成0-10的随机数,包含0,不包含10 Math.ceil(Math.random()*10) //ceil向上取整,即生成1-10的随机整数,取0的概率极小 Math.floor(Math.random()*10) //floor向下取整,即生成0-9的随机
阅读全文
摘要:使用moment插件 // 需要先 npm i moment // 再import moment from 'moment' // 1.获取当前年 const curYear = new Date().getFullYear() // 2.获取当前周 const curWeek = moment()
阅读全文