提交 ad858c78 编写于 作者: Z zhangxinyue

bug fix

Signed-off-by: Nzhangxinyue <zhangxinyue38@huawei.com>
上级 5fef6170
...@@ -21,6 +21,7 @@ struct GlobalExample { ...@@ -21,6 +21,7 @@ struct GlobalExample {
private settings: RenderingContextSettings = new RenderingContextSettings (true) private settings: RenderingContextSettings = new RenderingContextSettings (true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(300, 300, this.settings); private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(300, 300, this.settings);
private img: ImageBitmap = new ImageBitmap("/images/bg.jpg")
onPageShow() { onPageShow() {
console.info("global page called") console.info("global page called")
...@@ -35,50 +36,33 @@ struct GlobalExample { ...@@ -35,50 +36,33 @@ struct GlobalExample {
Canvas(this.context) Canvas(this.context)
.width('100%').height('40%').backgroundColor('#00ffff') .width('100%').height('40%').backgroundColor('#00ffff')
.onReady(() => { .onReady(() => {
this.context.imageSmoothingEnabled = false this.offContext.imageSmoothingEnabled = false
this.testImageBitmapSize(); this.testImageBitmapSize();
this.testOffscreenCanvas(); this.testOffscreenCanvas();
this.testImageData(); this.testImageData();
this.testImage();
}) })
}.width('100%').height('100%') }.width('100%').height('100%')
} }
testImageBitmapSize() { testImageBitmapSize() {
let img = new ImageBitmap("/images/bg.jpg"); let width = this.img.width;
let width = img.width; let height = this.img.height;
let height = img.height; this.offContext.imageSmoothingEnabled = false;
this.context.imageSmoothingEnabled = false; this.offContext.drawImage(this.img, 30, 950, 160, 100);
this.context.drawImage(img, 30, 950, 160, 100);
console.log("imagebitmap_width=" + width); console.log("imagebitmap_width=" + width);
console.log("imagebitmap_height=" + height); console.log("imagebitmap_height=" + height);
} }
testOffscreenCanvas() { testOffscreenCanvas() {
var offCanvas2 = this.offContext.getContext("2d"); this.offContext.drawImage(this.img, 0, 0, 100, 100);
var img = new Image(); var bitmap = this.offContext.transferToImageBitmap();
img.src = "/images/bg.jpg"; this.context.transferFromImageBitmap(bitmap);
offCanvas2.drawImage(img, 0, 0, 100, 100);
var bitmap = offscreen.transferToImageBitmap();
this.ctx.transferFromImageBitmap(bitmap);
} }
testImageData() { testImageData() {
var offCanvas2 = this.offContext.getContext("2d"); var imageData = this.offContext.createImageData(100, 100);
var imageData = offCanvas2.createImageData(100, 100);
var imgData = imageData.data; var imgData = imageData.data;
console.log("imageData_width=" + imageData.width); console.log("imageData_width=" + imageData.width);
console.log("imageData_height=" + imageData.height); console.log("imageData_height=" + imageData.height);
} }
testImage() {
var img = new Image("/images/bg.jpg", 100, 100)
.onload(() => {
})
.onerror(() => {
});
console.log("img_width=" + img.width);
console.log("img_height=" + img.height);
}
} }
\ No newline at end of file
...@@ -38,7 +38,7 @@ struct VisibilityExample { ...@@ -38,7 +38,7 @@ struct VisibilityExample {
eventId: 1116, eventId: 1116,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
events_emitter.on(stateChangeEvent2, this.stateChangCallBack); events_emitter.on(stateChangeEvent2, this.hiddenChangCallBack);
} }
private hiddenChangCallBack = (eventData) => { private hiddenChangCallBack = (eventData) => {
......
...@@ -405,7 +405,7 @@ export default function imageEffectsJsunit() { ...@@ -405,7 +405,7 @@ export default function imageEffectsJsunit() {
let strJsonNew = getInspectorByKey('centerRow5'); let strJsonNew = getInspectorByKey('centerRow5');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testImageEffects015] component objNew is: " + JSON.stringify(objNew)); console.info("[testImageEffects015] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.brightness).assertEqual(0.0000019999999949504854); expect(objNew.$attrs.brightness).assertEqual(0);
done(); done();
}); });
...@@ -520,7 +520,7 @@ export default function imageEffectsJsunit() { ...@@ -520,7 +520,7 @@ export default function imageEffectsJsunit() {
let strJsonNew = getInspectorByKey('centerRow6'); let strJsonNew = getInspectorByKey('centerRow6');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testImageEffects020] component objNew is: " + JSON.stringify(objNew)); console.info("[testImageEffects020] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.saturate).assertEqual(0.0000019999999949504854); expect(objNew.$attrs.saturate).assertEqual(0);
done(); done();
}); });
...@@ -634,7 +634,7 @@ export default function imageEffectsJsunit() { ...@@ -634,7 +634,7 @@ export default function imageEffectsJsunit() {
let strJsonNew = getInspectorByKey('centerRow7'); let strJsonNew = getInspectorByKey('centerRow7');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testImageEffects025] component objNew is: " + JSON.stringify(objNew)); console.info("[testImageEffects025] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.contrast).assertEqual(0.0000019999999949504854); expect(objNew.$attrs.contrast).assertEqual(0);
done(); done();
}); });
......
...@@ -450,7 +450,7 @@ export default function swiperJsunit() { ...@@ -450,7 +450,7 @@ export default function swiperJsunit() {
try { try {
let eventData = { let eventData = {
data: { data: {
"duration": "nan" "duration": "0"
} }
} }
let indexEvent = { let indexEvent = {
...@@ -466,7 +466,7 @@ export default function swiperJsunit() { ...@@ -466,7 +466,7 @@ export default function swiperJsunit() {
let strJsonNew = getInspectorByKey('swiper'); let strJsonNew = getInspectorByKey('swiper');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("swiperTest_1900 component objNew is: " + JSON.stringify(objNew)); console.info("swiperTest_1900 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.duration).assertEqual('nan'); expect(objNew.$attrs.duration).assertEqual('0.000000');
console.info('swiperTest_1900 END'); console.info('swiperTest_1900 END');
done(); done();
}); });
......
...@@ -22,15 +22,6 @@ struct PanGestureExample { ...@@ -22,15 +22,6 @@ struct PanGestureExample {
@State offsetY: number = 0 @State offsetY: number = 0
@State touchable: boolean = true; @State touchable: boolean = true;
@State isTouched: boolean = false; @State isTouched: boolean = false;
onPageShow() {
let ChangeEvent = {
eventId: 23,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(ChangeEvent, this.ChangCallBack)
}
private ChangCallBack = (eventData) => { private ChangCallBack = (eventData) => {
console.info("[PanGesture] ChangCallBack stateChangCallBack"); console.info("[PanGesture] ChangCallBack stateChangCallBack");
if (eventData != null) { if (eventData != null) {
...@@ -41,6 +32,14 @@ struct PanGestureExample { ...@@ -41,6 +32,14 @@ struct PanGestureExample {
} }
} }
onPageShow() {
var ChangeEvent = {
eventId: 23,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(ChangeEvent, this.ChangCallBack)
}
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY)
...@@ -54,8 +53,8 @@ struct PanGestureExample { ...@@ -54,8 +53,8 @@ struct PanGestureExample {
.translate({ x: this.offsetX, y: this.offsetY, z: 5 }) .translate({ x: this.offsetX, y: this.offsetY, z: 5 })
.touchable(this.touchable) .touchable(this.touchable)
.gesture( .gesture(
PanGesture({ fingers: 1, direction: PanDirection.All, distance: 1 }) PanGesture({ fingers: 1, direction: PanDirection.All, distance: 1 })
.onActionStart((event: PanGestureEvent) => { .onActionStart((event: GestureEvent) => {
console.info('Pan start') console.info('Pan start')
console.log('PanGesture globalX' + event.globalX); console.log('PanGesture globalX' + event.globalX);
console.log('PanGesture globalY' + event.globalY); console.log('PanGesture globalY' + event.globalY);
...@@ -67,14 +66,15 @@ struct PanGestureExample { ...@@ -67,14 +66,15 @@ struct PanGestureExample {
console.log('PanGesture pinchCenterX' + event.pinchCenterX); console.log('PanGesture pinchCenterX' + event.pinchCenterX);
console.log('PanGesture pinchCenterY' + event.pinchCenterY); console.log('PanGesture pinchCenterY' + event.pinchCenterY);
}) })
.onActionUpdate((event: PanGestureEvent) => { .onActionUpdate((event: GestureEvent) => {
this.offsetX = event.offsetX this.offsetX = event.offsetX
this.offsetY = event.offsetY this.offsetY = event.offsetY
}) })
.onActionEnd(() => { .onActionEnd(() => {
console.info('Pan end') console.info('Pan end')
}) })
.onTouch((event: TouchEvent) => { )
.onTouch((event: TouchEvent) => {
console.log('[PanGesture] TouchType start'); console.log('[PanGesture] TouchType start');
this.isTouched = true this.isTouched = true
if (event.type === TouchType.Down) { if (event.type === TouchType.Down) {
...@@ -104,7 +104,5 @@ struct PanGestureExample { ...@@ -104,7 +104,5 @@ struct PanGestureExample {
console.info("[PanGesture] emit action state err: " + JSON.stringify(err.message)) console.info("[PanGesture] emit action state err: " + JSON.stringify(err.message))
} }
}) })
)
} }
} }
\ No newline at end of file
...@@ -231,7 +231,7 @@ export default function spanJsunit() { ...@@ -231,7 +231,7 @@ export default function spanJsunit() {
console.info("[testSpan009] component strJson:" + strJson); console.info("[testSpan009] component strJson:" + strJson);
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[testSpan009] fontColor:" + obj); console.info("[testSpan009] fontColor:" + obj);
expect(obj.$attrs.fontColor).assertEqual('#FF000000'); expect(obj.$attrs.fontColor).assertEqual('#FFFFFFFF');
done(); done();
}); });
}) })
......
...@@ -101,13 +101,8 @@ export default { ...@@ -101,13 +101,8 @@ export default {
}, },
onShow(){ onShow(){
// 通用属性
var prop1 = this.$element('prop1');
var name1 = prop1.dataSet.name
var prop2 = this.$refs.prop2;
var name2 = prop2.dataSet.name
prompt.showToast({ prompt.showToast({
message: 'prop1--' + name1 + '\nprop2--' + name2 message: 'onShow'
}); });
}, },
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('idProp') expect(obj.$attrs.id).assertEqual('idProp')
done(); done();
}); });
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('classProp') expect(obj.$attrs.id).assertEqual('classProp')
expect(obj.$attrs.className).assertEqual('classProp') expect(obj.$attrs.className).assertEqual('classProp')
done(); done();
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('classPropNone') expect(obj.$attrs.id).assertEqual('classPropNone')
expect(obj.$attrs.className).assertEqual(undefined) expect(obj.$attrs.className).assertEqual(undefined)
console.info("[pickerViewProps] get className value is: " + JSON.stringify(obj.$attrs.className)); console.info("[pickerViewProps] get className value is: " + JSON.stringify(obj.$attrs.className));
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
// console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); // console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); // console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
// //
// expect(obj.$type).assertEqual('picker-view') // expect(obj.$type).assertEqual('picker-view-view')
// expect(obj.$attrs.id).assertEqual('styleProp') // expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined) // expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[pickerViewProps] get style value is: " + JSON.stringify(obj.$attrs.style)); // console.info("[pickerViewProps] get style value is: " + JSON.stringify(obj.$attrs.style));
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('refProp') expect(obj.$attrs.id).assertEqual('refProp')
expect(obj.$attrs.ref).assertEqual('refProp') expect(obj.$attrs.ref).assertEqual('refProp')
done(); done();
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('refPropNone') expect(obj.$attrs.id).assertEqual('refPropNone')
expect(obj.$attrs.ref).assertEqual(undefined) expect(obj.$attrs.ref).assertEqual(undefined)
console.info("[pickerViewProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); console.info("[pickerViewProps] get ref value is: " + JSON.stringify(obj.$attrs.ref));
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('disabledPropTrue') expect(obj.$attrs.id).assertEqual('disabledPropTrue')
expect(obj.$attrs.disabled).assertEqual('true') expect(obj.$attrs.disabled).assertEqual('true')
done(); done();
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('disabledPropFalse') expect(obj.$attrs.id).assertEqual('disabledPropFalse')
expect(obj.$attrs.disabled).assertEqual('false') expect(obj.$attrs.disabled).assertEqual('false')
done(); done();
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('disabledPropNone') expect(obj.$attrs.id).assertEqual('disabledPropNone')
expect(obj.$attrs.disabled).assertEqual('false') expect(obj.$attrs.disabled).assertEqual('false')
done(); done();
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('focusablePropTrue') expect(obj.$attrs.id).assertEqual('focusablePropTrue')
expect(obj.$attrs.focusable).assertEqual('true') expect(obj.$attrs.focusable).assertEqual('true')
done(); done();
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('focusablePropFalse') expect(obj.$attrs.id).assertEqual('focusablePropFalse')
expect(obj.$attrs.focusable).assertEqual('false') expect(obj.$attrs.focusable).assertEqual('false')
done(); done();
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('focusablePropNone') expect(obj.$attrs.id).assertEqual('focusablePropNone')
expect(obj.$attrs.focusable).assertEqual('false') expect(obj.$attrs.focusable).assertEqual('false')
done(); done();
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dataProp') expect(obj.$attrs.id).assertEqual('dataProp')
expect(obj.$attrs.datapickerView).assertEqual(undefined); expect(obj.$attrs.datapickerView).assertEqual(undefined);
console.info("[pickerViewProps] get datapickerView value is: " + JSON.stringify(obj.$attrs.datapickerView)); console.info("[pickerViewProps] get datapickerView value is: " + JSON.stringify(obj.$attrs.datapickerView));
...@@ -347,7 +347,7 @@ ...@@ -347,7 +347,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dataPropNone') expect(obj.$attrs.id).assertEqual('dataPropNone')
expect(obj.$attrs.datapickerView).assertEqual(undefined) expect(obj.$attrs.datapickerView).assertEqual(undefined)
console.info("[pickerViewProps] get datapickerView value is: " + JSON.stringify(obj.$attrs.datapickerView)); console.info("[pickerViewProps] get datapickerView value is: " + JSON.stringify(obj.$attrs.datapickerView));
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') expect(obj.$attrs.id).assertEqual('clickEffectPropSmall')
expect(obj.$attrs.clickEffect).assertEqual('spring-small') expect(obj.$attrs.clickEffect).assertEqual('spring-small')
done(); done();
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') expect(obj.$attrs.id).assertEqual('clickEffectPropMedium')
expect(obj.$attrs.clickEffect).assertEqual('spring-medium') expect(obj.$attrs.clickEffect).assertEqual('spring-medium')
done(); done();
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') expect(obj.$attrs.id).assertEqual('clickEffectPropLarge')
expect(obj.$attrs.clickEffect).assertEqual('spring-large') expect(obj.$attrs.clickEffect).assertEqual('spring-large')
done(); done();
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('clickEffectPropNone') expect(obj.$attrs.id).assertEqual('clickEffectPropNone')
expect(obj.$attrs.clickEffect).assertEqual(undefined) expect(obj.$attrs.clickEffect).assertEqual(undefined)
console.info("[pickerViewProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); console.info("[pickerViewProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect));
...@@ -444,7 +444,7 @@ ...@@ -444,7 +444,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dirPropRtl') expect(obj.$attrs.id).assertEqual('dirPropRtl')
expect(obj.$attrs.dir).assertEqual('rtl') expect(obj.$attrs.dir).assertEqual('rtl')
done(); done();
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dirPropLtr') expect(obj.$attrs.id).assertEqual('dirPropLtr')
expect(obj.$attrs.dir).assertEqual('ltr') expect(obj.$attrs.dir).assertEqual('ltr')
done(); done();
...@@ -482,7 +482,7 @@ ...@@ -482,7 +482,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dirPropAuto') expect(obj.$attrs.id).assertEqual('dirPropAuto')
expect(obj.$attrs.dir).assertEqual('auto') expect(obj.$attrs.dir).assertEqual('auto')
done(); done();
...@@ -501,7 +501,7 @@ ...@@ -501,7 +501,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('dirPropNone') expect(obj.$attrs.id).assertEqual('dirPropNone')
expect(obj.$attrs.dir).assertEqual('auto') expect(obj.$attrs.dir).assertEqual('auto')
done(); done();
...@@ -520,7 +520,7 @@ ...@@ -520,7 +520,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('forPropNull') expect(obj.$attrs.id).assertEqual('forPropNull')
expect(obj.$attrs.for).assertEqual(undefined) expect(obj.$attrs.for).assertEqual(undefined)
console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for)); console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for));
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('forPropOne') expect(obj.$attrs.id).assertEqual('forPropOne')
expect(obj.$attrs.for).assertEqual(undefined) expect(obj.$attrs.for).assertEqual(undefined)
console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for)); console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for));
...@@ -560,7 +560,7 @@ ...@@ -560,7 +560,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('forPropThree') expect(obj.$attrs.id).assertEqual('forPropThree')
expect(obj.$attrs.for).assertEqual(undefined) expect(obj.$attrs.for).assertEqual(undefined)
console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for)); console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.for));
...@@ -580,7 +580,7 @@ ...@@ -580,7 +580,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('ifPropTrue') expect(obj.$attrs.id).assertEqual('ifPropTrue')
expect(obj.$attrs.if).assertEqual(undefined) expect(obj.$attrs.if).assertEqual(undefined)
console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.if)); console.info("[pickerViewProps] get for value is: " + JSON.stringify(obj.$attrs.if));
...@@ -600,7 +600,7 @@ ...@@ -600,7 +600,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker-view') expect(obj.$type).assertEqual('picker-view-view')
expect(obj.$attrs.id).assertEqual('ifPropFalse') expect(obj.$attrs.id).assertEqual('ifPropFalse')
expect(obj.$attrs.if).assertEqual(false) expect(obj.$attrs.if).assertEqual(false)
done(); done();
...@@ -619,7 +619,7 @@ ...@@ -619,7 +619,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker-view') expect(obj.$type).assertEqual('picker-view-view')
expect(obj.$attrs.id).assertEqual('ifPropNone') expect(obj.$attrs.id).assertEqual('ifPropNone')
expect(obj.$attrs.if).assertEqual(false) expect(obj.$attrs.if).assertEqual(false)
done(); done();
...@@ -638,7 +638,7 @@ ...@@ -638,7 +638,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('showPropTrue') expect(obj.$attrs.id).assertEqual('showPropTrue')
expect(obj.$attrs.show).assertEqual('true') expect(obj.$attrs.show).assertEqual('true')
console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show)); console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show));
...@@ -658,7 +658,7 @@ ...@@ -658,7 +658,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('showPropFalse') expect(obj.$attrs.id).assertEqual('showPropFalse')
expect(obj.$attrs.show).assertEqual('false') expect(obj.$attrs.show).assertEqual('false')
console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show)); console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show));
...@@ -678,7 +678,7 @@ ...@@ -678,7 +678,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('showPropNone') expect(obj.$attrs.id).assertEqual('showPropNone')
expect(obj.$attrs.show).assertEqual('true') expect(obj.$attrs.show).assertEqual('true')
console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show)); console.info("[pickerViewProps] get show value is: " + JSON.stringify(obj.$attrs.show));
...@@ -698,7 +698,7 @@ ...@@ -698,7 +698,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('pickerViewText') expect(obj.$attrs.id).assertEqual('pickerViewText')
expect(obj.$attrs.type).assertEqual('text') expect(obj.$attrs.type).assertEqual('text')
console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type));
...@@ -718,7 +718,7 @@ ...@@ -718,7 +718,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('pickerViewTime') expect(obj.$attrs.id).assertEqual('pickerViewTime')
expect(obj.$attrs.type).assertEqual('time') expect(obj.$attrs.type).assertEqual('time')
console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type));
...@@ -738,7 +738,7 @@ ...@@ -738,7 +738,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('pickerViewDate') expect(obj.$attrs.id).assertEqual('pickerViewDate')
expect(obj.$attrs.type).assertEqual('date') expect(obj.$attrs.type).assertEqual('date')
console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type));
...@@ -758,7 +758,7 @@ ...@@ -758,7 +758,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('pickerViewDatetime') expect(obj.$attrs.id).assertEqual('pickerViewDatetime')
expect(obj.$attrs.type).assertEqual('datetime') expect(obj.$attrs.type).assertEqual('datetime')
console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type));
...@@ -778,7 +778,7 @@ ...@@ -778,7 +778,7 @@
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj)); console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker') expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('pickerViewMultiText') expect(obj.$attrs.id).assertEqual('pickerViewMultiText')
expect(obj.$attrs.type).assertEqual('multi-text') expect(obj.$attrs.type).assertEqual('multi-text')
console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[pickerViewProps] get type value is: " + JSON.stringify(obj.$attrs.type));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册