1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view class="contract">
- <headContent :showleftRight="false">
- <template #content>
- <view class="navigation-box">
- <view :class="['navigation-item hide_1' , contractIndex === index ? 'active-navigation-item' : '']"
- v-for="(item , index) in contractArr" :key="`navigation_${index}`"
- @click.stop="contractIndex = index">
- {{ item }}
- </view>
- </view>
- </template>
- </headContent>
-
- <!-- 永续合约 -->
- <template v-if="contractIndex === 0">
- <sustainability />
- </template>
-
- <!-- 赠金交易 -->
- <template v-if="contractIndex === 2">
- <grants />
- </template>
- <notarize />
- </view>
- </template>
- <script>
- import notarize from "./modules/notarize.vue"
- import sustainability from "./sustainability/index.vue"
- import grants from "./grants/index.vue"
- export default {
- name:'contract',
- components:{notarize , sustainability , grants},
- data() {
- return {
- contractIndex:2,
- contractArr:[
- '永续合约',
- '快捷合约',
- '赠金交易'
- ]
- };
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .navigation-box {
- width: 100%;
- height: 100%;
- padding-bottom: 11rpx;
- display: flex;
- align-items: flex-end;
- .navigation-item {
- // width: 25%;
- flex: 1;
- flex-shrink: 0;
- text-align: center;
- height: 60rpx;
- border: 2rpx solid #27ae83;
- line-height: 60rpx;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #05c175;
- &:nth-child(n + 2) {
- border-left: none;
- }
- &:last-child {
- border-radius: 0 6rpx 6rpx 0;
- }
- &:first-child {
- border-radius: 6rpx 0 0 6rpx;
- }
- }
- .active-navigation-item {
- background-color: #05C175;
- color: #FFFFFF;
- }
- }
- </style>
|