当前位置:网站首页>Auto.js 自定义对话框

Auto.js 自定义对话框

2022-04-23 17:53:00 宴西笔记

在这里插入图片描述

view = ui.inflate(
    <vertical>
        <horizontal>
            <text text="账号"/>
            <input id="账号"w="*"/>
        </horizontal>
        <horizontal>
            <text text="密码"/>
            <input id="密码"w="*"/>
        </horizontal>
    </vertical>
);
dialogs.build({
    
    customView: view,
    title: "登录",
    positive: "确定",
    negative: "取消",
    neutral: "注册"
}).on("positive", (dialog) => {
    
    账号=view.账号.text();
    密码=view.密码.text();
    toast("账号="+账号+"\n密码="+密码)
}).on("negative", (dialog) => {
    
    toast("取消")
    dialog.dismiss();
}).on("neutral", (dialog) => {
    
    toast("注册")
}).show();

QQ群 568523841

版权声明
本文为[宴西笔记]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_25226575/article/details/124347299