03 2022 档案

摘要:1.定义简单类型数据 用 ref const num = ref(100) 2.定义复杂类型用 reactive const list = reactive(['hhh', 'lll', 'ssss']) 3.防止篡改 添加只读属性readonly return { box, num, list: 阅读全文
posted @ 2022-03-30 09:07 小成- 阅读(216) 评论(0) 推荐(0) 编辑
摘要:1.导出Excel 公共方法 import axios from 'axios'//导出Excel公共方法export function exportMethod(data){ axios({ method:data.method, url:data.url, data:data.params, r 阅读全文
posted @ 2022-03-28 09:05 小成- 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1.安装 postcss-plugin-px2rem 插件 (px转化成动态的单位) module.exports={ css:{ loaderOptions: { postcss: { plugins: [ require('postcss-plugin-px2rem')({ rootValue: 阅读全文
posted @ 2022-03-25 16:31 小成- 阅读(310) 评论(0) 推荐(0) 编辑
摘要:1.新建utils文件下面http.js import axios from "axios"; // 创建axios实例 const service = axios.create({ timeout: 2000, baseURL: "http://127.0.0.1:4523/mock", }); 阅读全文
posted @ 2022-03-23 15:21 小成- 阅读(97) 评论(0) 推荐(0) 编辑
摘要:function getUUID() { function S4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); } return (S4() + S4() + "-" + S4() + "-" 阅读全文
posted @ 2022-03-18 14:28 小成- 阅读(419) 评论(0) 推荐(1) 编辑
摘要:1.安装 crypto-js 通过npm install crypto-js -s 2.创建AES.js 1.在src/util/文件夹下创建res.js文件 2.res.js的加密和解密函数 import CryptoJS from "crypto-js/crypto-js"; const KEY 阅读全文
posted @ 2022-03-18 14:19 小成- 阅读(317) 评论(0) 推荐(0) 编辑
摘要:1.安装: npm install jsencrypt --save-dev 2.创建rsa.js 1.在src/util/文件夹下创建rsa.js文件 2. 引入'jsencrypt', 'encryptlong' /* 产引入jsencrypt实现数据RSA加密 */ import JSEncr 阅读全文
posted @ 2022-03-18 11:08 小成- 阅读(819) 评论(1) 推荐(1) 编辑
摘要:安装: npm install --save sm-crypto 引用 const sm3 = require('sm-crypto').sm3 let data = '12345' sm3(data) 阅读全文
posted @ 2022-03-18 10:22 小成- 阅读(1128) 评论(0) 推荐(0) 编辑

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