Top
Fork me on Gitee My Github

随笔分类 -  vue2

摘要:为什么会用到监听隐藏显示窗口的事件呢? 主要是因为页面中有计时器,窗口隐藏页面隐藏后,计时器暂停,这里使用了重新获取数据,重新启动倒计时的功能解决,所以需要监听事件。 methods: { visibilityState() { if (document.visibilityState 'visib 阅读全文
posted @ 2022-08-31 11:21 lisashare 阅读(926) 评论(0) 推荐(0) 编辑
摘要:问题场景:页面打开不操作,前端项目代码更新重新部署后,页面不刷新,操作页面(点击打开弹窗、切换菜单等),页面没有反应,控制台报错 Uncaught SyntaxError: Unexpected token <。这个问题偶现,只有在项目重新部署后会出现,页面刷新后就恢复正常。 在前端项目未更新之前打 阅读全文
posted @ 2022-08-31 11:07 lisashare 阅读(2351) 评论(0) 推荐(0) 编辑
摘要:this.$router.go(0) location.reload() 阅读全文
posted @ 2022-08-31 10:54 lisashare 阅读(23) 评论(0) 推荐(0) 编辑
摘要:// 取出存储的id var clueId = "1138334945442639872"; mycustomVM.$nextTick(function(){ var storage = []; mycustomVM.dataTable.forEach(function(item, index) { 阅读全文
posted @ 2022-08-30 17:04 lisashare 阅读(593) 评论(0) 推荐(0) 编辑
摘要:keep-alive 官方文档 keep-alive 是系统自带的一个组件 主要用于保留组件状态或避免重新渲染(提升性能)。 Props: include - 字符串或正则表达式。只有名称匹配的组件会被缓存。 exclude - 字符串或正则表达式。任何名称匹配的组件都不会被缓存。 <!-- 逗号分 阅读全文
posted @ 2022-08-30 16:14 lisashare 阅读(75) 评论(0) 推荐(0) 编辑
摘要:在 vue-cli 移动项目中,使用 vant 底部切换,例如:/mine 和 /mine/collect 都需要"我的"高亮,点击"我的",回到 /mine 页面。使用vant文档中的 tabbar change 方法,点击"我的"不能触发 change 事件,所以可以点击每个 item 实现。刷 阅读全文
posted @ 2022-05-06 17:54 lisashare 阅读(1104) 评论(0) 推荐(0) 编辑
摘要:安装node, vue全局环境可以参考对应的官方文档,这里我们直接创建项目。 创建一个项目 vue create hello-vue default (babel, eslint) 默认套餐,提供 babel 和 eslint 支持。 Manually select features 自己去选择需要 阅读全文
posted @ 2022-04-08 18:28 lisashare 阅读(95) 评论(0) 推荐(0) 编辑
摘要:从vue-cli到@vue/cli再到vue-antd-admin 安装与创建 如果你已经全局安装了旧版本的vue-cli (1.x 或 2.x),先卸载它 npm uninstall vue-cli -g # OR yarn global remove vue-cli 可以使用下列任一命令安装@v 阅读全文
posted @ 2021-01-28 18:45 lisashare 阅读(95) 评论(0) 推荐(0) 编辑
摘要:form内只有一个输入框时,按回车会刷新页面 && 如果input有回车事件回车也会刷新页面 <el-form ref="form" :inline="true" :model="form" label-width="100px"> <el-input v-model="form.keyword" 阅读全文
posted @ 2020-10-23 14:29 lisashare 阅读(879) 评论(0) 推荐(0) 编辑
摘要:文档说明:autocomplete 原生属性,自动补全,string on/off,默认off 但是在项目中填写on后不能实现记忆功能,决绝办法:在e-input组件添加属性name。 阅读全文
posted @ 2020-10-21 10:28 lisashare 阅读(5215) 评论(0) 推荐(1) 编辑
摘要:上班前开发,执行命令npm run dev还可以正常运行,开发一段时间,也没有修改很多代码,再次执行启动一半,就卡住了,不继续执行,还不报错。 尝试重新下载依赖,关机都不行,百度搜索到一篇同样问题的文章,突然恍然大悟,查找了代码,确实是 同样的问题,在代码中子组件的头部,多了一个引入的多余的代码,位 阅读全文
posted @ 2020-09-22 16:51 lisashare 阅读(4705) 评论(0) 推荐(0) 编辑
摘要:项目使用的是 vue-element-admin <template> <div> <div ref="line" :class="className" :style="{height:height,width:width}" /> </div> </template> <script> impor 阅读全文
posted @ 2020-08-08 17:57 lisashare 阅读(1235) 评论(0) 推荐(0) 编辑
摘要:<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table-column label="全部用户"> <el-table-column type="selection" 阅读全文
posted @ 2020-07-29 17:48 lisashare 阅读(2376) 评论(0) 推荐(0) 编辑
摘要:<el-table v-loading="loading" :data="tableData.slice((pageNum-1)*pageSize,pageNum*pageSize)" style="width: 100%;" @sort-change="sort_change" > <el-tab 阅读全文
posted @ 2020-07-24 19:32 lisashare 阅读(1138) 评论(0) 推荐(1) 编辑
摘要:动态加载组件的四种方式: 1、使用import导入组件,可以获取到组件 var name = 'system'; import myComponent from '@/pages/components/' + name; var route={ name: name, component: myCo 阅读全文
posted @ 2020-06-30 17:16 lisashare 阅读(4281) 评论(0) 推荐(0) 编辑
摘要:<el-table-column :render-header="renderHeader"> <template slot-scope="scope"> {{ scope.row.user }} </template> </el-table-column> methods: { renderHea 阅读全文
posted @ 2020-06-28 15:37 lisashare 阅读(1811) 评论(0) 推荐(0) 编辑
摘要:element-ui <el-form-item label="大于等于:"> <el-input @keyup.native="number" maxlength="3" v-model="form.days" placeholder="输入查询天数" class="input-with-sele 阅读全文
posted @ 2019-08-29 17:53 lisashare 阅读(5023) 评论(0) 推荐(0) 编辑
摘要:点击数值 +1 的动效 阅读全文
posted @ 2019-07-11 15:36 lisashare 阅读(1290) 评论(0) 推荐(1) 编辑
摘要:局部过滤器 时间、***号 <div id="wrapper" class="wrapper" style="display: none;"> 距离活动结束还剩:<p v-html="times"></p> </div> <script src="vue.min.js"></script> <scr 阅读全文
posted @ 2019-07-10 15:58 lisashare 阅读(1414) 评论(0) 推荐(0) 编辑
摘要:"github代码地址" 效果图 阅读全文
posted @ 2019-06-25 09:49 lisashare 阅读(1572) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示