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--;
    			}
    		}
    	}
     }
    
  • 相关阅读:
    图灵机器人,web录音实现自动化交互问答
    人工智能初识,百度AI
    flask web 表单验证 WTForms
    websocket的原理
    DBUtils
    【hdu4704】 Sum——费马小定理+快速幂取模
    【hdu3037】Saving Beans——组合数取模
    【SRM15】题解
    【模板】快速幂取模
    【模板】线性筛法求素数
  • 原文地址:https://www.cnblogs.com/yinxingen/p/9540688.html
Copyright © 2011-2022 走看看