Skip to content

Commit

Permalink
perf: 查询框支持修改尺寸
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Sep 2, 2020
1 parent bc9a6c0 commit dfa2852
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docspress/guide/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ export const crudOptions = {
draggable:true, //是否支持表单对话框拖拽
updateTableDataAfterEdit: false // 添加和删除提交后,是否直接更新本地table的数据
},
searchOptions: { //查询配置参数
searchOptions: { //查询配置参数, 支持el-form的配置参数
form:{ //默认搜索参数
name:'小明' // 请求列表默认会带上此处配置参数,重置后会恢复成此处配置的值
},
size:'small',
show: true,//是否显示搜索工具条
disabled: false, //是否禁用搜索工具条
debounce:{ //自动查询防抖,debounce:false关闭自动查询
Expand Down
3 changes: 1 addition & 2 deletions packages/d2-crud-plus/src/lib/components/search/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
:inline="true"
:model="form"
ref="searchForm"
v-bind="options"
size="small" class="d2p-search-form" >
v-bind="options" class="d2p-search-form" >
<slot name="prefix" :form="this.form"></slot>
<el-form-item v-for="(item) in currentColumns" :key="item.key" :label="item.title?item.title:item.label" :prop="item.key" >
<template v-if="item.slot === true">
Expand Down
2 changes: 1 addition & 1 deletion packages/d2-crud-plus/src/lib/mixins/crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
editTemplate: {},
addRules: {},
editRules: {},
searchOptions: { disabled: false, show: true, form: {} },
searchOptions: { disabled: false, show: true, form: {}, size: 'small' },
list: [],
loading: false,
pagination: {
Expand Down

0 comments on commit dfa2852

Please sign in to comment.