建立网站官网,百度云资源搜索网站,网域高科学校网站管理系统漏洞,四川住房和城乡建设厅网站打不开flex里的[Inspectable]标签用于为as类的属性定义一些可供flex代码提示等使用的信息#xff0c;比如属性的类型啦合法值啦默认值啦之类的#xff0c;[Inspectable]标签可以用在属性上#xff0c;也可以用在getter/setter方法上#xff0c;写法如下#xff1a; [Inspectable…flex里的[Inspectable]标签用于为as类的属性定义一些可供flex代码提示等使用的信息比如属性的类型啦合法值啦默认值啦之类的[Inspectable]标签可以用在属性上也可以用在getter/setter方法上写法如下 [Inspectable(attributevalue[, attributevalue, …])] property_declaration name:type; [Inspectable(attributevalue[, attributevalue, …])] setter_getter_declarations; [Inspectable]标签有如下属性 PropertyTypeDescriptioncategoryStringenumerationString用逗号分隔指定一系列合法值只有这些值才允许设置例如“test1,test2,test3”注意值与值之间不要使用空格否则flex会认为空格是值的一部分除非你确实想这样啦这信息会出现在代码提示和属性检查器里formatStringtypeString设定属性的类型如果忽略则使用属性本身的数据类型可选值如下 Array, Boolean, Color, Font Name, List, Number, Object, String 例如下面这样的代码 [Inspectable(typeString, enumerationleft,center,right)] public var labelPlacement:String LabelPlacement.LEFT; 原文链接http://blog.163.com/zlx_p/blog/static/9775498201083011442847/转载于:https://www.cnblogs.com/Longbin/articles/2985345.html