diff --git a/README.en.md b/README.en.md index c7146ddd72b35aa773f29dae68bcbfdac12b9c7e..076620545936fb41edcf84985f254db8cca88db7 100644 --- a/README.en.md +++ b/README.en.md @@ -8,9 +8,9 @@ This sample uses CustomDialog, bindContentCover, and bindSheet to implement mult | Slide-to-select dialog | Modal dialog | Semi-modal dialog | Toast dialog | |---------------------------------------------|----------------------------------------------|-----------------------------------------------|-------------------------------------------| -| ![image](screenshots/device/slide_en.gif) | ![image](screenshots/device/modality_en.gif) | ![image](screenshots/device/semimodal_en.gif) | ![image](screenshots/device/toast_en.gif) | +| ![image](screenshots/device/slide_en.png) | ![image](screenshots/device/modality_en.png) | ![image](screenshots/device/semimodal_en.png) | ![image](screenshots/device/toast_en.png) | | Privacy agreement dialog | Full-screen dialog | Custom calendar selector dialog | Semi-modal + full-screen dialog | -| ![image](screenshots/device/privacy_en.gif) | ![image](screenshots/device/screen_en.gif) | ![image](screenshots/device/customize_en.gif) | ![image](screenshots/device/add_en.gif) | +| ![image](screenshots/device/privacy_en.png) | ![image](screenshots/device/screen_en.png) | ![image](screenshots/device/customize_en.png) | ![image](screenshots/device/add_en.png) | ### How to Use @@ -70,10 +70,10 @@ N/A ### Constraints -1. The sample is only supported on Huawei phones with standard systems. +1. The sample app is supported only on Huawei phones, tablets, and 2in1 devices running the standard system. -2. The HarmonyOS version must be HarmonyOS NEXT Developer Beta1 or later. +2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. -3. The DevEco Studio version must be DevEco Studio NEXT Developer Beta1 or later. +3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta1 or later. +4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release or later. diff --git a/README.md b/README.md index 69885d5561bb179b387dfffc4aa12dfb7cd15a8f..d24df33acd8c5d2f25b64f6b69ccc31eeb88b07b 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ | 滑动选择弹窗 | 模态弹窗 | 半模态弹窗 | Toast弹窗 | |------------------------------------------|-------------------------------------------|--------------------------------------------|----------------------------------------| -| ![image](screenshots/device/slide.gif) | ![image](screenshots/device/modality.gif) | ![image](screenshots/device/semimodal.gif) | ![image](screenshots/device/toast.gif) | +| ![image](screenshots/device/slide.png) | ![image](screenshots/device/modality.png) | ![image](screenshots/device/semimodal.png) | ![image](screenshots/device/toast.png) | | 隐私协议弹窗 | 全屏弹窗 | 自定义日历选择器弹窗 | 两级半模态+全屏弹窗 | -| ![image](screenshots/device/privacy.gif) | ![image](screenshots/device/screen.gif) | ![image](screenshots/device/customize.gif) | ![image](screenshots/device/add.gif) | +| ![image](screenshots/device/privacy.png) | ![image](screenshots/device/screen.png) | ![image](screenshots/device/customize.png) | ![image](screenshots/device/add.png) | ### 使用说明: @@ -70,10 +70,10 @@ ### 约束与限制 -1.本示例仅支持标准系统上运行,支持设备:phone,tablet,2in1。 +1. 本示例仅支持标准系统上运行,支持设备:phone,tablet,2in1。 -2.HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 -3.DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 -4.HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file diff --git a/entry/src/main/ets/common/constants/BreakpointSystem.ets b/entry/src/main/ets/common/constants/BreakpointSystem.ets index 797bded69d885bd7a43faffcdafa5bea8a0f9e49..9abc0230a18f2d4b14e3a02ee4ae7a0d80876857 100644 --- a/entry/src/main/ets/common/constants/BreakpointSystem.ets +++ b/entry/src/main/ets/common/constants/BreakpointSystem.ets @@ -14,9 +14,9 @@ */ export class BreakpointType { - sm: T - md: T - lg: T + public sm: T + public md: T + public lg: T constructor(sm: T, md: T, lg: T) { this.sm = sm; diff --git a/entry/src/main/ets/common/constants/CommonConstants.ets b/entry/src/main/ets/common/constants/CommonConstants.ets index a83eac7ffbae7cb5348c72077184586b8769ac9a..a1a34c71d857e7ba27e8755d030a47e292166b07 100644 --- a/entry/src/main/ets/common/constants/CommonConstants.ets +++ b/entry/src/main/ets/common/constants/CommonConstants.ets @@ -14,229 +14,228 @@ */ export class CommonConstants { - /** * Month. */ - static readonly MONTHS = 12; + public static readonly MONTHS = 12; /** * January. */ - static readonly JANUARY = 1; + public static readonly JANUARY = 1; /** * A week. */ - static readonly WEEK_NUMBER = 7; + public static readonly WEEK_NUMBER = 7; /** * Month number. */ - static readonly MONTH_NUMBER = 35; + public static readonly MONTH_NUMBER = 35; /** * Small grid height. */ - static readonly GRID_HEIGHT_L = 360; + public static readonly GRID_HEIGHT_L = 360; /** * Large grid height. */ - static readonly GRID_HEIGHT_M = 300; + public static readonly GRID_HEIGHT_M = 300; /** * Outside margin. */ - static readonly ELEMENTS_MARGIN = 12; + public static readonly ELEMENTS_MARGIN = 12; /** * One hundred percent. */ - static readonly ONE_HUNDRED_PERCENT: string = '100%'; + public static readonly ONE_HUNDRED_PERCENT: string = '100%'; /** * One hundred eleven percent. */ - static readonly ONE_HUNDRED_ELEVEN_PERCENT: string = '100%'; + public static readonly ONE_HUNDRED_ELEVEN_PERCENT: string = '100%'; /** * The hundred percent of the components */ - static readonly FULL_PERCENT: string = '100%'; + public static readonly FULL_PERCENT: string = '100%'; /** * Ninety two percent. */ - static readonly NINETY_PERCENT: string = '90%'; + public static readonly NINETY_PERCENT: string = '90%'; /** * Ninety two percent. */ - static readonly NINETY_TWO_PERCENT: string = '92%'; + public static readonly NINETY_TWO_PERCENT: string = '92%'; /** * Ninety five percent. */ - static readonly NINETY_FIVE_PERCENT: string = '95%'; + public static readonly NINETY_FIVE_PERCENT: string = '95%'; /** * Eighty five percent. */ - static readonly EIGHTY_FIVE_PERCENT: string = '85%'; + public static readonly EIGHTY_FIVE_PERCENT: string = '85%'; /** * Thirty percent. */ - static readonly THIRTY_PERCENT: string = '30%'; + public static readonly THIRTY_PERCENT: string = '30%'; /** * Forty percent. */ - static readonly FORTY_PERCENT: string = '40%'; + public static readonly FORTY_PERCENT: string = '40%'; /** * Seventy-five percent. */ - static readonly SEVENTY_FIVE_PERCENT: string = '75%'; + public static readonly SEVENTY_FIVE_PERCENT: string = '75%'; /** * Rotation angle. */ - static readonly ANGLE: number = 45; + public static readonly ANGLE: number = 45; /** * Line Spacing. */ - static readonly SPACE: number = 16; + public static readonly SPACE: number = 16; /** * Moving distance. */ - static readonly TRANSLATE: number = 1000; + public static readonly TRANSLATE: number = 1000; /** * Zero six. */ - static readonly ZERO_SIX: number = 0.6; + public static readonly ZERO_SIX: number = 0.6; /** * Zero eight. */ - static readonly ZERO_EIGHT: number = 0.8; + public static readonly ZERO_EIGHT: number = 0.8; /** * Duration. */ - static readonly DURATION: number = 1200; + public static readonly DURATION: number = 1200; /** * Delay. */ - static readonly DELAY: number = 500; + public static readonly DELAY: number = 500; /** * GridCount. */ - static readonly GRID_COUNT: number = 2; + public static readonly GRID_COUNT: number = 2; /** * Zero. */ - static readonly ZERO: number = 0; + public static readonly ZERO: number = 0; /** * Four */ - static readonly FOUR: number = 4; + public static readonly FOUR: number = 4; /** * Eight. */ - static readonly EIGHT: number = 8; + public static readonly EIGHT: number = 8; /** * Twelves. */ - static readonly TWELVES: number = 12; + public static readonly TWELVES: number = 12; /** * Space. */ - static readonly SPACE_ONE: number = 20; + public static readonly SPACE_ONE: number = 20; /** * Element margin large. */ - static readonly ELEMENTS_MARGIN_L: number = 16; + public static readonly ELEMENTS_MARGIN_L: number = 16; /** * Element margin small. */ - static readonly ELEMENTS_MARGIN_M: number = 8; + public static readonly ELEMENTS_MARGIN_M: number = 8; /** * 0.0. */ - static readonly ZERO_ZERO: number = 0.0; + public static readonly ZERO_ZERO: number = 0.0; /** * 0.3. */ - static readonly ZERO_Three: number = 0.3; + public static readonly ZERO_Three: number = 0.3; /** * 1.0. */ - static readonly ONE_ZERO: number = 1.0; + public static readonly ONE_ZERO: number = 1.0; /** * Saturday. */ - static readonly SATURDAY: string = '六'; + public static readonly SATURDAY: string = '六'; /** * Sunday. */ - static readonly SUNDAY: string = '日'; + public static readonly SUNDAY: string = '日'; /** * Seven grid. */ - static readonly GRID_SEVEN: string = '1fr 1fr 1fr 1fr 1fr 1fr 1fr'; + public static readonly GRID_SEVEN: string = '1fr 1fr 1fr 1fr 1fr 1fr 1fr'; /** * Six grid. */ - static readonly GRID_SIX: string = '1fr 1fr 1fr 1fr 1fr 1fr'; + public static readonly GRID_SIX: string = '1fr 1fr 1fr 1fr 1fr 1fr'; /** * Five grid. */ - static readonly GRID_FIVE: string = '1fr 1fr 1fr 1fr 1fr'; + public static readonly GRID_FIVE: string = '1fr 1fr 1fr 1fr 1fr'; /** * Breakpoint sm. */ - static readonly BREAK_POINT_SM: string = 'sm'; + public static readonly BREAK_POINT_SM: string = 'sm'; /** * Breakpoint md. */ - static readonly BREAK_POINT_MD: string = 'md'; + public static readonly BREAK_POINT_MD: string = 'md'; /** * Breakpoint lg. */ - static readonly BREAK_POINT_LG: string = 'lg'; + public static readonly BREAK_POINT_LG: string = 'lg'; /** * MD and LG width. */ - static readonly WIDTH_MD_LG: number = 448; + public static readonly WIDTH_MD_LG: number = 448; /** * All breakpoints */ - static readonly BREAKPOINTS: string[] = ['sm', 'md', 'lg']; + public static readonly BREAKPOINTS: string[] = ['sm', 'md', 'lg']; } \ No newline at end of file diff --git a/entry/src/main/ets/viewmodel/DateModel.ets b/entry/src/main/ets/viewmodel/DateModel.ets index 0b51bd3142cd00042c57cacb6e9cfd0692315d5e..016166ef4a1eb1a2a0fe287b6ab881fabf80e3fe 100644 --- a/entry/src/main/ets/viewmodel/DateModel.ets +++ b/entry/src/main/ets/viewmodel/DateModel.ets @@ -14,10 +14,10 @@ */ export class DateModel { - day: number; - week: number; - month: number; - year: number; + public day: number; + public week: number; + public month: number; + public year: number; constructor(day: number, week: number, month: number, year: number) { this.day = day; @@ -28,8 +28,8 @@ export class DateModel { } export class titleModel { - title: Resource; - url: string; + public title: Resource; + public url: string; constructor(title: Resource, url: string) { this.title = title; diff --git a/entry/src/main/ets/viewmodel/GetDate.ets b/entry/src/main/ets/viewmodel/GetDate.ets index dc8bbd0b3f7b43472dbc1613023f32c549eda515..dbd1c43a84e409da02105532efc4a079aaa8afb5 100644 --- a/entry/src/main/ets/viewmodel/GetDate.ets +++ b/entry/src/main/ets/viewmodel/GetDate.ets @@ -15,7 +15,7 @@ import { DateModel } from './DateModel'; -export function getMonthDate(specifiedMonth: number, specifiedYear: number): number[]{ +export function getMonthDate(specifiedMonth: number, specifiedYear: number): number[] { let currentFirstWeekDay: number = 0; let currentLastWeekDay: number = 0; let currentAllDay: number[] = []; @@ -34,7 +34,7 @@ export function getMonthDate(specifiedMonth: number, specifiedYear: number): num return currentAllDay; } -export function getRealTimeDate(): DateModel{ +export function getRealTimeDate(): DateModel { const nowDate = new Date(); let currentMonth = nowDate.getMonth() + 1; let currentDay = nowDate.getDate(); diff --git a/screenshots/device/add.gif b/screenshots/device/add.gif deleted file mode 100644 index af850f8199d20d91a64a3a373c93bddc68c30a11..0000000000000000000000000000000000000000 Binary files a/screenshots/device/add.gif and /dev/null differ diff --git a/screenshots/device/add.png b/screenshots/device/add.png new file mode 100644 index 0000000000000000000000000000000000000000..97b8f6ca82a0b41d04c045d87ee2f60c27b3528a Binary files /dev/null and b/screenshots/device/add.png differ diff --git a/screenshots/device/add_en.gif b/screenshots/device/add_en.gif deleted file mode 100644 index 357822e0ecb26c5d7686213052fe8144ec8b4f77..0000000000000000000000000000000000000000 Binary files a/screenshots/device/add_en.gif and /dev/null differ diff --git a/screenshots/device/add_en.png b/screenshots/device/add_en.png new file mode 100644 index 0000000000000000000000000000000000000000..7ee846dc9a1d76ee12fa0697c4b066dded693fe7 Binary files /dev/null and b/screenshots/device/add_en.png differ diff --git a/screenshots/device/customize.gif b/screenshots/device/customize.gif deleted file mode 100644 index 5350be885d467321c7cc4031d18dbe4b3564c985..0000000000000000000000000000000000000000 Binary files a/screenshots/device/customize.gif and /dev/null differ diff --git a/screenshots/device/customize.png b/screenshots/device/customize.png new file mode 100644 index 0000000000000000000000000000000000000000..d567cb5b0110ed41e4a93444387a1dae306f4592 Binary files /dev/null and b/screenshots/device/customize.png differ diff --git a/screenshots/device/customize_en.gif b/screenshots/device/customize_en.gif deleted file mode 100644 index 63cb8611fc192310170b550d496f6aec16270d4e..0000000000000000000000000000000000000000 Binary files a/screenshots/device/customize_en.gif and /dev/null differ diff --git a/screenshots/device/customize_en.png b/screenshots/device/customize_en.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3c7562e775d1a156f87e9fe45920986c2f759c Binary files /dev/null and b/screenshots/device/customize_en.png differ diff --git a/screenshots/device/modality.gif b/screenshots/device/modality.gif deleted file mode 100644 index 98dbe083ec101ca155cbc1f82809f7de69c6c4a4..0000000000000000000000000000000000000000 Binary files a/screenshots/device/modality.gif and /dev/null differ diff --git a/screenshots/device/modality.png b/screenshots/device/modality.png new file mode 100644 index 0000000000000000000000000000000000000000..28eb5b086b3239d8590c8bb7972293552da25063 Binary files /dev/null and b/screenshots/device/modality.png differ diff --git a/screenshots/device/modality_en.gif b/screenshots/device/modality_en.gif deleted file mode 100644 index 6784d36fdcb534fb092c3535420cd1b822a5c05a..0000000000000000000000000000000000000000 Binary files a/screenshots/device/modality_en.gif and /dev/null differ diff --git a/screenshots/device/modality_en.png b/screenshots/device/modality_en.png new file mode 100644 index 0000000000000000000000000000000000000000..70d227c00874c9dbb8f195fe3d00b5a8cf95b027 Binary files /dev/null and b/screenshots/device/modality_en.png differ diff --git a/screenshots/device/privacy.gif b/screenshots/device/privacy.gif deleted file mode 100644 index e67ad1fea75369913c146ce03b3eeb02ddebfbc4..0000000000000000000000000000000000000000 Binary files a/screenshots/device/privacy.gif and /dev/null differ diff --git a/screenshots/device/privacy.png b/screenshots/device/privacy.png new file mode 100644 index 0000000000000000000000000000000000000000..d8c3f534bb581b52ff97cc0d004ce53e1b590c10 Binary files /dev/null and b/screenshots/device/privacy.png differ diff --git a/screenshots/device/privacy_en.gif b/screenshots/device/privacy_en.gif deleted file mode 100644 index a322e850733a839916d4ae2cf4e3a0ec372070a3..0000000000000000000000000000000000000000 Binary files a/screenshots/device/privacy_en.gif and /dev/null differ diff --git a/screenshots/device/privacy_en.png b/screenshots/device/privacy_en.png new file mode 100644 index 0000000000000000000000000000000000000000..6039ff700c58ba886f57025f3c310ec51f72621c Binary files /dev/null and b/screenshots/device/privacy_en.png differ diff --git a/screenshots/device/screen.gif b/screenshots/device/screen.gif deleted file mode 100644 index 7e5982c7e6367932bfa8565b309534ab801a1b46..0000000000000000000000000000000000000000 Binary files a/screenshots/device/screen.gif and /dev/null differ diff --git a/screenshots/device/screen.png b/screenshots/device/screen.png new file mode 100644 index 0000000000000000000000000000000000000000..aef7d7abe9c25dd8cd5621a441890033ca52a64a Binary files /dev/null and b/screenshots/device/screen.png differ diff --git a/screenshots/device/screen_en.gif b/screenshots/device/screen_en.gif deleted file mode 100644 index 2d03d80c3f0bf76c149fd320d38a507ccce83f8a..0000000000000000000000000000000000000000 Binary files a/screenshots/device/screen_en.gif and /dev/null differ diff --git a/screenshots/device/screen_en.png b/screenshots/device/screen_en.png new file mode 100644 index 0000000000000000000000000000000000000000..70c67d1696fe3749840b33ede6fd815611ccd482 Binary files /dev/null and b/screenshots/device/screen_en.png differ diff --git a/screenshots/device/semimodal.gif b/screenshots/device/semimodal.gif deleted file mode 100644 index 838deb7db5bab592cb1ebd12aaa0c88006794eec..0000000000000000000000000000000000000000 Binary files a/screenshots/device/semimodal.gif and /dev/null differ diff --git a/screenshots/device/semimodal.png b/screenshots/device/semimodal.png new file mode 100644 index 0000000000000000000000000000000000000000..1511e6dfe19c33fd89dffbb94be37d21acd9b923 Binary files /dev/null and b/screenshots/device/semimodal.png differ diff --git a/screenshots/device/semimodal_en.gif b/screenshots/device/semimodal_en.gif deleted file mode 100644 index c2ceb8cff90995b995107bcda129dd0a45e6437a..0000000000000000000000000000000000000000 Binary files a/screenshots/device/semimodal_en.gif and /dev/null differ diff --git a/screenshots/device/semimodal_en.png b/screenshots/device/semimodal_en.png new file mode 100644 index 0000000000000000000000000000000000000000..44fc9e51cf3a983ab34660a8cf0aab14a9a97607 Binary files /dev/null and b/screenshots/device/semimodal_en.png differ diff --git a/screenshots/device/slide.gif b/screenshots/device/slide.gif deleted file mode 100644 index 6eb82c979ee873e64db104fc8f912beb59986ccf..0000000000000000000000000000000000000000 Binary files a/screenshots/device/slide.gif and /dev/null differ diff --git a/screenshots/device/slide.png b/screenshots/device/slide.png new file mode 100644 index 0000000000000000000000000000000000000000..15f8ca5d10f1f281876443cbf0967ca7535c2121 Binary files /dev/null and b/screenshots/device/slide.png differ diff --git a/screenshots/device/slide_en.gif b/screenshots/device/slide_en.gif deleted file mode 100644 index 911d92451a788185df606a9ceead69dddc8a265c..0000000000000000000000000000000000000000 Binary files a/screenshots/device/slide_en.gif and /dev/null differ diff --git a/screenshots/device/slide_en.png b/screenshots/device/slide_en.png new file mode 100644 index 0000000000000000000000000000000000000000..7276060263e0119e36e5e966cc7d132931d1ce2d Binary files /dev/null and b/screenshots/device/slide_en.png differ diff --git a/screenshots/device/toast.gif b/screenshots/device/toast.gif deleted file mode 100644 index 5d6dde70eb4ebc1b6203b2f5b259a530635e460b..0000000000000000000000000000000000000000 Binary files a/screenshots/device/toast.gif and /dev/null differ diff --git a/screenshots/device/toast.png b/screenshots/device/toast.png new file mode 100644 index 0000000000000000000000000000000000000000..d8f9a719f88bfda98b615eafa3b435022ef3581a Binary files /dev/null and b/screenshots/device/toast.png differ diff --git a/screenshots/device/toast_en.gif b/screenshots/device/toast_en.gif deleted file mode 100644 index 9e69974eb87566b0c4feaf2ab1eddd8f3d3bcdf7..0000000000000000000000000000000000000000 Binary files a/screenshots/device/toast_en.gif and /dev/null differ diff --git a/screenshots/device/toast_en.png b/screenshots/device/toast_en.png new file mode 100644 index 0000000000000000000000000000000000000000..30ce523315a0f10b549b1552dce25d3fef98c920 Binary files /dev/null and b/screenshots/device/toast_en.png differ