0

在ios9中,vue的条件渲染和绑定事件都失效了,在ios10和ios11都是正常的,怎么处理呢?

<div class="weui-cell weui-cell_select weui-cell_select-after">
    <div class="weui-cell__hd">
        <label for="invoice_type" class="weui-label">发票类型</label>
    </div>
    <div class="weui-cell__bd">
        <select class="weui-select" name="invoice_type" id="invoice_type" v-model="invoiceType" @change="changeInvoiceType" required emptyTips="请选择发票类型">
            <option value="" disabled selected>请选择</option>
            <option value="1">增值税普通发票</option>
            <option value="2">增值税专用发票</option>
        </select>
    </div>
</div>
<div class="weui-cell" v-if="invoiceType === '2'">
        <div class="weui-cell__hd" style="width: 115px;"><label class="weui-label">公司地址</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="请输入公司地址" v-model="companyLocation" />
        </div>
    </div>

var form = new Vue({
    el: '#form',
    data: {
        invoiceNatureId:'',
        invoiceType:'',
        companyLocation:''
    },
    methods: {
        changeInvoiceType: function () {
            if (this.invoiceType === '2') {
                this.invoiceNatureId = '2';
                this.headerType = '1';
            }
        },                
    }                      
});

1个回答

0

已采纳

不是vue的问题,问题是我使用了es6的foreach。

撰写答案