摘要: 1.组件 <template> <img :src="srcImg ? srcImg : defaultImage ? getDefaultImage : ''" v-bind="{ ...otheAttribute }" alt="" /> </template> <script> import 阅读全文
posted @ 2024-01-18 17:19 SKa-M 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑