rename nftbapp
This commit is contained in:
65
nftbapp/frontend-nftbapp/src/components/PostAuction.vue
Normal file
65
nftbapp/frontend-nftbapp/src/components/PostAuction.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-form class="form" ref="form">
|
||||
<v-text-field
|
||||
v-model="tokenid"
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
v-model="auction.auctionTitle"
|
||||
placeholder="e.g. My NFT"
|
||||
label="Auction title"
|
||||
persistent-hint
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
v-model="auction.price"
|
||||
placeholder="e.g. 1"
|
||||
label="Price"
|
||||
persistent-hint
|
||||
></v-text-field>
|
||||
|
||||
<v-btn @click="createAuction()" outline color="teal">Create Auction</v-btn>
|
||||
</v-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
props: ['tokenid', 'metadata'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
auction: {
|
||||
auctionTitle: '',
|
||||
price: null
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('wallet', [
|
||||
'klaytn',
|
||||
])
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
async createAuction() {
|
||||
if(!this.tokenid) {
|
||||
alert("Check for tokenId")
|
||||
return
|
||||
}
|
||||
|
||||
this.klaytn.createAuction(this.tokenid, this.auction.auctionTitle, this.metadata, auction.price, (receipt) => {
|
||||
alert(`Creation completed...! (#${receipt.blockNumber} ,${receipt.transactionHash})`)
|
||||
}, error => {
|
||||
alert(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user