update 查询控件写入组件

This commit is contained in:
2021-04-30 17:26:03 +08:00
parent f6790ef78c
commit a41311327c
9 changed files with 138 additions and 144 deletions

View File

@@ -151,6 +151,15 @@ export default {
})
return data
},
onQuery() {
this.$emit('query')
},
onResetQuery() {
this.$emit('resetQuery')
this.$emit('reset-query')
}
},
render() {
@@ -169,16 +178,33 @@ export default {
change: this.onTableChange,
...this.$listeners
}
const queryOn = {
'submit.native.prevent': () => { }
}
return (
<section>
<a-alert type="warning" closable>
<template slot="message">
后端没有排序参数
<br />
字段固定应该遵循左侧固定到最左,右侧固定到最右(此逻辑难以实现)
</template>
</a-alert>
<br />
{
this.$scopedSlots.query &&
<div class="yo-query-bar">
<a-form-model layout="inline" {...{ on: queryOn }}>
{this.$scopedSlots.query()}
<a-form-model-item>
<a-button-group>
<a-button onClick={this.onQuery} html-type="submit" type="primary">查询</a-button>
<a-button onClick={this.onResetQuery}>重置</a-button>
</a-button-group>
</a-form-model-item>
</a-form-model>
</div>
}
<div class="yo-action-bar">
<div class="yo-action-bar--actions">
{this.$scopedSlots.operator && this.$scopedSlots.operator()}