i-combogrid.vue组合表格组件的封装
i-combogrid.vue组合表格组件是文章的重点部分,以下代码部分引入的组件和js文件在之前文章里有写道。可以参考第一章和第二章。
第一章
第二章
i-combogrid.vue的实现
template
<template>
<div :getOptions="getOptions">
<el-input ref="comboinput" @click.native="showCombogrid($event)" placeholder="请选择" v-model="inputShowValue">
<i slot="suffix" class="el-icon-arrow-down" :class="iconChange"></i>
</el-input>
<iwhiteBoad ref="whiteBoad" :width="width" :timeValue="timeValue">
<div class="i-combogrid">
<iform ref="iform" :model="FormData" :rightFormData="FormData" :formTypeValue="formTypeValue"
:timeValue="timeValue">
<el-button v-if="showRearch" @click="getTableData"><i class="el-icon-search"></i></el-button>
</iform>
<itable ref="combotable" :showSelection="showSelection" @row-click="rowclick" @selection-change="selectionChange"
:itemList="columnList" :pageInfo="pageInfo"
:highlightCurrentRow="highlightCurrentRow" @handleChange="handleChange"
@handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange">
<el-table-column v-for="(item) in columnList" :key="item.field" sortable
:prop="item.field" :label="item.title" :width="item.width" align="center">
</el-table-column>
</itable>
<div class="i-button">
<el-button type="primary">确定{
{
0}}</el-button>
<el-button type="primary" @click="clearAllSelect">清空</el-button>
</div>
</div>
</iwhiteBoad>
</div>
</template>
script
<script>
import Itable from './i-table.vue';
import Iform from './i-form.vue';
import IwhiteBoad from './i-whiteBoad.vue';
import {
EventBus } from '../modules/event-bus';
import axios from 'axios';
export default {
name: 'i-combogrid',
components: {
Itable, Iform, IwhiteBoad },
props: {
getOptions