@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,44 @@
|
|
|
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: 'RADIO_GROUP'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const radioGroup = createWidget(widget.RADIO_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 = radioGroup.createWidget(widget.STATE_BUTTON, {
|
|
24
|
+
x: px(40),
|
|
25
|
+
y: px(200),
|
|
26
|
+
w: px(64),
|
|
27
|
+
h: px(64)
|
|
28
|
+
})
|
|
29
|
+
const button2 = radioGroup.createWidget(widget.STATE_BUTTON, {
|
|
30
|
+
x: px(190),
|
|
31
|
+
y: px(200),
|
|
32
|
+
w: px(64),
|
|
33
|
+
h: px(64)
|
|
34
|
+
})
|
|
35
|
+
const button3 = radioGroup.createWidget(widget.STATE_BUTTON, {
|
|
36
|
+
x: px(340),
|
|
37
|
+
y: px(200),
|
|
38
|
+
w: px(64),
|
|
39
|
+
h: px(64)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
radioGroup.setProperty(prop.INIT, button3)
|
|
43
|
+
}
|
|
44
|
+
})
|
|
@@ -0,0 +1,106 @@
|
|
|
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: 'SCROLL_LIST'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const dataList = [
|
|
11
|
+
{ name: 'Amazfit T-Rex 2', size: 454, img_src: 'true.png' },
|
|
12
|
+
{ name: 'Amazfit GTR 3 Pro', size: 480, img_src: 'true.png' },
|
|
13
|
+
{ name: 'Amazfit GTR 3', size: 454, img_src: 'true.png' }
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
const updateDataList = [
|
|
17
|
+
...dataList,
|
|
18
|
+
{ name: 'Amazfit GTS 3', size: 390 },
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const scroll_list = createWidget(widget.SCROLL_LIST, {
|
|
22
|
+
x: 0,
|
|
23
|
+
y: px(120),
|
|
24
|
+
h: px(300),
|
|
25
|
+
w: px(480),
|
|
26
|
+
snap_to_center: true,
|
|
27
|
+
item_enable_horizon_drag: true,
|
|
28
|
+
item_drag_max_distance: -px(200),
|
|
29
|
+
item_space: px(20),
|
|
30
|
+
item_config: [
|
|
31
|
+
{
|
|
32
|
+
type_id: 1,
|
|
33
|
+
item_bg_color: 0xef5350,
|
|
34
|
+
item_bg_radius: px(10),
|
|
35
|
+
text_view: [
|
|
36
|
+
{ x: 0, y: 0, w: px(480), h: px(80), key: 'name', color: 0xffffff, text_size: px(20), action: true },
|
|
37
|
+
{ x: 0, y: px(80), w: px(480), h: px(40), key: 'size', color: 0xffffff }
|
|
38
|
+
],
|
|
39
|
+
text_view_count: 2,
|
|
40
|
+
image_view: [
|
|
41
|
+
{ x: px(520), y: px(0), w: px(80), h: px(63), key: 'img_src', action: true },
|
|
42
|
+
],
|
|
43
|
+
image_view_count: 1,
|
|
44
|
+
item_height: px(120)
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type_id: 2,
|
|
48
|
+
item_bg_color: 0xef5350,
|
|
49
|
+
item_bg_radius: px(10),
|
|
50
|
+
text_view: [
|
|
51
|
+
{ x: 0, y: 0, w: px(480), h: px(80), key: 'name', color: 0x000000, text_size: px(20) },
|
|
52
|
+
{ x: 0, y: px(80), w: px(480), h: px(40), key: 'size', color: 0x000000 }
|
|
53
|
+
],
|
|
54
|
+
text_view_count: 2,
|
|
55
|
+
image_view: [
|
|
56
|
+
{ x: px(520), y: px(0), w: px(80), h: px(63), key: 'img_src', action: true },
|
|
57
|
+
],
|
|
58
|
+
image_view_count: 1,
|
|
59
|
+
item_height: px(120)
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
item_config_count: 2,
|
|
63
|
+
data_array: dataList,
|
|
64
|
+
data_count: dataList.length,
|
|
65
|
+
item_click_func: (list, index, data_key) => {
|
|
66
|
+
this.state.logger.log('list', list)
|
|
67
|
+
this.state.logger.log(`scrollListItemClick index=${index}`)
|
|
68
|
+
this.state.logger.log(`scrollListItemClick data_key=${data_key}`)
|
|
69
|
+
updateConfig()
|
|
70
|
+
},
|
|
71
|
+
item_focus_change_func: (list, index, focus) => {
|
|
72
|
+
this.state.logger.log('index', index)
|
|
73
|
+
this.state.logger.log(`itemFocusChange focus=${focus}`)
|
|
74
|
+
},
|
|
75
|
+
data_type_config: [
|
|
76
|
+
{
|
|
77
|
+
start: 0,
|
|
78
|
+
end: 1,
|
|
79
|
+
type_id: 1
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
start: 1,
|
|
83
|
+
end: 2,
|
|
84
|
+
type_id: 2
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
data_type_config_count: 2
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
function updateConfig() {
|
|
91
|
+
scroll_list.setProperty(prop.UPDATE_DATA, {
|
|
92
|
+
data_type_config: [
|
|
93
|
+
{
|
|
94
|
+
start: 0,
|
|
95
|
+
end: updateDataList.length - 1,
|
|
96
|
+
type_id: 1
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
data_type_config_count: 1,
|
|
100
|
+
data_array: updateDataList,
|
|
101
|
+
data_count: updateDataList.length,
|
|
102
|
+
on_page: 1
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
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: 'SLIDE_SWITCH'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
const slide_switch = createWidget(widget.SLIDE_SWITCH, {
|
|
11
|
+
x: px(200),
|
|
12
|
+
y: px(200),
|
|
13
|
+
w: px(96),
|
|
14
|
+
h: px(64),
|
|
15
|
+
select_bg: 'switch_on.png',
|
|
16
|
+
un_select_bg: 'switch_off.png',
|
|
17
|
+
slide_src: 'radio_select.png',
|
|
18
|
+
slide_select_x: px(40),
|
|
19
|
+
slide_un_select_x: px(8),
|
|
20
|
+
checked: true,
|
|
21
|
+
checked_change_func: (slideSwitch, checked) => {
|
|
22
|
+
this.state.logger.log('checked', checked)
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
this.state.logger.log('slide checked', slide_switch.getProperty(prop.CHECKED))
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
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: 'STROKE_RECT'
|
|
9
|
+
},
|
|
10
|
+
build() {
|
|
11
|
+
const strokeRect = createWidget(widget.STROKE_RECT, {
|
|
12
|
+
x: px(125),
|
|
13
|
+
y: px(125),
|
|
14
|
+
w: px(230),
|
|
15
|
+
h: px(150),
|
|
16
|
+
radius: px(20),
|
|
17
|
+
line_width: px(4),
|
|
18
|
+
color: DEFAULT_COLOR
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
strokeRect.addEventListener(event.CLICK_DOWN, (info) => {
|
|
22
|
+
this.state.logger.log('click down info', info)
|
|
23
|
+
strokeRect.setProperty(prop.MORE, {
|
|
24
|
+
y: px(200)
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createWidget, widget, event, align, text_style, prop } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import PageAdvanced from '../../../utils/template/PageAdvanced'
|
|
4
|
+
|
|
5
|
+
PageAdvanced({
|
|
6
|
+
state: {
|
|
7
|
+
pageName: 'TEXT'
|
|
8
|
+
},
|
|
9
|
+
build() {
|
|
10
|
+
try {
|
|
11
|
+
const text = createWidget(widget.TEXT, {
|
|
12
|
+
x: px(96),
|
|
13
|
+
y: px(120),
|
|
14
|
+
w: px(288),
|
|
15
|
+
h: px(46),
|
|
16
|
+
color: 0xffffff,
|
|
17
|
+
text_size: px(36),
|
|
18
|
+
align_h: align.CENTER_H,
|
|
19
|
+
align_v: align.CENTER_V,
|
|
20
|
+
text_style: text_style.NONE,
|
|
21
|
+
text: 'HELLO ZEPPOS'
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
text.addEventListener(event.CLICK_DOWN, (info) => {
|
|
25
|
+
text.setProperty(prop.MORE, {
|
|
26
|
+
y: px(200)
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const textI18n = createWidget(widget.TEXT, {
|
|
31
|
+
x: px(96),
|
|
32
|
+
y: px(300),
|
|
33
|
+
w: px(288),
|
|
34
|
+
h: px(46),
|
|
35
|
+
color: 0xffffff,
|
|
36
|
+
text_size: px(36),
|
|
37
|
+
align_h: align.CENTER_H,
|
|
38
|
+
align_v: align.CENTER_V,
|
|
39
|
+
text_style: text_style.NONE,
|
|
40
|
+
text_i18n: {
|
|
41
|
+
'zh-CN': '你好 Zepp OS',
|
|
42
|
+
'en-US': 'HELLO ZEPPOS'
|
|
43
|
+
},
|
|
44
|
+
font: 'raw/custom.ttf'
|
|
45
|
+
})
|
|
46
|
+
} catch (e) {
|
|
47
|
+
console.log('Build LifeCycle Error', e)
|
|
48
|
+
e && e.stack && e.stack.split(/\n/).forEach((i) => console.log('error stack', i))
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createWidget, widget, align, text_style } from '@zos/ui'
|
|
2
|
+
import { px } from '@zos/utils'
|
|
3
|
+
import { getRandomColor } from '../../../utils/utils'
|
|
4
|
+
import { DEFAULT_COLOR, DEFAULT_COLOR_TRANSPARENT } from '../../../config/constants'
|
|
5
|
+
|
|
6
|
+
Page({
|
|
7
|
+
build() {
|
|
8
|
+
createWidget(widget.TEXT, {
|
|
9
|
+
x: px(96),
|
|
10
|
+
y: px(40),
|
|
11
|
+
w: px(288),
|
|
12
|
+
h: px(46),
|
|
13
|
+
color: 0xffffff,
|
|
14
|
+
text_size: px(36),
|
|
15
|
+
align_h: align.CENTER_H,
|
|
16
|
+
align_v: align.CENTER_V,
|
|
17
|
+
text_style: text_style.NONE,
|
|
18
|
+
text: 'VIEW_CONTAINER'
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const viewContainer = createWidget(widget.VIEW_CONTAINER, {
|
|
22
|
+
x: px(0),
|
|
23
|
+
y: px(86),
|
|
24
|
+
w: px(480),
|
|
25
|
+
h: px(400),
|
|
26
|
+
scroll_frame_func(info) {
|
|
27
|
+
console.log('scroll frame')
|
|
28
|
+
console.log(JSON.stringify(info))
|
|
29
|
+
},
|
|
30
|
+
scroll_complete_func(info) {
|
|
31
|
+
console.log('scroll complete')
|
|
32
|
+
console.log(JSON.stringify(info))
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
Array.from({ length: 5 }).forEach((_, index) => {
|
|
37
|
+
viewContainer.createWidget(widget.FILL_RECT, {
|
|
38
|
+
x: 0,
|
|
39
|
+
y: px(index * 400),
|
|
40
|
+
w: px(480),
|
|
41
|
+
h: px(400),
|
|
42
|
+
color: getRandomColor()
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
viewContainer.createWidget(widget.TEXT, {
|
|
46
|
+
x: px(96),
|
|
47
|
+
y: px(170) + px(index * 400),
|
|
48
|
+
w: px(288),
|
|
49
|
+
h: px(46),
|
|
50
|
+
text_size: px(36),
|
|
51
|
+
color: 0xffffff,
|
|
52
|
+
align_h: align.CENTER_H,
|
|
53
|
+
align_v: align.CENTER_V,
|
|
54
|
+
text: `INDEX: ${index}`
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const viewContainerButton = createWidget(widget.VIEW_CONTAINER, {
|
|
59
|
+
x: px(0),
|
|
60
|
+
y: px(86),
|
|
61
|
+
w: px(480),
|
|
62
|
+
h: px(400),
|
|
63
|
+
z_index: 1,
|
|
64
|
+
scroll_enable: false
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
viewContainerButton.createWidget(widget.BUTTON, {
|
|
68
|
+
x: 0,
|
|
69
|
+
y: px(50),
|
|
70
|
+
w: px(200),
|
|
71
|
+
h: px(100),
|
|
72
|
+
text: 'Click',
|
|
73
|
+
radius: px(12),
|
|
74
|
+
normal_color: DEFAULT_COLOR,
|
|
75
|
+
press_color: DEFAULT_COLOR_TRANSPARENT,
|
|
76
|
+
click_func: () => {
|
|
77
|
+
console.log('123')
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
})
|
|
@@ -2,22 +2,29 @@ import { createWidget, widget, align, text_style } from "@zos/ui";
|
|
|
2
2
|
import { px } from "@zos/utils";
|
|
3
3
|
|
|
4
4
|
export default class TextByLine {
|
|
5
|
-
constructor(params) {
|
|
6
|
-
const { text =
|
|
5
|
+
constructor(params = {}) {
|
|
6
|
+
const { text = '', line = 0 } = params
|
|
7
7
|
|
|
8
|
-
this.text = text
|
|
9
|
-
this.
|
|
10
|
-
this.line = line;
|
|
11
|
-
this.y_computed = Number.isInteger(this.y)
|
|
12
|
-
? this.y
|
|
13
|
-
: px(this.line * 60 + 120);
|
|
8
|
+
this.text = text
|
|
9
|
+
this.line = line
|
|
14
10
|
}
|
|
15
11
|
|
|
16
|
-
render() {
|
|
12
|
+
render(params = {}) {
|
|
13
|
+
let { text = this.text, line = 0 } = params
|
|
14
|
+
|
|
15
|
+
if (!line) {
|
|
16
|
+
line = this.line
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const y = px(line * 60 + 120)
|
|
20
|
+
this.y = y
|
|
21
|
+
|
|
22
|
+
this.line = line + 1
|
|
23
|
+
|
|
17
24
|
return createWidget(widget.TEXT, {
|
|
18
|
-
x: px(
|
|
19
|
-
y
|
|
20
|
-
w: px(
|
|
25
|
+
x: px(0),
|
|
26
|
+
y,
|
|
27
|
+
w: px(480),
|
|
21
28
|
h: px(46),
|
|
22
29
|
color: 0xffffff,
|
|
23
30
|
text_size: px(20),
|
|
Binary file
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/calories/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/download/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
Binary file
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/fetch-api/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
Binary file
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/hello-world/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/notification/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
Binary file
|
|
Binary file
|
package/private-modules/zeppos-app-utils/dist/public/template/os3.0/app/todo-list/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference path="node_modules/@zeppos/device-types/index.d.ts" />
|
|
1
|
+
/// <reference path="node_modules/@zeppos/device-types/dist/index.d.ts" />
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dev": "nodemon -e ts,tsx --exec \"rm -rf dist && tsc && ts-node build.ts\" --ignore types/ --ignore dist/"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@zeppos/zpm": "^3.0.
|
|
16
|
+
"@zeppos/zpm": "^3.0.1",
|
|
17
17
|
"axios": "^0.27.2",
|
|
18
18
|
"chalk": "^4.1.2",
|
|
19
19
|
"chokidar": "^3.5.3",
|
package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/_package.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "calories",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "app.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@zeppos/device-types": "^2.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/calories/utils/storage.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { statSync, writeFileSync, readFileSync } from "@zos/fs";
|
|
2
|
-
|
|
3
|
-
export default class LocalStorage {
|
|
4
|
-
constructor(fileName = "") {
|
|
5
|
-
this.fileName = fileName;
|
|
6
|
-
this.contentObj = {};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
set(obj) {
|
|
10
|
-
writeFileSync({
|
|
11
|
-
path: this.fileName,
|
|
12
|
-
data: JSON.stringify(obj),
|
|
13
|
-
options: {
|
|
14
|
-
encoding: "utf8",
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
get() {
|
|
20
|
-
const fStat = statSync({
|
|
21
|
-
path: this.fileName,
|
|
22
|
-
});
|
|
23
|
-
if (fStat) {
|
|
24
|
-
try {
|
|
25
|
-
this.contentObj = JSON.parse(
|
|
26
|
-
readFileSync({
|
|
27
|
-
path: this.fileName,
|
|
28
|
-
options: {
|
|
29
|
-
encoding: "utf8",
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
);
|
|
33
|
-
} catch (error) {
|
|
34
|
-
this.contentObj = {};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return this.contentObj;
|
|
39
|
-
}
|
|
40
|
-
}
|
package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/fetch-api/_package.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fetch-api",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "app.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@zeppos/device-types": "^2.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
package/private-modules/zeppos-app-utils/dist/public/template/os2.0/app/hello-world/_package.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hello-word",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "app.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@zeppos/device-types": "^2.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|