diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6f20ed967b04838b627ff0b510b3fd87e47819..26269eb9e682b703d34ff464ba656c9cad604536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ - 面板首页搜索新增strictly参数,为true时不会跟着菜单折叠而改变 - 面板首页搜索新增placeholder参数,为输入框添加提示信息 +### Changed + +- 更新门户菜单容器默认显示的边距 + ## Fixed - 修复数据关系分页部件流布局模式下嵌套数据关系分页部件流布局时样式异常以及初始导航栏定位异常问题 diff --git a/src/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.scss b/src/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.scss index da4f1feb59634356ffe12a9d5f99396475518d96..7f2fd70b00195bd6661a40e15f3186785b6b8fef 100644 --- a/src/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.scss +++ b/src/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.scss @@ -3,11 +3,14 @@ $control-appmenu-portlet: ( 'border-color': getCssVar(color, primary), 'bg-color': getCssVar('color', 'bg', 0), 'padding': getCssVar(spacing, base-tight), + 'content-padding': getCssVar(spacing, tight) getCssVar(spacing, base), ); @include b(control-appmenu-portlet) { @include set-component-css-var('control-appmenu-portlet', $control-appmenu-portlet); + padding: getCssVar('control-appmenu-portlet', 'content-padding'); + @include e(content) { display: flex; flex-wrap: wrap; diff --git a/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx b/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx index ca8c7d7763f98f659333e518aa8ea7543e8795ac..eccc15685e6546f5c3609ab3b088afd2cd318dba 100644 --- a/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx +++ b/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx @@ -27,6 +27,9 @@ import './ibiz-markdown-editor.scss'; * @primary * @editorparams {"name":"customtheme","parameterType":"'light' | 'dark'","description":"设置Markdown主题,未配置时跟随应用主题"} * @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"} + * @editorparams {"name":"uploadparams","parameterType":"string","description":"上传参数,图片或文件上传时,用于计算上传路径"} + * @editorparams {"name":"exportparams","parameterType":"string","description":"下载参数,图片或文件下载时,用于计算下载路径"} + * @editorparams {"name":"osscat","parameterType":"string","description":"用于计算上传和下载路径的OSS参数"} * @ignoreprops autoFocus | overflowMode * @ignoreemits blur | focus | enter | infoTextChange */ diff --git a/src/locale/en/index.ts b/src/locale/en/index.ts index e0dbc41bd86088930b3b1de709ffe5681e28d838..df75a3ad27bf3327545b134aad666dbd08a1b071 100644 --- a/src/locale/en/index.ts +++ b/src/locale/en/index.ts @@ -861,6 +861,10 @@ export default { clearTopicDesc: 'Are you sure to clear all conversation data except for the current activation item?', }, + appModal: { + prev: 'Previous record', + next: 'Next record', + }, }, // runTime ...runTimeEn, diff --git a/src/locale/zh-CN/index.ts b/src/locale/zh-CN/index.ts index 064e0387d051ee5bee80baa9d09b638b0a66f65f..9732897cab7b03d6f09734a6befd82bdd193285c 100644 --- a/src/locale/zh-CN/index.ts +++ b/src/locale/zh-CN/index.ts @@ -805,6 +805,10 @@ export default { clearTopic: '清空会话', clearTopicDesc: '确认清空除当前激活项外的所有会话数据?', }, + appModal: { + prev: '上一个记录', + next: '下一个记录', + }, }, // runTime ...runTimeZhCN, diff --git a/src/util/app-modal/app-modal-component.scss b/src/util/app-modal/app-modal-component.scss index c24bf04a82de9f633ed924efdf718e48dd641192..d8716630fa13940b559c0179461e20069c132c61 100644 --- a/src/util/app-modal/app-modal-component.scss +++ b/src/util/app-modal/app-modal-component.scss @@ -9,6 +9,35 @@ $modal: ( @include b(modal) { @include set-component-css-var(modal, $modal); + @include e('record') { + @include m('prev') { + position: absolute; + top: 50%; + left: -6px; + transform: translate(-100%, -50%); + } + @include m('next') { + position: absolute; + top: 50%; + right: -6px; + font-size: getCssVar('font-size', 'regular' ); + transform: translate(100%, -50%); + } + + .el-button { + height: auto; + padding: getCssVar('spacing', 'loose') getCssVar('spacing', 'tight'); + margin: 0; + + --el-button-bg-color: #{getCssVar(color, bg, 0)}; + --el-button-text-color: #{getCssVar(color, text, 2)}; + --el-button-hover-bg-color: #{getCssVar(color, bg, 1)}; + --el-button-hover-text-color: #{getCssVar(color, text, 3)}; + --el-button-active-bg-color: #{getCssVar(color, bg, 0)}; + --el-button-active-text-color: #{getCssVar(color, text, 2)}; + } + } + &.el-dialog { overflow: visible; } diff --git a/src/util/app-modal/app-modal-component.tsx b/src/util/app-modal/app-modal-component.tsx index c3bf9f4b394129f5dac2bf93e9717e4418f1af8a..e239d95a3ebe61c77fbfac6368e524e82e661266 100644 --- a/src/util/app-modal/app-modal-component.tsx +++ b/src/util/app-modal/app-modal-component.tsx @@ -14,14 +14,19 @@ import { } from '@ibiz-template/vue3-util'; import { isNumber } from 'lodash-es'; import { + EventBase, IModalData, IModalOptions, IOverlayContainer, + IViewController, Modal, + SysUIActionTag, ViewMode, + ViewShellHooks, } from '@ibiz-template/runtime'; import './app-modal-component.scss'; import { calcOpenModeStyle } from '@ibiz-template/core'; +import { ArrowLeftBold, ArrowRightBold } from '../icon/icon'; export const AppModalComponent = defineComponent({ props: { @@ -35,6 +40,7 @@ export const AppModalComponent = defineComponent({ const isShow = ref(false); const { zIndex } = useUIStore(); const modalZIndex = zIndex.increment(); + let modalView: IViewController | undefined; // 处理自定义样式 const customStyle = reactive({}); @@ -70,6 +76,18 @@ export const AppModalComponent = defineComponent({ }, }); + const viewShellHooks = new ViewShellHooks(); + + viewShellHooks.hooks.viewCreated.tapPromise( + async (_event: EventBase): Promise => { + modalView = _event.view; + }, + ); + + const handleViewCreated = (event: EventBase) => { + modalView = event.view; + }; + // Modal自身的所有关闭方式最终都走这个 const onBeforeClose = async (done: () => void) => { const isClose = await modal.dismiss(); @@ -87,6 +105,15 @@ export const AppModalComponent = defineComponent({ isShow.value = true; }; + // 上一条 + const prevRecord = () => { + modalView?.call(SysUIActionTag.PREV_RECORD); + }; + // 下一条 + const nextRecord = () => { + modalView?.call(SysUIActionTag.NEXT_RECORD); + }; + return { ns, isShow, @@ -94,9 +121,13 @@ export const AppModalComponent = defineComponent({ modalZIndex, customStyle, modal, + viewShellHooks, present, dismiss, onBeforeClose, + prevRecord, + nextRecord, + handleViewCreated, }; }, render() { @@ -115,7 +146,28 @@ export const AppModalComponent = defineComponent({ beforeClose: this.onBeforeClose, ...this.options, }, - this.$slots.default?.(this.modal), + [ + // eslint-disable-next-line vue/no-multiple-slot-args + this.$slots.default?.(this.modal, this.viewShellHooks), + this.options.openIndicator && ( +
+ + {ArrowLeftBold()} + + + {ArrowRightBold()} + +
+ ), + ], ); }, }); diff --git a/src/util/icon/icon.tsx b/src/util/icon/icon.tsx new file mode 100644 index 0000000000000000000000000000000000000000..106b2bc76949a5ce8f74880d8cf0b3d1a948d372 --- /dev/null +++ b/src/util/icon/icon.tsx @@ -0,0 +1,31 @@ +const ArrowLeftBold = (): JSX.Element => ( + + + +); + +const ArrowRightBold = (): JSX.Element => ( + + + +); + +export { ArrowLeftBold, ArrowRightBold }; diff --git a/src/util/index.ts b/src/util/index.ts index 582f62864fbfde91f10657fc77ab58784e47b7ad..3c1df0f8f02402e080eb9183740080feb81598ed 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -14,3 +14,4 @@ export * from './wang-editor-util/wang-editor-util'; export { useFocusByEnter } from './keydown-util/keydown-util'; export { calcAiToolbarItemsByAc } from './ai-util/ai-util'; export { convertBtnType } from './button-util/button-util'; +export * from './icon/icon';