@zeppos/zeus-cli 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/private-modules/zeppos-app-utils/dist/config/device.js +2 -443
- package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/app-widget/index.js +99 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/app.js +9 -15
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/app.json +24 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/page/gts/food-list.js +4 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/page/gts/index.js +24 -24
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/secondary-widget/index.js +139 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/utils/styles-gts-3.js +23 -24
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/utils/styles.js +24 -24
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/empty/jsconfig.json +2 -7
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/pages/index.js +12 -12
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/app.json +8 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/page/home/index.page.js +16 -16
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/page/home/index.style.js +11 -11
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/page/i18n/en-US.po +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/secondary-widget/index.js +160 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/todo-list/utils/constants.js +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/app.json +2 -18
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/page/gtr/home/index.page.js +5 -5
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/page/gtr/home/index.style.js +7 -7
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/page/gts/home/index.page.js +5 -5
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/page/gts/home/index.style.js +6 -6
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/app.json +23 -9
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_10.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_11.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_12.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_13.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_14.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_15.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_16.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_17.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_18.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_19.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_20.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_21.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_22.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_23.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_24.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_25.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_26.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_27.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_28.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_29.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_30.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_31.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_32.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_33.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_34.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_35.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_36.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/anim/animation_9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/button_normal.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/button_press.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/false copy.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/icon copy.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/number-img/9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/radio_select.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/select.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/selected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/switch_off.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/switch_on.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/unselect.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/unselected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/gt4/zeppos.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/assets/raw/custom.ttf +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/config/tree.js +76 -2
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/index.js +7 -5
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/interaction/on_digital_crown.js +26 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/interaction/on_key.js +32 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/interaction/on_wrist_motion.js +27 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/router/set_launch_app_timeout.js +32 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/sensor/pai.js +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/arc.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/button.js +44 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/checkbox_group.js +45 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/circle.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/cycle_image_text_list.js +43 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/cycle_list.js +26 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/dialog.js +32 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/fill_rect.js +29 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/histogram.js +76 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/img.js +23 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/img_anim.js +37 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/page_indicator.js +32 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/pick_date.js +43 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/polyline.js +36 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/qrcode.js +22 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/radio_group.js +44 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/scroll_list.js +106 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/slide_switch.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/stroke_rect.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/text.js +51 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/page/ui/widget/view_container.js +81 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/utils/UI/TextByLine.js +19 -12
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/utils/UI/Title.js +2 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/utils/styles.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/showcase/utils/test.js +3 -2
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/calories/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/calories/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/calories/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/calories/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/download/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/download/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/download/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/empty/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/assets/common.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/assets/common.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/hello-world/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/hello-world/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/hello-world/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/hello-world/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/notification/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/notification/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/notification/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/todo-list/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/todo-list/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/todo-list/global.d.ts +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/todo-list/jsconfig.json +1 -1
- package/private-modules/zeppos-app-utils/package.json +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/_package.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/jsconfig.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/utils/storage.js +0 -40
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/_package.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/jsconfig.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/_package.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/app-side/index.js +0 -11
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/jsconfig.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/setting/i18n/en-US.po +0 -2
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/setting/index.js +0 -5
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/todo-list/_package.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/todo-list/jsconfig.json +0 -14
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/todo-list/utils/constants.js +0 -3
- package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/todo-list/utils/fs.js +0 -34
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/.prettierrc.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/app-side/index.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/app.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/assets/gts/icon.png +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/page/home/index.page.json +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/setting/i18n/en-US.po +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/setting/index.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/data.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/defer.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/device-polyfill.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/es6-promise.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/event.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/message-side.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/shared/message.js +0 -0
- /package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/{todo-list → fetch-api/todo-list}/utils/index.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { prop } from '@zos/ui'
|
|
2
|
+
import { onKey, KEY_SHORTCUT } from '@zos/interaction'
|
|
3
|
+
import PageAdvanced from '../../utils/template/PageAdvanced'
|
|
4
|
+
import TextByLine from '../../utils/UI/TextByLine'
|
|
5
|
+
|
|
6
|
+
PageAdvanced({
|
|
7
|
+
state: {
|
|
8
|
+
pageName: 'onKey'
|
|
9
|
+
},
|
|
10
|
+
build() {
|
|
11
|
+
const textByLine = new TextByLine()
|
|
12
|
+
|
|
13
|
+
const text = textByLine.render({
|
|
14
|
+
text: `key & action`
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
onKey({
|
|
18
|
+
callback: (key, action) => {
|
|
19
|
+
text.setProperty(prop.MORE, {
|
|
20
|
+
text: `key: ${key};action: ${action}`
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
if (key === KEY_SHORTCUT) {
|
|
24
|
+
this.state.logger.log('key shortcut')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { prop } from '@zos/ui'
|
|
2
|
+
import { onWristMotion } from '@zos/interaction'
|
|
3
|
+
import PageAdvanced from '../../utils/template/PageAdvanced'
|
|
4
|
+
import TextByLine from '../../utils/UI/TextByLine'
|
|
5
|
+
|
|
6
|
+
PageAdvanced({
|
|
7
|
+
state: {
|
|
8
|
+
pageName: 'onWristMotion'
|
|
9
|
+
},
|
|
10
|
+
build() {
|
|
11
|
+
const textByLine = new TextByLine()
|
|
12
|
+
|
|
13
|
+
const text = textByLine.render({
|
|
14
|
+
text: `MOTION`
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
onWristMotion({
|
|
18
|
+
callback: (data = {}) => {
|
|
19
|
+
const { motion } = data
|
|
20
|
+
this.state.logger.log('motion', motion)
|
|
21
|
+
text.setProperty(prop.MORE, {
|
|
22
|
+
text: `MOTION:${motion}`
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createWidget, widget } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import { Time } from '@zos/sensor'
|
|
4
|
+
import PageAdvanced from '../../utils/template/PageAdvanced'
|
|
5
|
+
import { setLaunchAppTimeout } from '@zos/router'
|
|
6
|
+
|
|
7
|
+
PageAdvanced({
|
|
8
|
+
state: {
|
|
9
|
+
pageName: 'SetLaunchAppTimeOut'
|
|
10
|
+
},
|
|
11
|
+
build() {
|
|
12
|
+
const time = new Time()
|
|
13
|
+
|
|
14
|
+
createWidget(widget.BUTTON, {
|
|
15
|
+
x: px(80),
|
|
16
|
+
y: px(300),
|
|
17
|
+
w: px(300),
|
|
18
|
+
h: px(60),
|
|
19
|
+
radius: px(12),
|
|
20
|
+
normal_color: 0xfc6950,
|
|
21
|
+
press_color: 0xfeb4a8,
|
|
22
|
+
text: 'setLaunchAppTimeOut',
|
|
23
|
+
click_func: () => {
|
|
24
|
+
setLaunchAppTimeout({
|
|
25
|
+
url: 'page/index',
|
|
26
|
+
appId: 25107,
|
|
27
|
+
utc: time.getTime() + 1000
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createWidget, widget, event, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
import { DEFAULT_COLOR } from '../../../config/constants'
|
|
5
|
+
|
|
6
|
+
PageAdvanced({
|
|
7
|
+
state: {
|
|
8
|
+
pageName: 'ARC'
|
|
9
|
+
},
|
|
10
|
+
build() {
|
|
11
|
+
const arc = createWidget(widget.ARC, {
|
|
12
|
+
x: px(100),
|
|
13
|
+
y: px(100),
|
|
14
|
+
w: px(250),
|
|
15
|
+
h: px(250),
|
|
16
|
+
start_angle: -90,
|
|
17
|
+
end_angle: 90,
|
|
18
|
+
color: DEFAULT_COLOR,
|
|
19
|
+
line_width: 20
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
arc.addEventListener(event.CLICK_DOWN, (info) => {
|
|
23
|
+
arc.setProperty(prop.MORE, {
|
|
24
|
+
y: px(150)
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createWidget, widget, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import { DEVICE_WIDTH } from '../../../config/device'
|
|
4
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
5
|
+
import { DEFAULT_COLOR, DEFAULT_COLOR_TRANSPARENT } from '../../../config/constants'
|
|
6
|
+
|
|
7
|
+
PageAdvanced({
|
|
8
|
+
state: {
|
|
9
|
+
pageName: 'Button'
|
|
10
|
+
},
|
|
11
|
+
build() {
|
|
12
|
+
const img_button = createWidget(widget.BUTTON, {
|
|
13
|
+
x: (DEVICE_WIDTH - px(96)) / 2,
|
|
14
|
+
y: 120,
|
|
15
|
+
text: 'Hello',
|
|
16
|
+
w: -1,
|
|
17
|
+
h: -1,
|
|
18
|
+
normal_src: 'button_normal.png',
|
|
19
|
+
press_src: 'button_press.png',
|
|
20
|
+
click_func: () => {
|
|
21
|
+
this.state.logger.log('button click')
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
createWidget(widget.BUTTON, {
|
|
26
|
+
x: (DEVICE_WIDTH - px(400)) / 2,
|
|
27
|
+
y: px(240),
|
|
28
|
+
w: px(400),
|
|
29
|
+
h: px(100),
|
|
30
|
+
radius: px(12),
|
|
31
|
+
normal_color: DEFAULT_COLOR,
|
|
32
|
+
press_color: DEFAULT_COLOR_TRANSPARENT,
|
|
33
|
+
text: 'Hello',
|
|
34
|
+
click_func: (button_widget) => {
|
|
35
|
+
button_widget.setProperty(prop.MORE, {
|
|
36
|
+
x: (DEVICE_WIDTH - px(400)) / 2,
|
|
37
|
+
y: px(260),
|
|
38
|
+
w: px(400),
|
|
39
|
+
h: px(100)
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createWidget, widget, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'CHECKBOX_GROUP'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const checkbox_group = createWidget(widget.CHECKBOX_GROUP, {
|
|
11
|
+
x: px(0),
|
|
12
|
+
y: px(0),
|
|
13
|
+
w: px(480),
|
|
14
|
+
h: px(64),
|
|
15
|
+
select_src: 'selected.png',
|
|
16
|
+
unselect_src: 'unselected.png',
|
|
17
|
+
check_func: (group, index, checked) => {
|
|
18
|
+
this.state.logger.log('index', index)
|
|
19
|
+
this.state.logger.log('checked', checked)
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const button1 = checkbox_group.createWidget(widget.STATE_BUTTON, {
|
|
24
|
+
x: px(40),
|
|
25
|
+
y: px(200),
|
|
26
|
+
w: px(64),
|
|
27
|
+
h: px(64)
|
|
28
|
+
})
|
|
29
|
+
const button2 = checkbox_group.createWidget(widget.STATE_BUTTON, {
|
|
30
|
+
x: px(190),
|
|
31
|
+
y: px(200),
|
|
32
|
+
w: px(64),
|
|
33
|
+
h: px(64)
|
|
34
|
+
})
|
|
35
|
+
const button3 = checkbox_group.createWidget(widget.STATE_BUTTON, {
|
|
36
|
+
x: px(340),
|
|
37
|
+
y: px(200),
|
|
38
|
+
w: px(64),
|
|
39
|
+
h: px(64)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
checkbox_group.setProperty(prop.INIT, button2)
|
|
43
|
+
checkbox_group.setProperty(prop.CHECKED, button3)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
2
|
+
import { DEFAULT_COLOR } from '../../../config/constants'
|
|
3
|
+
|
|
4
|
+
PageAdvanced({
|
|
5
|
+
state: {
|
|
6
|
+
pageName: 'CIRCLE'
|
|
7
|
+
},
|
|
8
|
+
build() {
|
|
9
|
+
const circle = hmUI.createWidget(hmUI.widget.CIRCLE, {
|
|
10
|
+
center_x: px(240),
|
|
11
|
+
center_y: px(240),
|
|
12
|
+
radius: px(120),
|
|
13
|
+
color: DEFAULT_COLOR,
|
|
14
|
+
alpha: 200
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
// 暂时不支持,代码先保留
|
|
18
|
+
circle.addEventListener(hmUI.event.CLICK_DOWN, () => {
|
|
19
|
+
this.state.logger.log('circle click')
|
|
20
|
+
circle.setProperty(hmUI.prop.MORE, {
|
|
21
|
+
center_x: px(240),
|
|
22
|
+
center_y: px(300),
|
|
23
|
+
radius: px(120),
|
|
24
|
+
color: DEFAULT_COLOR
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createWidget, widget, prop, event } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'CYCLE_IMAGE_TEXT_LIST'
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
build() {
|
|
11
|
+
const dataArray = [
|
|
12
|
+
{ text: '0', src: 'true.png' },
|
|
13
|
+
{ text: '1' },
|
|
14
|
+
{ text: '2' },
|
|
15
|
+
{ text: '3', src: 'false.png' },
|
|
16
|
+
{ text: '4' },
|
|
17
|
+
{ text: '5' },
|
|
18
|
+
{ text: '6' },
|
|
19
|
+
{ text: '7' },
|
|
20
|
+
{ text: '8' },
|
|
21
|
+
{ text: '9' }
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
const cycle_image_text_list = createWidget(widget.CYCLE_IMAGE_TEXT_LIST, {
|
|
25
|
+
x: 0,
|
|
26
|
+
y: px(120),
|
|
27
|
+
w: px(480),
|
|
28
|
+
h: px(300),
|
|
29
|
+
data_array: dataArray,
|
|
30
|
+
data_size: 10,
|
|
31
|
+
item_height: px(60),
|
|
32
|
+
// item_bg_color: 0xffffff,
|
|
33
|
+
item_text_color: 0xffffff,
|
|
34
|
+
item_text_size: px(18),
|
|
35
|
+
item_image_x: px(60)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
this.state.titleWidget.addEventListener(event.CLICK_DOWN, () => {
|
|
39
|
+
this.state.logger.log('property', cycle_image_text_list.getProperty(prop.MORE, {}))
|
|
40
|
+
cycle_image_text_list.setProperty(prop.LIST_TOP, { index: 3 })
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createWidget, widget } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'CYCLE_LIST'
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
build() {
|
|
11
|
+
const imgArray = ['number-img/0.png', 'number-img/1.png', 'number-img/2.png', 'number-img/3.png', 'number-img/4.png']
|
|
12
|
+
const cycleList = createWidget(widget.CYCLE_LIST, {
|
|
13
|
+
x: px(230),
|
|
14
|
+
y: px(120),
|
|
15
|
+
h: px(300),
|
|
16
|
+
w: px(30),
|
|
17
|
+
data_array: imgArray,
|
|
18
|
+
data_size: 5,
|
|
19
|
+
item_height: 100,
|
|
20
|
+
item_click_func: (list, index) => {
|
|
21
|
+
this.state.logger.log(index)
|
|
22
|
+
},
|
|
23
|
+
item_bg_color: 0xffffff
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createWidget, widget, align, prop } from '@zos/ui'
|
|
2
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
3
|
+
|
|
4
|
+
PageAdvanced({
|
|
5
|
+
state: {
|
|
6
|
+
pageName: 'DIALOG'
|
|
7
|
+
},
|
|
8
|
+
build() {
|
|
9
|
+
const dialog = createWidget(widget.DIALOG, {
|
|
10
|
+
ok_text: 'OK',
|
|
11
|
+
cancel_text: 'CANCEL'
|
|
12
|
+
})
|
|
13
|
+
dialog.setProperty(prop.MORE, {
|
|
14
|
+
text: 'DIALOG TITLE',
|
|
15
|
+
content_text_size: 40,
|
|
16
|
+
content_bg_color: 0x000000,
|
|
17
|
+
content_text_color: 0xffffff,
|
|
18
|
+
ok_text_color: 0x333333,
|
|
19
|
+
cancel_text_color: 0x333333,
|
|
20
|
+
dialog_align_h: align.CENTER_H,
|
|
21
|
+
content_text_align_h: align.CENTER_H,
|
|
22
|
+
content_text_align_v: align.CENTER_V,
|
|
23
|
+
ok_func: () => {
|
|
24
|
+
console.log('DIALOG OK')
|
|
25
|
+
},
|
|
26
|
+
cancel_func: () => {
|
|
27
|
+
console.log('DIALOG CANCEL')
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
dialog.setProperty(prop.SHOW, true)
|
|
31
|
+
}
|
|
32
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createWidget, widget, event, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import { DEFAULT_COLOR } from '../../../config/constants'
|
|
4
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
5
|
+
|
|
6
|
+
PageAdvanced({
|
|
7
|
+
state: {
|
|
8
|
+
pageName: 'FILL_RECT'
|
|
9
|
+
},
|
|
10
|
+
build() {
|
|
11
|
+
const fill_rect = createWidget(widget.FILL_RECT, {
|
|
12
|
+
x: px(125),
|
|
13
|
+
y: px(125),
|
|
14
|
+
w: px(230),
|
|
15
|
+
h: px(150),
|
|
16
|
+
radius: px(20),
|
|
17
|
+
color: DEFAULT_COLOR
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
fill_rect.addEventListener(event.CLICK_DOWN, (info) => {
|
|
21
|
+
fill_rect.setProperty(prop.MORE, {
|
|
22
|
+
x: px(125),
|
|
23
|
+
y: px(200),
|
|
24
|
+
w: px(230),
|
|
25
|
+
h: px(150)
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
})
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createWidget, widget, align } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'HISTOGRAM'
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
build() {
|
|
11
|
+
const fillRect = createWidget(widget.FILL_RECT, {
|
|
12
|
+
x: px(100),
|
|
13
|
+
y: px(120),
|
|
14
|
+
w: px(300),
|
|
15
|
+
h: px(300),
|
|
16
|
+
color: 0xffffff
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const view = createWidget(widget.HISTOGRAM, {
|
|
20
|
+
x: px(100),
|
|
21
|
+
y: px(120),
|
|
22
|
+
h: 300,
|
|
23
|
+
w: 300,
|
|
24
|
+
item_width: 20,
|
|
25
|
+
item_space: 10,
|
|
26
|
+
item_radius: 10,
|
|
27
|
+
item_start_y: 50,
|
|
28
|
+
item_max_height: 230,
|
|
29
|
+
item_color: 0x304ffe,
|
|
30
|
+
data_array: [20, 30, 40, 50, 60, 100, 80, 90, 20, 30],
|
|
31
|
+
data_count: 10,
|
|
32
|
+
data_min_value: 10,
|
|
33
|
+
data_max_value: 100,
|
|
34
|
+
xline: {
|
|
35
|
+
pading: 20,
|
|
36
|
+
space: 20,
|
|
37
|
+
start: 0,
|
|
38
|
+
end: 300,
|
|
39
|
+
color: 0x00c853,
|
|
40
|
+
width: 1,
|
|
41
|
+
count: 15
|
|
42
|
+
},
|
|
43
|
+
yline: {
|
|
44
|
+
pading: 10,
|
|
45
|
+
space: 10,
|
|
46
|
+
start: 0,
|
|
47
|
+
end: 300,
|
|
48
|
+
color: 0xff6d00,
|
|
49
|
+
width: 1,
|
|
50
|
+
count: 30
|
|
51
|
+
},
|
|
52
|
+
xText: {
|
|
53
|
+
x: px(12),
|
|
54
|
+
y: px(270),
|
|
55
|
+
w: px(20),
|
|
56
|
+
h: px(50),
|
|
57
|
+
space: 10,
|
|
58
|
+
align: align.LEFT,
|
|
59
|
+
color: 0x000000,
|
|
60
|
+
count: 10,
|
|
61
|
+
data_array: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
|
|
62
|
+
},
|
|
63
|
+
yText: {
|
|
64
|
+
x: 0,
|
|
65
|
+
y: px(20),
|
|
66
|
+
w: px(50),
|
|
67
|
+
h: px(50),
|
|
68
|
+
space: px(10),
|
|
69
|
+
align: align.LEFT,
|
|
70
|
+
color: 0x000000,
|
|
71
|
+
count: 6,
|
|
72
|
+
data_array: ['a', 'b', 'c', 'd', 'e', 'f']
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createWidget, widget, event, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'IMG'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const img = createWidget(widget.IMG, {
|
|
11
|
+
x: px(125),
|
|
12
|
+
y: px(125),
|
|
13
|
+
src: 'zeppos.png'
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
img.addEventListener(event.CLICK_DOWN, (info) => {
|
|
17
|
+
this.state.logger.log('click down info', info)
|
|
18
|
+
img.setProperty(prop.MORE, {
|
|
19
|
+
y: px(200)
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createWidget, widget, event, prop, anim_status } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'IMG_ANIM'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const imgAnimation = createWidget(widget.IMG_ANIM, {
|
|
11
|
+
anim_path: 'anim',
|
|
12
|
+
anim_prefix: 'animation',
|
|
13
|
+
anim_ext: 'png',
|
|
14
|
+
anim_fps: 60,
|
|
15
|
+
anim_size: 36,
|
|
16
|
+
repeat_count: 1,
|
|
17
|
+
anim_status: 3,
|
|
18
|
+
x: px(208),
|
|
19
|
+
y: px(230),
|
|
20
|
+
anim_complete_call: () => {
|
|
21
|
+
this.state.logger.log('animation complete')
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
imgAnimation.setProperty(prop.ANIM_STATUS, anim_status.START)
|
|
26
|
+
imgAnimation.addEventListener(event.CLICK_DOWN, () => {
|
|
27
|
+
const isRunning = imgAnimation.getProperty(prop.ANIM_IS_RUNINNG)
|
|
28
|
+
|
|
29
|
+
if (!isRunning) {
|
|
30
|
+
this.state.logger.log('running', isRunning)
|
|
31
|
+
imgAnimation.setProperty(prop.ANIM_STATUS, anim_status.START)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
imgAnimation.setProperty(prop.ANIM_STATUS, anim_status.START)
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Page({
|
|
2
|
+
build() {
|
|
3
|
+
let page_cnt = 10
|
|
4
|
+
let vertical = false
|
|
5
|
+
let page_size = px(480)
|
|
6
|
+
hmUI.setScrollView(true, page_size, page_cnt, vertical)
|
|
7
|
+
pg_indicator = hmUI.createWidget(hmUI.widget.PAGE_INDICATOR, {
|
|
8
|
+
x: 0,
|
|
9
|
+
y: px(50),
|
|
10
|
+
w: px(480),
|
|
11
|
+
h: px(100),
|
|
12
|
+
align_h: hmUI.align.CENTER_H,
|
|
13
|
+
h_space: 8,
|
|
14
|
+
select_src: 'select.png',
|
|
15
|
+
unselect_src: 'unselect.png'
|
|
16
|
+
})
|
|
17
|
+
for (let i = 0; i < page_cnt; i++) {
|
|
18
|
+
let x_pos = vertical ? 0 : page_size * i
|
|
19
|
+
let y_pos = vertical ? px(400) + page_size * i : px(400)
|
|
20
|
+
hmUI.createWidget(hmUI.widget.TEXT, {
|
|
21
|
+
x: px(x_pos),
|
|
22
|
+
y: px(y_pos),
|
|
23
|
+
w: px(480),
|
|
24
|
+
h: px(120),
|
|
25
|
+
text_size: 35,
|
|
26
|
+
color: 0xffffff,
|
|
27
|
+
align_h: hmUI.align.CENTER_H,
|
|
28
|
+
text: 'PAGE ' + i.toString()
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createWidget, widget, prop, event, align } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'PICK_DATE'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const pick_date_date = createWidget(widget.PICK_DATE)
|
|
11
|
+
pick_date_date.setProperty(prop.MORE, {
|
|
12
|
+
w: px(480),
|
|
13
|
+
x: px(20),
|
|
14
|
+
y: px(120),
|
|
15
|
+
startYear: 2000,
|
|
16
|
+
endYear: 2030,
|
|
17
|
+
initYear: 2021,
|
|
18
|
+
initMonth: 2,
|
|
19
|
+
initDay: 3
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const confirm = createWidget(widget.TEXT, {
|
|
23
|
+
x: 0,
|
|
24
|
+
y: px(360),
|
|
25
|
+
w: px(480),
|
|
26
|
+
h: px(80),
|
|
27
|
+
text_size: px(42),
|
|
28
|
+
color: 0xffffff,
|
|
29
|
+
align_h: align.CENTER_H,
|
|
30
|
+
align_v: align.CENTER_V,
|
|
31
|
+
text: 'confirm'
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
confirm.addEventListener(event.CLICK_UP, (info) => {
|
|
35
|
+
const dateObj = pick_date_date.getProperty(prop.MORE, {})
|
|
36
|
+
const { year, month, day } = dateObj
|
|
37
|
+
|
|
38
|
+
this.state.logger.log('year', year)
|
|
39
|
+
this.state.logger.log('month', month)
|
|
40
|
+
this.state.logger.log('day', day)
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
})
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createWidget, widget, event } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'GRADKIENT_POLYLINE'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const lineDataList = [
|
|
11
|
+
{ x: 0, y: px(200) },
|
|
12
|
+
{ x: px(100), y: px(10) },
|
|
13
|
+
{ x: px(200), y: px(50) },
|
|
14
|
+
{ x: px(300), y: px(50) },
|
|
15
|
+
{ x: px(400), y: px(200) }
|
|
16
|
+
]
|
|
17
|
+
const polyline = createWidget(widget.GRADKIENT_POLYLINE, {
|
|
18
|
+
x: 0,
|
|
19
|
+
y: px(200),
|
|
20
|
+
w: px(480),
|
|
21
|
+
h: px(200),
|
|
22
|
+
line_color: 0x00ffff,
|
|
23
|
+
line_width: 4,
|
|
24
|
+
bg_color: 0xffffff
|
|
25
|
+
})
|
|
26
|
+
polyline.clear()
|
|
27
|
+
polyline.addLine({
|
|
28
|
+
data: lineDataList,
|
|
29
|
+
count: lineDataList.length
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
this.state.titleWidget.addEventListener(event.CLICK_DOWN, () => {
|
|
33
|
+
polyline.clear()
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createWidget, widget } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'QRCODE'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
createWidget(widget.QRCODE, {
|
|
11
|
+
x: px(140),
|
|
12
|
+
y: px(140),
|
|
13
|
+
w: px(200),
|
|
14
|
+
h: px(200),
|
|
15
|
+
bg_x: px(120),
|
|
16
|
+
bg_y: px(120),
|
|
17
|
+
bg_w: px(240),
|
|
18
|
+
bg_h: px(240),
|
|
19
|
+
content: 'Hello Zepp OS'
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
})
|