提交 773fb00a 编写于 作者: RedPig97's avatar RedPig97

update: 快速搜索参数优化

上级 86877ff0
...@@ -109,7 +109,7 @@ export class MDView extends MainView { ...@@ -109,7 +109,7 @@ export class MDView extends MainView {
* @param {*} [args={}] * @param {*} [args={}]
* @memberof MDView * @memberof MDView
*/ */
public handleQuickGroupSearch(args: any = {}): void { public handleQuickGroupSearch(args: string): void {
const { viewParams } = this.state; const { viewParams } = this.state;
Object.assign(viewParams, { quickGroup: args.data }); Object.assign(viewParams, { quickGroup: args.data });
const tag = this.getMDCtrl().name; const tag = this.getMDCtrl().name;
...@@ -123,7 +123,7 @@ export class MDView extends MainView { ...@@ -123,7 +123,7 @@ export class MDView extends MainView {
*/ */
public handleQuickSearch(args: any = {}): void { public handleQuickSearch(args: any = {}): void {
const { viewParams } = this.state; const { viewParams } = this.state;
const query = args?.target?._value || ''; const query = args || '';
Object.assign(viewParams, { query: query }); Object.assign(viewParams, { query: query });
const tag = this.getMDCtrl().name; const tag = this.getMDCtrl().name;
this.next({ tag: tag, action: 'load', data: viewParams }); this.next({ tag: tag, action: 'load', data: viewParams });
......
...@@ -68,7 +68,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSear ...@@ -68,7 +68,7 @@ const { state, grid, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSear
{{#if page.enableFilter}} {{#if page.enableFilter}}
<template v-slot:quickSearch> <template v-slot:quickSearch>
<div class='app-quick-search'> <div class='app-quick-search'>
<a-input v-if="state.enableQuickSearch" @pressEnter="onQuickSearchEvent($event)" allowClear/> <a-input-search v-if="state.enableQuickSearch" @search="onQuickSearchEvent" allowClear/>
<a-popover v-if="state.expandSearchForm" trigger="click" :overlayStyle="{width: '50%'}" placement="bottom"> <a-popover v-if="state.expandSearchForm" trigger="click" :overlayStyle="{width: '50%'}" placement="bottom">
<template #content> <template #content>
<{{codeName}}SearchForm <{{codeName}}SearchForm
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册