摘要: vant中Toast图标都是上下结构,需求为一行展示,解决方法:设置type属性为html,自定义html即可 import { Toast } from "vant" Toast({ message: '<i class="van-icon van-icon-passed" style="colo 阅读全文
posted @ 2023-01-16 16:27 年轻浅识 阅读(1782) 评论(0) 推荐(0)
摘要: 将el-col全部放到el-row中,可能会出现分辨率或缩放、内容不同导致el-col高度不一致,而使布局异常。 解决方法: el-row添加flex布局,设置flex-wrap:wrap即可。 <el-row :gutter="20" type="flex" style="flex-wrap:wr 阅读全文
posted @ 2022-12-23 13:33 年轻浅识 阅读(2989) 评论(0) 推荐(0)
摘要: 文件多次上传,保留进度条 <template> <div class="upload-file"> <el-upload :action="uploadFileUrl" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpl 阅读全文
posted @ 2022-10-19 09:44 年轻浅识 阅读(664) 评论(0) 推荐(0)
摘要: el-image-viewer竟然可以单独使用,真不错 1、引入el-image-viewer组件 import ElImageViewer from 'element-ui/packages/image/src/image-viewer' components:{ElImageViewer }, 阅读全文
posted @ 2022-08-30 13:35 年轻浅识 阅读(2070) 评论(0) 推荐(0)
摘要: <template> <div ref="table"> <el-row> <el-table :border="columnsBorder" v-loading="loading" :height="tableHeight" :data="tableData" ref="multipleTable 阅读全文
posted @ 2022-07-20 09:43 年轻浅识 阅读(469) 评论(0) 推荐(0)
摘要: 1、自定义指令(当前只针对上下移动,左右移动同理可自行添加) directives: { drag: { // 指令的定义 bind: function (el) { let odiv = el; //获取当前元素 el.onmousedown = (e) => { //算出鼠标相对元素的位置 le 阅读全文
posted @ 2022-07-20 09:33 年轻浅识 阅读(1167) 评论(0) 推荐(0)
摘要: 1、安装vue-i18n:安装时注意匹配版本,不匹配会有警告信息,指定版本降级安装即可。 npm i vue-i18n -S 2、构建文件夹结构 config中为语言包配置: 1)zh-CN.js: // element-ui中文包 import elementZhLocale from 'elem 阅读全文
posted @ 2022-07-15 17:12 年轻浅识 阅读(210) 评论(0) 推荐(0)
摘要: html <div class="fix-dom"> <div v-show="showTop" class="fix-dom-in" @click="goTopClick"> 置顶 </div> </div> js data(){ return { showTop:false, scrollTop 阅读全文
posted @ 2022-07-13 09:06 年轻浅识 阅读(28) 评论(0) 推荐(0)
摘要: 安装diff库 npm install diff html <template> <div> <div style="white-space: pre-line"> <span v-for="(item,index) in resultStr" :key="index" :class="item.a 阅读全文
posted @ 2022-06-25 10:59 年轻浅识 阅读(1171) 评论(0) 推荐(0)
摘要: html <div class="fixed-div" @click="showChat" ><i class="el-icon-eleme"></i>联系我们 </div> css .fixed-div { position: fixed; color: #fff; background-colo 阅读全文
posted @ 2022-06-24 08:50 年轻浅识 阅读(64) 评论(0) 推荐(0)