element-ui - $prompt非空验证

//点击删除按钮

delStoreFun(data) {

let than = this;

this.$prompt('删除门店请填写备注', '提示', {

confirmButtonText: '确定',

cancelButtonText: '取消',

inputValidator: (value) => { //非空验证

if (!value) {

return '输入不能为空'

}

},

}).then(({ value }) => {

delShop({ id: data.systemStore.id,reason:value}).then((res) => {

than.$message({

message: "操作成功",

type: 'success'

});

than.list();

})

})

},

相关推荐
胡玉洋19 小时前
从新手到高手:全面解析 AI 时代的「魔法咒语」——Prompt
人工智能·ai·prompt·transformer·协议
L_cl1 天前
【NLP 72、Prompt、Agent、MCP、function calling】
prompt
Lilith的AI学习日记1 天前
Claude官方63组提示词模板全解析:从工作到生活的AI应用指南
人工智能·prompt·生活·ai编程·claude
java干货1 天前
每日Prompt:超现实交互场景
prompt
java干货2 天前
每日Prompt:发光线条解剖图
prompt
AI大模型顾潇2 天前
[特殊字符] 本地大模型编程实战(29):用大语言模型LLM查询图数据库NEO4J(2)
前端·数据库·人工智能·语言模型·自然语言处理·prompt·neo4j
java干货2 天前
每日Prompt:三只动物与地标自拍
prompt
0x2112 天前
[论文阅读]Formalizing and Benchmarking Prompt Injection Attacks and Defenses
论文阅读·prompt
java干货3 天前
每日Prompt:定制动漫手办
prompt
AIWritePaper智能写作探索4 天前
高质量学术引言如何妙用ChatGPT?如何写提示词?
人工智能·chatgpt·prompt·智能写作·aiwritepaper·引言