登录配置相关,调整登录逻辑,底部导航配置相关

This commit is contained in:
Jason
2022-09-13 19:07:36 +08:00
parent b47fc4219e
commit 3fe17fae5a
12 changed files with 173 additions and 100 deletions

View File

@@ -7,6 +7,5 @@ export interface Link {
path: string
name?: string
type: string
isTab: boolean
query?: Record<string, any>
}

View File

@@ -1,14 +1,18 @@
<template>
<div class="link-picker flex-1" @click="popupRef?.open()">
<div class="link-picker flex-1" @click="!disabled && popupRef?.open()">
<el-input
class="cursor-pointer"
:model-value="modelValue?.name ?? modelValue?.path"
placeholder="请选择链接"
readonly
:disabled="disabled"
>
<template #suffix>
<icon v-if="!modelValue?.path" name="el-icon-ArrowRight" />
<icon v-else name="el-icon-Close" @click.stop="emit('update:modelValue', {})" />
<icon
v-else
name="el-icon-Close"
@click.stop="!disabled && emit('update:modelValue', {})"
/>
</template>
</el-input>
<popup ref="popupRef" width="700px" title="链接选择" @confirm="handleConfirm">
@@ -24,6 +28,10 @@ import Popup from '@/components/popup/index.vue'
const props = defineProps({
modelValue: {
type: Object
},
disabled: {
type: Boolean,
default: false
}
})
const emit = defineEmits<{
@@ -47,3 +55,24 @@ watch(
}
)
</script>
<style scoped lang="scss">
.link-picker {
:deep(.el-input) {
&.is-disabled {
.el-input__inner {
cursor: not-allowed;
}
.el-input__suffix {
cursor: not-allowed;
}
}
.el-input__inner {
cursor: pointer;
}
.el-input__suffix {
cursor: pointer;
}
}
}
</style>

View File

@@ -35,20 +35,17 @@ const linkList = ref([
{
path: '/pages/index/index',
name: '商城首页',
type: LinkTypeEnum.SHOP_PAGES,
isTab: true
type: LinkTypeEnum.SHOP_PAGES
},
{
path: '/pages/news/news',
name: '文章资讯',
type: LinkTypeEnum.SHOP_PAGES,
isTab: true
type: LinkTypeEnum.SHOP_PAGES
},
{
path: '/pages/user/user',
name: '个人中心',
type: LinkTypeEnum.SHOP_PAGES,
isTab: true
type: LinkTypeEnum.SHOP_PAGES
},
{
path: '/pages/collection/collection',