zoukankan      html  css  js  c++  java
  • 前端批量删除(假删)

    elementUI表格

    html:
    <div class="uploadButton" v-show="addShow">
    	<el-button @click="deleteRow" :disabled="this.multipleSelection.length == 0">删除</el-button>
    </div>
    <el-table 
    	:data ="fileList" border  
    	class="uploadList"
    	style=" 100%;margin:20px 0;"
    	@selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55"></el-table-column>
    
    	<el-table-column label="图片" prop ="name" width="100">
    		<template slot-scope="scope">
    		        <i class="el-icon-document"></i>
    	        </template>
    	</el-table-column>
    	<el-table-column label="标题" prop ="FILENAME" show-overflow-tooltip></el-table-column>
    	<el-table-column label="大小" prop ="FILESIZE"  width="200"></el-table-column>
    	<el-table-column label="创建人" prop ="CREATENAME" width="200"></el-table-column>
    	<el-table-column label="创建时间" prop ="CREATEDATE" width="300"></el-table-column>
    	<el-table-column label="文件格式" prop ="FILEFROMAT"  width="200"></el-table-column>
    </el-table>
    js:
    handleSelectionChange(row) {
    	this.multipleSelection = row;
    },
    deleteRow(){
          for(var i=0;i<this.multipleSelection .length;i++){
    		for(var j=0;j<this.fileList.length;j++){
    			if(this.fileList[j]==this.multipleSelection [i]){
    				this.fileList.splice(j,1);
    				j--;
    			}
    		}
    	}
     }
    
  • 相关阅读:
    python运算符
    CocoChina开发者大会
    iphone模拟器上不能安装从itunes下载的app
    Objective-C学习--源文件结构
    Objective-C学习笔记--复合
    Objective-C学习笔记--继承
    Objective-C学习笔记--实例化对象
    Objective-C学习笔记--@implementation
    Objective-C学习笔记--@interface
    C语言函数原型
  • 原文地址:https://www.cnblogs.com/yinxingen/p/9540688.html
Copyright © 2011-2022 走看看