Commit 15d50d4d authored by chenqikuai's avatar chenqikuai

fix

parent 239ae41a
export const lang = { export const lang = {
home: 'Home', home: "Home",
book: 'White Paper', book: "White Paper",
news: 'Press Releases', news: "Press Releases",
email: 'email', blockChainBrowser: "blockchain browser",
zh: 'Chinese', page: {
en: 'English', first: "first",
YUANLIAN: 'YUANCHAIN', last: "last",
title: 'Enterprise Blockchain SaaS Platform', confirm: "confirm",
bannerDesc: 'Making Blockchain Easy in the World', nodata: "nodata",
},
yccBlockChainBrowser: "ycc blockchain browser",
chainMsg: {
latestBlock: "latest block",
nodeNum: "number of nodes",
circulation: "circulation",
pledgeQuantity: "pledge quantity",
},
transaction: "transaction",
latestTx: "latest deal",
chainPerf: {
speed: "block speed",
tps: "TPS",
txNumber: "total number of txns",
addressNumber: "total number of addr",
txNumberOnTheChain: "on-chain txns num",
},
viewMore: "see more",
search: "search",
price: {
realTimeQuotes: "real-time quotes",
_24hourVolatility: "24 hour volatility",
marketValueInDollars: "Market Cap (USD)",
dollar: "dollar",
},
placeholder: "Please enter address/transaction hash/block height",
searchCurrency: "search currency",
address: {
address: "address",
freeze: "frozen",
balance: "address available balance",
pleaseSelect: "please choose",
totalReception: "total reception",
totalSent: "total sent",
totalValue: "total value",
accountBalance: "account balance",
votingRecord: "voting record",
packingRecord: "packing records",
},
block: {
title: "all blocks",
count: "blocks",
height: "height",
time: "block age",
hash: "block hash",
txCount: "txn num",
blockRevenue: "block revenue",
mineRevenue: "mining income",
packingAddress: "pack addr",
blockReward: "block reward",
votingNode: "voting node",
packingNode: "package node",
allNode: "all nodes",
timestamp: "timestamp",
merkelgen: "merkelgen",
stateHash: "stateHash",
lastBlock: "last block",
nextBlock: "next block",
no: "nothing",
consensusAddress: "consensus",
},
txDetail: {
detail: "transaction details",
txHash: "Txn Hash",
status: "receive status",
success: "Write successfully, execute successfully",
faild: "Writing succeeded, execution failed",
value: "value",
random: "random num",
execer: "execer",
txType: "txn type",
normalTx: "Normal Transaction",
groupTx: "Transaction Group",
inData: "Input Data",
outData: "Output Data",
height: "height",
time: "time",
fee: "fee",
transfer: "transfer",
mining: "mining",
callContract: "call contract",
synchronize: "synchronize",
},
trade: {
title: "all txns",
count: "txns",
totalTip: "all",
tip: "show the last 100,000 entries",
hash: "Txn Hash",
sender: "sender",
receiver: "receiver",
fee: "fee",
func: "call functions",
time: "time",
token: "token",
type: "type",
txAmount: "Txn Value",
txRecord: "transaction record",
consensusNode: "consensus node",
txTotal: "A total of {0} txns were found",
consensusNodeTotal: "A total of {0} consensus nodes were found",
receiveStatus: "acceptance status",
},
components: {
hour: " hr ",
hours: " hrs ",
min: " min ",
mins: " mins ",
sec: " sec ago",
secs: " secs ago",
copy: "Copy",
tip: "Tip",
noMsg: "No transaction information was found",
repeat: "Repeat",
copySuc: "Copy Succeeded",
copyErr: "Copy Error",
allBlock: "All Blocks",
blockDetail: "Block Details",
succ: "Succeed",
fail: "Fail",
errMsg: "Incorrect input, please reenter",
errAdr: "Address Error",
errParam: "Incorrect parameter input!",
errToken: "No such token!",
errRequest: "Data request failed!",
errTxt: "Transaction text can’t be blank!",
errHeight:
"The block height entered cannot exceed the current maximum height",
errFormat:
"Format error, please complete the transaction text in hexadecimal format!",
footer: "Is a platform for block data inquiry and analysis.",
},
email: "email",
zh: "Chinese",
en: "English",
YUANLIAN: "YUANCHAIN",
title: "Enterprise Blockchain SaaS Platform",
bannerDesc: "Making Blockchain Easy in the World",
whatIs: "What's YUANCHAIN?", whatIs: "What's YUANCHAIN?",
mission: 'Mission', mission: "Mission",
missionText: 'YUANCHAIN (YCC), a new generation of basic application public chains. Based on the YUANCHAIN public chain network, it is naturally suitable for building application contracts such as Defi, NFT, Dao, etc. By building an innovative POS33 consensus mechanism, YUANCHAIN is able to achieve fast block verification and generation while ensuring decentralization, balancing credibility and performance. To address the ecosystem expansion of application-based public chain, the YUANCHAIN supports the expansion of a two-layer and multi-chain architecture to create parallel public parachain on the basis of themain chain consensus, to improve performance and ecosystem expansion.', missionText:
feature: 'Technical features', "YUANCHAIN (YCC), a new generation of basic application public chains. Based on the YUANCHAIN public chain network, it is naturally suitable for building application contracts such as Defi, NFT, Dao, etc. By building an innovative POS33 consensus mechanism, YUANCHAIN is able to achieve fast block verification and generation while ensuring decentralization, balancing credibility and performance. To address the ecosystem expansion of application-based public chain, the YUANCHAIN supports the expansion of a two-layer and multi-chain architecture to create parallel public parachain on the basis of themain chain consensus, to improve performance and ecosystem expansion.",
FT1: '1.Main chain stability is similar to the Bitcoin, without virtual machines and has high concurrency, the TPS can reach 10,000 levels in the future.', feature: "Technical features",
FT2: '2.The primary hash logs on the parachain are written to the main chain, ensuring it is tamper-proof.', FT1:
FT3: '3.Smart contracts and virtual machines can be used flexibly on parachains, with no impact to the stability and security of the main chain.', "1.Main chain stability is similar to the Bitcoin, without virtual machines and has high concurrency, the TPS can reach 10,000 levels in the future.",
FT4: '4.The cross-chain interaction between the parachain and the main chain is efficient and stable, balancing the authority of the main chain with the diversity of the parachain.', FT2:
FT5: '5.POS33+BFT, the innovative consensus algorithm, selects some coin-holding nodes as block producers and block validation nodes, which is similar to the jury system, balancing fairness and efficient consensus.', "2.The primary hash logs on the parachain are written to the main chain, ensuring it is tamper-proof.",
FT6: '6.YUANCHAIN supports the cross-chain bridge to achieve cross-chain transaction with Bitcoin and Ether network.', FT3:
application: 'Applications', "3.Smart contracts and virtual machines can be used flexibly on parachains, with no impact to the stability and security of the main chain.",
APPT: 'Technology supports: DeFi, NFT, social tokens, IOU note, assets on chain and trading, points system, preservation and traceability system, wallets, etc.', FT4:
APPO: 'Potential application areas: flowers, gifts, mobile phones, energy saving, pets, catering, environmental protection, automobiles, home appliances, clothing, electricity, health, education, construction, real estate, trade, artwork, chat, public security, courts, government affairs, etc.', "4.The cross-chain interaction between the parachain and the main chain is efficient and stable, balancing the authority of the main chain with the diversity of the parachain.",
reason: 'Why do you use YUANCHAIN?', FT5:
R1: '1.Easy to use and accessible.', "5.POS33+BFT, the innovative consensus algorithm, selects some coin-holding nodes as block producers and block validation nodes, which is similar to the jury system, balancing fairness and efficient consensus.",
R2: '2.Strong bottom architecture technical and application teams support and maintain. ', FT6:
R3: '3.Open ecosystem with technology support, maintained by the core team.', "6.YUANCHAIN supports the cross-chain bridge to achieve cross-chain transaction with Bitcoin and Ether network.",
R4: '4.YUANCHAIN ecosystem is large in scale and coverage, which facilitates the development of individuals and SMEs.', application: "Applications",
R5: '5.Absorbing domestic and foreign technology, and 100% owning independent and controllable blockchain technology by Chinese team with no foreign technology restrictions on upgrading and maintenance.', APPT:
R6: '6.YUANCHAIN has issued 10 billion tokens and 480 million tokens are used for mining per year. The mining allocation ratio is similar to Ether, as 60% belongs to the holders and 40% to the development fund, in order to avoid insufficient funding for research and development, and to ensure perpetual operation.', "Technology supports: DeFi, NFT, social tokens, IOU note, assets on chain and trading, points system, preservation and traceability system, wallets, etc.",
R7: 'Considering charity, taxation, and government regulation to develop in harmony with government and community.', APPO:
Feature: 'Features', "Potential application areas: flowers, gifts, mobile phones, energy saving, pets, catering, environmental protection, automobiles, home appliances, clothing, electricity, health, education, construction, real estate, trade, artwork, chat, public security, courts, government affairs, etc.",
flexible: 'Flexible', reason: "Why do you use YUANCHAIN?",
FText: 'When there is a smart contract bug of the application, hot swappable smart contract can be achieved to fix the bug in time, control the damage and resist forking', R1: "1.Easy to use and accessible.",
cross: 'Cross-chain', R2:
CText: 'YUANCHAIN system supports the barrier-free circulation of digital assets and currencies among the public chain, consortium chain and private chain', "2.Strong bottom architecture technical and application teams support and maintain. ",
latency: 'Low latency', R3: "3.Open ecosystem with technology support, maintained by the core team.",
LText: 'The minimum block interval is merely 1 second, which can be used in high performance scenarios, such as financial exchanges, intelligent robots, Industry 4.0, big data processing, etc', R4:
concurrency: 'High concurrency', "4.YUANCHAIN ecosystem is large in scale and coverage, which facilitates the development of individuals and SMEs.",
CCText: 'Public chain concurrency > 10,000 TPS, consortium and private chain concurrency > 100,000 TPS', R5:
heterogeneous: 'Heterogeneous', "5.Absorbing domestic and foreign technology, and 100% owning independent and controllable blockchain technology by Chinese team with no foreign technology restrictions on upgrading and maintenance.",
HeText: 'Even at different nodes, by different developers, using different development languages, the result of a smart contract is the same as long as the rules are consistent', R6:
security: 'Security', "6.YUANCHAIN has issued 10 billion tokens and 480 million tokens are used for mining per year. The mining allocation ratio is similar to Ether, as 60% belongs to the holders and 40% to the development fund, in order to avoid insufficient funding for research and development, and to ensure perpetual operation.",
SecText: 'Cross-chain identity authentication and management for public, consortium and private chains, as well as the behavior of the node server and fingerprint identification equipment can prevent multiple types of attacks', R7:
environment: 'Environmentally friendly', "Considering charity, taxation, and government regulation to develop in harmony with government and community.",
EnvText: 'Users can delegate mining consensus nodes to participate in voting and bookkeeping, which enables proxy mining', Feature: "Features",
fund: 'Community Fund', flexible: "Flexible",
FundText: 'Part of the block generation is allocated to the Community Development Fund, which assists the YUANCHAIN community in technology research and development, community promotion, tax expenditures, and project operation expenditures', FText:
Consensus: 'Consensus Mechanism', "When there is a smart contract bug of the application, hot swappable smart contract can be achieved to fix the bug in time, control the damage and resist forking",
ConT1: 'YUANCHAIN mainnet uses the innovative POS33 consensus mechanism. Introducing a jury mechanism built by the Verifiable Random Function (VRF) on the basis of the traditional POS consensus mechanism, which can achieve rapid block generation and verification while ensuring decentralization, balancing credibility and performance.', cross: "Cross-chain",
ConT2: 'Each node of YUANCHAIN mainnet obtains votes by pledging YCC on the blockchain. YCC and votes are pledged in the ratio of 10000:1. For example, users pledge 100,000 YCC to obtain 10 votes.', CText:
ConT3: 'Each node of YUANCHAIN mainnet signs the seed hash of the vote with its private key and calculates a hash value. Then a verifiable random function(VRF)is introduced to confirm that the node with a hash value less than a set threshold can be selected as a jury member. The node with the smallest hash value is confirmed by a vote of the jury members and completes the block generation after becoming the main judge. After that, the next round of jury election will be conducted.', "YUANCHAIN system supports the barrier-free circulation of digital assets and currencies among the public chain, consortium chain and private chain",
point: 'One click to issue points', latency: "Low latency",
QAS: 'Quick and safe', LText:
QAS1: '1.Enter the business name', "The minimum block interval is merely 1 second, which can be used in high performance scenarios, such as financial exchanges, intelligent robots, Industry 4.0, big data processing, etc",
QAS2: '2.Automatic generation /input of point abbreviations', concurrency: "High concurrency",
QAS3: '3.No duplicate names reviewed by the system', CCText:
QAS4: '4.Pay issuance fees', "Public chain concurrency > 10,000 TPS, consortium and private chain concurrency > 100,000 TPS",
QAS5: '5.Points into the wallet', heterogeneous: "Heterogeneous",
scene: 'Application Scenarios', HeText:
SC1: 'Blockchain Traceability', "Even at different nodes, by different developers, using different development languages, the result of a smart contract is the same as long as the rules are consistent",
SC1T: 'Product traceability, project management traceability, etc.', security: "Security",
SC2: 'Supply Chain Management', SecText:
SC2T: 'The entire supply chain of product orders, design, procurement, manufacturing and delivery can be managed by blockchain.', "Cross-chain identity authentication and management for public, consortium and private chains, as well as the behavior of the node server and fingerprint identification equipment can prevent multiple types of attacks",
SC3: 'Commodity Trading', environment: "Environmentally friendly",
SC3T: 'Blockchain exchanges, equity, debt, futures, forex, commodities, etc.', EnvText:
SC4: 'Global Points Alliance', "Users can delegate mining consensus nodes to participate in voting and bookkeeping, which enables proxy mining",
SC4T: 'Establishing a global points alliance with a multi-layered blockchain of public and permissioned chains', fund: "Community Fund",
SC5: 'Blockchain for Government', FundText:
SC5T: 'Identity management, business registration, taxation, etc.', "Part of the block generation is allocated to the Community Development Fund, which assists the YUANCHAIN community in technology research and development, community promotion, tax expenditures, and project operation expenditures",
SC6: 'Financial Accounting System', Consensus: "Consensus Mechanism",
SC6T: 'Assets and liabilities are on the blockchain for real-time financial accounting', ConT1:
SC7: 'Industry Blockchain', "YUANCHAIN mainnet uses the innovative POS33 consensus mechanism. Introducing a jury mechanism built by the Verifiable Random Function (VRF) on the basis of the traditional POS consensus mechanism, which can achieve rapid block generation and verification while ensuring decentralization, balancing credibility and performance.",
SC7T: 'Medical, agricultural, financial, health, education, etc.', ConT2:
SC8: 'Security Instruction System', "Each node of YUANCHAIN mainnet obtains votes by pledging YCC on the blockchain. YCC and votes are pledged in the ratio of 10000:1. For example, users pledge 100,000 YCC to obtain 10 votes.",
SC8T: 'Blockchain security commands by Industrial Robot 4.0', ConT3:
SC9: 'More Scenarios', "Each node of YUANCHAIN mainnet signs the seed hash of the vote with its private key and calculates a hash value. Then a verifiable random function(VRF)is introduced to confirm that the node with a hash value less than a set threshold can be selected as a jury member. The node with the smallest hash value is confirmed by a vote of the jury members and completes the block generation after becoming the main judge. After that, the next round of jury election will be conducted.",
SC9T: 'E-commerce, cross-border trade, charity, voting elections, etc.', point: "One click to issue points",
LINK: 'LINKS', QAS: "Quick and safe",
platform: 'Trading Platform', QAS1: "1.Enter the business name",
partner: 'Partners', QAS2: "2.Automatic generation /input of point abbreviations",
BNAI: 'Blockchain News and Information', QAS3: "3.No duplicate names reviewed by the system",
community: 'Community', QAS4: "4.Pay issuance fees",
bit: '8bit', QAS5: "5.Points into the wallet",
newestInfo: 'Newest', scene: "Application Scenarios",
morecontent: 'More', SC1: "Blockchain Traceability",
nextInfo: 'Next News', SC1T: "Product traceability, project management traceability, etc.",
date: 'Date', SC2: "Supply Chain Management",
author: 'Author', SC2T:
close: 'close', "The entire supply chain of product orders, design, procurement, manufacturing and delivery can be managed by blockchain.",
wx1: 'wechat', SC3: "Commodity Trading",
wx2: 'wechat' SC3T: "Blockchain exchanges, equity, debt, futures, forex, commodities, etc.",
} SC4: "Global Points Alliance",
\ No newline at end of file SC4T:
"Establishing a global points alliance with a multi-layered blockchain of public and permissioned chains",
SC5: "Blockchain for Government",
SC5T: "Identity management, business registration, taxation, etc.",
SC6: "Financial Accounting System",
SC6T:
"Assets and liabilities are on the blockchain for real-time financial accounting",
SC7: "Industry Blockchain",
SC7T: "Medical, agricultural, financial, health, education, etc.",
SC8: "Security Instruction System",
SC8T: "Blockchain security commands by Industrial Robot 4.0",
SC9: "More Scenarios",
SC9T: "E-commerce, cross-border trade, charity, voting elections, etc.",
LINK: "LINKS",
platform: "Trading Platform",
partner: "Partners",
BNAI: "Blockchain News and Information",
community: "Community",
bit: "8bit",
newestInfo: "Newest",
morecontent: "More",
nextInfo: "Next News",
date: "Date",
author: "Author",
close: "close",
wx1: "wechat",
wx2: "wechat",
};
...@@ -30,6 +30,7 @@ import { LabelLayout, UniversalTransition } from 'echarts/features' ...@@ -30,6 +30,7 @@ import { LabelLayout, UniversalTransition } from 'echarts/features'
import { CanvasRenderer } from 'echarts/renderers' import { CanvasRenderer } from 'echarts/renderers'
import { numOfOnChainTx, statSearch } from '@/service/api' import { numOfOnChainTx, statSearch } from '@/service/api'
import moment from 'moment' import moment from 'moment'
import { nFormatter } from '@/utils/common'
// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型 // 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
type ECOption = echarts.ComposeOption< type ECOption = echarts.ComposeOption<
| BarSeriesOption | BarSeriesOption
...@@ -166,6 +167,11 @@ export default Vue.extend({ ...@@ -166,6 +167,11 @@ export default Vue.extend({
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLabel: {
formatter: (item: number) => {
return nFormatter(item)
},
},
}, },
series: [ series: [
{ {
......
...@@ -41,6 +41,7 @@ echarts.use([ ...@@ -41,6 +41,7 @@ echarts.use([
import chartsMixin from '@/mixin/componentsMixin/charts' import chartsMixin from '@/mixin/componentsMixin/charts'
import VueTypedMixins from 'vue-typed-mixins' import VueTypedMixins from 'vue-typed-mixins'
import { nFormatter } from '@/utils/common'
export default VueTypedMixins(chartsMixin).extend({ export default VueTypedMixins(chartsMixin).extend({
props: { props: {
...@@ -94,6 +95,11 @@ export default VueTypedMixins(chartsMixin).extend({ ...@@ -94,6 +95,11 @@ export default VueTypedMixins(chartsMixin).extend({
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLabel: {
formatter: (item: number) => {
return nFormatter(item)
},
},
}, },
series: [ series: [
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Count :time="time" class="text-text-color text-xs"></Count> <Count :time="time" class="text-text-color text-xs"></Count>
</div> </div>
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<div> <div class=" mt-2">
<span class="text-text-color text-xs"> <span class="text-text-color text-xs">
{{ $t('lang.block.consensusAddress') }}: {{ $t('lang.block.consensusAddress') }}:
</span> </span>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
}, },
}" }"
> >
{{ address | filterHash }} {{ address | filterHash(6) }}
</router-link> </router-link>
</span> </span>
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
]" ]"
> >
<div> <div>
<span class="text-base font-bold">{{ rewardAmount }}</span> <span class="text-base font-bold">{{ rewardAmount | filterAmount }}</span>
<span class="text-xs"> <span class="text-xs">
YCC YCC
</span> </span>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="num flow-root"> <div class="num flow-root">
<div class="mt-2.5 flex items-center justify-between"> <div class="mt-2.5 flex items-center justify-between">
<div class="text-darkBlue font-bold"> <div class="text-darkBlue font-bold">
链上交易数量 {{ $t('lang.chainPerf.txNumberOnTheChain') }}
</div> </div>
<div> <div>
<span <span
......
...@@ -9,51 +9,43 @@ ...@@ -9,51 +9,43 @@
<div class="left"> <div class="left">
<div> <div>
<span class="graytxt">{{ $t('lang.trade.hash') }}</span> <span class="graytxt">{{ $t('lang.trade.hash') }}</span>
<span class="text-footer-color"> <span class="text-footer-color"><router-link
<router-link
:to="{ :to="{
path: '/tradeHash', path: '/tradeHash',
query: { query: {
hash: item.hash, hash: item.hash,
}, },
}" }"
> >{{ item.hash | filterHash(8) }}</router-link>
{{ item.hash | filterHash(9) }}
</router-link>
</span> </span>
</div> </div>
<div class="graytxt"> <div class="graytxt">{{ item.time_block | formatTime }}
{{ item.time_block | formatTime }}
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
<div> <div>
<span class="graytxt">{{ $t('lang.trade.sender') }}</span> <span class="graytxt">{{ $t('lang.trade.sender') }}</span>
<span class="text-footer-color"> <span class="text-footer-color"><router-link
<router-link
:to="{ :to="{
path: '/address', path: '/address',
query: { query: {
address: item.from, address: item.from,
}, },
}" }"
> >{{ item.from | filterHash(8) }}
{{ item.from | filterHash(9) }}
</router-link> </router-link>
</span> </span>
</div> </div>
<div class="graytxt"> <div class="graytxt">
<span class="graytxt">{{ $t('lang.trade.receiver') }}</span> <span class="graytxt">{{ $t('lang.trade.receiver') }}</span>
<span class="text-footer-color"> <span class="text-footer-color"><router-link
<router-link
:to="{ :to="{
path: '/address', path: '/address',
query: { query: {
address: item.to, address: item.to,
}, },
}" }"
> >{{ item.to | filterHash(8) }}
{{ item.to | filterHash(9) }}
</router-link> </router-link>
</span> </span>
</div> </div>
...@@ -125,14 +117,14 @@ export default Vue.extend({ ...@@ -125,14 +117,14 @@ export default Vue.extend({
color: #7c88ad; color: #7c88ad;
} }
.left { .left {
min-width: 233px; min-width: 230px;
} }
.middle { .middle {
min-width: 168px; min-width: 181px;
} }
.right { .right {
min-width: 56px; min-width: 46px;
} }
</style> </style>
...@@ -60,7 +60,7 @@ export default Vue.extend({ ...@@ -60,7 +60,7 @@ export default Vue.extend({
<style scoped lang="scss"> <style scoped lang="scss">
.c-txStatus { .c-txStatus {
.status { .status {
width: 70px; min-width: 70px;
height: 30px; height: 30px;
border-radius: 15px; border-radius: 15px;
} }
......
...@@ -250,7 +250,8 @@ export default Vue.extend({ ...@@ -250,7 +250,8 @@ export default Vue.extend({
watch: { watch: {
$route(n, o) { $route(n, o) {
const scrollY = window.scrollY const scrollY = window.scrollY
this.iconType = n.query.lang || 'zh-CN' this.iconType =
n.query.lang || window.sessionStorage.getItem('language') || 'zh-CN'
this.isTop = scrollY < 70 ? true : false this.isTop = scrollY < 70 ? true : false
window.addEventListener('scroll', () => { window.addEventListener('scroll', () => {
const scrollY = window.scrollY const scrollY = window.scrollY
......
...@@ -18,4 +18,45 @@ const tradeAccuracy = function(Actuators: string, ty: number, execer?: any) { ...@@ -18,4 +18,45 @@ const tradeAccuracy = function(Actuators: string, ty: number, execer?: any) {
} }
}; };
export { tradeAccuracy }; const nFormatter = (num: number, digits = 2) => {
const si = [
{
value: 1,
symbol: "",
},
{
value: 1e3,
symbol: "K",
},
{
value: 1e6,
symbol: "M",
},
{
value: 1e9,
symbol: "G",
},
{
value: 1e12,
symbol: "T",
},
{
value: 1e15,
symbol: "P",
},
{
value: 1e18,
symbol: "E",
},
];
const rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
let i;
for (i = si.length - 1; i > 0; i--) {
if (num >= si[i].value) {
break;
}
}
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol;
};
export { tradeAccuracy, nFormatter };
...@@ -27,11 +27,11 @@ import MFourParams from './m-four-params.vue' ...@@ -27,11 +27,11 @@ import MFourParams from './m-four-params.vue'
import MAddressBalanceGraph from './m-address-balance-graph.vue' import MAddressBalanceGraph from './m-address-balance-graph.vue'
export default VueTypedMixins(AddressOverview).extend({ export default VueTypedMixins(AddressOverview).extend({
props: { props: {
balance: Number, balance: [Number, Object],
selectedValue: String, selectedValue: String,
optionsList: Array, optionsList: Array,
handleSelectChange: Function, handleSelectChange: Function,
frozen: Number frozen: [Number, Object],
}, },
components: { components: {
mAddressDisplay, mAddressDisplay,
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
:grid="{ :grid="{
top: '10px', top: '10px',
bottom: '25px', bottom: '25px',
left: '40px', left: '60px',
right: '40px', right: '60px',
}" }"
style="height: 110px;" style="height: 110px;"
></charts-in-addr> ></charts-in-addr>
......
...@@ -43,8 +43,8 @@ export default Vue.extend({ ...@@ -43,8 +43,8 @@ export default Vue.extend({
Select, Select,
}, },
props: { props: {
forzen: Number, forzen: [Number, Object],
balance: Number, balance: [Number, Object],
selectedValue: String, selectedValue: String,
optionsList: Array, optionsList: Array,
handleSelectChange: Function, handleSelectChange: Function,
......
...@@ -143,7 +143,7 @@ export default vueTypedMixins(tradeDetail).extend({ ...@@ -143,7 +143,7 @@ export default vueTypedMixins(tradeDetail).extend({
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #7c88ad; color: #7c88ad;
width: 73px; width: 110px;
min-height: 40px; min-height: 40px;
line-height: 40px; line-height: 40px;
} }
......
...@@ -75,7 +75,11 @@ ...@@ -75,7 +75,11 @@
<el-table-column :label="$t('lang.trade.type')" align="right" width="90"> <el-table-column :label="$t('lang.trade.type')" align="right" width="90">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="text-darkBlue"> <div class="text-darkBlue">
{{ row.type === 'vote' ? '投票节点' : '打包节点' }} {{
row.type === 'vote'
? $t('lang.block.votingNode')
: $t('lang.block.packingNode')
}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -234,7 +234,7 @@ export default vueTypedMixins(tradeDetail).extend({ ...@@ -234,7 +234,7 @@ export default vueTypedMixins(tradeDetail).extend({
} }
.item-text { .item-text {
.status { .status {
width: 70px; min-width: 70px;
height: 30px; height: 30px;
border-radius: 15px; border-radius: 15px;
padding: 3px 10px; padding: 3px 10px;
......
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