国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined

這篇具有很好參考價(jià)值的文章主要介紹了uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined,uni-app,小程序,vue.js
18888888888 脫敏為 188****8888

是因?yàn)閷?duì)字符串使用toString的時(shí)候頁(yè)面中的數(shù)據(jù)還沒(méi)有加載 。

錯(cuò)誤代碼:
uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined,uni-app,小程序,vue.js

可以使用 v-if
修改為:
uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined,uni-app,小程序,vue.js

手機(jī)號(hào)脫敏文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-542214.html

<text v-if="ownerPhone">{{ownerPhone.toString().replace(/^(1[3-9][0-9])\d{4}(\d{4}$)/, '$1****$2')}}</text>

到了這里,關(guān)于uniapp 小程序 vue TypeError: Cannot read property ‘toString‘ of undefined的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 在uniapp 小程序 vue中報(bào) 錯(cuò) Cannot read property ‘substring‘ of undefined

    在uniapp 小程序 vue中報(bào) 錯(cuò) Cannot read property ‘substring‘ of undefined

    是因 是因?yàn)閷?duì)字符串使用substring的時(shí)候頁(yè)面中的數(shù)據(jù)還沒(méi)有加載 。 錯(cuò)誤代碼: 可以使用 v-if 修改為:

    2024年02月12日
    瀏覽(22)
  • 【vue3+ts】TypeError: Cannot read properties of undefined (reading ‘commit‘)

    vue3組合式api中使用store.commit報(bào)錯(cuò),提示: 打印store的值,顯示undefined。 經(jīng)排查, const store = useStore() 不能寫(xiě)在setup函數(shù)的函數(shù)內(nèi)部,應(yīng)該就寫(xiě)在setup下。useStore這個(gè)方法的調(diào)用位置是有要求的,它只能在setup函數(shù)中調(diào)用,這是它的語(yǔ)法規(guī)定。 組合式API中使用vuex文檔:官網(wǎng)

    2024年02月15日
    瀏覽(24)
  • VUE+element UI :TypeError: Cannot read properties of null (reading ‘setAttribute‘)

    報(bào)錯(cuò)提示: 原因就是使用了 el-dropdown? 但是卻沒(méi)有它的子組件? el-dropdown-menu, 解決辦法: 1. 加一個(gè) el-dropdown-menu 2. 不要用這個(gè)組件就行

    2024年02月04日
    瀏覽(17)
  • vue Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘comcode‘)

    vue Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘comcode‘)

    ?在查看信息時(shí),界面沒(méi)反應(yīng),然后查看控制臺(tái)報(bào)錯(cuò) 然后查找獲取數(shù)據(jù)的方法 ?f12查看返回?cái)?shù)據(jù)信息如下: {msg: \\\"操作成功\\\", code: 200} 因?yàn)闆](méi)有正確返回?cái)?shù)據(jù),導(dǎo)致獲取response.data時(shí)是一個(gè)undefined ,因此展示數(shù)據(jù)的時(shí)候就會(huì)出錯(cuò) 所以修改獲取數(shù)據(jù)的function,然后將獲取的數(shù)據(jù)判

    2024年02月14日
    瀏覽(91)
  • 【微信小程序錯(cuò)誤】TypeError: Cannot read property ‘setData‘ of undefined

    在使用微信小程序的時(shí)候,遇到了這么個(gè)問(wèn)題。告訴你setData未找到! 代碼段中,我們可以看到,直接使用了this,這里的this獲取到的內(nèi)容出現(xiàn)了問(wèn)題。上段代碼中我們可以看到此處的this獲取到的是undefined。 只要將此處的undefind解決掉就可以。 這樣就搞定了。將this提前獲取到

    2024年02月10日
    瀏覽(46)
  • 【Vue】- 報(bào)錯(cuò) Error in render: “TypeError: Cannot read properties of undefined (reading ‘nickname‘)“

    【Vue】- 報(bào)錯(cuò) Error in render: “TypeError: Cannot read properties of undefined (reading ‘nickname‘)“

    在created()鉤子函數(shù)請(qǐng)求接口并報(bào)錯(cuò)數(shù)據(jù),渲染在dom元素是可以正常渲染,但是在開(kāi)發(fā)者工具中就會(huì)報(bào)錯(cuò) Error in render: \\\"TypeError: Cannot read properties of undefined (reading \\\'nickname\\\')\\\" ?意思是 在created調(diào)用封裝請(qǐng)求接口的函數(shù) ,獲取到的數(shù)據(jù)再給保存起來(lái)并渲染到dom元素,不過(guò)數(shù)據(jù)渲染之

    2023年04月21日
    瀏覽(36)
  • [Vue warn]: Error in nextTick: “TypeError: Cannot read properties of undefined (reading ‘toggleRowSe

    [Vue warn]: Error in nextTick: “TypeError: Cannot read properties of undefined (reading ‘toggleRowSe

    [Vue warn]: Error in nextTick: \\\"TypeError: Cannot read properties of undefined (reading \\\'toggleRowSelection\\\')\\\" 因?yàn)橐梦醇虞d完,所以報(bào)未定義的錯(cuò)誤,異步函數(shù)等待加載完成,并且得到數(shù)值后再執(zhí)行,報(bào)錯(cuò)就沒(méi)了。 ?

    2024年02月12日
    瀏覽(24)
  • [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined (reading ‘matched‘)“

    [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined (reading ‘matched‘)“

    vue中在路由那里你可能經(jīng)常遇到[Vue warn]: Error in render: \\\"TypeError: Cannot read properties of undefined (reading \\\'matched\\\')\\\"的報(bào)錯(cuò),導(dǎo)致頁(yè)面無(wú)法顯示的問(wèn)題。如圖: 出現(xiàn)這種情況,你應(yīng)該首先查看路由的引入是否正確??!在vue里面使用路由有一個(gè)比較需要注意的地方,就是要使用router來(lái)注

    2024年02月16日
    瀏覽(28)
  • vue3報(bào)錯(cuò) Uncaught TypeError: Cannot read properties of null (reading ‘isCE‘) at renderSlot

    vue3報(bào)錯(cuò) Uncaught TypeError: Cannot read properties of null (reading ‘isCE‘) at renderSlot

    最近在vue項(xiàng)目中遇到如下報(bào)錯(cuò),項(xiàng)目使用的是vue3+webpack搭建的 造成這個(gè)的原因是有兩個(gè)不同的vue版本, 就可能下載的其他的第三方和當(dāng)前的vue版本不相同, 就有兩個(gè)vue的副本,在引入的時(shí)候, npm去嘗試引入的地址不對(duì) 有如下幾種解決方案 由于npm的引入地址不對(duì), 那我們使

    2023年04月27日
    瀏覽(30)
  • 解決:[Vue warn]: Error in render: “TypeError: Cannot read properties of undefined (reading ‘matched‘)“

    解決:[Vue warn]: Error in render: “TypeError: Cannot read properties of undefined (reading ‘matched‘)“

    在vue項(xiàng)目中使用路由報(bào)以下錯(cuò)誤: [Vue warn]: Error in render: \\\"TypeError: Cannot read properties of undefined (reading \\\'matched\\\')\\\" ,如圖?? 這個(gè)錯(cuò)誤表示,App組件在渲染過(guò)程中嘗試訪問(wèn)一個(gè)未定義的屬性或方法,例如訪問(wèn)一個(gè)空對(duì)象的屬性或調(diào)用一個(gè)未定義的函數(shù)。 出錯(cuò)的代碼嘗試訪問(wèn)一個(gè)叫

    2024年02月12日
    瀏覽(31)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包