04 2023 档案
摘要:1.jsencrypt 公钥私钥随便找个网站生成(https://www.bejson.com/enc/rsa/) 1.安装包:npm i jsencrypt --save 2.封装函数 import { JSEncrypt } from 'jsencrypt'; // 加密 msg为需要加密的字符
阅读全文
摘要:import type { Directive, App } from 'vue'; const longPress: Directive = { beforeMount: function (el, binding, vnode, prevVnode) { if (typeof binding.v
阅读全文
摘要:1.vue2 + jsx (1)slot组件 <template> <div class="index"> <h2>slotdemo -- 组件调用成功</h2> <slot name="title"></slot> <slot></slot> </div> </template> (2)调用 <s
阅读全文
摘要:1.安装vite的jsx包 npm i @vitejs/plugin-vue-jsx --save 2.安装所有依赖 npm i 3.在vite.config.ts中配置 import { defineConfig } from 'vite'; import vue from '@vitejs/pl
阅读全文