随笔分类 -  Vue

Vue相关问题
摘要:给树一个ref ‘tree’ 调用方法 this.$refs.tree.getCheckedNodes().length > 0 //判断选中的数据是否大于0 阅读全文
posted @ 2021-11-09 16:18 丶有情调。 阅读(326) 评论(0) 推荐(0)
摘要:给组件一个ref ‘tbList’ 调用方法 this.$refs.tbList.toggleRowSelection(this.pageParam.data[0]); //参数为默认选中项的数据 阅读全文
posted @ 2021-11-09 16:15 丶有情调。 阅读(1539) 评论(0) 推荐(0)
摘要:下载flv.js cnpm install flv.js 引入 import flvjs from 'flv.js' 使用 HTML <video ref="videoElement" v-model="test" id="dplayer" controls autoplay muted width 阅读全文
posted @ 2021-10-19 10:28 丶有情调。 阅读(962) 评论(0) 推荐(0)
摘要:在input框加入 v-model.trim 阅读全文
posted @ 2021-09-08 10:12 丶有情调。 阅读(755) 评论(0) 推荐(0)
摘要:1.下载组件:cnpm install vue-json-excel 2.main.js中引入: import JsonExcel from 'vue-json-excel' Vue.component('downloadExcel', JsonExcel) 3.页面引用 html: <downlo 阅读全文
posted @ 2021-07-28 12:01 丶有情调。 阅读(164) 评论(0) 推荐(0)
摘要:在columns对象中复制一列即可,title为该列的标题,key为对应后台数据的key值 若想对该列数据进行筛选,则可以通过过滤器来实现 其中val为该列该行返回的值,row为该列,col为该行 若要添加一些操作按钮,则可以这样写 通过emit来给对应的文本添加点击事件 可通过过滤函数来修改该列返 阅读全文
posted @ 2021-07-22 15:14 丶有情调。 阅读(2186) 评论(0) 推荐(0)
摘要:1.监听第code为13的按键<input @:keyup.13="submit"> 2.监听会车按键<input @:keyup.enter="submit"> 3.常用按键: .enter .tab .delete (捕获 “删除” 和 “退格” 键) .esc .space .up .down 阅读全文
posted @ 2021-07-22 11:52 丶有情调。 阅读(855) 评论(0) 推荐(0)
摘要:1.安装node环境 2.安装好后下载cnpm npm install -g cnpm --registry=http://registry.npm.taobao.org 3.安装VUE脚手架 cnpm install -g vue-cli 4.进入项目目录,下载依赖包 cnpm install 5 阅读全文
posted @ 2021-07-22 11:52 丶有情调。 阅读(46) 评论(0) 推荐(0)
摘要:1.ElementUI npm i element-ui -S main.js中引入 import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' Vue.use(ElementUI) 2.vue-r 阅读全文
posted @ 2021-07-22 11:51 丶有情调。 阅读(111) 评论(0) 推荐(0)
摘要:1.项目根目录执行下载echarts,命令:npm install echarts --save 2.在main.js中全局引入echarts 代码 : import * as echarts from "echarts" Vue.prototype.$echarts = echarts 3.在对应 阅读全文
posted @ 2021-07-22 11:51 丶有情调。 阅读(209) 评论(0) 推荐(0)
摘要:1.prop传值延迟问题 解决办法: a.给prop默认值 b.直接在父级给子组件赋值:this.$refs.statisticsInfo.selectedData = this.selected[0]; 有时调用失败是因为子组件没有渲染完成 this.$nextTick(() => {this.$ 阅读全文
posted @ 2021-07-22 11:50 丶有情调。 阅读(207) 评论(0) 推荐(0)
摘要:1.下载组件:npm i v-charts echarts@4.9.0 -S 2.main.js中引入: import VCharts from 'v-charts' Vue.use(VCharts) 3.使用 准备数据: return { statisticsVisible: false, cha 阅读全文
posted @ 2021-07-22 11:45 丶有情调。 阅读(444) 评论(0) 推荐(0)
摘要:组件源码: <template> <div> <el-upload class="upload-demo" v-loading="loading" ref="uploadComs" name="importFile" :limit="1" :on-change="handleChange" :on- 阅读全文
posted @ 2021-07-20 16:59 丶有情调。 阅读(570) 评论(0) 推荐(0)
摘要:文件目录: 最外层index文件的html代码: <el-tabs v-model="activeName" type="card"> <el-tab-pane v-for="tab in tabs" :key="tab.name" :label="tab.label" :name="tab.nam 阅读全文
posted @ 2021-07-20 10:59 丶有情调。 阅读(885) 评论(0) 推荐(0)

Live2D
-->