摘要: 1.代码 点击查看代码 <template> <slot :openDialog="openDialog" :closDialog="modalCancel"></slot> <a-modal v-model:open="open" title="Basic Modal" @cancel="moda 阅读全文
posted @ 2023-11-30 17:12 SKa-M 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 <template> <div class="wrapper"> <input :id="id" class="exp" type="checkbox" /> <div class="text" :class="bgFlag == 'bgColor' ? 'text2' : ''"> 阅读全文
posted @ 2023-05-12 16:08 SKa-M 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1.jsencrypt 公钥私钥随便找个网站生成(https://www.bejson.com/enc/rsa/) 1.安装包:npm i jsencrypt --save 2.封装函数 import { JSEncrypt } from 'jsencrypt'; // 加密 msg为需要加密的字符 阅读全文
posted @ 2023-04-13 15:04 SKa-M 阅读(557) 评论(0) 推荐(0) 编辑
摘要: import type { Directive, App } from 'vue'; const longPress: Directive = { beforeMount: function (el, binding, vnode, prevVnode) { if (typeof binding.v 阅读全文
posted @ 2023-04-13 14:43 SKa-M 阅读(790) 评论(0) 推荐(0) 编辑
摘要: 1.vue2 + jsx (1)slot组件 <template> <div class="index"> <h2>slotdemo -- 组件调用成功</h2> <slot name="title"></slot> <slot></slot> </div> </template> (2)调用 <s 阅读全文
posted @ 2023-04-13 11:08 SKa-M 阅读(781) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2023-04-13 10:16 SKa-M 阅读(3827) 评论(0) 推荐(2) 编辑
摘要: 1.安装两个npm库 npm i -g git-cz npm i -g commitizen 2.使用规范 1.提交修改的文件至本地 git add . 2.输入cz规则命令 git cz 3.选择本次提交的大致操作 feat: 新增一个功能 fix:修改/修复bug docs:文档变更 style 阅读全文
posted @ 2023-03-10 12:50 SKa-M 阅读(827) 评论(0) 推荐(0) 编辑
摘要: 1.函数 const flatTree = (treeData) => { let result = []; treeData.forEach((item) => { // 先克隆一份数据作为第一层级的填充 let res = JSON.parse(JSON.stringify(item)); de 阅读全文
posted @ 2023-01-12 16:26 SKa-M 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.让input的type类型使password变为text <el-input type="text" placeholder="请输入" v-model="unlockPwd" size="mini" class="no-autofill-pwd" ></el-input> 2.加上class类 阅读全文
posted @ 2023-01-12 15:11 SKa-M 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1.伪类是通过在元素选择器上加⼊伪类改变元素状态,⽽伪元素通过对元素的操作进⾏对元素的改变。(伪类针对的是元素状态、伪元素针对的是元素本身) (1)伪元素:在内容元素的前后插入额外的元素或样式,但是这些元素实际上并不在文档中生成。 它们只在外部显示可见,但不会在文档的源代码中找到它们,因此,称为“伪 阅读全文
posted @ 2023-01-09 16:30 SKa-M 阅读(58) 评论(0) 推荐(0) 编辑