关于前端:button按钮传type类型参数

9次阅读

共计 1176 个字符,预计需要花费 3 分钟才能阅读完成。

以 @click=”formData.type = 1;showEmail=true” 来进行传 type 参数

<view class="ple-Warning">
  <button size="default" id="checkout-button" shape="circle" class="btn_1"  @click="formData.type = 1;showEmail=true">{{allLang.coinify_button_one}}</button>
  <button size="default" id="checkout-button" shape="circle" class="btn_2"  @click="formData.type = 0;goLogin()">{{allLang.coinify_button_two}}</button>
</view>

动静绑定 input 输入框

<view class="boxBm test_pop" v-if="showEmail">
  <view class="box2">
      <view class="email-text">
          <text>{{allLang.coinify_login_text_three}}</text>
          <input type="text" v-model="formData.email" placeholder=""/>
      </view>
      <view class="ple-Warning">
          <button size="default" id="checkout-button" shape="circle" class="btn_1"  @click="getEmail()">{{allLang.app_general_determine}}</button>
          <button size="default" id="checkout-button" shape="circle" class="btn_2"  @click="closeEmail()">{{allLang.app_general_cancel}}</button>
      </view>

  </view>
</view>

script

<script>
    import payMentTitle from '../../../components/payMentTitle/payMentTitle.vue'
    export default {data() {
            return {
                allLang:'',
                email:'tan88@yandex.com',
                payType:'',
                lang:'en',
                isLower: false,
                showEmail: false,
                oneToken: '',
                depositAddress:'',
                refToken:'',
                // 初始化参数
                formData: {
                    type: 0,
                    email: ""
                }
            }
        },
    }
</script>
正文完
 0