解释以下代码<template>
  <div>
    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
			<el-form :inline="true" :model="filters">
				<!-- <el-form-item>
					<el-input size="small" v-model="filters.name" placeholder="名称"></el-input>
				</el-form-item> -->
				<el-form-item>
					<el-button size="small" type="primary" icon="el-icon-search" v-on:click="getData">查询</el-button>
				</el-form-item>
        <el-form-item>
					<el-button size="small" type="primary" icon="el-icon-plus" @click="addType(1)">添加</el-button>
				</el-form-item>
        <el-form-item>
					<el-button size="small" type="danger" @click="del">删除</el-button>
				</el-form-item>
			</el-form>
		</el-col>

		<el-table
	    :data="list.slice((currentPage-1)*pageSize,currentPage*pageSize)"
	    border
	    stripe
	    size="medium"
	    style="width: 100%"
	    v-loading="loading"
      @selection-change="handleSelectionChange"
      >
	    <el-table-column
        type="selection"
        width="55">
      </el-table-column>
	   <!--  <el-table-column type="index" width="50">
    	</el-table-column> -->
	    <el-table-column prop="name" label="名称">
	    </el-table-column>
	  </el-table>

    <addDialog
      :visible.sync="visibleChild"
      @handleSucces="getData"
    >

    </addDialog>

		<div class="block">
	    <el-pagination
	      @size-change="handleSizeChange"
	      @current-change="handleCurrentChange"
	      :current-page.sync="currentPage"
	      :page-sizes="[5, 10, 15, 20]"
	      :page-size="pageSize"
	      layout="total, sizes, prev, pager, next, jumper"
	      :total="this.list.length">
	    </el-pagination>
	  </div>
  </div>
</template>

<script>
import axios from 'axios'
import _ from "lodash"
import { mapState } from 'vuex'
import addDialog from "./modules/add.vue"
export default {
  components: {
    addDialog
  },
  data() {
    return {
      loading: false,
      filters: {
				name: ''
			},
			list: [],
			loading: false,
			currentPage: 1,
      pageSize: 10,
      nodes: [],
      node: {},
      visibleChild: false,
    }
  },
  computed: {
		...mapState(['nickName'])
  },
  mounted() { 
    this.getData()
  },
  methods: {
    getData() {
			this.loading = true
      axios.get("/admin/goodsTypes").then((response) => {
        let res = response.data;
        
				this.list = res.rows || [];
				this.loading = false
			}).catch((err)=>{
				console.log(err);
			});	
		},
		handleSizeChange(val) {
			this.pageSize = val;
		},
		handleCurrentChange(val) {
			this.currentPage = val;
    },
    /**
     * @vuese 添加类别
     */
    addType(type) {
      this.visibleChild = true
    },
    /**
     * @vuese 选择行
     */
    handleSelectionChange(selection) {
      this.nodes = _.cloneDeep(selection)
    },
    /**
     * @vuese 查看子菜单
     */
    del() {
      if (this.nodes.length !== 1) {
        this.$message({ message: '请选择一条数据', type: 'error', center: true });
        return
      }

      this.node = this.nodes[0]

      axios.delete(`/admin/goodsType?id=${this.nodes[0].id}`).then((response) => {
        let res = response.data;
        
				this.list = res.rows;
        this.loading = false
        this.$message({ message: res.info, type: 'success', center: true });
        this.getData()
			}).catch((err)=>{
				console.log(err);
      });	

      
    },
    mounted() {
      this.getData();
    }
  }
}
</script>


<style lang="scss" scoped="" type="text/css">
</style>