摘要: <template> <div :class="props.className" style="padding: 8px 0;"> <el-table :ref="props.refsName" row-key="id" :data="state.tableData" style="width: 1 阅读全文
posted @ 2023-08-24 11:35 月亮已落 阅读(287) 评论(0) 推荐(0)
摘要: 三个页面复制过去可以直接用,功能还不够完善,基础模板包含 自定义表头及多级表头、显示隐藏、检索、是否分页、操作示例 页面代码 <template> <div> <Table :tableRules="tableRules" :tableData="tableData" :load="load" @g 阅读全文
posted @ 2023-05-11 17:43 月亮已落 阅读(97) 评论(0) 推荐(0)
摘要: 临时写的,仅供参考 示例,过滤isTrue属性为true的属性,子节点存在匹配数据,会直接将父节点返回 const arr = [ { id: 1, name: '1', isTrue: false, children: [ { id: 2, name: '2', isTrue: true, chi 阅读全文
posted @ 2023-05-06 09:27 月亮已落 阅读(83) 评论(0) 推荐(0)
摘要: 复制即用,根据需求自行修改<template> <div class="custom-tree-container" @contextmenu.native="handlePaste($event)"> <!-- <el-tree :data="dataSource" show-checkbox n 阅读全文
posted @ 2023-04-28 09:54 月亮已落 阅读(920) 评论(0) 推荐(0)
摘要: <el-table :data="tableData" style="width: 100%" :cell-class-name="tableCellClassName" > </el-table> methods:{ //用来修改单元格css tableCellClassName({ row, c 阅读全文
posted @ 2022-07-21 15:55 月亮已落 阅读(6834) 评论(2) 推荐(0)
摘要: 初学者简单的方法,目前还没有遇到问题 想法很简单,当export导出,骗eslint认为是一个模块。 如果有新的问题欢迎留言,我也在学习 1 import utilsApi from '../utils/api'; 下面是我的写法,确实不报错了。 1 const utilsApi = module. 阅读全文
posted @ 2022-05-05 11:12 月亮已落 阅读(1055) 评论(0) 推荐(0)
摘要: 通俗易懂不说废话,拿去用,看两遍就能理解。 1 const { baseUrl } = require('./env').dev; 2 const token = wx.getStorageSync('token') || ''; 3 module.exports = { 4 request: fu 阅读全文
posted @ 2022-05-05 11:06 月亮已落 阅读(590) 评论(0) 推荐(0)
摘要: 仅用xlsx是无法实现文字样式及表格边框的style的,因此配合使用xlsx-style 以下源码直接复制过去用 // 源码什么的都不需要改动 import * as XLSXStyle from 'xlsx-style'; export function sheet2blob(sheet, she 阅读全文
posted @ 2022-04-02 09:53 月亮已落 阅读(2141) 评论(0) 推荐(0)
摘要: 列表数据纯前端使用xlsx实现导出功能 基础写法 let filename = "资产导出.xlsx"; 定义导出数据 let data = [ ["第一列",'','','', "第二列", "第三列"], [1, 2, 3], [true, false, null, "sheetjs"], [" 阅读全文
posted @ 2022-03-30 16:36 月亮已落 阅读(454) 评论(0) 推荐(0)