未验证 提交 ac99f3f9 编写于 作者: O openharmony_ci 提交者: Gitee

!9881 修改日历选择器组件xts代码

Merge pull request !9881 from sunjiakun/calendarpick0826
...@@ -57,7 +57,7 @@ struct CalendarPickerExample { ...@@ -57,7 +57,7 @@ struct CalendarPickerExample {
build() { build() {
Column() { Column() {
CalendarPicker({hintRadius:16,selected: this.selectedDate}) CalendarPicker({selected: this.selectedDate})
.textStyle(this.textStyle) .textStyle(this.textStyle)
.edgeAlign(this.edgeAlign) .edgeAlign(this.edgeAlign)
.onChange((value) => { .onChange((value) => {
...@@ -72,7 +72,7 @@ struct CalendarPickerExample { ...@@ -72,7 +72,7 @@ struct CalendarPickerExample {
}) })
.key('CalendarPickerDefault') .key('CalendarPickerDefault')
CalendarPicker({hintRadius:10,selected: this.selectedDate}) CalendarPicker({selected: this.selectedDate})
.textStyle(this.textStyle) .textStyle(this.textStyle)
.edgeAlign(CalendarAlign.START,{dx: 5,dy: 5}) .edgeAlign(CalendarAlign.START,{dx: 5,dy: 5})
.onChange((value) => { .onChange((value) => {
...@@ -98,4 +98,4 @@ struct CalendarPickerExample { ...@@ -98,4 +98,4 @@ struct CalendarPickerExample {
} }
} }
} }
\ No newline at end of file
...@@ -24,29 +24,6 @@ export default function calendarpicker() { ...@@ -24,29 +24,6 @@ export default function calendarpicker() {
done(); done();
}) })
afterEach(async function (done) {
console.info("CalendarPicker afterEach start");
try {
var eventData = {
data: {
"textStyle": {color:Color.Black,font:{size:8,weight:FontWeight.Lighter}},
"edgeAlign": CalendarAlign.END,
"hintRadius": 16
}
}
var innerEvent = {
eventId: 185,
priority: events_emitter.EventPriority.LOW
}
console.info("[CalendarPicker_afterEach] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[CalendarPicker_afterEach] change component data error: " + err.message);
}
console.info("[ArkUI_Stage_CalendarPicker_textStyle_0100] data" + JSON.stringify(data));
done();
})
/* /*
* @tc.number ArkUI_Stage_CalendarPicker_textStyle_0100 * @tc.number ArkUI_Stage_CalendarPicker_textStyle_0100
* @tc.name Tests the textStyle property of the CalendarCalendarPicker component * @tc.name Tests the textStyle property of the CalendarCalendarPicker component
...@@ -440,18 +417,19 @@ export default function calendarpicker() { ...@@ -440,18 +417,19 @@ export default function calendarpicker() {
expect(obj.$attrs.edgeAlign.offset.dy).assertEqual('-10.00vp'); expect(obj.$attrs.edgeAlign.offset.dy).assertEqual('-10.00vp');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_CalendarPicker_hintRadius_0100 * @tc.number ArkUI_Stage_CalendarPicker_hintRadius_0100
* @tc.name Tests the hintRadius property of the CalendarPicker component * @tc.name Tests the hintRadius property of the CalendarPicker component
* @tc.desc get the property of the hintRadius * @tc.desc get the property of the hintRadius
*/ */
it('ArkUI_Stage_CalendarPicker_hintRadius_0100', 0, async function (done) { it('ArkUI_Stage_CalendarPicker_hintRadius_0100', 0, async function (done) {
let strJson = getInspectorByKey('CalendarPicker'); let strJson = getInspectorByKey('CalendarPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_CalendarPicker_hintRadius_0100] hintRadius:" + obj.$attrs.hintRadius); console.info("[ArkUI_Stage_CalendarPicker_hintRadius_0100] hintRadius:" + obj.$attrs.hintRadius);
expect(obj.$attrs.hintRadius).assertEqual('undefined'); expect(obj.$attrs.hintRadius).assertEqual(undefined);
done(); done();
}); });
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册