01 2024 档案
摘要:1.组件 <template> <img :src="srcImg ? srcImg : defaultImage ? getDefaultImage : ''" v-bind="{ ...otheAttribute }" alt="" /> </template> <script> import
阅读全文
摘要:1.组件 <script lang="tsx"> import type { PropType } from 'vue'; import { type InputProps, Input } from 'ant-design-vue'; import { EyeInvisibleOutlined,
阅读全文
摘要:1.方式一 代码如下 import { createFromIconfontCN } from '@ant-design/icons-vue'; const IconFont = createFromIconfontCN({ scriptUrl: new URL('./assets/font/ico
阅读全文
摘要:1、html <a-directory-tree :tree-data="useDataSourceTreeList" v-model:selectedKeys="selectedKey" v-if="datasourceId" blockNode class="tree-card" :showIc
阅读全文
摘要:1、请求头加token const token = localStorage.getItem('token'); let aothrization = ''; if (token) { aothrization = 'Bearer ' + JSON.parse(token); this.reqHea
阅读全文
摘要:utf8_to_b64(str: any) { return btoa(unescape(encodeURIComponent(str))); },
阅读全文
摘要:1.安装npm包 npm i clipboard 2.封装tools方法 import Clipboard from 'clipboard'; /** * 复制 * @param className 类名 * @param copyName 复制字段 * @param callback 成功回调 *
阅读全文
摘要:1.使用函数 //树形结构筛选,过滤保留父节点 export function filterTree( node: any[], //树形结构 callBack = (node: any): boolean => { return true; }, //子节点过滤方式,如果返回为true则匹配成功,
阅读全文