【vue】option配置表單校驗輸入框禁止只有空格 阿新 • • 發佈:2021-01-14 技術標籤:vuevue 【vue】option配置表單校驗輸入框禁止只有空格 option配置表單校驗輸入框禁止只有空格 option配置表單校驗輸入框禁止只有空格 程式碼示例: option: { column: [ { label: "登入賬號", prop: "account", maxlength: 255, rules: [ { required: true, message: "登入賬號不能為空", trigger: "blur", }, { whitespace: true, message: "不能只輸入空格", trigger: "blur" } ] } ] } 圖片示例: