提交 d48cc88c authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 f6cbbe2e
...@@ -13,19 +13,12 @@ ...@@ -13,19 +13,12 @@
<!-- input --> <!-- input -->
<el-input v-model="params[item.prop]" v-bind="item" clearable v-if="item.type === 'input'" /> <el-input v-model="params[item.prop]" v-bind="item" clearable v-if="item.type === 'input'" />
<!-- select --> <!-- select -->
<el-select <el-select v-model="params[item.prop]" clearable v-bind="item" v-if="item.type === 'select'" @change="search">
v-model="params[item.prop]"
clearable
v-bind="item"
v-if="item.type === 'select'"
@change="search"
>
<template v-for="(option, index) in item.options"> <template v-for="(option, index) in item.options">
<el-option <el-option
:label="option[item.labelKey] || option.label || option" :label="option[item.labelKey] || option.label || option"
:value="option[item.valueKey] || option.value || option" :value="option[item.valueKey] || option.value || option"
:key="index" :key="index"></el-option>
></el-option>
</template> </template>
</el-select> </el-select>
</template> </template>
...@@ -52,8 +45,7 @@ ...@@ -52,8 +45,7 @@
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"
style="height: 100%" style="height: 100%"
ref="table" ref="table">
>
<template v-for="item in currentColumns"> <template v-for="item in currentColumns">
<el-table-column v-bind="item" :key="item.prop" v-if="visible(item)"> <el-table-column v-bind="item" :key="item.prop" v-if="visible(item)">
<template v-slot:default="scope" v-if="item.slots || item.computed"> <template v-slot:default="scope" v-if="item.slots || item.computed">
...@@ -73,15 +65,14 @@ ...@@ -73,15 +65,14 @@
<el-pagination <el-pagination
class="table-list-pagination" class="table-list-pagination"
layout="total, prev, pager, next, sizes, jumper" layout="total, prev, pager, next, sizes, jumper"
:page-sizes="[10, 20, 30, 50, 100]" :page-sizes="[10, 20, 30, 50]"
:page-size="page.size" :page-size="page.size"
:total="page.total" :total="page.total"
:current-page.sync="page.currentPage" :current-page.sync="page.currentPage"
@size-change="pageSizeChange" @size-change="pageSizeChange"
@current-change="fetchList()" @current-change="fetchList()"
:hide-on-single-page="true" :hide-on-single-page="true"
v-if="hasPagination" v-if="hasPagination">
>
</el-pagination> </el-pagination>
</div> </div>
<!-- 更多筛选 --> <!-- 更多筛选 -->
...@@ -98,19 +89,9 @@ ...@@ -98,19 +89,9 @@
<!-- input --> <!-- input -->
<el-input v-model="params[item.prop]" v-bind="item" clearable v-if="item.type === 'input'" /> <el-input v-model="params[item.prop]" v-bind="item" clearable v-if="item.type === 'input'" />
<!-- select --> <!-- select -->
<el-select <el-select v-model="params[item.prop]" clearable v-bind="item" v-if="item.type === 'select'" style="width: 100%">
v-model="params[item.prop]"
clearable
v-bind="item"
v-if="item.type === 'select'"
style="width: 100%"
>
<template v-for="(option, index) in item.options"> <template v-for="(option, index) in item.options">
<el-option <el-option :label="option[item.labelKey] || option.label" :value="option[item.valueKey] || option.value" :key="index"></el-option>
:label="option[item.labelKey] || option.label"
:value="option[item.valueKey] || option.value"
:key="index"
></el-option>
</template> </template>
</el-select> </el-select>
</template> </template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论