oxy-uni-ui 1.2.0 → 2.0.0
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/attributes.json +1 -1
- package/components/common/abstracts/variable.scss +396 -321
- package/components/common/path.ts +9 -0
- package/components/common/util.ts +200 -5
- package/components/composables/index.ts +1 -0
- package/components/composables/useGlobalLoading.ts +42 -0
- package/components/composables/useGlobalMessage.ts +48 -0
- package/components/composables/useGlobalToast.ts +84 -0
- package/components/composables/usePopover.ts +24 -20
- package/components/composables/useVirtualScroll.ts +13 -11
- package/components/composables/useWindowResize.ts +35 -0
- package/components/oxy-action-sheet/index.scss +24 -11
- package/components/oxy-action-sheet/oxy-action-sheet.vue +27 -19
- package/components/oxy-action-sheet/types.ts +7 -0
- package/components/oxy-backtop/index.scss +3 -3
- package/components/oxy-backtop/oxy-backtop.vue +9 -6
- package/components/oxy-backtop/types.ts +7 -7
- package/components/oxy-badge/index.scss +4 -4
- package/components/oxy-badge/oxy-badge.vue +3 -3
- package/components/oxy-badge/types.ts +2 -2
- package/components/oxy-button/index.scss +5 -5
- package/components/oxy-button/oxy-button.vue +5 -1
- package/components/oxy-calendar/index.scss +11 -11
- package/components/oxy-calendar/oxy-calendar.vue +1 -0
- package/components/oxy-calendar/types.ts +5 -0
- package/components/oxy-calendar-view/month/index.scss +4 -4
- package/components/oxy-calendar-view/month/types.ts +36 -0
- package/components/oxy-calendar-view/monthPanel/index.scss +7 -7
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +14 -8
- package/components/oxy-calendar-view/year/index.scss +4 -4
- package/components/oxy-calendar-view/yearPanel/index.scss +4 -4
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +21 -5
- package/components/oxy-card/index.scss +2 -2
- package/components/oxy-cell/index.scss +8 -8
- package/components/oxy-cell/oxy-cell.vue +15 -2
- package/components/oxy-cell/types.ts +4 -0
- package/components/oxy-checkbox/index.scss +8 -8
- package/components/oxy-checkbox/oxy-checkbox.vue +2 -2
- package/components/oxy-checkbox-group/index.scss +2 -2
- package/components/oxy-circle/oxy-circle.vue +10 -7
- package/components/oxy-circle/types.ts +5 -5
- package/components/oxy-col/oxy-col.vue +2 -2
- package/components/oxy-col-picker/index.scss +4 -4
- package/components/oxy-col-picker/oxy-col-picker.vue +9 -5
- package/components/oxy-col-picker/types.ts +12 -3
- package/components/oxy-collapse/index.scss +2 -2
- package/components/oxy-collapse-item/oxy-collapse-item.vue +3 -3
- package/components/oxy-corner/index.scss +32 -32
- package/components/oxy-corner/oxy-corner.vue +15 -3
- package/components/oxy-corner/types.ts +15 -1
- package/components/oxy-count-to/oxy-count-to.vue +3 -3
- package/components/oxy-curtain/index.scss +15 -15
- package/components/oxy-curtain/oxy-curtain.vue +4 -2
- package/components/oxy-curtain/types.ts +6 -1
- package/components/oxy-date-strip/index.scss +10 -0
- package/components/oxy-date-strip/oxy-date-strip.vue +198 -0
- package/components/oxy-date-strip/types.ts +98 -0
- package/components/oxy-date-strip/utils.ts +67 -0
- package/components/oxy-date-strip-item/index.scss +94 -0
- package/components/oxy-date-strip-item/oxy-date-strip-item.vue +102 -0
- package/components/oxy-date-strip-item/types.ts +53 -0
- package/components/oxy-datetime-picker/index.scss +11 -11
- package/components/oxy-datetime-picker/oxy-datetime-picker.vue +4 -1
- package/components/oxy-datetime-picker/types.ts +10 -1
- package/components/oxy-drop-menu/index.scss +3 -3
- package/components/oxy-drop-menu/oxy-drop-menu.vue +3 -3
- package/components/oxy-drop-menu-item/index.scss +1 -1
- package/components/oxy-drop-menu-item/oxy-drop-menu-item.vue +4 -3
- package/components/oxy-drop-menu-item/types.ts +5 -0
- package/components/oxy-echarts/index.scss +17 -0
- package/components/oxy-echarts/index.ts +1 -0
- package/components/oxy-echarts/oxy-echarts.vue +32 -0
- package/components/oxy-echarts/types.ts +18 -0
- package/components/oxy-fab/index.scss +8 -8
- package/components/oxy-fab/oxy-fab.vue +22 -3
- package/components/oxy-file-list/index.scss +42 -15
- package/components/oxy-file-list/oxy-file-list.vue +208 -34
- package/components/oxy-file-list/types.ts +58 -2
- package/components/oxy-floating-panel/oxy-floating-panel.vue +13 -9
- package/components/oxy-floating-panel/{type.ts → types.ts} +8 -8
- package/components/oxy-footer/index.scss +19 -0
- package/components/oxy-footer/oxy-footer.vue +78 -0
- package/components/oxy-footer/types.ts +17 -0
- package/components/oxy-form-item/types.ts +22 -1
- package/components/oxy-gap/oxy-gap.vue +2 -2
- package/components/oxy-gap/types.ts +2 -2
- package/components/oxy-global-loading/oxy-global-loading.vue +53 -0
- package/components/oxy-global-message/oxy-global-message.vue +64 -0
- package/components/oxy-global-toast/oxy-global-toast.vue +53 -0
- package/components/oxy-grid/oxy-grid.vue +1 -1
- package/components/oxy-grid/types.ts +1 -1
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-grid-item/oxy-grid-item.vue +7 -5
- package/components/oxy-grid-item/types.ts +1 -1
- package/components/oxy-guidance/index.scss +75 -0
- package/components/oxy-guidance/oxy-guidance.vue +201 -0
- package/components/oxy-guidance/types.ts +33 -0
- package/components/oxy-icon/oxy-icon.vue +2 -2
- package/components/oxy-icon/types.ts +1 -1
- package/components/oxy-img/oxy-img.vue +4 -4
- package/components/oxy-img/types.ts +3 -3
- package/components/oxy-img-cropper/index.scss +12 -12
- package/components/oxy-img-cropper/oxy-img-cropper.vue +97 -52
- package/components/oxy-img-cropper/types.ts +2 -2
- package/components/oxy-img-lazy/index.scss +17 -0
- package/components/oxy-img-lazy/oxy-img-lazy.vue +332 -0
- package/components/oxy-img-lazy/types.ts +69 -0
- package/components/oxy-index-anchor/index.scss +2 -2
- package/components/oxy-index-anchor/oxy-index-anchor.vue +2 -2
- package/components/oxy-index-anchor/{type.ts → types.ts} +3 -0
- package/components/oxy-index-bar/index.scss +3 -3
- package/components/oxy-index-bar/oxy-index-bar.vue +3 -3
- package/components/oxy-index-bar/{type.ts → types.ts} +2 -2
- package/components/oxy-input/index.scss +1 -1
- package/components/oxy-input-number/index.scss +5 -5
- package/components/oxy-input-number/oxy-input-number.vue +2 -2
- package/components/oxy-input-number/types.ts +3 -2
- package/components/oxy-keyboard/index.scss +5 -5
- package/components/oxy-keyboard/key/index.scss +3 -3
- package/components/oxy-keyboard/key/index.vue +2 -2
- package/components/oxy-keyboard/key/types.ts +15 -0
- package/components/oxy-keyboard/oxy-keyboard.vue +1 -0
- package/components/oxy-keyboard/types.ts +5 -0
- package/components/oxy-link/index.scss +57 -0
- package/components/oxy-link/oxy-link.vue +130 -0
- package/components/oxy-link/types.ts +81 -0
- package/components/oxy-list/index.scss +7 -1
- package/components/oxy-list/oxy-list.vue +4 -3
- package/components/oxy-list/types.ts +1 -1
- package/components/oxy-loading/oxy-loading.vue +8 -4
- package/components/oxy-loading/types.ts +1 -1
- package/components/oxy-loadmore/index.scss +3 -3
- package/components/oxy-long-press-menu/index.scss +93 -0
- package/components/oxy-long-press-menu/oxy-long-press-menu.vue +338 -0
- package/components/oxy-long-press-menu/types.ts +34 -0
- package/components/oxy-message-box/index.scss +12 -11
- package/components/oxy-message-box/oxy-message-box.vue +11 -3
- package/components/oxy-message-box/types.ts +14 -0
- package/components/oxy-navbar/index.scss +2 -2
- package/components/oxy-navbar/oxy-navbar.vue +58 -13
- package/components/oxy-navbar/types.ts +8 -1
- package/components/oxy-navbar-capsule/types.ts +3 -0
- package/components/oxy-notice-bar/index.scss +3 -3
- package/components/oxy-notice-bar/oxy-notice-bar.vue +9 -5
- package/components/oxy-notice-bar/types.ts +3 -3
- package/components/oxy-notify/index.ts +1 -0
- package/components/oxy-notify/oxy-notify.vue +3 -2
- package/components/oxy-notify/types.ts +7 -0
- package/components/oxy-pagination/index.scss +1 -1
- package/components/oxy-password-input/oxy-password-input.vue +2 -2
- package/components/oxy-password-input/types.ts +1 -1
- package/components/oxy-picker/index.scss +45 -2
- package/components/oxy-picker/oxy-picker.vue +103 -14
- package/components/oxy-picker/types.ts +33 -1
- package/components/oxy-picker-view/index.scss +3 -3
- package/components/oxy-picker-view/oxy-picker-view.vue +4 -4
- package/components/oxy-popover/index.scss +9 -9
- package/components/oxy-popup/index.scss +2 -2
- package/components/oxy-popup/oxy-popup.vue +35 -2
- package/components/oxy-popup/types.ts +8 -1
- package/components/oxy-progress/index.scss +3 -3
- package/components/oxy-qrcode/draw.ts +398 -0
- package/components/oxy-qrcode/index.scss +2 -0
- package/components/oxy-qrcode/oxy-qrcode.vue +124 -0
- package/components/oxy-qrcode/qrcode.ts +936 -0
- package/components/oxy-qrcode/types.ts +42 -0
- package/components/oxy-radio/index.scss +13 -13
- package/components/oxy-radio/oxy-radio.vue +1 -1
- package/components/oxy-radio-group/index.scss +2 -2
- package/components/oxy-rate/types.ts +4 -4
- package/components/oxy-resize/index.scss +2 -2
- package/components/oxy-resize/oxy-resize.vue +4 -4
- package/components/oxy-resize/types.ts +3 -0
- package/components/oxy-rich-text/icon/emjio.svg +1 -0
- package/components/oxy-rich-text/icon/quote.svg +1 -0
- package/components/oxy-rich-text/icon/text.svg +1 -0
- package/components/oxy-rich-text/icon/title.svg +1 -0
- package/components/oxy-rich-text/index.scss +160 -0
- package/components/oxy-rich-text/mp-html/card/card.vue +122 -0
- package/components/oxy-rich-text/mp-html/card/index.js +7 -0
- package/components/oxy-rich-text/mp-html/editable/config.js +15 -0
- package/components/oxy-rich-text/mp-html/editable/index.js +553 -0
- package/components/oxy-rich-text/mp-html/emoji/index.js +203 -0
- package/components/oxy-rich-text/mp-html/highlight/config.js +5 -0
- package/components/oxy-rich-text/mp-html/highlight/index.js +96 -0
- package/components/oxy-rich-text/mp-html/highlight/prism.css +1 -0
- package/components/oxy-rich-text/mp-html/highlight/prism.min.js +7 -0
- package/components/oxy-rich-text/mp-html/img-cache/index.js +138 -0
- package/components/oxy-rich-text/mp-html/latex/index.js +80 -0
- package/components/oxy-rich-text/mp-html/latex/katex.css +1 -0
- package/components/oxy-rich-text/mp-html/latex/katex.min.js +1 -0
- package/components/oxy-rich-text/mp-html/markdown/index.js +50 -0
- package/components/oxy-rich-text/mp-html/markdown/marked.min.js +71 -0
- package/components/oxy-rich-text/mp-html/mp-html.d.ts +184 -0
- package/components/oxy-rich-text/mp-html/mp-html.vue +684 -0
- package/components/oxy-rich-text/mp-html/node/node.vue +1172 -0
- package/components/oxy-rich-text/mp-html/parser.js +1428 -0
- package/components/oxy-rich-text/mp-html/search/index.js +132 -0
- package/components/oxy-rich-text/mp-html/style/index.js +129 -0
- package/components/oxy-rich-text/mp-html/style/parser.js +175 -0
- package/components/oxy-rich-text/mp-html/template/index.js +67 -0
- package/components/oxy-rich-text/mp-html/txv-video/index.js +46 -0
- package/components/oxy-rich-text/oxy-rich-text.vue +642 -0
- package/components/oxy-rich-text/types.ts +76 -0
- package/components/oxy-row/oxy-row.vue +3 -3
- package/components/oxy-row/types.ts +1 -1
- package/components/oxy-search/index.scss +3 -3
- package/components/oxy-segmented/index.scss +16 -16
- package/components/oxy-segmented/oxy-segmented.vue +23 -3
- package/components/oxy-select/index.scss +331 -0
- package/components/oxy-select/oxy-select.vue +456 -0
- package/components/oxy-select/types.ts +83 -0
- package/components/oxy-select-picker/index.scss +7 -7
- package/components/oxy-select-picker/oxy-select-picker.vue +4 -0
- package/components/oxy-select-picker/types.ts +7 -1
- package/components/oxy-sidebar-item/index.scss +1 -1
- package/components/oxy-signature/oxy-signature.vue +18 -10
- package/components/oxy-signature/types.ts +106 -13
- package/components/oxy-skeleton/oxy-skeleton.vue +6 -6
- package/components/oxy-skeleton/types.ts +1 -1
- package/components/oxy-slider/index.scss +3 -3
- package/components/oxy-sort-button/index.scss +8 -8
- package/components/oxy-status-tip/index.scss +4 -4
- package/components/oxy-status-tip/oxy-status-tip.vue +5 -5
- package/components/oxy-status-tip/types.ts +3 -3
- package/components/oxy-step/index.scss +14 -14
- package/components/oxy-sticky/oxy-sticky.vue +6 -6
- package/components/oxy-stream-render/index.scss +6 -0
- package/components/oxy-stream-render/oxy-stream-render.vue +204 -0
- package/components/oxy-stream-render/types.ts +8 -0
- package/components/oxy-swipe-action/oxy-swipe-action.vue +27 -2
- package/components/oxy-swiper/oxy-swiper.vue +6 -6
- package/components/oxy-swiper/types.ts +5 -5
- package/components/oxy-switch/index.scss +8 -8
- package/components/oxy-switch/oxy-switch.vue +2 -2
- package/components/oxy-switch/types.ts +1 -1
- package/components/oxy-tab/index.scss +11 -1
- package/components/oxy-tabbar/index.scss +1 -1
- package/components/oxy-tabbar/oxy-tabbar.vue +39 -10
- package/components/oxy-table/index.scss +5 -5
- package/components/oxy-table/oxy-table.vue +8 -6
- package/components/oxy-table/types.ts +2 -2
- package/components/oxy-table-col/oxy-table-col.vue +3 -3
- package/components/oxy-table-col/types.ts +2 -2
- package/components/oxy-tabs/index.scss +43 -15
- package/components/oxy-tabs/oxy-tabs.vue +53 -19
- package/components/oxy-tabs/types.ts +15 -3
- package/components/oxy-tag/index.scss +15 -15
- package/components/oxy-text/index.scss +5 -1
- package/components/oxy-text/oxy-text.vue +76 -7
- package/components/oxy-text/types.ts +12 -0
- package/components/oxy-textarea/index.scss +6 -6
- package/components/oxy-toast/oxy-toast.vue +24 -8
- package/components/oxy-tooltip/index.scss +9 -9
- package/components/oxy-tree/index.scss +61 -9
- package/components/oxy-tree/oxy-tree.vue +102 -17
- package/components/oxy-tree/types.ts +23 -10
- package/components/oxy-upload/index.scss +21 -21
- package/components/oxy-upload/types.ts +2 -2
- package/components/oxy-verification-code/index.scss +6 -0
- package/components/oxy-verification-code/oxy-verification-code.vue +187 -0
- package/components/oxy-verification-code/types.ts +82 -0
- package/components/oxy-video-preview/index.scss +4 -4
- package/components/oxy-virtual-scroll/index.scss +4 -4
- package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +11 -7
- package/components/oxy-virtual-scroll/types.ts +14 -14
- package/components/oxy-voice-player/index.scss +908 -0
- package/components/oxy-voice-player/oxy-voice-player.vue +821 -0
- package/components/oxy-voice-player/types.ts +567 -0
- package/components/oxy-waterfall/index.scss +18 -0
- package/components/oxy-waterfall/oxy-waterfall.vue +218 -0
- package/components/oxy-waterfall/types.ts +90 -0
- package/components/oxy-waterfall-item/index.scss +8 -0
- package/components/oxy-waterfall-item/oxy-waterfall-item.vue +89 -0
- package/components/oxy-waterfall-item/types.ts +16 -0
- package/components/oxy-watermark/oxy-watermark.vue +35 -13
- package/components/oxy-watermark/types.ts +14 -14
- package/global.d.ts +9 -0
- package/index.ts +3 -0
- package/locale/lang/ar-SA.ts +3 -0
- package/locale/lang/en-US.ts +29 -0
- package/locale/lang/zh-CN.ts +29 -0
- package/package.json +97 -1
- package/tags.json +1 -1
- package/uni-echarts/changelog.md +2 -0
- package/uni-echarts/components/index.js +1 -0
- package/uni-echarts/components/uni-echarts/events.js +95 -0
- package/uni-echarts/components/uni-echarts/types.d.ts +183 -0
- package/uni-echarts/components/uni-echarts/types.js +1 -0
- package/uni-echarts/components/uni-echarts/uni-echarts.vue +530 -0
- package/uni-echarts/components/uni-echarts/uni-echarts.vue.d.ts +19 -0
- package/uni-echarts/global.d.ts +7 -0
- package/uni-echarts/index.d.ts +440 -0
- package/uni-echarts/index.js +2 -0
- package/uni-echarts/package.json +105 -0
- package/uni-echarts/shared-core.d.ts +269 -0
- package/uni-echarts/shared-core.js +900 -0
- package/web-types.json +1 -1
- package/components/oxy-number-keyboard/index.scss +0 -78
- package/components/oxy-number-keyboard/key/index.scss +0 -81
- package/components/oxy-number-keyboard/key/index.vue +0 -78
- package/components/oxy-number-keyboard/key/types.ts +0 -11
- package/components/oxy-number-keyboard/oxy-number-keyboard.vue +0 -151
- package/components/oxy-number-keyboard/types.ts +0 -83
- package/components/oxy-tree/components/tree-node-content.vue +0 -72
- package/components/oxy-tree/index.ts +0 -51
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { WeekRange, DateType, DisableDate } from './types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 获取指定日期所在周的日期范围。
|
|
5
|
+
* @param {Date} date - 指定日期。
|
|
6
|
+
* @param {number} firstDayOfWeek - 一周的第一天,0 表示周日,1 表示周一,以此类推。
|
|
7
|
+
* @returns {WeekRange} 返回一个包含周起始和结束日期的对象。
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export function getWeekRange(date: Date, firstDayOfWeek: number): WeekRange {
|
|
11
|
+
const start = new Date(date.getTime())
|
|
12
|
+
const dayOffset = (date.getDay() - firstDayOfWeek + 7) % 7
|
|
13
|
+
start.setDate(start.getDate() - dayOffset)
|
|
14
|
+
|
|
15
|
+
const end = new Date(start.getTime())
|
|
16
|
+
end.setDate(end.getDate() + 6)
|
|
17
|
+
return { start, end } as WeekRange
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 向指定日期添加天数。
|
|
22
|
+
* @param {Date} date - 基础日期。
|
|
23
|
+
* @param {number} days - 要添加的天数,可以是正数或负数。
|
|
24
|
+
* @returns {Date} 返回一个新的日期对象,该对象是基础日期加上指定天数后的结果。
|
|
25
|
+
*/
|
|
26
|
+
export function addDays(date: Date, days: number): Date {
|
|
27
|
+
const result = new Date(date.getTime())
|
|
28
|
+
result.setDate(result.getDate() + days)
|
|
29
|
+
return result
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function addWeeks(date: Date, weeks: number): Date {
|
|
33
|
+
const result = new Date(date.getTime())
|
|
34
|
+
result.setDate(result.getDate() + weeks * 7)
|
|
35
|
+
return result
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 判断两个日期是否表示同一天(忽略时间部分)。
|
|
40
|
+
*
|
|
41
|
+
* @param date1 - 第一个日期。
|
|
42
|
+
* @param date2 - 第二个日期。
|
|
43
|
+
* @returns 如果两个日期是同一天,返回 true;否则返回 false。
|
|
44
|
+
*/
|
|
45
|
+
function isSameDay(date1: Date, date2: Date): boolean {
|
|
46
|
+
return date1.getFullYear() == date2.getFullYear() && date1.getMonth() == date2.getMonth() && date1.getDate() == date2.getDate()
|
|
47
|
+
}
|
|
48
|
+
export function calcType(date: Date, minDate: Date, maxDate: Date, selectedDate: Date | null, disableDate?: DisableDate): DateType {
|
|
49
|
+
// 检查日期是否早于 minDate 或晚于 maxDate
|
|
50
|
+
if (date.getTime() < minDate.getTime() || date.getTime() > maxDate.getTime()) {
|
|
51
|
+
return 'disabled'
|
|
52
|
+
}
|
|
53
|
+
if (disableDate && disableDate(date)) {
|
|
54
|
+
return 'disabled'
|
|
55
|
+
}
|
|
56
|
+
// 如果 selectedDate 不为 null,检查日期是否等于 selectedDate
|
|
57
|
+
if (selectedDate != null && isSameDay(date, selectedDate)) {
|
|
58
|
+
return 'selected'
|
|
59
|
+
}
|
|
60
|
+
return ''
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function daysBetween(date1: Date, date2: Date): number {
|
|
64
|
+
// 将两个日期转换为毫秒
|
|
65
|
+
const diffInMilliseconds = Math.abs(date2.getTime() - date1.getTime())
|
|
66
|
+
return Math.floor(diffInMilliseconds / (1000 * 3600 * 24))
|
|
67
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/mixin';
|
|
3
|
+
|
|
4
|
+
@include b(date-strip-item) {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
padding: $-date-strip-padding-y $-date-strip-padding-x;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
/* #ifndef UNI-APP-X && APP */
|
|
10
|
+
height: 100%;
|
|
11
|
+
/* #endif */
|
|
12
|
+
&--week {
|
|
13
|
+
flex: 1;
|
|
14
|
+
.oxy-date-strip-item__grid {
|
|
15
|
+
flex: 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
&--none {
|
|
19
|
+
.oxy-date-strip-item__grid {
|
|
20
|
+
width: $-date-strip-grid-width;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&__grid {
|
|
24
|
+
/* #ifndef UNI-APP-X && APP */
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
/* #endif */
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
margin: 0 4rpx;
|
|
30
|
+
transition-duration: 300ms;
|
|
31
|
+
transition-property: background-color, color;
|
|
32
|
+
transition-timing-function: linear;
|
|
33
|
+
|
|
34
|
+
&-prefix,&-day,&-suffix {
|
|
35
|
+
text-align: center;
|
|
36
|
+
transition-duration: 200ms;
|
|
37
|
+
transition-property: color;
|
|
38
|
+
transition-timing-function: linear;
|
|
39
|
+
}
|
|
40
|
+
&-prefix {
|
|
41
|
+
font-size: $-date-strip-prefix-font-size;
|
|
42
|
+
color: $-date-strip-prefix-color;
|
|
43
|
+
}
|
|
44
|
+
&--none {
|
|
45
|
+
.oxy-date-strip-item__grid-prefix {
|
|
46
|
+
padding-bottom: 8rpx;
|
|
47
|
+
padding-top: 8rpx;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
&--circle {
|
|
51
|
+
.oxy-date-strip-item__grid-prefix {
|
|
52
|
+
padding-bottom: 8rpx;
|
|
53
|
+
}
|
|
54
|
+
.oxy-date-strip-item__grid-info {
|
|
55
|
+
border-radius: $-date-strip-grid-circle-radius;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&--square {
|
|
59
|
+
border-radius: $-date-strip-square-radius;
|
|
60
|
+
padding: $-date-strip-grid-square-padding-y $-date-strip-grid-square-padding-x;
|
|
61
|
+
}
|
|
62
|
+
&-suffix {
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 50%;
|
|
65
|
+
transform: translateY(60%);
|
|
66
|
+
font-size: $-date-strip-suffix-font-size;
|
|
67
|
+
color: $-date-strip-suffix-color;
|
|
68
|
+
}
|
|
69
|
+
&-day {
|
|
70
|
+
font-size: $-date-strip-font-size;
|
|
71
|
+
color: $-date-strip-color;
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
}
|
|
74
|
+
&-info {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex: 1;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
position: relative;
|
|
80
|
+
}
|
|
81
|
+
&--active-bg {
|
|
82
|
+
background-color: $-date-strip-active-color;
|
|
83
|
+
}
|
|
84
|
+
&--active-text {
|
|
85
|
+
color: white;
|
|
86
|
+
&-none {
|
|
87
|
+
color: $-date-strip-active-color;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
&--disabled {
|
|
91
|
+
opacity: 0.4;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="`oxy-date-strip-item oxy-date-strip-item--${switchMode} ${customClass}`" :style="customStyle">
|
|
3
|
+
<view
|
|
4
|
+
class="oxy-date-strip-item__grid"
|
|
5
|
+
v-for="item in dates"
|
|
6
|
+
:style="[
|
|
7
|
+
styles,
|
|
8
|
+
item.type == 'selected' && shape == 'square' && activeBgColor != null ? { background: activeBgColor } : {},
|
|
9
|
+
shape == 'square' && radius != null ? { 'border-radius': radius } : {}
|
|
10
|
+
]"
|
|
11
|
+
:class="[
|
|
12
|
+
'oxy-date-strip-item__grid--' + shape,
|
|
13
|
+
{
|
|
14
|
+
'oxy-date-strip-item__grid--active-bg': shape == 'square' && item.type == 'selected',
|
|
15
|
+
'oxy-date-strip-item__grid--disabled': item.type == 'disabled',
|
|
16
|
+
'oxy-date-strip-item__grid--selected': item.type == 'selected'
|
|
17
|
+
}
|
|
18
|
+
]"
|
|
19
|
+
@click="onClick(item)"
|
|
20
|
+
:key="item.key"
|
|
21
|
+
>
|
|
22
|
+
<text
|
|
23
|
+
class="oxy-date-strip-item__grid-prefix"
|
|
24
|
+
:class="{
|
|
25
|
+
'oxy-date-strip-item__grid--active-text': item.type == 'selected' && shape == 'square',
|
|
26
|
+
'oxy-date-strip-item__grid--active-text-none': item.type == 'selected' && shape == 'none'
|
|
27
|
+
}"
|
|
28
|
+
:style="[item.type == 'selected' && activeColor ? { color: activeColor } : {}]"
|
|
29
|
+
>
|
|
30
|
+
{{ item.prefix }}
|
|
31
|
+
</text>
|
|
32
|
+
<view
|
|
33
|
+
class="oxy-date-strip-item__grid-info"
|
|
34
|
+
:class="{
|
|
35
|
+
'oxy-date-strip-item__grid--active-bg': shape == 'circle' && item.type == 'selected'
|
|
36
|
+
}"
|
|
37
|
+
:style="[
|
|
38
|
+
item.type == 'selected' && shape == 'circle' && activeBgColor ? { background: activeBgColor } : {},
|
|
39
|
+
shape == 'square' && radius ? { 'border-radius': radius } : {}
|
|
40
|
+
]"
|
|
41
|
+
>
|
|
42
|
+
<text
|
|
43
|
+
class="oxy-date-strip-item__grid-day"
|
|
44
|
+
:class="{
|
|
45
|
+
'oxy-date-strip-item__grid--active-text': item.type == 'selected' && shape != 'none',
|
|
46
|
+
'oxy-date-strip-item__grid--active-text-none': item.type == 'selected' && shape == 'none'
|
|
47
|
+
}"
|
|
48
|
+
:style="[item.type == 'selected' && activeColor ? { color: activeColor } : {}]"
|
|
49
|
+
>
|
|
50
|
+
{{ item.text }}
|
|
51
|
+
</text>
|
|
52
|
+
<text
|
|
53
|
+
class="oxy-date-strip-item__grid-suffix"
|
|
54
|
+
:class="{
|
|
55
|
+
'oxy-date-strip-item__grid--active-text': item.type == 'selected' && shape != 'none',
|
|
56
|
+
'oxy-date-strip-item__grid--active-text-none': item.type == 'selected' && shape == 'none'
|
|
57
|
+
}"
|
|
58
|
+
:style="[item.type == 'selected' && activeColor ? { color: activeColor } : {}]"
|
|
59
|
+
v-if="item.suffix"
|
|
60
|
+
>
|
|
61
|
+
{{ item.suffix }}
|
|
62
|
+
</text>
|
|
63
|
+
</view>
|
|
64
|
+
</view>
|
|
65
|
+
</view>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script lang="ts">
|
|
69
|
+
export default {
|
|
70
|
+
name: 'oxy-date-strip-item',
|
|
71
|
+
options: {
|
|
72
|
+
addGlobalClass: true,
|
|
73
|
+
virtualHost: true,
|
|
74
|
+
styleIsolation: 'shared'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<script lang="ts" setup>
|
|
80
|
+
import { ref, computed } from 'vue'
|
|
81
|
+
import { dateStripItemProps } from './types'
|
|
82
|
+
import type { DateStriPDay } from '../oxy-date-strip/types'
|
|
83
|
+
|
|
84
|
+
const props = defineProps(dateStripItemProps)
|
|
85
|
+
const emit = defineEmits(['click'])
|
|
86
|
+
|
|
87
|
+
const styles = computed(() => {
|
|
88
|
+
const style: Record<string, any> = {}
|
|
89
|
+
if (props.gridWidth && props.switchMode == 'none') {
|
|
90
|
+
style['width'] = props.gridWidth
|
|
91
|
+
}
|
|
92
|
+
return style
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
const onClick = (day: DateStriPDay) => {
|
|
96
|
+
emit('click', day)
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style lang="scss" scoped>
|
|
101
|
+
@import './index.scss';
|
|
102
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue'
|
|
2
|
+
import { baseProps } from '../common/props'
|
|
3
|
+
import type { DateStriPDay, DateStripShape, DateStripSwitchMode } from '../oxy-date-strip/types'
|
|
4
|
+
|
|
5
|
+
export const dateStripItemProps = {
|
|
6
|
+
...baseProps,
|
|
7
|
+
dates: {
|
|
8
|
+
type: Array as PropType<DateStriPDay[]>,
|
|
9
|
+
default: () => []
|
|
10
|
+
},
|
|
11
|
+
// 网格宽度
|
|
12
|
+
gridWidth: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
16
|
+
// 主题色,对底部按钮和选中日期生效
|
|
17
|
+
color: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
// 选中日期的背景色
|
|
22
|
+
activeBgColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
// 选中日期的文字颜色
|
|
27
|
+
activeColor: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
// 背景色
|
|
32
|
+
bgColor: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
// 圆角半径
|
|
37
|
+
radius: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: null
|
|
40
|
+
},
|
|
41
|
+
// 切换模式,'week' 或 'none'
|
|
42
|
+
switchMode: {
|
|
43
|
+
type: String as PropType<DateStripSwitchMode>,
|
|
44
|
+
default: 'week'
|
|
45
|
+
},
|
|
46
|
+
// 形状,'square'、'circle' 或 'none'
|
|
47
|
+
shape: {
|
|
48
|
+
type: String as PropType<DateStripShape>,
|
|
49
|
+
default: 'square'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type DateStripItemProps = ExtractPropTypes<typeof dateStripItemProps>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
@include e(region) {
|
|
23
23
|
color: $-dark-color;
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
@include when(active) {
|
|
26
26
|
background: $-picker-region-bg-active-color;
|
|
27
27
|
color: $-dark-color;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
|
|
34
34
|
@include b(datetime-picker) {
|
|
35
35
|
@include edeep(cell) {
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
font-size: $-cell-icon-size-large;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
.oxy-cell__value--ellipsis {
|
|
57
57
|
view {
|
|
58
58
|
@include lineEllipsis;
|
|
59
59
|
width: 100%;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
text {
|
|
63
63
|
@include lineEllipsis;
|
|
64
64
|
max-width: 100%;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
@include e(placeholder) {
|
|
70
70
|
color: $-input-placeholder-color;
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
@include edeep(arrow) {
|
|
74
74
|
display: block;
|
|
75
75
|
font-size: $-cell-icon-size;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
@include edeep(popup) {
|
|
88
|
-
border-radius:
|
|
88
|
+
border-radius: 32rpx 32rpx 0 0;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@include e(wraper) {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
font-size: $-picker-toolbar-fs;
|
|
111
111
|
color: $-picker-toolbar-finish-color;
|
|
112
112
|
background: transparent;
|
|
113
|
-
padding:
|
|
113
|
+
padding: 48rpx 30rpx 28rpx 30rpx;
|
|
114
114
|
|
|
115
115
|
@include m(cancel) {
|
|
116
116
|
color: $-picker-toolbar-cancel-color;
|
|
@@ -135,9 +135,9 @@
|
|
|
135
135
|
display: inline-block;
|
|
136
136
|
color: $-picker-region-color;
|
|
137
137
|
text-align: center;
|
|
138
|
-
padding:
|
|
138
|
+
padding: 28rpx 0;
|
|
139
139
|
font-size: $-picker-region-fs;
|
|
140
|
-
line-height:
|
|
140
|
+
line-height: 32rpx;
|
|
141
141
|
transition: all 0.15s ease-out;
|
|
142
142
|
|
|
143
143
|
@include when(active) {
|
|
@@ -147,8 +147,8 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
@include e(region-time) {
|
|
150
|
-
font-size:
|
|
151
|
-
margin-top:
|
|
150
|
+
font-size: 32rpx;
|
|
151
|
+
margin-top: 4rpx;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
@include e(hidden) {
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
position="bottom"
|
|
58
58
|
:hide-when-close="false"
|
|
59
59
|
:close-on-click-modal="closeOnClickModal"
|
|
60
|
+
:max-width="popupMaxWidth"
|
|
60
61
|
:safe-area-inset-bottom="safeAreaInsetBottom"
|
|
61
62
|
:z-index="zIndex"
|
|
62
63
|
:root-portal="rootPortal"
|
|
@@ -512,7 +513,9 @@ function close() {
|
|
|
512
513
|
|
|
513
514
|
function showPopup() {
|
|
514
515
|
if (props.disabled || props.readonly) return
|
|
515
|
-
|
|
516
|
+
if (isFunction(props.beforeOpen) && !props.beforeOpen()) {
|
|
517
|
+
return
|
|
518
|
+
}
|
|
516
519
|
emit('open')
|
|
517
520
|
if (region.value) {
|
|
518
521
|
popupShow.value = true
|
|
@@ -157,6 +157,11 @@ export const datetimePickerProps = {
|
|
|
157
157
|
* 弹窗层级
|
|
158
158
|
*/
|
|
159
159
|
zIndex: makeNumberProp(15),
|
|
160
|
+
/**
|
|
161
|
+
* 弹层最大宽度,支持 `rpx`、`px`、`%` 等单位;
|
|
162
|
+
* `%` 在弹层打开时按屏幕宽度换算为 `rpx`
|
|
163
|
+
*/
|
|
164
|
+
popupMaxWidth: makeStringProp('1200rpx'),
|
|
160
165
|
/**
|
|
161
166
|
* 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的
|
|
162
167
|
*/
|
|
@@ -196,7 +201,11 @@ export const datetimePickerProps = {
|
|
|
196
201
|
/**
|
|
197
202
|
* 必填标记位置,可选值:before、after
|
|
198
203
|
*/
|
|
199
|
-
markerSide: makeStringProp<'before' | 'after'>('before')
|
|
204
|
+
markerSide: makeStringProp<'before' | 'after'>('before'),
|
|
205
|
+
/**
|
|
206
|
+
* 打开pop之前的校验
|
|
207
|
+
*/
|
|
208
|
+
beforeOpen: Function as PropType<() => boolean>
|
|
200
209
|
}
|
|
201
210
|
|
|
202
211
|
export type DatetimePickerDisplayFormat = (items: Record<string, any>[]) => string
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
&::after {
|
|
67
67
|
position: absolute;
|
|
68
68
|
content: '';
|
|
69
|
-
width:
|
|
69
|
+
width: 38rpx;
|
|
70
70
|
height: $-drop-menu-line-height;
|
|
71
|
-
bottom:
|
|
71
|
+
bottom: 12rpx;
|
|
72
72
|
left: 50%;
|
|
73
73
|
transform: translate(-50%, 0);
|
|
74
74
|
background: $-drop-menu-line-color;
|
|
@@ -85,6 +85,6 @@
|
|
|
85
85
|
|
|
86
86
|
@include edeep(arrow) {
|
|
87
87
|
font-size: $-drop-menu-arrow-fs;
|
|
88
|
-
margin-left:
|
|
88
|
+
margin-left: 4rpx;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
import { computed, getCurrentInstance, inject, onBeforeMount, ref, watch } from 'vue'
|
|
48
48
|
import { closeOther } from '../common/clickoutside'
|
|
49
49
|
import { type Queue, queueKey } from '../composables/useQueue'
|
|
50
|
-
import { getRect, uuid } from '../common/util'
|
|
50
|
+
import { getRect, unitConvert, uuid } from '../common/util'
|
|
51
51
|
import { useChildren } from '../composables/useChildren'
|
|
52
52
|
import { DROP_MENU_KEY, dropMenuProps } from './types'
|
|
53
53
|
import OxyOverlay from '../oxy-overlay/oxy-overlay.vue'
|
|
@@ -59,10 +59,10 @@ const offset = ref<number>(0)
|
|
|
59
59
|
const windowHeight = ref<number>(0)
|
|
60
60
|
const modalStyle = computed(() => {
|
|
61
61
|
return props.direction === 'down'
|
|
62
|
-
? `top: calc(var(--window-top) + ${offset.value}
|
|
62
|
+
? `top: calc(var(--window-top) + ${unitConvert(offset.value, 0, { output: 'px' })}); bottom: 0;`
|
|
63
63
|
: props.direction === 'bottom'
|
|
64
64
|
? 'top: var(--window-top); bottom: 0;'
|
|
65
|
-
: `top: 0; bottom: calc(var(--window-bottom) + ${offset.value}
|
|
65
|
+
: `top: 0; bottom: calc(var(--window-bottom) + ${unitConvert(offset.value, 0, { output: 'px' })})`
|
|
66
66
|
})
|
|
67
67
|
|
|
68
68
|
const { proxy } = getCurrentInstance() as any
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:z-index="zIndex"
|
|
10
10
|
:duration="duration"
|
|
11
11
|
:position="position"
|
|
12
|
+
:max-width="popupMaxWidth"
|
|
12
13
|
:custom-style="`position: absolute; pointer-events: auto; max-height: ${popupHeight ? popupHeight : '80%'}; ${customPopupStyle}`"
|
|
13
14
|
:custom-class="customPopupClass"
|
|
14
15
|
:modal="false"
|
|
@@ -61,7 +62,7 @@ import { type Queue, queueKey } from '../composables/useQueue'
|
|
|
61
62
|
import type { PopupType } from '../oxy-popup/types'
|
|
62
63
|
import { useParent } from '../composables/useParent'
|
|
63
64
|
import { DROP_MENU_KEY } from '../oxy-drop-menu/types'
|
|
64
|
-
import { isDef, isFunction } from '../common/util'
|
|
65
|
+
import { isDef, isFunction, unitConvert } from '../common/util'
|
|
65
66
|
import { dorpMenuItemProps, type DropMenuItemExpose } from './types'
|
|
66
67
|
|
|
67
68
|
const props = defineProps(dorpMenuItemProps)
|
|
@@ -90,10 +91,10 @@ const positionStyle = computed(() => {
|
|
|
90
91
|
if (showWrapper.value && dropMenu) {
|
|
91
92
|
style =
|
|
92
93
|
dropMenu.props.direction === 'down'
|
|
93
|
-
? `top: calc(var(--window-top) + ${dropMenu.offset.value}
|
|
94
|
+
? `top: calc(var(--window-top) + ${unitConvert(dropMenu.offset.value, 0, { output: 'px' })}); bottom: 0;`
|
|
94
95
|
: dropMenu.props.direction === 'bottom'
|
|
95
96
|
? 'top: calc(var(--window-top); bottom: 0;'
|
|
96
|
-
: `top: 0; bottom: calc(var(--window-bottom) + ${dropMenu.offset.value}
|
|
97
|
+
: `top: 0; bottom: calc(var(--window-bottom) + ${unitConvert(dropMenu.offset.value, 0, { output: 'px' })})`
|
|
97
98
|
} else {
|
|
98
99
|
style = ''
|
|
99
100
|
}
|
|
@@ -76,6 +76,11 @@ export const dorpMenuItemProps = {
|
|
|
76
76
|
* 弹出层高度 这里设置了 就取这里的
|
|
77
77
|
*/
|
|
78
78
|
popupHeight: makeStringProp(''),
|
|
79
|
+
/**
|
|
80
|
+
* 弹层最大宽度,支持 `rpx`、`px`、`%` 等单位;
|
|
81
|
+
* `%` 在弹层打开时按屏幕宽度换算为 `rpx`
|
|
82
|
+
*/
|
|
83
|
+
popupMaxWidth: makeStringProp('1200rpx'),
|
|
79
84
|
/**
|
|
80
85
|
* 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal)
|
|
81
86
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../uni-echarts'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<uni-echarts ref="echartsRef" v-bind="$attrs">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</uni-echarts>
|
|
5
|
+
</template>
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { ref } from 'vue'
|
|
8
|
+
import { echartsProps } from './types'
|
|
9
|
+
import UniEcharts from '../../../../uni_modules/oxy-uni-ui/uni-echarts/components/uni-echarts/uni-echarts.vue'
|
|
10
|
+
import type { UniEchartsInst } from '../../../../uni_modules/oxy-uni-ui/uni-echarts'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'oxy-echarts',
|
|
14
|
+
options: {
|
|
15
|
+
virtualHost: true,
|
|
16
|
+
addGlobalClass: true,
|
|
17
|
+
styleIsolation: 'shared'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
const props = defineProps(echartsProps)
|
|
24
|
+
const echartsRef = ref<UniEchartsInst | null>(null)
|
|
25
|
+
defineExpose({
|
|
26
|
+
echartsInstance: echartsRef
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="scss" scoped>
|
|
31
|
+
@import './index.scss';
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue'
|
|
2
|
+
import { type ComponentPublicInstance } from 'vue'
|
|
3
|
+
import { type UniEchartsInst } from '../../uni-echarts'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Echarts 组件属性
|
|
7
|
+
*/
|
|
8
|
+
export const echartsProps = {}
|
|
9
|
+
|
|
10
|
+
export type EchartsProps = ExtractPropTypes<typeof echartsProps>
|
|
11
|
+
export type EchartsExpose = {
|
|
12
|
+
/**
|
|
13
|
+
* 当前图表实例
|
|
14
|
+
*/
|
|
15
|
+
echartsInstance: UniEchartsInst | null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type EchartsInstance = ComponentPublicInstance<EchartsProps, EchartsExpose>
|
|
@@ -67,44 +67,44 @@
|
|
|
67
67
|
@include e(transition-enter) {
|
|
68
68
|
@include m(top) {
|
|
69
69
|
opacity: 0;
|
|
70
|
-
transform: translateY(
|
|
70
|
+
transform: translateY(80rpx);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@include m(bottom) {
|
|
74
74
|
opacity: 0;
|
|
75
|
-
transform: translateY(-
|
|
75
|
+
transform: translateY(-80rpx);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
@include m(left) {
|
|
79
79
|
opacity: 0;
|
|
80
|
-
transform: translateX(
|
|
80
|
+
transform: translateX(80rpx);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
@include m(right) {
|
|
84
84
|
opacity: 0;
|
|
85
|
-
transform: translateX(-
|
|
85
|
+
transform: translateX(-80rpx);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
@include e(transition-leave-to) {
|
|
90
90
|
@include m(top) {
|
|
91
91
|
opacity: 0;
|
|
92
|
-
transform: translateY(
|
|
92
|
+
transform: translateY(80rpx);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
@include m(bottom) {
|
|
96
96
|
opacity: 0;
|
|
97
|
-
transform: translateY(-
|
|
97
|
+
transform: translateY(-80rpx);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
@include m(left) {
|
|
101
101
|
opacity: 0;
|
|
102
|
-
transform: translateX(
|
|
102
|
+
transform: translateX(80rpx);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
@include m(right) {
|
|
106
106
|
opacity: 0;
|
|
107
|
-
transform: translateX(-
|
|
107
|
+
transform: translateX(-80rpx);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|