bugfix and performance improvements

This commit is contained in:
2023-07-21 16:45:30 +08:00
parent 6cc3e9e348
commit 2be4e29f37
22 changed files with 611 additions and 551 deletions

View File

@ -1,5 +1,5 @@
<template>
<el-row type="flex" style="padding: 40px 20px">
<el-row style="padding: 40px 20px" type="flex">
<div class="img">
<el-image :src="data.image" alt />
</div>
@ -21,8 +21,9 @@
>
</div>
</div>
<div class="keywords" style="flex: 1">
<div class="keywords" style="/*flex: 1; */ width: 360px">
<wordcloud
:width="360"
:data="createdData(data.keyword?.split(',') ?? [])"
></wordcloud>
</div>
@ -32,7 +33,7 @@
<script setup>
import wordcloud from "./wordcloud.vue";
import { useRoute, useRouter } from "vue-router";
import { addViewHistory } from "@/utils/view_history";
const route = useRoute();
const router = useRouter();
const props = defineProps({
@ -41,6 +42,7 @@ const props = defineProps({
required: true,
},
});
function createdData(arr) {
let l = [];
let snap = JSON.parse(JSON.stringify(arr));
@ -50,6 +52,7 @@ function createdData(arr) {
});
return l;
}
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/enterprise/detail/${id}`,
@ -62,17 +65,22 @@ function handleDetail(id) {
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.img {
width: 90px;
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
:deep(.el-image) {
width: 90px;
height: 90px;
border-radius: 50%;
}
}
.content {
flex: 1;
}
</style>