mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-20 09:49:06 +08:00
修复bug ,底部导航,装修优化
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
<template>
|
||||
<el-image :style="styles" v-bind="props">
|
||||
<template v-slot:error>
|
||||
<div class="text-tx-secondary flex items-center justify-center bg-white h-full">
|
||||
<icon name="el-icon-Picture" :size="30" />
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
<el-image :style="styles" v-bind="props"> </el-image>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
自定义链接
|
||||
<div class="ml-4 flex-1 min-w-[100px]">
|
||||
<el-input
|
||||
:model-value="modelValue.path"
|
||||
:model-value="modelValue.query?.url"
|
||||
placeholder="请输入链接地址"
|
||||
@input="handleInput"
|
||||
/>
|
||||
@@ -32,7 +32,10 @@ const emit = defineEmits<{
|
||||
|
||||
const handleInput = (value: string) => {
|
||||
emit('update:modelValue', {
|
||||
path: value,
|
||||
path: '/pages/webview/webview',
|
||||
query: {
|
||||
url: value
|
||||
},
|
||||
type: LinkTypeEnum.CUSTOM_LINK
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,16 +10,8 @@
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
<div class="flex-1 pl-4">
|
||||
<shop-pages
|
||||
v-model="activeLink"
|
||||
v-if="LinkTypeEnum.SHOP_PAGES == activeMenu"
|
||||
@update:model-value="updateLink"
|
||||
/>
|
||||
<custom-link
|
||||
v-model="activeLink"
|
||||
v-if="LinkTypeEnum.CUSTOM_LINK == activeMenu"
|
||||
@update:model-value="updateLink"
|
||||
/>
|
||||
<shop-pages v-model="activeLink" v-if="LinkTypeEnum.SHOP_PAGES == activeMenu" />
|
||||
<custom-link v-model="activeLink" v-if="LinkTypeEnum.CUSTOM_LINK == activeMenu" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -72,9 +64,10 @@ const handleSelect = (index: string) => {
|
||||
activeMenu.value = index
|
||||
}
|
||||
|
||||
const updateLink = (value: any) => {
|
||||
watch(activeLink, (value) => {
|
||||
if (!value.type) return
|
||||
emit('update:modelValue', value)
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<div class="link-picker flex-1" @click="!disabled && popupRef?.open()">
|
||||
<el-input
|
||||
:model-value="modelValue?.name ?? modelValue?.path"
|
||||
placeholder="请选择链接"
|
||||
readonly
|
||||
:disabled="disabled"
|
||||
>
|
||||
<el-input :model-value="getLink" placeholder="请选择链接" readonly :disabled="disabled">
|
||||
<template #suffix>
|
||||
<icon v-if="!modelValue?.path" name="el-icon-ArrowRight" />
|
||||
<icon
|
||||
@@ -43,6 +38,17 @@ const activeLink = ref<Link>({ path: '', type: LinkTypeEnum.SHOP_PAGES })
|
||||
const handleConfirm = () => {
|
||||
emit('update:modelValue', activeLink.value)
|
||||
}
|
||||
|
||||
const getLink = computed(() => {
|
||||
switch (props.modelValue?.type) {
|
||||
case LinkTypeEnum.SHOP_PAGES:
|
||||
return props.modelValue.name
|
||||
case LinkTypeEnum.CUSTOM_LINK:
|
||||
return props.modelValue.query?.url
|
||||
default:
|
||||
return props.modelValue?.name
|
||||
}
|
||||
})
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(value) => {
|
||||
|
||||
Reference in New Issue
Block a user