切换导航
网站首页
网页制作
网络编程
脚本专栏
数据库
服务器
操作系统
网站运营
平面设计
硬件教程
网络安全
电脑基础
Vue.js
js
文档
Node.js
Vue.js
React
jQuery
ES2015(es6)
angularjs
css3动画
vbs
最新电影
flutter
微信小程序
C教程
java教程
C++教程
C#教程
php教程
sql教程
mysql教程
android教程
ios教程
python教程
正则表达式
首页
宝典数据
Vue.js
vue+element 后台管理系统(一)表格
上一篇: 基于 vue.js 实现图片本地预览 +...
下一篇:新的征程——再见2017,你好2018
vue+element 后台管理系统(一)表格
发布时间:2019-05-29 发布网站:脚本宝典
脚本宝典
收集整理的这篇文章主要介绍了
vue+element 后台管理系统(一)表格
,
脚本宝典
觉得挺不错的,现在分享给大家,也给大家做个参考。
非vue-cli模式!
Vue({ el: '#app', data() { return { tableData3: [], multipleSelection: [], title:"", fullscreenLoading: true } }, mounted(){
const
loading =
this
.$loading({ lock: true, text: '加载中', spinner: 'el-icon-loading', custom
Class
:"load_text", background: 'rgba(0, 0, 0, 0.4)' }); for(var i=0;i<12;i++){ this.tableData3.push({ id:i, date: '2016-05-07', name: '王小虎', province:'哈尔滨', zip:'150000', city:'南岗区', address: '上海市普陀区金沙江路 1518 弄' }) } setTimeout(() => { loading.close(); }, 2000); }, methods: { toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; }, handleClick(row) { console.log(row); if(this.multipleSelection.length>1){
this
.$message({ message: '只能选中一条数据', type: 'warning' }); return false; } else if(this.multipleSelection.length<=0){ this.$message({ message: '至少选中一条数据', type: 'warning' }); return false; } this.$message({ showClose: true, message: '你选中了ID:'+this.multipleSelection[0].id, type: 'success' }); }, pageChange(e){ //一般发起请求重新获取数据更新 console.log(e) } } })