mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-11 23:58:46 +08:00
fix:修改构建过程中设置页面ts报错
This commit is contained in:
1
frontend/components.d.ts
vendored
1
frontend/components.d.ts
vendored
@@ -8,7 +8,6 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AsideMenu: typeof import('./src/components/AsideMenu.vue')['default']
|
AsideMenu: typeof import('./src/components/AsideMenu.vue')['default']
|
||||||
copy: typeof import('./src/components/Home/FolderSelect copy.vue')['default']
|
|
||||||
DoubanMovie: typeof import('./src/components/Home/DoubanMovie.vue')['default']
|
DoubanMovie: typeof import('./src/components/Home/DoubanMovie.vue')['default']
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="settings">
|
<div v-if="settingStore.globalSetting" class="settings">
|
||||||
<el-card v-if="settingStore.globalSetting" class="setting-card">
|
<el-card class="setting-card">
|
||||||
<h2>网络配置</h2>
|
<h2>网络配置</h2>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="proxyDomain">代理域名:</label>
|
<label for="proxyDomain">代理域名:</label>
|
||||||
<el-input
|
<el-input
|
||||||
id="proxyDomain"
|
id="proxyDomain"
|
||||||
v-model="settingStore.globalSetting.httpProxyHost"
|
v-model="globalSetting.httpProxyHost"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="127.0.0.1"
|
placeholder="127.0.0.1"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<label for="proxyPort">代理端口:</label>
|
<label for="proxyPort">代理端口:</label>
|
||||||
<el-input
|
<el-input
|
||||||
id="proxyPort"
|
id="proxyPort"
|
||||||
v-model="settingStore.globalSetting.httpProxyPort"
|
v-model="globalSetting.httpProxyPort"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="7890"
|
placeholder="7890"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<label for="AdminUserCode">管理员注册码:</label>
|
<label for="AdminUserCode">管理员注册码:</label>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
id="AdminUserCode"
|
id="AdminUserCode"
|
||||||
v-model="settingStore.globalSetting.AdminUserCode"
|
v-model="globalSetting.AdminUserCode"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
type="text"
|
type="text"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<label for="CommonUserCode">普通用户注册码:</label>
|
<label for="CommonUserCode">普通用户注册码:</label>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
id="CommonUserCode"
|
id="CommonUserCode"
|
||||||
v-model="settingStore.globalSetting.CommonUserCode"
|
v-model="globalSetting.CommonUserCode"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
type="text"
|
type="text"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="isProxyEnabled">启用代理:</label>
|
<label for="isProxyEnabled">启用代理:</label>
|
||||||
<el-switch v-model="settingStore.globalSetting.isProxyEnabled" @change="saveSettings" />
|
<el-switch v-model="globalSetting.isProxyEnabled" @change="saveSettings" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -99,7 +99,20 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useUserSettingStore } from "@/stores/userSetting";
|
import { useUserSettingStore } from "@/stores/userSetting";
|
||||||
|
import { computed } from "vue";
|
||||||
const settingStore = useUserSettingStore();
|
const settingStore = useUserSettingStore();
|
||||||
|
|
||||||
|
const globalSetting = computed(
|
||||||
|
() =>
|
||||||
|
settingStore.globalSetting || {
|
||||||
|
httpProxyHost: "127.0.1",
|
||||||
|
httpProxyPort: "7890",
|
||||||
|
isProxyEnabled: false,
|
||||||
|
AdminUserCode: 230713,
|
||||||
|
CommonUserCode: 9527,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
settingStore.getSettings();
|
settingStore.getSettings();
|
||||||
|
|
||||||
const saveSettings = () => {
|
const saveSettings = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user