摘要: 多个组件挂在到同一个组件上,通过参数进行动态切换 一、实现方式 <component :is="componentName"></component> 二、示例 import Page1 from './Page1' import Page2 from './Page2' import Page3 阅读全文
posted @ 2023-03-29 11:12 BillyYang 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 问题:elementUI el-table 设置了高度height 和合计行 show-summary 之后,合计行无法正常显示 一、问题分析 根据调试,发现该问题应该属于组件bug,表格主体中给 footer留的高度不够导致,重新设置即可。 二、解决方法 添加生命周期钩子 updated ,对 t 阅读全文
posted @ 2023-03-07 10:00 BillyYang 阅读(212) 评论(0) 推荐(0) 编辑
摘要: elementUI实现月、季度、年 时间选择框 一、通过 el-date-picker 组件来实现月、年的选择 代码如下: <el-date-picker v-if="dateType 'month' || dateType 'year'" v-model="time" :type="dateTyp 阅读全文
posted @ 2022-10-18 15:20 BillyYang 阅读(2273) 评论(0) 推荐(0) 编辑
摘要: js通过文件路径下载文件,而页面不发生跳转 一、js下载文件而页面不进行跳转 1)方法一: 通过a标签触发文件流形式,代码如下: let url = 'http://xxxxx.zip' fetch(url) .then(res => res.blob()) .then(blob => { cons 阅读全文
posted @ 2022-04-25 17:47 BillyYang 阅读(2539) 评论(0) 推荐(1) 编辑
摘要: elementUI的select下拉框增加checkbox选择框 一、实现效果 二、实现方法 1、组件代码如下: <div> <el-select ref="select" v-model="value" multiple placeholder="请选择" > <el-option v-for=" 阅读全文
posted @ 2022-03-09 15:38 BillyYang 阅读(3948) 评论(0) 推荐(0) 编辑
摘要: 日期时间控件实现固定步长,例如5分钟间隔、10分钟间隔 一、效果图 二、实现方法 通过日期时间控件的箭头来控制步长的显示与否,具体代码详见 阅读全文
posted @ 2022-02-15 16:05 BillyYang 阅读(2177) 评论(0) 推荐(0) 编辑
摘要: echarts的x轴显示不全的解决办法 一、背景 当x轴类目较多时,label显示时会自动间隔显示,也就是会隐藏掉中间的label,如下图: 二、解决办法 通过设置 xAxis.axisLabel.interval = 0 来解决,如下: xAxis: { type: 'category', axi 阅读全文
posted @ 2022-02-15 15:17 BillyYang 阅读(4426) 评论(0) 推荐(0) 编辑
摘要: 在linux环境中通过关键字搜索文件里面的内容 1、显示文件里匹配关键字那行以及上下50行 cat 文件名 | grep -C 50 '关键字' 2、显示关键字及前50行 cat 文件名 | grep -B 50 '关键字' 3、显示关键字及后50行 cat 文件名 | grep -A 50 '关键 阅读全文
posted @ 2021-12-11 14:04 BillyYang 阅读(3498) 评论(0) 推荐(0) 编辑
摘要: 查询包含某字段的表都有哪些 查询SQL如下: SELECT b.oid, b.relname, att.attname, b.relkind, attinhcount, atttypmod FROM pg_attribute att, pg_class b WHERE b.oid = att.att 阅读全文
posted @ 2021-10-08 08:41 BillyYang 阅读(934) 评论(0) 推荐(0) 编辑
摘要: postgresql查询表的大小 一、查询sql SELECT table_schema || '.' || TABLE_NAME AS table_full_name, pg_size_pretty ( pg_total_relation_size ( '"' || table_schema || 阅读全文
posted @ 2021-06-18 14:16 BillyYang 阅读(291) 评论(0) 推荐(0) 编辑