diff --git a/CHANGELOG.md b/CHANGELOG.md index e4ac9164039f75c6eb2a033daa73f440af5630a3..8bbe9446d9bc33356abdcdea369a7f9c09e3e9a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ ### Change +- 移除搜索表单保存条件UI相关代码 - 更新多数据视图同时存在搜索表单和搜索栏时才会绘制搜索表单弹出按钮 - 更新直接内容轮播图和视频样式,更新树导航栏样式 - 更新面板组件样式变量抽取,组件内部不直接使用基础变量 diff --git a/src/control/form/search-form/search-form.scss b/src/control/form/search-form/search-form.scss index 5206e3faac4ec8ad25d343ae0100820d766f6487..68bf93fd2515f59a759d1a9d329fdea2d5a6e646 100644 --- a/src/control/form/search-form/search-form.scss +++ b/src/control/form/search-form/search-form.scss @@ -5,11 +5,6 @@ $control-search-form: ( 'btn-margin': 0 0 0 getCssVar(spacing, tight), 'form-page-item-padding-top': calc(getCssVar('padding') / 2), 'form-item-container-padding-bottom': calc(getCssVar('padding', 'right') / 2), - 'popover-padding': getCssVar(spacing, tight) 0, - 'popover-item-padding': getCssVar(spacing, tight) getCssVar(spacing, base), - 'popover-item-margin': getCssVar(spacing, base) 0 0 0, - 'save-name-padding': getCssVar(spacing, base), - 'filter-item-gap': getCssVar(spacing, base), ); @include b(control-searchform) { @@ -42,22 +37,6 @@ $control-search-form: ( margin: getCssVar('control-search-form', 'btn-margin'); } - @include e('popover-more') { - margin: getCssVar('control-search-form', 'btn-margin'); - } - - @include e('popover-content') { - @include set-component-css-var('control-search-form', $control-search-form); - - padding: getCssVar('control-search-form', 'popover-padding'); - @include m('item') { - padding: getCssVar('control-search-form', 'popover-item-padding'); - &:first-child { - margin-top: 0; - } - } - } - @include e('right') { @include flex(row, flex-start, center); @@ -68,18 +47,4 @@ $control-search-form: ( padding: 0; } } - - @include e('save-name') { - &.van-cell { - padding: getCssVar('control-search-form', 'save-name-padding'); - } - } - - @include e('filter-item'){ - padding: getCssVar('control-search-form', 'popover-item-padding'); - display: flex; - gap: getCssVar('control-search-form', 'filter-item-gap'); - align-items: center; - justify-content: space-between; - } -} \ No newline at end of file +} diff --git a/src/control/form/search-form/search-form.tsx b/src/control/form/search-form/search-form.tsx index 4b548c70856ba4c7745ad79c91fc6be9ed21738a..73e6eb066e5101283f1823a4cf5bff4a42f2cf92 100644 --- a/src/control/form/search-form/search-form.tsx +++ b/src/control/form/search-form/search-form.tsx @@ -1,7 +1,7 @@ import { IControlProvider, SearchFormController } from '@ibiz-template/runtime'; import { useControlController, useNamespace } from '@ibiz-template/vue3-util'; import { IDESearchForm } from '@ibiz/model-core'; -import { defineComponent, PropType, reactive, ref } from 'vue'; +import { defineComponent, PropType, reactive } from 'vue'; import './search-form.scss'; export const SearchFormControl = defineComponent({ @@ -34,15 +34,6 @@ export const SearchFormControl = defineComponent({ ); const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`); - // 显示下拉气泡 - const showPopover = ref(false); - - // 显示保存弹窗 - const showSaveDialog = ref(false); - - // 保存方案名称 - const saveName = ref(''); - c.evt.on('onCreated', () => { const keys = Object.keys(c.details); keys.forEach(key => { @@ -51,44 +42,6 @@ export const SearchFormControl = defineComponent({ }); }); - // 重置 - const onReset = () => { - showPopover.value = false; - c.reset(); - }; - - // 保存过滤条件 - const onSaveFilter = () => { - showSaveDialog.value = true; - }; - - // 点击历史保存项 - const onHistoryClick = (index: number) => { - showPopover.value = false; - c.applyStoredFilter(index); - }; - - // 移除历史保存项 - const onHistoryRemove = (index: number, event: PointerEvent) => { - event.stopPropagation(); - c.removeStoredFilter(index); - }; - - // 保存弹窗取消 - const onDialogCancel = () => { - saveName.value = ''; - showSaveDialog.value = false; - showPopover.value = false; - }; - - // 保存弹窗确定 - const onDialogConfirm = async () => { - await c.storeFilter(saveName.value); - saveName.value = ''; - showSaveDialog.value = false; - showPopover.value = false; - }; - // 搜索按钮 const renderSearch = () => { return ( @@ -111,96 +64,9 @@ export const SearchFormControl = defineComponent({ ); }; - // 绘制历史保存列表 - const renderHistorySaveList = () => { - if (c.state.storedFilters?.length > 0) { - return c.state.storedFilters.map((item: IData, index: number) => { - return ( -