Alert组件简介

文章关键字:|Alert|组件|提示框|按钮|窗口|对话框|

Alert.show(content,title,flags,parent,closeHandle,iconClass,defaultButtonFlag);

Content:提示内容

title:提示框标题

flags:指定出现的按钮。选值有:

0--OK按钮;
1--Yes按钮;
2--No按钮;
3--Yes,No按钮组;
4--OK按钮;
5--OK,Yes按钮组;
6--OK,No按钮组;
7--OK,YES,NO按钮组;
8--Cancel按钮;
9--YES,CANCEL按钮组;
10--NO,CANCEL按钮组;
11--YES,NO,CANCEL;
12--NO,CANCEL按钮组;
13--NO,YES,CANCEL按钮组;
14--OK,NO,CANCEL按钮组;
15--OK,NO,YES,CANCEL按钮组。
到16以后又回到0开始,即16=0,17=1等等

//你可以通过逻辑符合"|"随意组合,组合后默认排列,与你自定义的顺序无关。如:1|2|8显示是为:YES按钮,NO按钮,Cancel按钮

parent:对话框居中的参照对象。一般指定this,即当前窗口。

iconClass:给对话框指定图标。

defaultButtonFlag:指定默认被选中的按钮。当按下回车相当于该按钮的点击事件出发。

【官方源码】

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.CloseEvent;

// Event handler function uses a static method to show
// a pop-up window with the title, message, and requested buttons.
private function clickHandler(event:Event):void {
Alert.show("Do you want to save your changes?", "Save Changes",3, this, alertClickHandler);
}

// Event handler function for displaying the selected Alert button.
private function alertClickHandler(event:CloseEvent):void {
if (event.detail==Alert.YES)
status.text="You answered Yes";
else
status.text="You answered No";
}

// Event handler function changes the default Button labels and sets the
// Button widths. If you later use an Alert with the default Buttons,
// you must reset these values.
private function secondClickHandler(event:Event):void {
Alert.buttonWidth = 100;
Alert.yesLabel = "Magenta";
Alert.noLabel = "Blue";
Alert.cancelLabel = "Green";

Alert.show("Select a color:","Color Selection",1|2|8,this);

// Set the labels back to normal:
Alert.yesLabel = "Yes";
Alert.noLabel = "No";
}
]]>
</mx:Script>

<mx:Panel title="Alert Control Example" width="75%" horizontalAlign="center" paddingTop="10">
<mx:Text width="100%" color="blue" textAlign="center"
text="Click the button below to display a simple Alert window."/>
<mx:Button label="Click Me" click="Alert.show('Hello World!', 'Message');"/>

<mx:Text width="100%" color="blue" textAlign="center"
text="Click the button below to display an Alert window and capture the button pressed by the user."/>
<mx:Button label="Click Me" click="clickHandler(event);"/>
<mx:Label id="status" fontWeight="bold"/>

<mx:Text width="100%" color="blue" textAlign="center"
text="Click the button below to display an Alert window that uses custom Button labels."/>
<mx:Button label="Click Me" click="secondClickHandler(event);"/>
</mx:Panel>

</mx:Application>

原文地址:http://www.evget.com/zh-CN/Info/ReadInfo.aspx?id=9193
标题基于SpringBoot+Vue的学生交流互助平台研究AI更换标题第1章引言介绍学生交流互助平台的研究背景、意义、现状、方法与创新点。1.1研究背景与意义分析学生交流互助平台在当前教育环境下的需求及其重要性。1.2国内外研究现状综述国内外在学生交流互助平台方面的研究进展与实践应用。1.3研究方法与创新点概述本研究采用的方法论、技术路线及预期的创新成果。第2章相关理论阐述SpringBoot与Vue框架的理论基础及在学生交流互助平台中的应用。2.1SpringBoot框架概述介绍SpringBoot框架的核心思想、特点及优势。2.2Vue框架概述阐述Vue框架的基本原理、组件化开发思想及与前端的交互机制。2.3SpringBoot与Vue的整合应用探讨SpringBoot与Vue在学生交流互助平台中的整合方式及优势。第3章平台需求分析深入分析学生交流互助平台的功能需求、非功能需求及用户体验要求。3.1功能需求分析详细阐述平台的各项功能需求,如用户管理、信息交流、互助学习等。3.2非功能需求分析对平台的性能、安全性、可扩展性等非功能需求进行分析。3.3用户体验要求从用户角度出发,提出平台在易用性、美观性等方面的要求。第4章平台设计与实现具体描述学生交流互助平台的架构设计、功能实现及前后端交互细节。4.1平台架构设计给出平台的整体架构设计,包括前后端分离、微服务架构等思想的应用。4.2功能模块实现详细阐述各个功能模块的实现过程,如用户登录注册、信息发布与查看、在线交流等。4.3前后端交互细节介绍前后端数据交互的方式、接口设计及数据传输过程中的安全问题。第5章平台测试与优化对平台进行全面的测试,发现并解决潜在问题,同时进行优化以提高性能。5.1测试环境与方案介绍测试环境的搭建及所采用的测试方案,包括单元测试、集成测试等。5.2测试结果分析对测试结果进行详细分析,找出问题的根源并
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值