随笔分类 -  vue

摘要:需求:用户选择“通过”时,“理由”非必填;选择“驳回”时,“理由”必填 步骤如下:(前两步定义什么时候必填,后两步设置提示语) 1. 2.computed中定义在什么情况下为必填 3.data()中定义变量 4.data(){return{ ****** }}中定义rules校验规则 阅读全文
posted @ 2021-12-23 18:46 小白&小菜 阅读(2411) 评论(0) 推荐(0) 编辑
摘要:简单使用 1.cmd安装vuex,vue-meta-info cnpm install vuex -savecnpm install vue-meta-info --save 2.src下新建store文件夹,新增src/store/index.js文件 import Vue from 'vue'i 阅读全文
posted @ 2021-04-23 14:46 小白&小菜 阅读(195) 评论(0) 推荐(0) 编辑
摘要:ui框架官网:https://www.antdv.com/components/table-cn/ 弄了差不多一天,哎,终于可以了; 需求:以下表格中红框部分的数据虽然一样,但因为“等级”不同,不能做合并; 方案: data部分: temp:{},//当前重复的值,支持多列 filBonusColu 阅读全文
posted @ 2021-02-26 10:46 小白&小菜 阅读(3139) 评论(0) 推荐(0) 编辑
摘要:效果图 1.下载:npm install --save signature_pad 2.引入并使用 <template> <div> <div style="border: 1px solid #eee" ref="canvasBox"> <canvas class="canvasId"/> </d 阅读全文
posted @ 2021-02-24 18:54 小白&小菜 阅读(4785) 评论(2) 推荐(1) 编辑
摘要:import ElementUI from 'element-ui'; 配置:ElementUI.Dialog.props.lockScroll.default = false;即可 vue中在main.js中写 nuxt中在 阅读全文
posted @ 2020-12-30 22:54 小白&小菜 阅读(678) 评论(0) 推荐(0) 编辑
摘要:1.安装插件 cnpm install clipboard --save 2.所需页面中引入插件 import Clipboard from 'clipboard'; 3.按钮 <div class="copy flexCenter" @click="copyUrl" :data-clipboard 阅读全文
posted @ 2020-11-03 16:48 小白&小菜 阅读(954) 评论(0) 推荐(0) 编辑
摘要:头部组件 <template> <!-- 公共头部--> <div class="header flexCenter"> <div class="logo">陕西新闻图片网</div> <div class="menu flexBetween"> <div class="menu_item flex 阅读全文
posted @ 2020-10-30 14:52 小白&小菜 阅读(1312) 评论(0) 推荐(0) 编辑
摘要:官方文档 https://aplayer.netlify.app/docs/guide/ 1.下载依赖 npm install vue-aplayer --save 2.引用 import vueAplayer from 'vue-aplayer' components: { 'vueAplayer 阅读全文
posted @ 2020-10-28 17:24 小白&小菜 阅读(1732) 评论(0) 推荐(0) 编辑
摘要:document.getElementById('目标元素id').scrollIntoView({ block: 'start', behavior: 'smooth' }) 阅读全文
posted @ 2020-10-27 17:43 小白&小菜 阅读(879) 评论(0) 推荐(0) 编辑
摘要:1.下载字体.ttf放到assets/font下2.在font.css中引入字体 3.main.js中引入font.css import './assets/scss/font.css' 4.使用字体 阅读全文
posted @ 2020-10-21 16:32 小白&小菜 阅读(4086) 评论(0) 推荐(1) 编辑
摘要:解决方式: npm uninstall sass-loader npm install --save-dev sass-loader@7.3.1 阅读全文
posted @ 2020-10-21 14:11 小白&小菜 阅读(1052) 评论(0) 推荐(0) 编辑
摘要:// 批量下载 downloadFile(url){ const iframe = document.createElement("iframe"); iframe.style.display = "none"; // 防止影响页面 iframe.style.height = 0; // 防止影响页 阅读全文
posted @ 2020-10-16 15:59 小白&小菜 阅读(7317) 评论(0) 推荐(0) 编辑
摘要:1.循环的数据中,每个el-form-item都写rules、prop 2.rules为data中rules对象对应属性,如'rules.name'; 3.prop的第一部分为data中该组遍历数据对应的数组名,此例中为form中的‘personList’;第二部分为遍历的key值变量;第三部分为f 阅读全文
posted @ 2020-08-14 15:02 小白&小菜 阅读(3835) 评论(0) 推荐(0) 编辑
摘要:解决方案: 1.下载https://codeload.github.com/vuejs-templates/webpack-simple/zip/master到本地 2.更名为webpack放到以下路径下,(.vue-templates是自己定义的文件夹) 3.cmd中建项目后边加 --offlin 阅读全文
posted @ 2020-07-01 09:56 小白&小菜 阅读(2706) 评论(1) 推荐(4) 编辑
摘要:html <img :src="utils.imgBaseUrl + item.photoUrl" :onerror="default_cattle"/> js data(){ return { default_cattle: 'this.src="' + require('../assets/im 阅读全文
posted @ 2020-06-30 11:16 小白&小菜 阅读(1737) 评论(0) 推荐(0) 编辑
摘要:实现方案: 环信没有临时聊天人员历史记录接口,所以实现的方案是: 1.监听消息接收;2.将受到的消息存到缓存中,同时判断此用户是否之前聊天过,如果没聊过的话,把他的用户信息也存到缓存中;3.展示的东西都是从缓存中获取;4.新消息提醒是在监听到消息后,给用户信息里设置一个状态值,当点击刚用户查看历史记 阅读全文
posted @ 2020-06-22 11:58 小白&小菜 阅读(706) 评论(0) 推荐(0) 编辑
摘要:部分代码: template部分 <!-- 修改弹窗 --> <el-dialog :title="dialogTxt" @close="closeDialog" :visible.sync="alertBox" > <el-form ref="addForm" :rules="rules" :mo 阅读全文
posted @ 2020-06-10 16:59 小白&小菜 阅读(5508) 评论(0) 推荐(0) 编辑
摘要:index.css里 body::-webkit-scrollbar{ width:0; } element打开弹框后,页面内容会左移的解决方法: main.js中引入element时,全局设置(问题:弹框超出页面高度时,右侧还是会显示滚动条,但不会出现左移问题,暂时这么处理了) import El 阅读全文
posted @ 2020-06-10 11:35 小白&小菜 阅读(1114) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-09 09:33 小白&小菜 阅读(521) 评论(0) 推荐(0) 编辑

我是一个小菜鸟,飞呀飞呀,快飞高