Commit 749753c7 by haojie

1

parent d56c5013
No preview for this file type
......@@ -72,5 +72,12 @@ export default <RouterConfig>{
},
],
},
// 价值币筛选
{
path: '/CoinFilter',
name: 'CoinFilter',
component: () => import('@/views/Private/CoinFilter/index.vue'),
meta: { hasSearch: false, hasRollToken: false, footer: false },
},
],
};
......@@ -22,36 +22,26 @@
</template>
<script lang="ts" setup>
const props = defineProps({
background: {
type: String,
default: 'rgba(230,230,230,0.2)',
},
position: {
type: String,
default: 'absolute',
},
width: {
type: String,
default: '100%',
},
left: {
type: String,
default: '0px',
},
height: {
type: String,
default: '100%',
},
top: {
type: String,
default: '0px',
},
isTable: {
type: Boolean,
default: false,
},
});
const props = withDefaults(
defineProps<{
background?: string;
position?: string;
width?: string;
height?: string;
left?: string;
top?: string;
isTable?: boolean;
}>(),
{
background: 'rgba(230,230,230,0.2)',
position: 'absolute',
width: '100%',
height: '100%',
left: '0px',
top: '0px',
isTable: false,
}
);
</script>
<style lang="less" scoped>
......
......@@ -5,14 +5,14 @@
:bordered="true"
v-model="locale"
:options="languageOptions"
:onChange="changeLanguage"
@Change="changeLanguage"
:borderless="true"
></t-select>
</div>
</template>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
import { useI18n } from '#imports';
const props = defineProps({
type: {
type: String,
......
......@@ -24,3 +24,8 @@ export const CollectionDelete = () => {
export const useWatchEcharts = () => {
return useState('WatchEchartsInit', () => 1);
};
// loading
export const useTableLoading = () => {
return useState('TableLoading', () => false);
};
......@@ -1171,7 +1171,10 @@ export const goplusList = [
// swap图标大全
export const SwapList: any = {
ARBITRUM: [
{ img: '/images/svg/table/swap/ARBITRUM/3xcalibur.png', name: '3xcalibur' },
{
img: '/images/svg/table/swap/ARBITRUM/3xcalibur.png',
name: '3xcalibur',
},
{ img: '/images/svg/table/swap/ARBITRUM/balancer.png', name: 'balancer' },
{ img: '/images/svg/table/swap/ARBITRUM/camelot.png', name: 'camelot' },
{ img: '/images/svg/table/swap/ARBITRUM/kyberswap.png', name: 'kyberswap' },
......@@ -1181,14 +1184,25 @@ export const SwapList: any = {
name: 'solidlizard',
},
{
img: '/images/svg/table/swap/ARBITRUM/sushiswap (1).png',
name: 'sushiswap (1)',
img: '/images/svg/table/swap/ARBITRUM/sushiswap.png',
name: 'sushiswap',
},
{ img: '/images/svg/table/swap/ARBITRUM/sushiswap.png', name: 'sushiswap' },
{ img: '/images/svg/table/swap/ARBITRUM/swapfish.png', name: 'swapfish' },
{ img: '/images/svg/table/swap/ARBITRUM/swapr.png', name: 'swapr' },
{ img: '/images/svg/table/swap/ARBITRUM/traderjoe.png', name: 'traderjoe' },
{ img: '/images/svg/table/swap/ARBITRUM/uniswap.png', name: 'uniswap' },
{
img: '/images/svg/table/swap/ARBITRUM/uniswap.png',
name: 'uniswapV2',
url: 'https://app.uniswap.org/#/swap?outputCurrency=',
needToken: true,
},
{
img: '/images/svg/table/swap/ARBITRUM/uniswap.png',
name: 'uniswapV3',
url: 'https://app.uniswap.org/#/swap?outputCurrency=',
needToken: true,
},
{ img: '/images/svg/table/swap/ARBITRUM/zyberswap.png', name: 'zyberswap' },
],
'Arbitrum Nova': [
......@@ -1490,8 +1504,12 @@ export const SwapList: any = {
},
{ img: '/images/svg/table/swap/OPTIMISM/kyberswap.png', name: 'kyberswap' },
{
img: '/images/svg/table/swap/OPTIMISM/uniswap (1).png',
name: 'uniswap (1)',
img: '/images/svg/table/swap/OPTIMISM/uniswap.png',
name: 'uniswapV2',
},
{
img: '/images/svg/table/swap/OPTIMISM/uniswap.png',
name: 'uniswapV3',
},
{ img: '/images/svg/table/swap/OPTIMISM/velodrome.png', name: 'velodrome' },
{ img: '/images/svg/table/swap/OPTIMISM/zipswap.png', name: 'zipswap' },
......@@ -1535,8 +1553,12 @@ export const SwapList: any = {
{ img: '/images/svg/table/swap/POLYGON/sushiswap.png', name: 'sushiswap' },
{ img: '/images/svg/table/swap/POLYGON/tetuswap.png', name: 'tetuswap' },
{
img: '/images/svg/table/swap/POLYGON/uniswap (1).png',
name: 'uniswap (1)',
img: '/images/svg/table/swap/POLYGON/uniswap.png',
name: 'uniswapV2',
},
{
img: '/images/svg/table/swap/POLYGON/uniswap.png',
name: 'uniswapV3',
},
{ img: '/images/svg/table/swap/POLYGON/vulcandex.png', name: 'vulcandex' },
{ img: '/images/svg/table/swap/POLYGON/wault.png', name: 'wault' },
......
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { TableSort } from '@/utils/tool';
import { useI18n } from '#imports';
export default function () {
const { t } = useI18n();
const otherLink = ref([
......
import { ref } from 'vue';
import { getSwap } from '@/constants/UnifiedManagementChain';
export default function () {
const ChainObj = ref();
// 获取当前行的swap
const getCurSwap = (swap: string) => {
if (ChainObj.value.fullName && swap) {
let obj = getSwap(ChainObj.value.fullName, swap);
if (obj) {
return obj.img;
}
return '';
}
};
// 获取当前链图标
const getCurChainImg = () => {
// 链图标
if (ChainObj.value.newImg) {
return ChainObj.value.newImg;
} else {
return ChainObj.value.img;
}
};
return {
ChainObj,
getCurSwap,
getCurChainImg,
};
}
import cn from '../language/cn';
import en from '../language/en';
const i18n = {
locales: ['cn', 'en'], //有多少地区的语言就添加多少种
defaultLocale: 'en', //默认的地区语言
vueI18n: {
fallbackLocale: 'en', //回退策略,指定的locale中没有找到对应资源的情况下使用的locale
messages: {
//要渲染的信息,有多少语言就添加多少种
cn: cn,
en: en,
},
},
};
export default i18n;
import viteCompression from 'vite-plugin-compression';
import i18n from './language/i18n';
// 筛选接口地址
let filterApi = 'http://156.247.9.93:9501/';
let loginApi = 'http://156.247.9.93:8001/';
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
// plugins: [],
modules: ['nuxt-svgo', '@nuxtjs-alt/proxy'],
modules: ['nuxt-svgo', '@nuxtjs-alt/proxy', '@nuxtjs/i18n'],
i18n: {
// ...
...i18n,
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
redirectOn: 'root', // recommended
},
},
proxy: {
enableProxy: true,
proxies: {
......@@ -71,7 +80,7 @@ export default defineNuxtConfig({
// 第三方插件转es5
transpile:
process.env.NODE_ENV === 'production'
? ['tdesign-vue-next', 'echarts', 'vue-i18n']
? ['tdesign-vue-next', 'echarts']
: ['echarts'],
// cssSourceMap: true,
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,6 +10,7 @@
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/types": "^2.16.0",
"axios": "^0.24.0",
"cross-env": "^7.0.3",
"fontmin": "^0.9.9",
......@@ -21,6 +22,7 @@
"dependencies": {
"@metamask/detect-provider": "^2.0.0",
"@nuxtjs-alt/proxy": "^2.0.4",
"@nuxtjs/i18n": "^7.3.1",
"echarts": "^5.4.0",
"ethers": "^5.7.2",
"install": "^0.13.0",
......@@ -29,7 +31,6 @@
"qrcode": "^1.5.1",
"tdesign-icons-vue-next": "^0.1.7",
"tdesign-vue-next": "^0.25.0",
"vue-clipboard3": "^1.0.1",
"vue-i18n": "^9.2.2"
"vue-clipboard3": "^1.0.1"
}
}
import { defineNuxtPlugin } from '#app';
import i18n from '@/language/index';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(i18n);
});
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.53252 16.6467C5.25329 16.6467 4.97406 16.5596 4.73728 16.3854C4.31732 16.0793 4.11181 15.5723 4.20116 15.0607L4.83333 11.3771C4.8378 11.3526 4.82663 11.3347 4.81769 11.3258L2.13711 8.7122C1.7663 8.35032 1.6345 7.81868 1.7931 7.32724C1.95394 6.83356 2.37166 6.48062 2.88544 6.40467L6.58688 5.86632C6.60475 5.86408 6.62262 5.85068 6.63155 5.83281L8.28681 2.48208C8.51466 2.01745 8.9793 1.72705 9.49754 1.72705H9.49978C10.018 1.72705 10.4827 2.01521 10.7127 2.48208L12.368 5.83504C12.3769 5.85291 12.3926 5.86408 12.4127 5.86632L16.1141 6.40467C16.6279 6.48062 17.0479 6.83356 17.2065 7.32724C17.3651 7.82091 17.2333 8.35256 16.8624 8.71444L14.1886 11.3235C14.1729 11.3392 14.1662 11.3593 14.1707 11.3816L14.8029 15.0652C14.89 15.579 14.6822 16.086 14.2623 16.3898C13.8423 16.6936 13.2973 16.7338 12.8393 16.4904L9.53105 14.7502C9.51541 14.7413 9.49308 14.7413 9.47521 14.7502L6.16245 16.4904C5.96364 16.5953 5.74696 16.6467 5.53252 16.6467ZM9.49978 3.02267C9.46627 3.02267 9.45734 3.04054 9.45063 3.05394V3.05617L7.79537 6.40913C7.59656 6.80899 7.21682 7.08598 6.77675 7.15076L3.07531 7.68911C3.06415 7.69135 3.03957 7.69358 3.0284 7.72932C3.01724 7.76283 3.03287 7.77847 3.04404 7.7874L5.72239 10.3987C6.04183 10.7115 6.18926 11.1605 6.11107 11.6005L5.4789 15.2841C5.47667 15.2997 5.4722 15.3198 5.50124 15.3399C5.53028 15.36 5.55039 15.3511 5.56156 15.3444L8.87208 13.6043C9.26746 13.3988 9.73656 13.3988 10.1297 13.6043L13.4425 15.3444C13.4559 15.3511 13.4737 15.36 13.5028 15.3399C13.5318 15.3176 13.5296 15.2953 13.5274 15.2819L12.8952 11.5916C12.8237 11.156 12.9689 10.7092 13.2816 10.3987L13.2839 10.3965L15.9622 7.78517C15.9734 7.774 15.989 7.7606 15.9779 7.72709C15.9667 7.69135 15.9421 7.68911 15.9309 7.68688L12.2273 7.14853C11.7872 7.08375 11.4052 6.80675 11.2087 6.40913L9.55339 3.05617C9.54669 3.04277 9.53552 3.02267 9.49978 3.02267Z" fill="#7B7D87"/>
<svg width="19" height="19" viewBox="0 0 19 19" fill="" xmlns="http://www.w3.org/2000/svg">
<path d="M5.53252 16.6467C5.25329 16.6467 4.97406 16.5596 4.73728 16.3854C4.31732 16.0793 4.11181 15.5723 4.20116 15.0607L4.83333 11.3771C4.8378 11.3526 4.82663 11.3347 4.81769 11.3258L2.13711 8.7122C1.7663 8.35032 1.6345 7.81868 1.7931 7.32724C1.95394 6.83356 2.37166 6.48062 2.88544 6.40467L6.58688 5.86632C6.60475 5.86408 6.62262 5.85068 6.63155 5.83281L8.28681 2.48208C8.51466 2.01745 8.9793 1.72705 9.49754 1.72705H9.49978C10.018 1.72705 10.4827 2.01521 10.7127 2.48208L12.368 5.83504C12.3769 5.85291 12.3926 5.86408 12.4127 5.86632L16.1141 6.40467C16.6279 6.48062 17.0479 6.83356 17.2065 7.32724C17.3651 7.82091 17.2333 8.35256 16.8624 8.71444L14.1886 11.3235C14.1729 11.3392 14.1662 11.3593 14.1707 11.3816L14.8029 15.0652C14.89 15.579 14.6822 16.086 14.2623 16.3898C13.8423 16.6936 13.2973 16.7338 12.8393 16.4904L9.53105 14.7502C9.51541 14.7413 9.49308 14.7413 9.47521 14.7502L6.16245 16.4904C5.96364 16.5953 5.74696 16.6467 5.53252 16.6467ZM9.49978 3.02267C9.46627 3.02267 9.45734 3.04054 9.45063 3.05394V3.05617L7.79537 6.40913C7.59656 6.80899 7.21682 7.08598 6.77675 7.15076L3.07531 7.68911C3.06415 7.69135 3.03957 7.69358 3.0284 7.72932C3.01724 7.76283 3.03287 7.77847 3.04404 7.7874L5.72239 10.3987C6.04183 10.7115 6.18926 11.1605 6.11107 11.6005L5.4789 15.2841C5.47667 15.2997 5.4722 15.3198 5.50124 15.3399C5.53028 15.36 5.55039 15.3511 5.56156 15.3444L8.87208 13.6043C9.26746 13.3988 9.73656 13.3988 10.1297 13.6043L13.4425 15.3444C13.4559 15.3511 13.4737 15.36 13.5028 15.3399C13.5318 15.3176 13.5296 15.2953 13.5274 15.2819L12.8952 11.5916C12.8237 11.156 12.9689 10.7092 13.2816 10.3987L13.2839 10.3965L15.9622 7.78517C15.9734 7.774 15.989 7.7606 15.9779 7.72709C15.9667 7.69135 15.9421 7.68911 15.9309 7.68688L12.2273 7.14853C11.7872 7.08375 11.4052 6.80675 11.2087 6.40913L9.55339 3.05617C9.54669 3.04277 9.53552 3.02267 9.49978 3.02267Z" fill=""/>
</svg>
\ No newline at end of file
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
"extends": "./.nuxt/tsconfig.json",
"compilerOptions": {
"types": ["@nuxt/types", "@nuxtjs/i18n"]
}
}
<template>
<div class="">
<ClientOnly> 111 </ClientOnly>
</div>
</template>
<script lang="ts" setup></script>
<style lang="less"></style>
......@@ -225,6 +225,17 @@ const getTokenList = () => {
console.log(e);
});
};
watch(
() => keyword.value,
(v) => {
if (!v) {
currentSearchType.value = 'top';
isLoading.value = false;
} else {
currentSearchType.value = 'search';
}
}
);
// 搜索结果过滤
const resultFilter = (list) => {
let newList = list;
......@@ -287,14 +298,23 @@ const getPopularList = async () => {
if (item.Newr24h[0] !== '-') {
item.Newr24h = '+' + item.Newr24h;
}
// 判断是否收藏
item.isCollect = Cache.hasSet(
item.pool[0] === 'd' ? item.pool : 'd' + item.pool
);
// 判断当前token是否已收藏
let res = Cache.getCollectionList();
if (!res) {
item.isStar = false;
} else {
let index = res.findIndex((it: any) => it.hash == item.tb_name);
if (index != -1) {
// 存在
item.isStar = true;
} else {
item.isStar = false;
}
}
});
topList.value = res.list;
isLoading.value = false;
}
isLoading.value = false;
} catch (e) {
console.log(e);
isLoading.value = false;
......@@ -390,7 +410,8 @@ watch(
border: none;
outline: none;
box-shadow: none;
background: #f4f5f7;
border: var(--new-border-2);
border-radius: 10px;
.t-input__inner {
width: 200px;
margin-left: 10px;
......@@ -398,8 +419,7 @@ watch(
.input2-icon {
height: 100%;
width: 42px;
background: #e8f1ff;
border-radius: 10px 0px 0px 10px;
border-right: var(--new-border-2);
.dja();
svg {
fill: #287eff;
......@@ -411,8 +431,7 @@ watch(
font-family: 'Medium';
font-weight: 500;
font-size: 14px;
background: #e8f1ff;
border-radius: 0 10px 10px 0;
border-left: var(--new-border-2);
.dja();
cursor: pointer;
}
......
<template>
<div class="total-token-info" v-for="item in options" :key="item.pool">
<div class="header-pro"></div>
<div class="header-pro">
<template v-if="getCurSwap(item.swap)">
<TokenAvatar
:img1="getCurSwap(item.swap)"
:img2="getCurChainImg()"
></TokenAvatar>
</template>
<template v-else>
<DefaultAvatar :value="item.tn"></DefaultAvatar>
</template>
</div>
<div class="token-information">
<div class="token-name">
<span>Name: </span>
<span>&nbsp;{{ item.name }}</span>
<span>/{{ item.pool }}</span>
<span>&nbsp;-&nbsp;{{ item.symbol }}</span>
<div class="collection-box" @click.stop="collectData(item)">
<star-filled-icon
size="22px"
v-if="item.isStar"
class="filled-star"
/>
<star-icon v-else size="22px"></star-icon>
</div>
</div>
<div class="price-and-time">
<div class="token">
......@@ -28,16 +30,6 @@
}}</span>
</div>
<div class="token not_first">
<span>Holders: </span>
<span>&nbsp;{{ item.holders }}</span>
</div>
<div class="token not_first">
<span>Tx: </span>
<span>&nbsp;{{ item.tx }}</span>
</div>
</div>
<div class="price-and-time">
<div class="token">
<span>Pool: </span>
<span>&nbsp;{{ item.filterPool }}</span>
</div>
......@@ -56,6 +48,21 @@
<analysisSvg class="to-analysis"></analysisSvg>
</template>
</JumpOther>
<JumpOther
:tb="item.tb_name"
type="collection"
:row="item"
:content="$t('filter.Collection')"
@CustomClick="onCustomClick"
>
<template #svg>
<CollectionSvg2
class="collect-no"
v-if="!item.isStar"
></CollectionSvg2>
<CollectionSvg3 class="collect-yes" v-else></CollectionSvg3>
</template>
</JumpOther>
</div>
</div>
</template>
......@@ -66,7 +73,19 @@ import { StarIcon, StarFilledIcon } from 'tdesign-icons-vue-next';
import JumpOther from '/views/token/JumpOther.vue';
import analysisSvg from '/public/images/svg/table/media.svg';
import KLink from '/public/images/svg/table/k_link.svg';
import { chain_options } from '@/constants/UnifiedManagementChain';
import TokenAvatar from '@/views/token/tokenAvatar.vue';
import DefaultAvatar from '@/views/token/avatar.vue';
import CollectionSvg2 from '/public/images/svg/rightDetail/colection2.svg';
import CollectionSvg3 from '/public/images/svg/rightDetail/collection-yes.svg';
import {
chain_options,
filterChainObj,
getSwap,
} from '@/constants/UnifiedManagementChain';
import useSwap from '@/hooks/useSwap';
const { ChainObj, getCurSwap, getCurChainImg } = useSwap();
const chain = useChain();
ChainObj.value = filterChainObj('value', chain.value);
const props = withDefaults(
defineProps<{
options: any[];
......@@ -75,7 +94,6 @@ const props = withDefaults(
options: [],
}
);
const goDetail = (row) => {
// 找到链id对应的路由名称
let Obj = chain_options.find((item: any) => item.chain_id == row.chain);
......@@ -84,20 +102,30 @@ const goDetail = (row) => {
path: Obj.name,
};
};
const collectData = (item) => {
let chain_id = item.chainId;
let obj = filterChainObj('chain_id', chain_id);
if (item.isStar) {
Cache.deleteCollection(item.tb_name);
Cache.deleteCollection([
{
tb: item.tb_name,
},
]);
item.isStar = false;
} else {
Cache.setCollection({
hash: item.tb_name,
symbol: item.symbol,
path: obj.value,
});
item.isStar = true;
}
};
const onCustomClick = (item: any) => {
collectData(item);
};
// 监听正负改变颜色
const monitor = (item) => {
if (item[0] === '-') {
......@@ -128,17 +156,19 @@ const monitor = (item) => {
width: 10%;
height: 100%;
.dja();
.custom-avatar {
margin-right: 0;
}
}
.token-information {
width: 90%;
height: 100%;
padding-left: 6px;
flex-direction: column;
.dj(space-around);
.dj(space-evenly);
.token-name {
height: 20px;
width: 70%;
position: relative;
:nth-child(1) {
color: @td-search-btn-back-1;
font-family: 'Regular';
......@@ -154,17 +184,6 @@ const monitor = (item) => {
font-weight: bold;
font-family: 'Medium';
}
.collection-box {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 20px;
margin-top: -5px;
.filled-star {
color: var(--td-brand-color);
}
}
}
.price-and-time {
font-family: fiveFont !important;
......
......@@ -3,7 +3,7 @@
placement="bottom-left"
trigger="click"
v-model:visible="DialogVisible"
:content="popupContent()"
:content="popupContent"
:VisibleChange="onVisibleChange"
>
<div class="custom-chose-chain-box" @click="ChangeDialog">
......
......@@ -106,10 +106,12 @@
<td align="center" class="index">{{ item.index }}</td>
<td class="tn">
<div class="token-name">
<div class="custom-avatar" v-if="getCurSwap(item.swap)">
<img class="img1" :src="getCurSwap(item.swap)" alt="" />
<img class="img2" :src="getCurChainImg()" alt="" />
</div>
<template v-if="getCurSwap(item.swap)">
<TokenAvatar
:img1="getCurSwap(item.swap)"
:img2="getCurChainImg()"
></TokenAvatar>
</template>
<template v-else>
<CustomAvatar :value="item.tn"></CustomAvatar>
</template>
......@@ -172,9 +174,7 @@
</tr>
</template>
</tbody>
<template v-if="loading">
<Animation></Animation>
</template>
<Animation v-show="loading"></Animation>
</table>
</div>
<div class="page-footer">
......@@ -204,6 +204,9 @@ import CustomRadio from '../CustomComponent/radio.vue';
import BscChain from '/public/images/svg/selectChain/bsc.svg';
import SwapSvg from '/public/images/svg/socialInfoWrapper/bscTransaction.svg';
import CustomAvatar from './avatar.vue';
import TokenAvatar from './tokenAvatar.vue';
import useSwap from '@/hooks/useSwap';
const { ChainObj, getCurSwap, getCurChainImg } = useSwap();
const route = useRoute();
const LoadHead = ref(false);
const CustomHead = ref(null);
......@@ -221,7 +224,6 @@ const CurrentTime = useCurrentTimeChange();
// 吸顶元素
const affixedHeadRef = ref(null);
const affixedTableWidth = ref('');
const ChainObj = ref();
// 当前选中的行数
const CurLineIndex = ref(0);
// 表格数据轮询
......@@ -338,26 +340,6 @@ const onFilterChange = (value: string) => {
}
getTableList();
};
// 获取当前行的swap
const getCurSwap = (swap: string) => {
if (ChainObj.value.fullName && swap) {
let obj = getSwap(ChainObj.value.fullName, swap);
if (obj) {
return obj.img;
}
return '';
}
};
// 获取当前链图标
const getCurChainImg = () => {
// 链图标
if (ChainObj.value.newImg) {
return ChainObj.value.newImg;
} else {
return ChainObj.value.img;
}
};
// 获取涨跌幅
const getUpDown = (value: string) => {
if (value && value[0] == '-') {
......@@ -437,6 +419,7 @@ const TableFilter = (result: any) => {
resultData.total = result.dataCount;
} else {
resultData.list = [];
resultData.total = result.dataCount;
}
if (process.client) {
getMinWidth();
......@@ -540,8 +523,6 @@ const getTableList = async () => {
loading.value = false;
} catch (e) {
loading.value = false;
} finally {
loading.value = false;
}
};
watch(
......@@ -611,10 +592,10 @@ const windowOpenFn = (e: any) => {
}
};
const onCurrentChange = (v) => {
loading.value = true;
pageNum.value = v;
GlbFilter.value.page = v;
// next();
getTableList();
// getTableList();
};
const onScrollEvent = () => {
// 获取滚动元素dom
......@@ -677,7 +658,6 @@ onMounted(() => {
RightInfo.value.r24h = resultData.list[0].r24h;
RightInfo.value.up = resultData.list[0].up;
}
loading.value = false;
// 获取th的个数并修改ColGroupList
setColGroupList();
});
......@@ -988,25 +968,6 @@ for (let i = 0; i < arr1.length; i++) {
}
.token-name {
.da();
.custom-avatar {
position: relative;
.da();
margin-right: 12px;
img {
border-radius: 50%;
}
.img1 {
width: 35px;
height: 35px;
}
.img2 {
position: absolute;
top: -4px;
right: -3px;
width: 15px;
height: 15px;
}
}
.name-block {
.tn {
color: var(--main-theme-color);
......
......@@ -2,7 +2,15 @@
<div class="other-box-cl">
<t-tooltip :content="content" placement="top" show-arrow>
<NuxtLink :to="getDetailLink" target="_blank" @click="StopBubbly">
<t-button class="kline-btn" theme="primary" ghost>
<t-button
class="kline-btn"
:class="{
collection: type == 'collection',
}"
theme="primary"
ghost
@click="getType"
>
<template #icon>
<slot name="svg"> </slot>
</template>
......@@ -14,20 +22,13 @@
<script lang="ts" setup>
import { filterChainObj } from '@/constants/UnifiedManagementChain';
const props = defineProps({
tb: {
type: String,
default: '',
},
type: {
type: String,
default: '',
},
content: {
type: String,
default: '',
},
});
const props = defineProps<{
tb: string;
type: string;
content: string;
row?: any;
}>();
const emit = defineEmits(['CustomClick']);
// 筛选链下标
// 当前链
const chain = useChain();
......@@ -46,10 +47,20 @@ const getDetailLink = computed(() => {
let path = Obj.name;
if (type == 'detail') {
return `/${path}/${tbname}`;
}
if (type == 'collection') {
return '';
} else {
return `/analysis/${path}/${tbname}`;
}
});
const getType = () => {
const { type, row } = props;
if (type == 'collection') {
emit('CustomClick', row);
}
};
// 阻止a标签冒泡
const StopBubbly = (e: any) => {
e.stopPropagation();
......@@ -83,5 +94,14 @@ const StopBubbly = (e: any) => {
}
}
}
.collection {
--ripple-color: none !important;
&:hover {
background: none;
}
:deep(.collect-no) {
fill: var(--new-border-5);
}
}
}
</style>
......@@ -20,6 +20,7 @@
}
.filled-star-on {
cursor: pointer;
fill: #7b7d87;
}
}
.pro-tokeninfo-header {
......
......@@ -25,7 +25,6 @@ export default defineComponent({
const { doCopy } = useCopy();
const collectData = () => {
const { tokenInfo, isInCollection, tb, currentPath } = props;
if (isInCollection) {
if (tb) {
Cache.deleteCollection([
......@@ -58,11 +57,13 @@ export default defineComponent({
const getImg = computed(() => {
const { tokenInfo } = props;
try {
if (tokenInfo.chat.img) {
if (Object.keys(tokenInfo).length) {
if ('chat' in tokenInfo) {
return tokenInfo.chat.img;
} else {
return '/images/img/default-avatar.png';
}
}
} catch (e) {
console.log(e);
return '/images/img/default-avatar.png';
......
<template>
<div class="custom-avatar" v-if="img1">
<img class="img1" :src="img1" alt="" />
<img class="img2" :src="img2" alt="" />
</div>
</template>
<script lang="ts" setup>
const props = defineProps<{
img1: string;
img2: string;
}>();
</script>
<style lang="less">
@import '@/style/flex.less';
.custom-avatar {
position: relative;
.da();
margin-right: 12px;
img {
border-radius: 50%;
}
.img1 {
width: 35px;
height: 35px;
}
.img2 {
position: absolute;
top: -4px;
right: -3px;
width: 15px;
height: 15px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment