增加自定义footer
This commit is contained in:
parent
2e0af5f147
commit
779712a5da
@ -241,6 +241,18 @@ function resetPanelConfig() {
|
|||||||
</NGrid>
|
</NGrid>
|
||||||
</NCard>
|
</NCard>
|
||||||
|
|
||||||
|
<NCard style="border-radius:10px" class="mt-[10px]" size="small">
|
||||||
|
<div class="text-slate-500 mb-[5px] font-bold">
|
||||||
|
自定义footer
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<NInput
|
||||||
|
v-model:value="panelState.panelConfig.footerHtml"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="基本的 Textarea"
|
||||||
|
/>
|
||||||
|
</NCard>
|
||||||
|
|
||||||
<NCard style="border-radius:10px" class="mt-[10px]" size="small">
|
<NCard style="border-radius:10px" class="mt-[10px]" size="small">
|
||||||
<NPopconfirm
|
<NPopconfirm
|
||||||
@positive-click="resetPanelConfig"
|
@positive-click="resetPanelConfig"
|
||||||
|
@ -3,6 +3,8 @@ import { PanelPanelConfigStyleEnum, PanelStateNetworkModeEnum } from '@/enums'
|
|||||||
import defaultBackground from '@/assets/defaultBackground.webp'
|
import defaultBackground from '@/assets/defaultBackground.webp'
|
||||||
const LOCAL_NAME = 'panelStorage'
|
const LOCAL_NAME = 'panelStorage'
|
||||||
|
|
||||||
|
const defaultFooterHtml = '<div class="flex justify-center text-slate-300">Powered By <a href="https://github.com/hslr-s/sun-panel" target="_blank" class="ml-[5px] text-slate-500">Sun-Panel</a></div>'
|
||||||
|
|
||||||
export function defaultStatePanelConfig(): Panel.panelConfig {
|
export function defaultStatePanelConfig(): Panel.panelConfig {
|
||||||
return {
|
return {
|
||||||
backgroundImageSrc: defaultBackground,
|
backgroundImageSrc: defaultBackground,
|
||||||
@ -22,6 +24,7 @@ export function defaultStatePanelConfig(): Panel.panelConfig {
|
|||||||
maxWidth: 1200,
|
maxWidth: 1200,
|
||||||
maxWidthUnit: 'px',
|
maxWidthUnit: 'px',
|
||||||
marginX: 5,
|
marginX: 5,
|
||||||
|
footerHtml: defaultFooterHtml,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
src/typings/panel.d.ts
vendored
1
src/typings/panel.d.ts
vendored
@ -55,6 +55,7 @@ declare namespace Panel {
|
|||||||
maxWidth?:number
|
maxWidth?:number
|
||||||
maxWidthUnit:string
|
maxWidthUnit:string
|
||||||
marginX?:number
|
marginX?:number
|
||||||
|
footerHtml?:string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface userConfig{
|
interface userConfig{
|
||||||
|
@ -478,6 +478,7 @@ function handleAddItem(itemIconGroupId?: number) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-5 footer" v-html="panelState.panelConfig.footerHtml" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user