fix
This commit is contained in:
@@ -40,7 +40,7 @@ const router = createRouter({
|
|||||||
component: () => import('../views/home/index.vue'),
|
component: () => import('../views/home/index.vue'),
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'test',
|
path: 'test/:id',
|
||||||
name: 'test',
|
name: 'test',
|
||||||
component: () => import('../views/home/test.vue'),
|
component: () => import('../views/home/test.vue'),
|
||||||
meta: { topNavStyle: '2' }
|
meta: { topNavStyle: '2' }
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<div class="history-list" v-show="!isCollapse && showHistory">
|
<div class="history-list" v-show="!isCollapse && showHistory">
|
||||||
<div v-for="item in historyList" :key="item.name" class="history-item">
|
<div v-for="item in historyList" :key="item.name" class="history-item">
|
||||||
<div v-if="item.title" class="title">{{ item.name }}</div>
|
<div v-if="item.title" class="title">{{ item.name }}</div>
|
||||||
<div v-else class="box">
|
<div v-else class="box" @click="onClickHistoryItem(item)">
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<el-popover placement="right" trigger="click">
|
<el-popover placement="right" trigger="click">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
@@ -62,9 +62,11 @@
|
|||||||
name: $t('Home.today')
|
name: $t('Home.today')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: 1,
|
||||||
name: 'Conversation Item 1'
|
name: 'Conversation Item 1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: 2,
|
||||||
name: 'Conversation Item 2'
|
name: 'Conversation Item 2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -72,6 +74,7 @@
|
|||||||
name: $t('Home.yesterday')
|
name: $t('Home.yesterday')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: 3,
|
||||||
name: 'Conversation Item 3'
|
name: 'Conversation Item 3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -79,9 +82,11 @@
|
|||||||
name: $t('Home.earlierChat')
|
name: $t('Home.earlierChat')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: 4,
|
||||||
name: 'Conversation Item 4'
|
name: 'Conversation Item 4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: 5,
|
||||||
name: 'Conversation Item 5'
|
name: 'Conversation Item 5'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
@@ -91,6 +96,10 @@
|
|||||||
const onHistory = () => {
|
const onHistory = () => {
|
||||||
showHistory.value = !showHistory.value
|
showHistory.value = !showHistory.value
|
||||||
}
|
}
|
||||||
|
const onClickHistoryItem = (item: any) => {
|
||||||
|
console.log(item)
|
||||||
|
router.push({ name: 'test', params: { id: item.id } })
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="test">
|
<div class="test">
|
||||||
<p>老八秘制小汉堡</p>
|
<p>老八秘制小汉堡 - {{ id }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
|
const id = computed(() => route.params.id)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 2.5rem;
|
padding: 2.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
.register > .left,
|
.register > .left,
|
||||||
.login > .left {
|
.login > .left {
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
.login > .left > .logo > span {
|
.login > .left > .logo > span {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 3.3rem;
|
font-size: 3.3rem;
|
||||||
|
font-family: SemiBold;
|
||||||
}
|
}
|
||||||
.register > .right,
|
.register > .right,
|
||||||
.login > .right {
|
.login > .right {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
font-size: 2.2rem;
|
font-size: 2.2rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
font-family: SemiBold;
|
||||||
&:active {
|
&:active {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 2.5rem;
|
padding: 2.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
>.left {
|
>.left {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
>span {
|
>span {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 3.3rem;
|
font-size: 3.3rem;
|
||||||
|
font-family: SemiBold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user