第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為什么我的子組件Property or method "phoneFormRules" is not defined on the instance but referenced during render.

父組件

<phone-login :rule-form="phoneForm"></phone-login>

子組件

<template>

?<div>

? ?<el-form :model="ruleForm"

? ? ? ? ? ? :rules="phoneFormRules"

? ? ? ? ? ? ref="ruleForm">

? ? ?<el-form-item prop="phone">

? ? ? ?<el-input placeholder="請(qǐng)輸入手機(jī)號(hào)"

? ? ? ? ? ? ? ? ?v-model="ruleForm.phone">

? ? ? ? ?<i slot="prefix"

? ? ? ? ? ? class="el-icon-phone"></i>

? ? ? ?</el-input>

? ? ?</el-form-item>

? ? ?<el-form-item prop="code">

? ? ? ?<el-row :gutter='18'>

? ? ? ? ?<el-col :span="18">

? ? ? ? ? ?<el-input placeholder="請(qǐng)輸入驗(yàn)證碼"

? ? ? ? ? ? ? ? ? ? ?v-model="ruleForm.code">

? ? ? ? ? ? ?<i slot="prefix"

? ? ? ? ? ? ? ? class="el-icon-tickets"></i>

? ? ? ? ? ?</el-input>

? ? ? ? ?</el-col>

? ? ? ? ?<el-col :span="6">

? ? ? ? ? ?<el-button>發(fā)送驗(yàn)證碼</el-button>

? ? ? ? ?</el-col>

? ? ? ?</el-row>

? ? ?</el-form-item>

? ? ?<el-form-item>

? ? ? ?<el-button type="primary"

? ? ? ? ? ? ? ? ? style="width:100%">登錄</el-button>

? ? ?</el-form-item>

? ?</el-form>

?</div>

</template>

<script>

export default {

?name: 'PhoneLogin',

?props: {

? ?ruleForm: {

? ? ?type: Object,

? ? ?require: true

? ?},

? ?countDown: {

? ? ?type: Number,

? ? ?default: 60

? ?},

? ?data () {

? ? ?const checkPhone = (rule, value, callback) => {

? ? ? ?if (!value) {

? ? ? ? ?return callback(new Error('手機(jī)號(hào)不能為空'))

? ? ? ?} else {

? ? ? ? ?const reg = /^1[3|4|5|7|8][0-9]\d{8}$/

? ? ? ? ?if (reg.test(value)) {

? ? ? ? ? ?callback()

? ? ? ? ?} else {

? ? ? ? ? ?return callback(new Error('請(qǐng)輸入正確的手機(jī)號(hào)'))

? ? ? ? ?}

? ? ? ?}

? ? ?}

? ? ?return {

? ? ? ?phoneFormRules: {

? ? ? ? ?phone: [{ validator: checkPhone, trigger: 'change' }],

? ? ? ? ?code: [{ require: true, message: '驗(yàn)證碼不能為空', trigger: 'blur' }]

? ? ? ?}

? ? ?}

? ?}

?}

}

</script>




正在回答

1 回答

data位置錯(cuò)誤

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么我的子組件Property or method "phoneFormRules" is not defined on the instance but referenced during render.

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)