@property({ type: Boolean })
a: boolean;
@property({ type: String, hidden: "!data.a" })
hide: string = "";
@property({ type: Boolean })
b: boolean;
@property({ type: String, readonly: "data.b" })
read: string = "";
@property(String)
text1: string;
@property({ type: String, validator: "if (value == data.text1) return '不能与a值相同' " })
text2: string = "";
@property({ type: String, password: true })
password: string;
@property({ type: String, submitOnTyping: false })
submit: string;
@property({ type: "text", prompt: "文本提示信息" })
prompt: string;
@property({ type: Number, enumSource: [{name:"Yes", value:1}, {name:"No",value:0}] })
enumsource: number;
@property({ type: "boolean", reverseBool: true })
reverseboolean : boolean;
@property({ type: String, nullable: true })
nullable: string;
@property({ type: Number, range:[0,5], step: 0.5, fractionDigits: 3 })
range : number;
@property({ type: Number, range:[0,1], percentage: true })
percent : number;
@property({ type: ["number"], fixedLength: true })
arr1: number[];
@property({ type: ["number"], arrayActions: ["delete", "move"] })
arr2: number[];
@property({ type: [Number], elementProps: { range: [0, 100] } })
array1: Array<Number>;
@property({ type: [[Number]], elementProps: { elementProps: { range: [0, 10] } } })
array2: Array<Array<Number>>;
@property({ type: Laya.Color, showAlpha: false })
color1: Laya.Color;
@property({ type: String, inspector: "color", defaultColor: "rgba(217, 232, 0, 1)" })
color2: string;
@property({ type: Laya.Color, colorNullable: true })
color3: Laya.Color;
@property({ type: String, isAsset: true, assetTypeFilter: "Image" })
resource: string;
@property({ type: String })
x: string;
@property({ type: String, position: "before x" })
testposition: string;
@property({ type: String, addIndent:1 })
indent1: string;
@property({ type: String, addIndent:2 })
indent2: string;
@property({ type: Boolean, onChange: "onChangeTest"})
change: boolean;
onChangeTest() {
console.log("onChangeTest");
}