fix
This commit is contained in:
parent
9415fb7c14
commit
37c391713f
|
@ -75,10 +75,10 @@ const Item = defineComponent({
|
||||||
return () => (
|
return () => (
|
||||||
<div
|
<div
|
||||||
class={clsx(
|
class={clsx(
|
||||||
'px-4 py-2 text-sm tracking-widest w-full overflow-hidden text-ellipsis whitespace-nowrap break-all transition-all rounded-lg cursor-pointer mb-2',
|
' py-1 text-sm tracking-widest w-full overflow-hidden flex justify-center text-ellipsis whitespace-nowrap break-all transition-all rounded cursor-pointer mb-1',
|
||||||
{
|
{
|
||||||
'bg-red-500/80 hover:bg-red-500 text-white': props.alert,
|
' hover:bg-black/20 text-black/80': props.alert,
|
||||||
'bg-white/80 hover:bg-white text-black/80': !props.alert && !props.noStyle,
|
' hover:bg-black/20 text-black/80': !props.alert && !props.noStyle,
|
||||||
'bg-transparent text-black/60 hover:text-black/80 hover:bg-white/20': props.noStyle
|
'bg-transparent text-black/60 hover:text-black/80 hover:bg-white/20': props.noStyle
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
@ -114,7 +114,7 @@ export default defineComponent(() => {
|
||||||
v-outside-click={() => {
|
v-outside-click={() => {
|
||||||
menu.dismiss()
|
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={{
|
style={{
|
||||||
zIndex: '999',
|
zIndex: '999',
|
||||||
left: menu.display.x + 'px',
|
left: menu.display.x + 'px',
|
||||||
|
@ -223,11 +223,11 @@ export default defineComponent(() => {
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Item>
|
</Item>
|
||||||
|
{layout.state.content[layout.state.current].pages.length > 1 && (
|
||||||
<Item
|
<Item
|
||||||
alert
|
alert
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// 删除链接
|
// 删除链接
|
||||||
console.log(menu.selectPage)
|
|
||||||
|
|
||||||
const idx = layout.state.content[layout.state.current].pages.findIndex(
|
const idx = layout.state.content[layout.state.current].pages.findIndex(
|
||||||
(el) => el.id === menu.selectPage?.id
|
(el) => el.id === menu.selectPage?.id
|
||||||
|
@ -235,14 +235,19 @@ export default defineComponent(() => {
|
||||||
menu.dismiss()
|
menu.dismiss()
|
||||||
|
|
||||||
if (idx < 0) return
|
if (idx < 0) return
|
||||||
if (idx === layout.state.currentPage) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
layout.state.content[layout.state.current].pages.splice(idx, 1)
|
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
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</Item>
|
</Item>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default defineComponent({
|
||||||
gridColumn: `span ${props.block.w}`,
|
gridColumn: `span ${props.block.w}`,
|
||||||
gridRow: `span ${props.block.h}`,
|
gridRow: `span ${props.block.h}`,
|
||||||
transition: 'border .3s, transform .2s',
|
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' : ''}
|
data-transportable={props.block.link && !props.block.link.startsWith('id:') ? '1' : ''}
|
||||||
onDragover={(e) => {
|
onDragover={(e) => {
|
||||||
|
|
|
@ -40,22 +40,24 @@ export default defineComponent(() => {
|
||||||
get: () => data.images[2],
|
get: () => data.images[2],
|
||||||
set: (val) => (data.images[2] = val)
|
set: (val) => (data.images[2] = val)
|
||||||
})
|
})
|
||||||
|
const list = [img1, img2, img3]
|
||||||
return () => (
|
return () => (
|
||||||
<div class={'p-4 ' + (isGame.value ? 'text-white' : 'text-black/60')}>
|
<div class={'p-4 ' + (isGame.value ? 'text-white' : 'text-black/60')}>
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-red-500">*</span>
|
<span class="text-red-500 ">*</span>
|
||||||
问题描述
|
问题描述
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="cursor-pointer"
|
class="cursor-pointer text-[14px]"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
let his = await db.getItem<Feedback[]>('feedbacks')
|
let his = await db.getItem<Feedback[]>('feedbacks')
|
||||||
if (!his) his = []
|
if (!his) his = []
|
||||||
const ins = Modal.info({
|
const ins = Modal.warn({
|
||||||
title: '历史反馈',
|
title: '历史反馈',
|
||||||
width: '1024px',
|
width: '1024px',
|
||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
|
okText: '关闭',
|
||||||
content: () => (
|
content: () => (
|
||||||
<Table
|
<Table
|
||||||
class="max-h-[50vh] overflow-y-auto"
|
class="max-h-[50vh] overflow-y-auto"
|
||||||
|
@ -111,19 +113,35 @@ export default defineComponent(() => {
|
||||||
历史反馈
|
历史反馈
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class={'mt-2 ' + (isGame.value ? 'bg-white/10 text-white' : 'bg-black/5 text-black/60')}>
|
<div
|
||||||
|
class={
|
||||||
|
'mt-2 relative appearance-none rounded-lg h-[124px] bg-white/10 ' + (isGame.value ? 'bg-white/10 text-white' : 'bg-black/5 text-black/60')
|
||||||
|
}
|
||||||
|
>
|
||||||
<textarea
|
<textarea
|
||||||
|
placeholder='在此输入您的问题,并可以添加图片,方便更清晰的描述问题,我们会尽快帮您解决,感谢您的反馈'
|
||||||
|
maxlength={80}
|
||||||
v-model={data.description}
|
v-model={data.description}
|
||||||
class="bg-transparent no-textarea w-full p-2"
|
class="bg-transparent no-textarea w-full p-2 appearance-none resize-none placeholder:text-[14px] "
|
||||||
style={{
|
style={{
|
||||||
color: isGame.value ? 'white' : 'black'
|
color: isGame.value ? 'white' : 'black'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div class="p-2 flex gap-2">
|
<div class="p-2 flex gap-2">
|
||||||
<ImageUploader width={42} v-model:value={img1.value} />
|
{list
|
||||||
<ImageUploader width={42} v-model:value={img2.value} />
|
.filter(
|
||||||
<ImageUploader width={42} v-model:value={img3.value} />
|
(_, idx) =>
|
||||||
|
idx <=
|
||||||
|
list.reduce((acc, cur) => {
|
||||||
|
if (cur.value) acc++
|
||||||
|
return acc
|
||||||
|
}, 0)
|
||||||
|
)
|
||||||
|
.map((item) => (
|
||||||
|
<ImageUploader width={38} v-model:value={item.value} />
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<span class={"absolute right-2 bottom-2"}>{data.description.length}/80</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">联系方式</div>
|
<div class="mt-4">联系方式</div>
|
||||||
<div class="text-sm">留下您的联系方式,以便必要时我们可以联系到您</div>
|
<div class="text-sm">留下您的联系方式,以便必要时我们可以联系到您</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default function useSortable(list: Ref<any[]>, type: Ref<string>) {
|
||||||
filter: '.operation-button'
|
filter: '.operation-button'
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
ghostClass: 'opacity-20',
|
ghostClass: 'opacity-0',
|
||||||
onStart: (e: any) => {
|
onStart: (e: any) => {
|
||||||
dragging.type = type.value
|
dragging.type = type.value
|
||||||
dragging.id = e.item.id || ''
|
dragging.id = e.item.id || ''
|
||||||
|
|
|
@ -3,6 +3,7 @@ import useTimeStore from '@/utils/useTimeStore'
|
||||||
import { Lunar } from 'lunar-typescript'
|
import { Lunar } from 'lunar-typescript'
|
||||||
import { computed, defineComponent, Transition } from 'vue'
|
import { computed, defineComponent, Transition } from 'vue'
|
||||||
import useLayoutStore from '../useLayoutStore'
|
import useLayoutStore from '../useLayoutStore'
|
||||||
|
import clsx from 'clsx'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
setup() {
|
setup() {
|
||||||
|
@ -39,7 +40,10 @@ export default defineComponent({
|
||||||
const layout = useLayoutStore()
|
const layout = useLayoutStore()
|
||||||
return () => (
|
return () => (
|
||||||
<div
|
<div
|
||||||
class="absolute z-20 shadow-text tracking-widest font-normal h-[110px] transition-all "
|
class={clsx(
|
||||||
|
'absolute z-20 shadow-text tracking-widest font-normal transition-all ',
|
||||||
|
layout.isCompact ? 'text-[13px] flex z-20 items-center pointer-events-none gap-x-2' : 'h-[110px]'
|
||||||
|
)}
|
||||||
style={{
|
style={{
|
||||||
color: 'white',
|
color: 'white',
|
||||||
transitionDuration: '.4s',
|
transitionDuration: '.4s',
|
||||||
|
@ -49,36 +53,39 @@ export default defineComponent({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Transition>
|
<Transition>
|
||||||
|
{layout.state.simple
|
||||||
{
|
? settings.state.simpleModeShowString.includes('showTime') && (
|
||||||
layout.state.simple ?
|
|
||||||
settings.state.simpleModeShowString.includes('showTime') &&
|
|
||||||
<div
|
<div
|
||||||
class={
|
class={
|
||||||
'transition-all ' +
|
'transition-all ' +
|
||||||
(layout.isCompact ? 'text-[1.4rem] leading-[1.4rem]' : 'text-[8vh] leading-[4rem]')
|
(layout.isCompact
|
||||||
|
? 'text-[1.2rem] leading-[1.4rem]'
|
||||||
|
: 'text-[8vh] leading-[4rem]')
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{text.value.timeStr}
|
{text.value.timeStr}
|
||||||
</div>
|
</div>
|
||||||
:
|
)
|
||||||
settings.state!.showTime &&
|
: settings.state!.showTime && (
|
||||||
<div
|
<div
|
||||||
class={
|
class={
|
||||||
'transition-all ' +
|
'transition-all ' +
|
||||||
(layout.isCompact ? 'text-[1.4rem] leading-[1.4rem]' : 'text-[8vh] leading-[4rem]')
|
(layout.isCompact
|
||||||
|
? 'text-[1.2rem] leading-[1.4rem]'
|
||||||
|
: 'text-[8vh] leading-[4rem]')
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{text.value.timeStr}
|
{text.value.timeStr}
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
</Transition>
|
</Transition>
|
||||||
<Transition>
|
<Transition>
|
||||||
{
|
{layout.state.simple
|
||||||
layout.state.simple ?
|
? settings.state.simpleModeShowString.includes('showDate') && (
|
||||||
settings.state.simpleModeShowString.includes('showDate') &&
|
|
||||||
<div
|
<div
|
||||||
class={'flex items-center gap-4 mt-4 ' + (layout.isCompact ? '' : 'justify-center')}
|
class={
|
||||||
|
'flex items-center gap-4 ' + (layout.isCompact ? 'text-[1.2rem]' : 'justify-center mt-4')
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{settings.state.timeOptions.includes('date') && <div>{text.value.dateStr}</div>}
|
{settings.state.timeOptions.includes('date') && <div>{text.value.dateStr}</div>}
|
||||||
<Transition>
|
<Transition>
|
||||||
|
@ -92,10 +99,12 @@ export default defineComponent({
|
||||||
)}
|
)}
|
||||||
</Transition>
|
</Transition>
|
||||||
</div>
|
</div>
|
||||||
:
|
)
|
||||||
settings.state!.showTime &&
|
: settings.state!.showTime && (
|
||||||
<div
|
<div
|
||||||
class={'flex items-center gap-4 mt-4 ' + (layout.isCompact ? '' : 'justify-center')}
|
class={
|
||||||
|
'flex items-center gap-4 ' + (layout.isCompact ? ' text-[1.2rem]' : 'mt-4 justify-center')
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{settings.state.timeOptions.includes('date') && <div>{text.value.dateStr}</div>}
|
{settings.state.timeOptions.includes('date') && <div>{text.value.dateStr}</div>}
|
||||||
<Transition>
|
<Transition>
|
||||||
|
@ -109,8 +118,7 @@ export default defineComponent({
|
||||||
)}
|
)}
|
||||||
</Transition>
|
</Transition>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
|
|
||||||
</Transition>
|
</Transition>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,13 +17,13 @@ export default defineComponent(
|
||||||
return () => (
|
return () => (
|
||||||
<div
|
<div
|
||||||
class={clsx(
|
class={clsx(
|
||||||
!props?.isMini ? 'absolute left-1/2 -translate-x-1/2 z-20 transition-all' : 'w-full'
|
!props?.isMini ? 'absolute left-1/2 -translate-x-1/2 z-20 duration-300 transition-all' : 'w-full'
|
||||||
)}
|
)}
|
||||||
style={
|
style={
|
||||||
props.isMini
|
props.isMini
|
||||||
? {}
|
? {}
|
||||||
: {
|
: {
|
||||||
top: layout.isCompact ? '40px' : layout.state.simple ? '230px' : '172px',
|
top: layout.isCompact ? '50px' : layout.state.simple ? '230px' : '172px',
|
||||||
width: settings.state.searchWidth + 'rem'
|
width: settings.state.searchWidth + 'rem'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default defineComponent(() => {
|
||||||
<Transition>
|
<Transition>
|
||||||
{layout.ready && (
|
{layout.ready && (
|
||||||
<div
|
<div
|
||||||
onContextmenu={(e)=> {
|
onContextmenu={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}}
|
}}
|
||||||
|
@ -174,6 +174,7 @@ export default defineComponent(() => {
|
||||||
label="添加"
|
label="添加"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
menu.showEditPage = true
|
menu.showEditPage = true
|
||||||
|
menu.selectPage = undefined
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Item
|
<Item
|
||||||
|
|
Loading…
Reference in New Issue