@@ -47,16 +58,28 @@ export default defineComponent(() => {
dragging.value ? 'border-[#3f80ff] bg-[#6b9dff1a]' : 'border-transparent bg-[#ebebeb]'
)}
- style={
- tempBackground.value
- ? {
- backgroundImage: `url(${tempBackground.value})`,
- backgroundSize: 'cover',
- backgroundRepeat: 'no-repeat'
- }
- : {}
- }
+ // style={
+ // tempBackground.value
+ // ? {
+ // backgroundImage: `url(${tempBackground.value})`,
+ // backgroundSize: 'cover',
+ // backgroundRepeat: 'no-repeat'
+ // }
+ // : backgroundStore.state.isCustom
+ // ? {
+ // backgroundImage: `url(${backgroundStore.tag})`,
+ // backgroundSize: 'cover',
+ // backgroundRepeat: 'no-repeat'
+ // }
+ // : null
+ // }
>
+
+
+
{
if (tempFile.value) {
uploadLocal(tempFile.value).then((res) => {
useLayoutStore().changeBackground(res)
-
+ backgroundStore.state.isCustom = true
tempFile.value = null
tempBackground.value = ''
message.success('应用成功')
diff --git a/src/layout/background/index.tsx b/src/layout/background/index.tsx
index 0f0d7ac..1766224 100644
--- a/src/layout/background/index.tsx
+++ b/src/layout/background/index.tsx
@@ -2,7 +2,7 @@ import { defineComponent, nextTick, reactive, ref, Transition, watch } from 'vue
import useLayoutStore from '../useLayoutStore'
import useSettingsStore from '@/settings/useSettingsStore'
-const BgContent = defineComponent({
+export const BgContent = defineComponent({
props: {
image: {
type: String,
diff --git a/src/layout/background/useBackgroundStore.ts b/src/layout/background/useBackgroundStore.ts
index 760a97c..1a4743b 100644
--- a/src/layout/background/useBackgroundStore.ts
+++ b/src/layout/background/useBackgroundStore.ts
@@ -3,6 +3,9 @@ import { reactive, ref, watch } from 'vue'
export default defineStore('background', () => {
const tag = ref(localStorage.getItem('backgroundTag') || '')
+ const state = reactive({
+ isCustom: false,
+ })
const resource = reactive({
type: 'image',
brief: '',
@@ -29,6 +32,9 @@ export default defineStore('background', () => {
)
return {
tag,
- resource
+ resource,
+ state
}
+}, {
+ persist: true
})
diff --git a/src/layout/grid/Feedback.tsx b/src/layout/grid/Feedback.tsx
index 29f6ad9..3c6dab6 100644
--- a/src/layout/grid/Feedback.tsx
+++ b/src/layout/grid/Feedback.tsx
@@ -81,7 +81,9 @@ export default defineComponent(() => {
{
title: '问题描述',
customRender: ({ record }) => (
-
{record.description}
+
+ {record.description}
+
)
},
{
@@ -169,9 +171,11 @@ export default defineComponent(() => {
{
)}
>
- 轻闲
+ 轻娱