diff --git a/src/layout/GlobalMenu.tsx b/src/layout/GlobalMenu.tsx index 63ad351..9dfa9de 100644 --- a/src/layout/GlobalMenu.tsx +++ b/src/layout/GlobalMenu.tsx @@ -75,10 +75,10 @@ const Item = defineComponent({ return () => (
{ v-outside-click={() => { menu.dismiss() }} - class="fixed px-2 pt-4 pb-2 bg-white/60 backdrop-blur shadow-lg rounded-lg overflow-hidden" + class="fixed px-2 pt-2 pb-1 bg-white/60 backdrop-blur shadow-lg rounded-lg overflow-hidden" style={{ zIndex: '999', left: menu.display.x + 'px', @@ -223,26 +223,31 @@ export default defineComponent(() => { > 编辑 - { - // 删除链接 - console.log(menu.selectPage) + {layout.state.content[layout.state.current].pages.length > 1 && ( + { + // 删除链接 - const idx = layout.state.content[layout.state.current].pages.findIndex( - (el) => el.id === menu.selectPage?.id - ) - menu.dismiss() + const idx = layout.state.content[layout.state.current].pages.findIndex( + (el) => el.id === menu.selectPage?.id + ) + menu.dismiss() - if (idx < 0) return - if (idx === layout.state.currentPage) { - return - } - layout.state.content[layout.state.current].pages.splice(idx, 1) - }} - > - 删除 - + if (idx < 0) return + layout.state.content[layout.state.current].pages.splice(idx, 1) + if ( + layout.state.currentPage >= + layout.state.content[layout.state.current].pages.length + ) { + layout.state.currentPage = + layout.state.content[layout.state.current].pages.length - 1 + } + }} + > + 删除 + + )} ) } diff --git a/src/layout/grid/BlockWrapper.tsx b/src/layout/grid/BlockWrapper.tsx index d0b9095..4ff1da3 100644 --- a/src/layout/grid/BlockWrapper.tsx +++ b/src/layout/grid/BlockWrapper.tsx @@ -40,7 +40,7 @@ export default defineComponent({ gridColumn: `span ${props.block.w}`, gridRow: `span ${props.block.h}`, transition: 'border .3s, transform .2s', - border: hover.value ? '2px solid rgba(255,255,255,.5)' : '2px solid rgba(255,255,255,0)' + // border: hover.value ? '2px solid rgba(255,255,255,.5)' : '2px solid rgba(255,255,255,0)' }} data-transportable={props.block.link && !props.block.link.startsWith('id:') ? '1' : ''} onDragover={(e) => { diff --git a/src/layout/grid/Feedback.tsx b/src/layout/grid/Feedback.tsx index c219b2e..15b561f 100644 --- a/src/layout/grid/Feedback.tsx +++ b/src/layout/grid/Feedback.tsx @@ -40,22 +40,24 @@ export default defineComponent(() => { get: () => data.images[2], set: (val) => (data.images[2] = val) }) + const list = [img1, img2, img3] return () => (
- * + * 问题描述
{ let his = await db.getItem('feedbacks') if (!his) his = [] - const ins = Modal.info({ + const ins = Modal.warn({ title: '历史反馈', width: '1024px', maskClosable: true, + okText: '关闭', content: () => ( { 历史反馈 -
+