Commit 300bec3b authored by chenqikuai's avatar chenqikuai

fix: show diff bg color when tx is txGroup

parent e5043dda
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue, { PropType } from 'vue' import Vue from 'vue'
import TxStatus from '../pc/txStatus.vue' import TxStatus from '../pc/txStatus.vue'
import txGroupIcon from '@/assets/images/blockChainBrowser/tradeDetail/txGroupIcon.png' import txGroupIcon from '@/assets/images/blockChainBrowser/tradeDetail/txGroupIcon.png'
export default Vue.extend({ export default Vue.extend({
...@@ -100,7 +100,7 @@ export default Vue.extend({ ...@@ -100,7 +100,7 @@ export default Vue.extend({
}, },
props: { props: {
blockTime: Number, blockTime: Number,
txGroup: String as PropType<'isGroupItem' | 'isGroupItemEnd'>, tradeG: Number,
amount: Number, amount: Number,
txHash: String, txHash: String,
from: String, from: String,
...@@ -112,6 +112,17 @@ export default Vue.extend({ ...@@ -112,6 +112,17 @@ export default Vue.extend({
txGroupIcon, txGroupIcon,
} }
}, },
computed: {
txGroup() {
if (this.tradeG === 1 || this.tradeG === 2) {
return 'isGroupItem'
} else if (this.tradeG === 3) {
return 'isGroupItemEnd'
} else {
return ''
}
},
},
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -51,7 +51,6 @@ export default Vue.extend({ ...@@ -51,7 +51,6 @@ export default Vue.extend({
if (data.error == null) { if (data.error == null) {
// this.searchIcon(data.result.txs); // this.searchIcon(data.result.txs);
this.Trades = this.checkGroup(data.result.txs); this.Trades = this.checkGroup(data.result.txs);
console.log(this.Trades, "show Trades");
} else { } else {
message.warning(this.$t("components.tip") + data.error); message.warning(this.$t("components.tip") + data.error);
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
:from="trade.tx.from" :from="trade.tx.from"
:blockTime="trade.blockTime" :blockTime="trade.blockTime"
:to="trade.tx.to" :to="trade.tx.to"
:tradeG="trade.tradeG"
:status="isSuccess(trade.tx.execer, trade.receipt.ty)" :status="isSuccess(trade.tx.execer, trade.receipt.ty)"
></m-tx-item> ></m-tx-item>
<m-page-container <m-page-container
......
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