日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

波卡链Substrate (6)SubstrateUI界面

發布時間:2025/3/21 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 波卡链Substrate (6)SubstrateUI界面 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 波卡支持基于 React 的 Web 界面

  • 預定義的錢包操作、鏈更新、賬戶管理和其他操作
  • 完全可定制,可以通過幾個步驟添加任何新 UI

eg.

class BonusSegment extends React.Component {constructor() {super()this.tokenOwner = new Bond}render() {return <Segment style={{ margin: '1em' }} padded><Header as='h2'><Icon name='certificate' /><Header.Content>Bonus tokens<Header.Subheader>Bonus tokens</Header.Subheader></Header.Content></Header><div style={{ paddingBottom: '1em' }}><div style={{ fontSize: 'small' }}>Holder</div><SignerBond bond={this.tokenOwner} /><If condition={this.tokenOwner.ready()} then={<span><Label>Balance<Label.Detail><Pretty value={runtime.bonus.balanceOf(this.tokenOwner)} /></Label.Detail></Label></span>} /></div><TransactButtoncontent="Spend 1 token"icon='game'tx={{sender: this.tokenOwner,call: calls.bonus.transfer(<address for tokens spending>, 1)}}/></Segment>} }

按鈕按下

總結

以上是生活随笔為你收集整理的波卡链Substrate (6)SubstrateUI界面的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。