diff --git a/assets/img/home/history.png b/assets/img/home/history.png new file mode 100644 index 0000000..4ecdd0b Binary files /dev/null and b/assets/img/home/history.png differ diff --git a/main.js b/main.js index a2c6788..55810f9 100644 --- a/main.js +++ b/main.js @@ -3,9 +3,9 @@ import App from './App.vue' import '@/plugins' import i18n from "./i18n"; import store from './store' -// import 'element-ui/lib/theme-chalk/index.css' -// import element from './element/index' -// Vue.use(element) +import 'element-ui/lib/theme-chalk/index.css' +import element from './element/index' +Vue.use(element) //把vuex定义成全局组件 Vue.prototype.$store = store Vue.prototype._i18n = i18n; diff --git a/pages/exchange/exchange-transaction.vue b/pages/exchange/exchange-transaction.vue index fae07aa..6d2b178 100644 --- a/pages/exchange/exchange-transaction.vue +++ b/pages/exchange/exchange-transaction.vue @@ -158,17 +158,26 @@ --> - + - - + + + - + + + - 可用 {{ usable }}{{ usableUnit }} + {{ $t("common.c3") }} {{ usable }}{{ usableUnit }} @@ -321,25 +330,34 @@ --> - - - - - 委托(0) - - - 仓位(0) - - - 资产 + + + @@ -475,7 +493,14 @@ export default { sliderActive:-1, dtime: null, scrollTop:0, - refreshing:false + refreshing:false, + marks:{ + 2: '0%', + 25: '25%', + 50: '50%', + 75: '75%', + 100: '100%', + } }; }, computed: { @@ -549,20 +574,29 @@ export default { return totalMoney; }, // 显示百分比 - activeStep() { - let num = 0; - if (this.form.direction == "buy") { - if (!this.targetBalance.usable_balance) return 0; - num = this.totalMoney / this.targetBalance.usable_balance; - } else if (this.form.direction == "sell") { - if (!this.currentBalance.usable_balance) return 0; - num = this.form.amount / this.currentBalance.usable_balance; - } - if (!isNaN(num)) { - num = num.toFixed(3); - } - return num*100 - }, + // activeStep() { + // let num = 0; + // if (this.form.direction == "buy") { + // if (!this.targetBalance.usable_balance) return 0; + // num = this.totalMoney / this.targetBalance.usable_balance; + // } else if (this.form.direction == "sell") { + // if (!this.currentBalance.usable_balance) return 0; + // num = this.form.amount / this.currentBalance.usable_balance; + // } + // if (!isNaN(num)) { + // num = num.toFixed(3); + // } + // return num*100 + // }, + // 所占百分比 + activeStep() { + return (this.form.amount / this.maxNum) * 100; + }, + activeStep() { + if (!this.form.amount || !this.maxNum) return 0; + let num = (this.form.amount / this.maxNum) * 100; + return num; + }, // 可用数量 usable() { if (this.form.direction == "buy") { @@ -1075,6 +1109,34 @@ export default { // border:1px solid $theme-1!important; border-color: $theme-1!important; } +// 滑块样式 +::v-deep .el-slider__marks-text{ + font-size: 18rpx; +} +::v-deep .el-slider__runway{ + background-color: #2B2B2B; + height: 8rpx; +} +::v-deep .el-slider__bar{ + background-color: white; +} +::v-deep .el-slider__stop{ + background-color: #121212; + border: 2px solid #2B2B2B; + top: -3px; + // border-radius: 10px; +} +::v-deep .el-slider__button{ + width: 20rpx; + height: 20rpx; + border: 2px solid #fff; + background-color: #121212; +} + +.entrust_title{ + display: flex;justify-content: space-between;width: 240px;padding-bottom: 4px; +} + .h-110{ height: 110px; } diff --git a/pages/exchange/open-position.vue b/pages/exchange/open-position.vue index 9d03b9d..bd38df2 100644 --- a/pages/exchange/open-position.vue +++ b/pages/exchange/open-position.vue @@ -1,15 +1,36 @@