elememt-ui 表单表格二次封装
`
<el-table :data="tableData" size="medium"
ref="multipleTable" border fit
@sort-change="handleSort"
@filter-change="filterHandler"
@selection-change="handleSelectionChange">
<el-button v-for="(o, key) in th.operation" :key="key"
@click="o.clickFun(scope.row)"
style="width:100%"
type="text" size="mini">
{{o.name}}
{{ scope.row[th.prop] }}
<el-select v-else-if="th.selected" :disabled="!th.disabled" v-model="scope.row[th.prop]" @change="th.changeFunc" clearable>
{{ scope.row[th.prop] }}
{{ scope.row[th.prop] | formatters(th.formatData) }}
表格调用
`<comp-table :tableData="tableData"
:tableHeader="tableHeader"
:multipleSelection.sync="multipleSelection"
@filter-events="filterEvents"
@sort-events="sortEvents">
`
<el-select v-if="item.type='Select'" v-model="searchData[item.prop]" size="mini" @change="item.change(searchData[item.prop])" :style="{width:item.width}">
<el-radio-group v-if="item.type='RadioButton'" v-model="searchData[item.prop]" @change="item.change && item.change(searchData[item.prop])">
<el-button :type="item.type" :size="item.size || size" @click='item.handle()'>{{item.label}}
————————————————
`
表单调用
`
`