vue
耄耋年少
想你所想
展开
-
scrollBy 滚动到指定楼层
<div class="qp-box" v-for="(allItem, allIndex) in qList" :key="allIndex" :ref="'ques' + allIndex" > <div class="question-box"> ....... </div> </div> ... qList: [], .....原创 2021-10-29 16:03:23 · 147 阅读 · 0 评论 -
uni-app上拉加载 下拉刷新
uni-app上拉加载 下拉刷新父组件中使用下拉刷新onPullDownRefresh,上拉加载 onReachBottom,分别调用子组件appear的updatePage,pulldatePage方法。//父组件 async onPullDownRefresh() { if (this.text == '我的安全') { await this.$refs.mySecurity.getAA0001(); } if (this.text == '隐患排查' &&原创 2021-09-03 11:06:24 · 515 阅读 · 0 评论 -
ES6相关
全网最详细,如果不是,就当我没说!!!letlet用来声明变量,和var用法类似,但是所声明的变量,只有在let命令所在的代码块里有效。1.存在块级作用域2.不存在声明提升(注意考虑暂时性死区)3.不允许重复声明(包括普通变量和函数参数)4.const的使用(不要试图修改,因为不能修改,哈哈哈哈)解构赋值按照一定的模式,从数组和对象中提取值,对变量进行赋值。优点:一次性可以...原创 2019-11-05 22:07:03 · 116 阅读 · 0 评论 -
element Dialog子组件弹框
//父组件<div> <tipDialog :DialogTipShow="DialogTipShow" @closeDialog="closeDialog"></tipDialog></div>import tipDialog from '../components/tipDialog' export default { components: { tipDialog }, data() { return {原创 2020-12-16 22:46:52 · 701 阅读 · 0 评论 -
echarts适配 自适应
1.注意:容器宽不要写死,可用百分比2.第一种 setTimeout(function() { window.onresize = function() { myChart.resize() } }, 200)3 第二种 window.addEventListener("resize", function () { myChart.resize()//下面可以接多个图 }).原创 2020-10-15 12:04:38 · 1343 阅读 · 1 评论 -
vue项目组件缓存
在APP.vue里 <div id="app"> <keep-alive> <router-view v-if="$route.meta.keepAlive" /> </keep-alive> <router-view v-if="!$route.meta.keepAlive" /> </div>在路由配置里加上 meta: { title: '管网统计',转载 2020-09-24 11:57:08 · 181 阅读 · 0 评论 -
element 多级表头+可编辑表格
```javascript<template> <div> <el-button size="mini" @click="handleAdd()" type="primary">Add</el-button> <el-table ref="mytable" :data="table_data" style="width: 100%" @selection-change="handle.原创 2020-09-02 17:39:28 · 1022 阅读 · 0 评论 -
重装node报错
重新安装 npm rebuild node-sass即可原创 2020-08-18 13:05:00 · 181 阅读 · 0 评论