Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ycc-website
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
ycc-website
Commits
7001ff6a
Commit
7001ff6a
authored
Feb 17, 2022
by
chenqikuai
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add vote pack table template
parent
25a86414
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
160 additions
and
9 deletions
+160
-9
address.ts
src/mixin/address.ts
+27
-4
votePackTable.vue
src/views/pc/address/components/votePackTable.vue
+109
-0
index.vue
src/views/pc/address/index.vue
+24
-5
No files found.
src/mixin/address.ts
View file @
7001ff6a
...
@@ -4,11 +4,28 @@ export default Vue.extend({
...
@@ -4,11 +4,28 @@ export default Vue.extend({
data
()
{
data
()
{
return
{
return
{
value
:
""
,
value
:
""
,
focusedTab
:
"
1
"
,
focusedTab
:
"
txRecord
"
,
pages
:
{
pages
:
{
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
total
:
0
,
},
},
selectedOption
:
"1"
,
selectedOption
:
"1"
,
loadingTxRecordTable
:
false
,
txRecordList
:
[]
as
any
[],
voteList
:
[
{
height
:
30303
,
hash
:
"102931jlakjsdflkajsdf"
,
sender
:
"alkdsjflkajsdf"
,
receiver
:
"aldskfjalkdsjfa"
,
reward
:
987234
,
time
:
17602983409
,
},
],
packList
:
[],
loadingVote
:
false
,
loadingPack
:
false
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -16,15 +33,15 @@ export default Vue.extend({
...
@@ -16,15 +33,15 @@ export default Vue.extend({
return
[
return
[
{
{
name
:
this
.
$t
(
"lang.trade.txRecord"
),
name
:
this
.
$t
(
"lang.trade.txRecord"
),
value
:
"
1
"
,
value
:
"
txRecord
"
,
},
},
{
{
name
:
this
.
$t
(
"lang.address.votingRecord"
),
name
:
this
.
$t
(
"lang.address.votingRecord"
),
value
:
"
2
"
,
value
:
"
votingRecord
"
,
},
},
{
{
name
:
this
.
$t
(
"lang.address.packingRecord"
),
name
:
this
.
$t
(
"lang.address.packingRecord"
),
value
:
"
3
"
,
value
:
"
packingRecord
"
,
},
},
];
];
},
},
...
@@ -39,6 +56,12 @@ export default Vue.extend({
...
@@ -39,6 +56,12 @@ export default Vue.extend({
setValue
(
v
:
string
)
{
setValue
(
v
:
string
)
{
this
.
value
=
v
;
this
.
value
=
v
;
},
},
sizeChange
(
size
:
number
)
{
this
.
pages
.
pageSize
=
size
;
},
pageChange
(
page
:
number
)
{
this
.
pages
.
currentPage
=
page
;
},
groupCellName
(
val
:
any
)
{
groupCellName
(
val
:
any
)
{
switch
(
val
.
row
.
tradeG
)
{
switch
(
val
.
row
.
tradeG
)
{
case
0
:
case
0
:
...
...
src/views/pc/address/components/votePackTable.vue
0 → 100644
View file @
7001ff6a
<
template
>
<div
class=
"c-votePackTable"
>
<el-table
:data=
"list"
v-loading=
"loading"
>
<TableColumn
label
width=
"40"
></TableColumn>
<TableColumn
:label=
"$t('lang.txDetail.height')"
>
<template
slot-scope=
"
{ row }">
<div
class=
"text-footer-color"
>
<router-link
:to=
"
{
path: '/blockDetail',
query: {
height: row.height,
},
}"
>
{{
row
.
height
}}
</router-link>
</div>
</
template
>
</TableColumn>
<TableColumn
:label=
"$t('lang.trade.hash')"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"text-footer-color"
>
<router-link
:to=
"
{
path: '/tradeHash',
query: {
hash: row.hash,
},
}"
>
{{
row
.
hash
}}
</router-link>
</div>
</
template
>
</TableColumn>
<TableColumn
:label=
"$t('lang.trade.sender')"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"text-footer-color"
>
<router-link
:to=
"
{
path: '/address',
query: {
address: row.sender,
},
}"
>
{{
row
.
sender
}}
</router-link>
</div>
</
template
>
</TableColumn>
<TableColumn
label
width=
"40"
>
<
template
slot-scope=
""
>
<img
:src=
"arrowRight"
alt=
""
/>
</
template
>
</TableColumn>
<TableColumn
:label=
"$t('lang.trade.receiver')"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"text-footer-color"
>
<router-link
:to=
"
{
path: '/address',
query: {
address: row.receiver,
},
}"
>
{{
row
.
receiver
}}
</router-link>
</div>
</
template
>
</TableColumn>
<TableColumn
:label=
"$t('lang.block.blockReward')"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"text-text-color"
>
{{
row
.
reward
|
filterAmount
}}
YCC
</div>
</
template
>
</TableColumn>
<TableColumn
:label=
"$t('lang.trade.time')"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"text-text-color"
>
{{
row
.
time
|
formatTime
}}
</div>
</
template
>
</TableColumn>
</el-table>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Table
,
TableColumn
}
from
'element-ui'
import
arrowRight
from
'@/assets/images/blockChainBrowser/blockDetail/arrow-right-dark.png'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
components
:
{
'el-table'
:
Table
,
TableColumn
,
},
props
:
{
list
:
Array
,
loading
:
Boolean
,
},
data
()
{
return
{
arrowRight
,
}
},
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/pc/address/index.vue
View file @
7001ff6a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
:focusedTab=
"focusedTab"
:focusedTab=
"focusedTab"
></TabList>
></TabList>
<DataFilter
<DataFilter
v-if=
"focusedTab === '
1
'"
v-if=
"focusedTab === '
txRecord
'"
:optionList=
"optionList"
:optionList=
"optionList"
:setValue=
"(v) => (selectedOption = v)"
:setValue=
"(v) => (selectedOption = v)"
:value=
"selectedOption"
:value=
"selectedOption"
...
@@ -21,14 +21,24 @@
...
@@ -21,14 +21,24 @@
</
template
>
</
template
>
</DataFilter>
</DataFilter>
<TradeTable
<TradeTable
v-if=
"focusedTab === '
1
'"
v-if=
"focusedTab === '
txRecord
'"
:groupCellName=
"groupCellName"
:groupCellName=
"groupCellName"
:Loading=
"loadingTable"
:Loading=
"loadingT
xRecordT
able"
:Trades=
"
Trades
"
:Trades=
"
txRecordList
"
:pages=
"pages"
:pages=
"pages"
:sizeChange=
"sizeChange"
:sizeChange=
"sizeChange"
:pageChange=
"pageChange"
:pageChange=
"pageChange"
></TradeTable>
></TradeTable>
<vote-pack-table
v-if=
"focusedTab === 'votingRecord'"
:list=
"voteList"
:loading=
"loadingVote"
></vote-pack-table>
<vote-pack-table
v-if=
"focusedTab === 'packingRecord'"
:list=
"packList"
:loading=
"loadingPack"
></vote-pack-table>
</div>
</div>
</template>
</template>
...
@@ -38,9 +48,18 @@ import AddressOverview from '@/components/pc/BlockChainBrowser/AddressOverview/i
...
@@ -38,9 +48,18 @@ import AddressOverview from '@/components/pc/BlockChainBrowser/AddressOverview/i
import
VueTypedMixins
from
'vue-typed-mixins'
import
VueTypedMixins
from
'vue-typed-mixins'
import
address
from
'@/mixin/address'
import
address
from
'@/mixin/address'
import
TabList
from
'@/components/pc/BlockChainBrowser/TabList/index.vue'
import
TabList
from
'@/components/pc/BlockChainBrowser/TabList/index.vue'
import
TradeTable
from
'@/components/pc/BlockChainBrowser/TradeTable/index.vue'
import
DataFilter
from
'@/components/pc/BlockChainBrowser/DataFilter/index.vue'
import
DataFilter
from
'@/components/pc/BlockChainBrowser/DataFilter/index.vue'
import
VotePackTable
from
'./components/votePackTable.vue'
export
default
VueTypedMixins
(
address
).
extend
({
export
default
VueTypedMixins
(
address
).
extend
({
components
:
{
ChainSearch
,
AddressOverview
,
TabList
,
DataFilter
},
components
:
{
ChainSearch
,
AddressOverview
,
TabList
,
DataFilter
,
TradeTable
,
VotePackTable
,
},
computed
:
{},
computed
:
{},
})
})
</
script
>
</
script
>
...
...
chenqikuai
@chenqikuai
mentioned in commit
748f7ae1
·
Mar 03, 2022
mentioned in commit
748f7ae1
mentioned in commit 748f7ae18ac2f8eb14ee7c2865eaea786342a520
Toggle commit list
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