摘要: 1.组件 <script lang="tsx"> import type { PropType } from 'vue'; import { type InputProps, Input } from 'ant-design-vue'; import { EyeInvisibleOutlined, 阅读全文
posted @ 2024-01-18 17:07 SKa-M 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 1.方式一 代码如下 import { createFromIconfontCN } from '@ant-design/icons-vue'; const IconFont = createFromIconfontCN({ scriptUrl: new URL('./assets/font/ico 阅读全文
posted @ 2024-01-18 16:46 SKa-M 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 1、html <a-directory-tree :tree-data="useDataSourceTreeList" v-model:selectedKeys="selectedKey" v-if="datasourceId" blockNode class="tree-card" :showIc 阅读全文
posted @ 2024-01-18 15:53 SKa-M 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1、请求头加token const token = localStorage.getItem('token'); let aothrization = ''; if (token) { aothrization = 'Bearer ' + JSON.parse(token); this.reqHea 阅读全文
posted @ 2024-01-18 15:43 SKa-M 阅读(7) 评论(0) 推荐(0) 编辑
摘要: utf8_to_b64(str: any) { return btoa(unescape(encodeURIComponent(str))); }, 阅读全文
posted @ 2024-01-18 15:07 SKa-M 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1.安装npm包 npm i clipboard 2.封装tools方法 import Clipboard from 'clipboard'; /** * 复制 * @param className 类名 * @param copyName 复制字段 * @param callback 成功回调 * 阅读全文
posted @ 2024-01-18 11:32 SKa-M 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1.使用函数 //树形结构筛选,过滤保留父节点 export function filterTree( node: any[], //树形结构 callBack = (node: any): boolean => { return true; }, //子节点过滤方式,如果返回为true则匹配成功, 阅读全文
posted @ 2024-01-18 09:48 SKa-M 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 /** * 移动文件夹 (不能移动当前文件夹以及子文件夹) * @param tree 树形结构 * @param condition 过滤单条数据 * @returns */ export function excludeNodeAndChildren(tree: any, cond 阅读全文
posted @ 2023-12-22 16:27 SKa-M 阅读(48) 评论(0) 推荐(0) 编辑
摘要: const getFilePromises: Promise<any>[] = []; fileIds.forEach((item) => { getFilePromises.push(getFileInfoApi({ id: item })); }); Promise.allSettled(get 阅读全文
posted @ 2023-12-13 17:36 SKa-M 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1.模版 <a-upload name="layoutFile" v-model:file-list="fileList" @change="importModules" accept="*" :showUploadList="false" :customRequest="() => {}" :he 阅读全文
posted @ 2023-12-07 20:54 SKa-M 阅读(152) 评论(0) 推荐(0) 编辑