add apiurl

This commit is contained in:
wintsa 2024-03-18 15:06:01 +08:00
parent 258d5de815
commit 97d0f4084a
7 changed files with 7633 additions and 20 deletions

8
.env
View File

@ -1,10 +1,14 @@
# Glob API URL # Glob API URL
VITE_GLOB_API_URL=/api VITE_GLOB_API_URL=/api
VITE_APP_API_BASE_URL=http://127.0.0.1:3002/ # VITE_APP_API_BASE_URL=http://127.0.0.1:3002/
VITE_APP_API_BASE_URL=http://sunpaneldemo.enianteam.com
# Whether long replies are supported, which may result in higher API fees # Whether long replies are supported, which may result in higher API fees
VITE_GLOB_OPEN_LONG_REPLY=false VITE_GLOB_OPEN_LONG_REPLY=false
# When you want to use PWA # When you want to use PWA
VITE_GLOB_APP_PWA=false VITE_GLOB_APP_PWA=false
VITE_APP_VERSION=20240318

View File

@ -249,7 +249,9 @@ function resetPanelConfig() {
<span class="mr-[10px]">{{ $t('apps.baseSettings.maxWidth') }}</span> <span class="mr-[10px]">{{ $t('apps.baseSettings.maxWidth') }}</span>
<div class="flex"> <div class="flex">
<NInputGroup> <NInputGroup>
<NInput v-model:value="panelState.panelConfig.maxWidth" size="small" type="number" :maxlength="10" :style="{ width: '100px' }" placeholder="1200" /> <!-- <NInput v-model:value="panelState.panelConfig.maxWidth" size="small" type="number" :maxlength="10" :style="{ width: '100px' }" placeholder="1200" /> -->
<n-input-number v-model:value="panelState.panelConfig.maxWidth" clearable :maxlength="10" :style="{ width: '100px' }" placeholder="1200" size="small"/>
<NSelect v-model:value="panelState.panelConfig.maxWidthUnit" :style="{ width: '80px' }" :options="maxWidthUnitOption" size="small" /> <NSelect v-model:value="panelState.panelConfig.maxWidthUnit" :style="{ width: '80px' }" :options="maxWidthUnitOption" size="small" />
</NInputGroup> </NInputGroup>
</div> </div>

View File

@ -20,33 +20,23 @@ const propClass = ref(props.class)
<template> <template>
<div class="item-card w-full"> <div class="item-card w-full">
<!-- 详情图标 --> <!-- 详情图标 -->
<div <div v-if="cardTypeStyle === PanelPanelConfigStyleEnum.info"
v-if="cardTypeStyle === PanelPanelConfigStyleEnum.info" class="item-card-info w-full rounded-2xl transition-all duration-200 flex" :class="propClass"
class="item-card-info w-full rounded-2xl transition-all duration-200 flex" :style="{ backgroundColor: backgroundColor ?? defaultBackground }">
:class="propClass"
:style="{ backgroundColor: backgroundColor ?? defaultBackground }"
>
<slot name="info" /> <slot name="info" />
</div> </div>
<!-- 极简图标APP --> <!-- 极简图标APP -->
<div <div v-if="cardTypeStyle === PanelPanelConfigStyleEnum.icon" class="item-card-small">
v-if="cardTypeStyle === PanelPanelConfigStyleEnum.icon"
class="item-card-small"
>
<div <div
class="item-card-small-icon overflow-hidden rounded-2xl sunpanel w-[70px] h-[70px] mx-auto transition-all duration-200" class="item-card-small-icon overflow-hidden rounded-2xl sunpanel w-[70px] h-[70px] mx-auto transition-all duration-200"
:class="propClass" :class="propClass" :style="{ backgroundColor: backgroundColor ?? defaultBackground }">
:style="{ backgroundColor: backgroundColor ?? defaultBackground }"
>
<slot name="small" /> <slot name="small" />
</div> </div>
<div <div v-if="!iconTextIconHideTitle"
v-if="!iconTextIconHideTitle"
class="item-card-small-title text-center app-icon-text-shadow cursor-pointer mt-[2px]" class="item-card-small-title text-center app-icon-text-shadow cursor-pointer mt-[2px]"
:style="{ color: iconTextColor }" :style="{ color: iconTextColor }">
>
{{ iconText }} {{ iconText }}
</div> </div>
</div> </div>

View File

@ -36,6 +36,7 @@ onMounted(() => {
}) })
onUnmounted(() => { onUnmounted(() => {
//@ts-ignore
clearInterval(timer) clearInterval(timer)
}) })
</script> </script>

View File

@ -46,6 +46,8 @@ onMounted(() => {
}) })
onUnmounted(() => { onUnmounted(() => {
//@ts-ignore
clearInterval(timer) clearInterval(timer)
}) })
</script> </script>

View File

@ -41,6 +41,8 @@ onMounted(() => {
}) })
onUnmounted(() => { onUnmounted(() => {
//@ts-ignore
clearInterval(timer) clearInterval(timer)
}) })
</script> </script>

7612
yarn.lock Normal file

File diff suppressed because it is too large Load Diff