mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-09 13:58:12 -05:00
🐛 Fix: fix some bugs of manage page
This commit is contained in:
parent
e56bd78096
commit
6f40c0912e
@ -1,4 +1,4 @@
|
|||||||
ea/*
|
/*
|
||||||
*UI布局和部分样式代码参考了https://github.com/willnewii/qiniuClient
|
*UI布局和部分样式代码参考了https://github.com/willnewii/qiniuClient
|
||||||
*感谢作者@willnewii
|
*感谢作者@willnewii
|
||||||
*/
|
*/
|
||||||
|
@ -317,22 +317,19 @@ const importedNewConfig: IStringKeyMap = {}
|
|||||||
|
|
||||||
function ruleMap (options: IStringKeyMap) {
|
function ruleMap (options: IStringKeyMap) {
|
||||||
const rule:any = {}
|
const rule:any = {}
|
||||||
for (const key in options) {
|
Object.keys(options).forEach((key) => {
|
||||||
const { options: itemOptions, configOptions } = options[key]
|
const item = options[key].options
|
||||||
|
item.forEach((option: string) => {
|
||||||
for (const option of itemOptions) {
|
const configOptions = options[key].configOptions[option]
|
||||||
const keyName = `${key}.${option}`
|
const keyName = `${key}.${option}`
|
||||||
const configOption = configOptions[option]
|
if (configOptions.rule) {
|
||||||
|
rule[keyName] = configOptions.rule
|
||||||
if (configOption.rule) {
|
|
||||||
rule[keyName] = configOption.rule
|
|
||||||
}
|
|
||||||
|
|
||||||
if (configOption.default) {
|
|
||||||
configResult[keyName] = configOption.default
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (configOptions.default) {
|
||||||
|
configResult[keyName] = configOptions.default
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
return rule
|
return rule
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,16 +480,19 @@ const handleConfigReset = (name: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleConfigRemove = (name: string) => {
|
const handleConfigRemove = (name: string) => {
|
||||||
|
const commonNoticeConfig = {
|
||||||
|
title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'),
|
||||||
|
duration: 2000,
|
||||||
|
customClass: 'notification',
|
||||||
|
offset: 100
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
removeConfig('picBed', name)
|
removeConfig('picBed', name)
|
||||||
ElNotification(
|
ElNotification(
|
||||||
{
|
{
|
||||||
title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'),
|
...commonNoticeConfig,
|
||||||
message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_C')}${name}`,
|
message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_C')}${name}`,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 2000,
|
|
||||||
customClass: 'notification',
|
|
||||||
offset: 100,
|
|
||||||
position: 'bottom-right'
|
position: 'bottom-right'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -501,12 +501,9 @@ const handleConfigRemove = (name: string) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElNotification(
|
ElNotification(
|
||||||
{
|
{
|
||||||
title: $T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_NAME'),
|
...commonNoticeConfig,
|
||||||
message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_D')}${name}${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_E')}`,
|
message: `${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_D')}${name}${$T('MANAGE_LOGIN_PAGE_PANE_CONFIG_CHANGE_NOTICE_MESSAGE_E')}`,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 2000,
|
|
||||||
customClass: 'notification',
|
|
||||||
offset: 100,
|
|
||||||
position: 'bottom-right'
|
position: 'bottom-right'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -501,13 +501,14 @@ function switchPicBed (picBedAlias:string) {
|
|||||||
allPicBedConfigure: JSON.stringify(allPicBedConfigure)
|
allPicBedConfigure: JSON.stringify(allPicBedConfigure)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
currentAlias.value = picBedAlias
|
currentAlias.value = picBedAlias
|
||||||
currentPicBedName.value = allPicBedConfigure[picBedAlias].picBedName
|
currentPicBedName.value = allPicBedConfigure[picBedAlias].picBedName
|
||||||
currentPagePicBedConfig = allPicBedConfigure[picBedAlias]
|
currentPagePicBedConfig = allPicBedConfigure[picBedAlias]
|
||||||
picBedSwitchDialogVisible.value = false
|
picBedSwitchDialogVisible.value = false
|
||||||
currentSelectedBucket.value = ''
|
currentSelectedBucket.value = ''
|
||||||
getBucketList()
|
getBucketList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changePicBed () {
|
function changePicBed () {
|
||||||
|
@ -1160,4 +1160,3 @@ export default {
|
|||||||
color #ddd
|
color #ddd
|
||||||
margin-bottom 10px
|
margin-bottom 10px
|
||||||
</style>
|
</style>
|
||||||
@/apis
|
|
||||||
|
@ -54,7 +54,7 @@ export default createRouter({
|
|||||||
{
|
{
|
||||||
path: 'manage-login-page',
|
path: 'manage-login-page',
|
||||||
name: config.MANAGE_LOGIN_PAGE,
|
name: config.MANAGE_LOGIN_PAGE,
|
||||||
component: () => import(/* webpackChunkName: "ManageLogeinPage" */ '@/manage/pages/logIn.vue')
|
component: () => import(/* webpackChunkName: "ManageLoginPage" */ '@/manage/pages/logIn.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'picbeds/:type/:configId?',
|
path: 'picbeds/:type/:configId?',
|
||||||
|
Loading…
Reference in New Issue
Block a user