Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dexfilter-web-nuxt3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
dexfilter-web-nuxt3
Commits
7c51f718
Commit
7c51f718
authored
Mar 25, 2023
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
95be55e0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
33 deletions
+51
-33
.output.zip
+0
-0
composables/useTable.ts
+0
-8
composables/useToken.ts
+19
-7
utils/router/RouterChange.ts
+20
-0
views/token/CustomTokenList.vue
+0
-0
views/token/RightDetail.vue
+5
-5
views/token/TimeTab.vue
+3
-3
views/token/TokenPool.vue
+4
-10
No files found.
.output.zip
View file @
7c51f718
No preview for this file type
composables/useTable.ts
View file @
7c51f718
/*
* @Author: lei 2897821407@qq.com
* @Date: 2023-02-20 19:44:53
* @LastEditors: lei 2897821407@qq.com
* @LastEditTime: 2023-02-22 18:10:45
* @FilePath: \dexfilter-web-nuxt3\composables\useTable.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
DefaultChain
,
filterChainObj
,
...
...
composables/useToken.ts
View file @
7c51f718
...
...
@@ -21,6 +21,14 @@ let filter: filterfield = {
page
:
1
,
page_size
:
100
,
};
export
interface
RightInfoType
{
token
:
string
;
tb
:
string
;
tbname
:
string
;
r24h
:
string
;
up
:
string
|
null
;
swap
:
string
;
}
// 获取当前交易token
export
const
useCurToken
=
()
=>
{
return
useState
(
tokenName
,
()
=>
"bar"
);
...
...
@@ -47,13 +55,17 @@ export const useChangeTable = () => {
// 当前右侧的token和tb等数据
export
const
useCurrentRightInfo
=
()
=>
{
return
useState
(
"RightInfo"
,
()
=>
({
token
:
""
,
tb
:
""
,
r24h
:
""
,
up
:
null
,
swap
:
""
,
}));
return
useState
(
"RightInfo"
,
()
=>
({
token
:
""
,
tb
:
""
,
r24h
:
""
,
up
:
null
,
swap
:
""
,
}
as
RightInfoType
)
);
};
// 当前主题
...
...
utils/router/RouterChange.ts
0 → 100644
View file @
7c51f718
interface
JumpParams
{
path
:
string
;
tb
:
string
;
}
/**
* 跳转k线
* @param params
* @param type
*/
export
const
JumpKLine
=
(
params
:
JumpParams
,
type
:
"open"
|
"jump"
)
=>
{
const
router
=
useRouter
();
if
(
type
==
"open"
)
{
// 打开新的页面
const
url
=
router
.
resolve
({
path
:
`/
${
params
.
path
}
/
${
params
.
tb
}
`
,
});
window
.
open
(
url
.
href
);
}
};
views/token/CustomTokenList.vue
View file @
7c51f718
This diff is collapsed.
Click to expand it.
views/token/RightDetail.vue
View file @
7c51f718
...
...
@@ -157,12 +157,12 @@ const headerBtns = computed(() => [
]);
const
props
=
withDefaults
(
defineProps
<
{
token
:
string
;
scene
:
string
;
tb
:
string
;
token
?
:
string
;
scene
?
:
string
;
tb
?
:
string
;
currentPath
:
string
;
r24h
:
number
;
mt
:
string
;
r24h
?
:
number
;
mt
?
:
string
;
up
?:
number
;
}
>
(),
{
...
...
views/token/TimeTab.vue
View file @
7c51f718
...
...
@@ -42,11 +42,11 @@ import { useI18n } from "vue-i18n";
import
{
Button
as
TButton
}
from
"tdesign-vue-next"
;
const
{
t
}
=
useI18n
();
const
props
=
defineProps
<
{
token
:
string
;
token
?
:
string
;
currentPath
:
string
;
tb
:
string
;
tb
?
:
string
;
PoolAddress
:
string
;
mt
:
string
;
mt
?
:
string
;
}
>
();
// 当前链
const
chain
=
useChain
();
...
...
views/token/TokenPool.vue
View file @
7c51f718
...
...
@@ -63,15 +63,15 @@ import TableEmpty from "@/components/TableEmpty.vue";
import
request
from
"@/utils/request"
;
import
{
parseNumberToK
,
parseCoinAmount
}
from
"@/utils/tool"
;
import
{
WebS
}
from
"@/utils/TokenTrans"
;
// import { goDetailK } from '@/utils/router/routerGo';
import
{
filterChainObj
}
from
"@/constants/UnifiedManagementChain"
;
import
{
Loading
as
TLoading
}
from
"tdesign-vue-next"
;
import
{
JumpKLine
}
from
"@/utils/router/RouterChange"
;
const
route
=
useRoute
();
const
props
=
defineProps
<
{
poolToken
:
string
;
currentPath
:
string
;
tb
:
string
;
mt
:
string
;
mt
?
:
string
;
}
>
();
const
emit
=
defineEmits
([
"update:address"
]);
interface
PoolListValue
{
...
...
@@ -100,7 +100,6 @@ watch(
}
);
const
currentPoolValue
=
ref
();
const
currentPoolAddress
=
ref
(
""
);
onMounted
(()
=>
{
getPoolToken
();
});
...
...
@@ -167,7 +166,6 @@ const getPoolToken = async () => {
isLoading
.
value
=
false
;
}
isLoading
.
value
=
false
;
console
.
log
(
poolInfo
.
value
);
}
catch
(
e
)
{
console
.
log
(
e
);
isLoading
.
value
=
false
;
...
...
@@ -175,20 +173,16 @@ const getPoolToken = async () => {
};
// 切换流动池
const
switchPool
=
(
item
:
PoolListValue
,
index
:
number
)
=>
{
// currentPoolValue.value = index;
// currentPoolAddress.value = item.address;
// emit('update:address', currentPoolAddress.value);
if
(
currentPoolValue
.
value
===
index
)
{
return
;
}
let
Obj
=
filterChainObj
(
"value"
,
chain
.
value
);
// 打开新
的流动池
// 打开新
页面
let
params
=
{
path
:
Obj
.
name
,
tb
:
item
.
address
,
};
// goDetailK(params
);
JumpKLine
(
params
,
"open"
);
};
</
script
>
<
style
lang=
"less"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment