Vue 澶ч噺data鍙妑ules鐨刣ata閫夐」缁撴瀯缁勭粐
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vue 澶ч噺data鍙妑ules鐨刣ata閫夐」缁撴瀯缁勭粐相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/word' title='word'>word
mode character const err turn min name cte濡傛灉Vue鏂囦欢闇€瑕佸緢澶氱殑data鎴愬憳鍙婅〃鍗曢獙璇侊紝寤鸿浣跨敤绫讳技缁撴瀯
export default{
data(){
const model = {
username: 鈥榮uzhen鈥?
password: 鈥?2345678鈥? }
const rules = {
username: [
{ required: true, message: 鈥楿sername is required鈥?},
{ min: 2, max: 16, message: 鈥楿sername must be between 2 and 16 characters鈥?
}],
password: [
{ required: true, message: 鈥楶assword is required鈥?},
{ min: 4, max: 16, message: 鈥楶assword must be between 4 and 16 characters鈥?}
]}
// 鍔犱笂椤甸潰鏁版嵁
return { model, rules, error: null, loading: false }
}
以上是关于Vue 澶ч噺data鍙妑ules鐨刣ata閫夐」缁撴瀯缁勭粐的主要内容,如果未能解决你的问题,请参考以下文章
鐢宠杩涘害 | 澶ч檰鏈鐢熸柀鑾?Microsoft 鍖椾含瀹炰範Offer
涓浗绋嬪簭濯涜嚜鏇濓細鏇捐Scala澶т浆鎬ч獨鎵帮紒涓撴寫闈炶嫳璇瘝璇皬濮戝涓嬫墜
澶ф姤鐐?| Mogwai / Tame Impala / Tortoise / Karen O...