oxy-uni-ui 1.2.3 → 2.1.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 +512 -343
- package/components/common/util.ts +185 -32
- package/components/composables/index.ts +1 -0
- package/components/composables/usePopover.ts +24 -20
- package/components/composables/useVirtualScroll.ts +48 -21
- 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 +4 -4
- 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 +15 -15
- 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 -8
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +14 -8
- package/components/oxy-calendar-view/year/index.scss +5 -5
- 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-checkbox/index.scss +12 -12
- 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 +6 -5
- package/components/oxy-col-picker/types.ts +7 -2
- 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 +33 -33
- 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/oxy-date-strip.vue +2 -2
- package/components/oxy-date-strip/types.ts +1 -1
- package/components/oxy-date-strip-item/index.scss +3 -3
- package/components/oxy-datetime-picker/index.scss +11 -11
- package/components/oxy-datetime-picker/oxy-datetime-picker.vue +1 -0
- package/components/oxy-datetime-picker/types.ts +5 -0
- package/components/oxy-drop-menu/index.scss +5 -5
- package/components/oxy-drop-menu/oxy-drop-menu.vue +3 -3
- package/components/oxy-drop-menu-item/index.scss +3 -3
- 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/types.ts +6 -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 +30 -29
- package/components/oxy-file-list/oxy-file-list.vue +2 -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-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 +23 -23
- 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/oxy-img-lazy.vue +3 -3
- package/components/oxy-img-lazy/types.ts +3 -3
- 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 +2 -2
- package/components/oxy-list/oxy-list.vue +4 -3
- 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 +9 -2
- package/components/oxy-message-box/types.ts +9 -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 +6 -5
- 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 +100 -14
- package/components/oxy-picker/types.ts +29 -1
- package/components/oxy-picker-view/index.scss +4 -4
- package/components/oxy-picker-view/oxy-picker-view.vue +4 -4
- package/components/oxy-popover/index.scss +13 -13
- package/components/oxy-popup/index.scss +4 -4
- 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 +25 -19
- 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/index.scss +37 -36
- package/components/oxy-rich-text/mp-html/card/card.vue +3 -3
- package/components/oxy-rich-text/mp-html/mp-html.vue +33 -24
- package/components/oxy-rich-text/mp-html/node/node.vue +30 -19
- package/components/oxy-rich-text/oxy-rich-text.vue +31 -31
- package/components/oxy-rich-text/types.ts +6 -1
- package/components/oxy-row/oxy-row.vue +3 -3
- package/components/oxy-row/types.ts +1 -1
- package/components/oxy-search/index.scss +7 -7
- package/components/oxy-segmented/index.scss +19 -16
- package/components/oxy-segmented/oxy-segmented.vue +23 -3
- package/components/oxy-select/index.scss +213 -89
- package/components/oxy-select/oxy-select.vue +106 -58
- package/components/oxy-select/types.ts +13 -1
- package/components/oxy-select-picker/index.scss +7 -7
- package/components/oxy-select-picker/oxy-select-picker.vue +1 -0
- package/components/oxy-select-picker/types.ts +2 -0
- package/components/oxy-sidebar-item/index.scss +2 -2
- package/components/oxy-signature/oxy-signature.vue +18 -10
- package/components/oxy-signature/types.ts +106 -13
- package/components/oxy-skeleton/index.scss +1 -1
- package/components/oxy-skeleton/oxy-skeleton.vue +6 -6
- package/components/oxy-skeleton/types.ts +1 -1
- package/components/oxy-slider/index.scss +6 -6
- package/components/oxy-sort-button/index.scss +8 -8
- package/components/oxy-splitter/index.scss +19 -0
- package/components/oxy-splitter/oxy-splitter.vue +409 -0
- package/components/oxy-splitter/types.ts +75 -0
- package/components/oxy-splitter-panel/index.scss +366 -0
- package/components/oxy-splitter-panel/oxy-splitter-panel.vue +432 -0
- package/components/oxy-splitter-panel/types.ts +63 -0
- 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 +16 -16
- package/components/oxy-sticky/oxy-sticky.vue +6 -6
- package/components/oxy-stream-render/oxy-stream-render.vue +230 -4
- package/components/oxy-stream-render/types.ts +4 -1
- 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-swiper-nav/index.scss +3 -3
- package/components/oxy-switch/index.scss +10 -10
- 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 +2 -2
- package/components/oxy-tabbar/oxy-tabbar.vue +39 -10
- package/components/oxy-table/index.scss +8 -8
- package/components/oxy-table/oxy-table.vue +8 -6
- package/components/oxy-table/types.ts +2 -2
- package/components/oxy-table-col/index.scss +3 -3
- 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 +52 -22
- package/components/oxy-tabs/oxy-tabs.vue +53 -19
- package/components/oxy-tabs/types.ts +15 -3
- package/components/oxy-tag/index.scss +111 -36
- 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 +51 -15
- package/components/oxy-tree/oxy-tree.vue +13 -9
- package/components/oxy-tree/types.ts +12 -9
- package/components/oxy-upload/index.scss +23 -23
- 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 +5 -5
- 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 +937 -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/oxy-waterfall.vue +6 -6
- package/components/oxy-waterfall/types.ts +6 -6
- package/components/oxy-watermark/oxy-watermark.vue +35 -13
- package/components/oxy-watermark/types.ts +14 -14
- package/global.d.ts +4 -0
- package/locale/lang/ar-SA.ts +3 -0
- package/locale/lang/en-US.ts +3 -0
- package/locale/lang/zh-CN.ts +3 -0
- package/package.json +97 -1
- package/tags.json +1 -1
- 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
- package/oxy-uni-ui.zip +0 -0
|
@@ -38,11 +38,11 @@ export const imgCropperProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
imgSrc: makeStringProp(''),
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* 图片宽,支持 `px/rpx/%`,number 与纯数字字符串按 rpx 处理
|
|
42
42
|
*/
|
|
43
43
|
imgWidth: makeNumericProp(''),
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* 图片高,支持 `px/rpx/%`,number 与纯数字字符串按 rpx 处理
|
|
46
46
|
*/
|
|
47
47
|
imgHeight: makeNumericProp(''),
|
|
48
48
|
/**
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
|
|
65
65
|
<script lang="ts" setup>
|
|
66
66
|
import { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
67
|
-
import {
|
|
67
|
+
import { withDefaultUnit, isDef, objToStyle } from '../common/util'
|
|
68
68
|
import { imgLazyProps } from './types'
|
|
69
69
|
|
|
70
70
|
const props = defineProps(imgLazyProps)
|
|
@@ -73,10 +73,10 @@ const emit = defineEmits(['show', 'load', 'error', 'destroyed'])
|
|
|
73
73
|
const rootStyle = computed(() => {
|
|
74
74
|
const style: Record<string, string | number> = {}
|
|
75
75
|
if (isDef(props.height)) {
|
|
76
|
-
style['height'] =
|
|
76
|
+
style['height'] = withDefaultUnit(props.height)
|
|
77
77
|
}
|
|
78
78
|
if (isDef(props.width)) {
|
|
79
|
-
style['width'] =
|
|
79
|
+
style['width'] = withDefaultUnit(props.width)
|
|
80
80
|
}
|
|
81
81
|
return `${objToStyle(style)}${props.customStyle}`
|
|
82
82
|
})
|
|
@@ -28,15 +28,15 @@ export const imgLazyProps = {
|
|
|
28
28
|
*/
|
|
29
29
|
mode: makeStringProp<ImageMode>('aspectFill'),
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* 宽度,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
|
|
32
32
|
*/
|
|
33
33
|
width: numericProp,
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* 高度,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
|
|
36
36
|
*/
|
|
37
37
|
height: numericProp,
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* 圆角大小,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
|
|
40
40
|
*/
|
|
41
41
|
borderRadius: makeStringProp('0'),
|
|
42
42
|
/**
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script setup lang="ts">
|
|
16
|
-
import { indexAnchorProps } from './
|
|
16
|
+
import { indexAnchorProps } from './types'
|
|
17
17
|
import { onMounted, getCurrentInstance, ref, computed } from 'vue'
|
|
18
|
-
import { indexBarInjectionKey } from '../oxy-index-bar/
|
|
18
|
+
import { indexBarInjectionKey } from '../oxy-index-bar/types'
|
|
19
19
|
import { getRect, isDef, uuid } from '../common/util'
|
|
20
20
|
import { useParent } from '../composables/useParent'
|
|
21
21
|
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
@include e(sidebar) {
|
|
23
23
|
position: absolute;
|
|
24
24
|
top: 50%;
|
|
25
|
-
right:
|
|
25
|
+
right: 12rpx;
|
|
26
26
|
transform: translateY(-50%);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@include e(index) {
|
|
30
|
-
font-size:
|
|
30
|
+
font-size: $-index-bar-index-font-size;
|
|
31
31
|
font-weight: $-fw-medium;
|
|
32
32
|
color: $-color-title;
|
|
33
|
-
padding:
|
|
33
|
+
padding: 12rpx 16rpx;
|
|
34
34
|
|
|
35
35
|
@include when(active) {
|
|
36
36
|
color: $-color-theme;
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script setup lang="ts">
|
|
27
|
-
import type { AnchorIndex } from './
|
|
28
|
-
import { indexBarInjectionKey, indexBarProps } from './
|
|
27
|
+
import type { AnchorIndex } from './types'
|
|
28
|
+
import { indexBarInjectionKey, indexBarProps } from './types'
|
|
29
29
|
import { ref, getCurrentInstance, onMounted, reactive, nextTick, watch } from 'vue'
|
|
30
30
|
import { getRect, isDef, uuid, pause } from '../common/util'
|
|
31
31
|
import { useChildren } from '../composables/useChildren'
|
|
@@ -71,7 +71,7 @@ let offsetTop = 0
|
|
|
71
71
|
let sidebarInfo = {
|
|
72
72
|
// 侧边栏距离顶部的高度
|
|
73
73
|
offsetTop: 0,
|
|
74
|
-
// 高度固定
|
|
74
|
+
// 高度固定48rpx
|
|
75
75
|
indexHeight: 24
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -6,7 +6,7 @@ export type AnchorIndex = number | string
|
|
|
6
6
|
|
|
7
7
|
export const indexBarProps = {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 索引栏是否启用吸顶效果
|
|
10
10
|
*/
|
|
11
11
|
sticky: makeBooleanProp(false)
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ export type IndexBarProps = ExtractPropTypes<typeof indexBarProps>
|
|
|
16
16
|
export type InderBarProvide = {
|
|
17
17
|
props: { sticky?: boolean }
|
|
18
18
|
anchorState: {
|
|
19
|
-
activeIndex: AnchorIndex | null
|
|
19
|
+
activeIndex: AnchorIndex | null
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
&::after {
|
|
46
46
|
position: absolute;
|
|
47
47
|
content: "";
|
|
48
|
-
width: calc(200% -
|
|
49
|
-
height: calc(200% -
|
|
48
|
+
width: calc(200% - 4rpx);
|
|
49
|
+
height: calc(200% - 4rpx);
|
|
50
50
|
left: 0;
|
|
51
51
|
top: 0;
|
|
52
52
|
border: 1px solid $-input-number-border-color;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
display: block;
|
|
78
78
|
width: $-input-number-input-width;
|
|
79
79
|
height: $-input-number-height;
|
|
80
|
-
padding: 0
|
|
80
|
+
padding: 0 4rpx;
|
|
81
81
|
box-sizing: border-box;
|
|
82
82
|
z-index: 1;
|
|
83
83
|
background: transparent;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
@include e(input-border) {
|
|
94
94
|
position: absolute;
|
|
95
95
|
width: 100%;
|
|
96
|
-
height: calc(200% -
|
|
96
|
+
height: calc(200% - 4rpx);
|
|
97
97
|
left: 0;
|
|
98
98
|
top: 0;
|
|
99
99
|
border-top: 1px solid $-input-number-border-color;
|
|
@@ -129,4 +129,4 @@
|
|
|
129
129
|
border-left: none;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<view v-if="!withoutInput" class="oxy-input-number__inner" @click.stop="">
|
|
14
14
|
<input
|
|
15
15
|
class="oxy-input-number__input"
|
|
16
|
-
:style="`${inputWidth ? 'width: ' + inputWidth : ''}`"
|
|
16
|
+
:style="`${inputWidth ? 'width: ' + withDefaultUnit(inputWidth) : ''}`"
|
|
17
17
|
:type="inputType"
|
|
18
18
|
:input-mode="precision ? 'decimal' : 'numeric'"
|
|
19
19
|
:disabled="disabled || disableInput"
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
<script lang="ts" setup>
|
|
53
53
|
import OxyIcon from '../oxy-icon/oxy-icon.vue'
|
|
54
54
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
55
|
-
import { isDef, isEqual } from '../common/util'
|
|
55
|
+
import { isDef, isEqual, withDefaultUnit } from '../common/util'
|
|
56
56
|
import { inputNumberProps, type OperationType } from './types'
|
|
57
57
|
import { callInterceptor } from '../common/interceptor'
|
|
58
58
|
|
|
@@ -57,9 +57,10 @@ export const inputNumberProps = {
|
|
|
57
57
|
*/
|
|
58
58
|
withoutInput: makeBooleanProp(false),
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* 输入框宽度。
|
|
61
|
+
* number 或纯数字字符串默认按 rpx 处理,支持传入带单位字符串(如 `px`、`rpx`、`%`)。
|
|
61
62
|
*/
|
|
62
|
-
inputWidth: makeNumericProp(
|
|
63
|
+
inputWidth: makeNumericProp(72),
|
|
63
64
|
/**
|
|
64
65
|
* 是否允许为空
|
|
65
66
|
*/
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
user-select: none;
|
|
19
19
|
|
|
20
20
|
@include m(with-title) {
|
|
21
|
-
border-radius:
|
|
21
|
+
border-radius: $-keyboard-panel-radius $-keyboard-panel-radius 0 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include e(header) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
justify-content: center;
|
|
29
29
|
box-sizing: content-box;
|
|
30
30
|
height: $-keyboard-title-height;
|
|
31
|
-
padding-top:
|
|
31
|
+
padding-top: 12rpx;
|
|
32
32
|
color: $-keyboard-title-color;
|
|
33
33
|
font-size: $-keyboard-title-font-size;
|
|
34
34
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
@include e(body) {
|
|
47
47
|
display: flex;
|
|
48
|
-
padding:
|
|
48
|
+
padding: 12rpx 0 0 12rpx;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
@include e(keys) {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
&-car {
|
|
58
58
|
@include e(body) {
|
|
59
59
|
display: flex;
|
|
60
|
-
padding:
|
|
60
|
+
padding: 12rpx 0 0 12rpx;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
flex-wrap: wrap;
|
|
69
69
|
|
|
70
70
|
.oxy-key-wrapper {
|
|
71
|
-
--oxy-keyboard-key-font-size:
|
|
71
|
+
--oxy-keyboard-key-font-size: #{$-keyboard-car-key-font-size};
|
|
72
72
|
flex-basis: 10%;
|
|
73
73
|
|
|
74
74
|
@include m(wider) {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
flex: 1;
|
|
22
22
|
flex-basis: 33%;
|
|
23
23
|
box-sizing: border-box;
|
|
24
|
-
padding: 0
|
|
24
|
+
padding: 0 12rpx 12rpx 0;
|
|
25
25
|
|
|
26
26
|
@include m(wider) {
|
|
27
27
|
flex-basis: 66%;
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
@include m(large) {
|
|
46
46
|
position: absolute;
|
|
47
47
|
top: 0;
|
|
48
|
-
right:
|
|
49
|
-
bottom:
|
|
48
|
+
right: 12rpx;
|
|
49
|
+
bottom: 12rpx;
|
|
50
50
|
left: 0;
|
|
51
51
|
height: auto;
|
|
52
52
|
}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
<template v-if="text">
|
|
12
12
|
{{ text }}
|
|
13
13
|
</template>
|
|
14
|
-
<oxy-icon v-else custom-class="oxy-key__icon" name="keyboard-delete" size="
|
|
14
|
+
<oxy-icon v-else custom-class="oxy-key__icon" name="keyboard-delete" size="44rpx"></oxy-icon>
|
|
15
15
|
</template>
|
|
16
16
|
<template v-else-if="type === 'extra'">
|
|
17
17
|
<template v-if="text">
|
|
18
18
|
{{ text }}
|
|
19
19
|
</template>
|
|
20
|
-
<oxy-icon v-else custom-class="oxy-key__icon" name="keyboard-collapse" size="
|
|
20
|
+
<oxy-icon v-else custom-class="oxy-key__icon" name="keyboard-collapse" size="44rpx"></oxy-icon>
|
|
21
21
|
</template>
|
|
22
22
|
<template v-else>{{ text }}</template>
|
|
23
23
|
</view>
|
|
@@ -3,9 +3,24 @@ import { makeBooleanProp, makeNumericProp, makeStringProp } from '../../common/p
|
|
|
3
3
|
export type NumberKeyType = '' | 'delete' | 'extra' | 'close'
|
|
4
4
|
|
|
5
5
|
export const keyProps = {
|
|
6
|
+
/**
|
|
7
|
+
* 按键类型
|
|
8
|
+
*/
|
|
6
9
|
type: makeStringProp<NumberKeyType>(''),
|
|
10
|
+
/**
|
|
11
|
+
* 按键显示文本
|
|
12
|
+
*/
|
|
7
13
|
text: makeNumericProp(''),
|
|
14
|
+
/**
|
|
15
|
+
* 是否为加宽按键
|
|
16
|
+
*/
|
|
8
17
|
wider: makeBooleanProp(false),
|
|
18
|
+
/**
|
|
19
|
+
* 是否为大号按键
|
|
20
|
+
*/
|
|
9
21
|
large: makeBooleanProp(false),
|
|
22
|
+
/**
|
|
23
|
+
* 是否显示加载状态
|
|
24
|
+
*/
|
|
10
25
|
loading: makeBooleanProp(false)
|
|
11
26
|
}
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
@refresherrestore="onRestore"
|
|
29
29
|
@refresherabort="onAbort"
|
|
30
30
|
>
|
|
31
|
-
<view class="oxy-virtual-scroll__container" :style="{ height: totalHeight
|
|
32
|
-
<view class="oxy-virtual-scroll__items" :style="{ transform: `translateY(${virtualOffsetY}
|
|
31
|
+
<view class="oxy-virtual-scroll__container" :style="{ height: unitConvert(totalHeight, 0, { output: 'px' }) }">
|
|
32
|
+
<view class="oxy-virtual-scroll__items" :style="{ transform: `translateY(${unitConvert(virtualOffsetY, 0, { output: 'px' })})` }">
|
|
33
33
|
<view v-for="(item, index) in virtualData" :key="index">
|
|
34
34
|
<slot name="item" :item="item" :index="startIndex + index"></slot>
|
|
35
35
|
</view>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
<!-- 回到顶部按钮 -->
|
|
56
56
|
<view v-if="showBackToTop && showBackTopBtn" class="oxy-virtual-scroll__back-top" @click="scrollToTop">
|
|
57
|
-
<oxy-icon name="backtop" color="#fff" size="
|
|
57
|
+
<oxy-icon name="backtop" color="#fff" size="40rpx"></oxy-icon>
|
|
58
58
|
</view>
|
|
59
59
|
</view>
|
|
60
60
|
</template>
|
|
@@ -80,6 +80,7 @@ import type {
|
|
|
80
80
|
ScrollViewOnScrollEvent
|
|
81
81
|
} from '@uni-helper/uni-app-types/index'
|
|
82
82
|
import { useVirtualScroll } from '../composables/useVirtualScroll'
|
|
83
|
+
import { unitConvert } from '../common/util'
|
|
83
84
|
|
|
84
85
|
const props = defineProps(listProps)
|
|
85
86
|
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
<script lang="ts" setup>
|
|
20
20
|
import { computed, onBeforeMount, ref, watch, type CSSProperties } from 'vue'
|
|
21
21
|
import base64 from '../common/base64'
|
|
22
|
-
import { gradient, context, objToStyle,
|
|
22
|
+
import { withDefaultUnit, gradient, context, objToStyle, isDef } from '../common/util'
|
|
23
23
|
import { loadingProps } from './types'
|
|
24
24
|
|
|
25
25
|
const svgDefineId = context.id++
|
|
@@ -44,7 +44,11 @@ const iconSize = ref<string | number | null>(null)
|
|
|
44
44
|
watch(
|
|
45
45
|
() => props.size,
|
|
46
46
|
(newVal) => {
|
|
47
|
-
|
|
47
|
+
if (!isDef(newVal) || newVal === '') {
|
|
48
|
+
iconSize.value = null
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
iconSize.value = withDefaultUnit(newVal)
|
|
48
52
|
},
|
|
49
53
|
{
|
|
50
54
|
deep: true,
|
|
@@ -66,8 +70,8 @@ watch(
|
|
|
66
70
|
const rootStyle = computed(() => {
|
|
67
71
|
const style: CSSProperties = {}
|
|
68
72
|
if (isDef(iconSize.value)) {
|
|
69
|
-
style.height =
|
|
70
|
-
style.width =
|
|
73
|
+
style.height = iconSize.value
|
|
74
|
+
style.width = iconSize.value
|
|
71
75
|
}
|
|
72
76
|
return `${objToStyle(style)} ${props.customStyle}`
|
|
73
77
|
})
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
@include edeep(loading) {
|
|
17
17
|
display: inline-block;
|
|
18
|
-
margin-right:
|
|
18
|
+
margin-right: 16rpx;
|
|
19
19
|
vertical-align: middle;
|
|
20
20
|
width: $-loadmore-loading-size;
|
|
21
21
|
height: $-loadmore-loading-size;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
vertical-align: middle;
|
|
27
27
|
|
|
28
28
|
@include when(light) {
|
|
29
|
-
margin: 0
|
|
29
|
+
margin: 0 12rpx;
|
|
30
30
|
color: $-loadmore-error-color;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
vertical-align: middle;
|
|
37
37
|
font-size: $-loadmore-refresh-fs;
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@import './../common/abstracts/_mixin.scss';
|
|
2
|
+
@import './../common/abstracts/variable.scss';
|
|
3
|
+
|
|
4
|
+
@include b(long-press-menu) {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-block; /* 让容器适应内容宽度 */
|
|
7
|
+
user-select: none;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
|
|
10
|
+
@include e(trigger) {
|
|
11
|
+
position: relative;
|
|
12
|
+
transition: background-color 0.2s;
|
|
13
|
+
border-radius: $-long-press-menu-radius;
|
|
14
|
+
/* 默认为 inline-block,减少空白占据 */
|
|
15
|
+
display: inline-block;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
@include when(active) {
|
|
19
|
+
background-color: $-long-press-menu-active-bg; /* 长按时的高亮背景 */
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include e(mask) {
|
|
24
|
+
position: fixed;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
z-index: 998;
|
|
30
|
+
background-color: transparent; /* 透明遮罩,点击关闭 */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include e(popover) {
|
|
34
|
+
position: fixed;
|
|
35
|
+
z-index: $-long-press-menu-z-index;
|
|
36
|
+
background-color: $-long-press-menu-bg;
|
|
37
|
+
border-radius: $-long-press-menu-radius;
|
|
38
|
+
padding: $-long-press-menu-padding;
|
|
39
|
+
min-width: 200rpx;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include e(content) {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@include e(item) {
|
|
49
|
+
padding: $-long-press-menu-item-padding;
|
|
50
|
+
position: relative;
|
|
51
|
+
&:not(:last-child)::after {
|
|
52
|
+
content: '';
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: 0;
|
|
55
|
+
top: 24rpx;
|
|
56
|
+
bottom: 24rpx;
|
|
57
|
+
width: 1px;
|
|
58
|
+
background-color: $-long-press-menu-divider-color;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include e(text) {
|
|
63
|
+
color: $-long-press-menu-color;
|
|
64
|
+
font-size: $-long-press-menu-fs;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include e(arrow) {
|
|
69
|
+
left: 24rpx;
|
|
70
|
+
}
|
|
71
|
+
@include triangleArrow($-long-press-menu-arrow-size, $-long-press-menu-bg);
|
|
72
|
+
|
|
73
|
+
@include when(selectable) {
|
|
74
|
+
/* 移除 user-select,改为控制 trigger */
|
|
75
|
+
.oxy-long-press-menu__trigger {
|
|
76
|
+
user-select: text;
|
|
77
|
+
-webkit-user-select: text;
|
|
78
|
+
-webkit-touch-callout: none; /* 禁用系统默认长按菜单 */
|
|
79
|
+
cursor: text;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes fadeIn {
|
|
85
|
+
from {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
transform: translateX(-50%) scale(0.9);
|
|
88
|
+
}
|
|
89
|
+
to {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transform: translateX(-50%) scale(1);
|
|
92
|
+
}
|
|
93
|
+
}
|