Merge branch 'feature/footer' into dev
This commit is contained in:
commit
7ebe35856e
@ -241,6 +241,18 @@ function resetPanelConfig() {
|
||||
</NGrid>
|
||||
</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">
|
||||
<NPopconfirm
|
||||
@positive-click="resetPanelConfig"
|
||||
|
@ -3,6 +3,8 @@ import { PanelPanelConfigStyleEnum, PanelStateNetworkModeEnum } from '@/enums'
|
||||
import defaultBackground from '@/assets/defaultBackground.webp'
|
||||
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 {
|
||||
return {
|
||||
backgroundImageSrc: defaultBackground,
|
||||
@ -22,6 +24,7 @@ export function defaultStatePanelConfig(): Panel.panelConfig {
|
||||
maxWidth: 1200,
|
||||
maxWidthUnit: 'px',
|
||||
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
|
||||
maxWidthUnit:string
|
||||
marginX?:number
|
||||
footerHtml?:string
|
||||
}
|
||||
|
||||
interface userConfig{
|
||||
|
@ -485,6 +485,7 @@ function handleAddItem(itemIconGroupId?: number) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 footer" v-html="panelState.panelConfig.footerHtml" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user