sard-uniapp 1.11.1 → 1.12.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/CHANGELOG.md +34 -0
- package/README.md +5 -3
- package/components/action-sheet/action-sheet.vue +8 -2
- package/components/action-sheet/index.scss +1 -1
- package/components/back-top/back-top.d.ts +1 -1
- package/components/badge/badge.vue +1 -1
- package/components/button/button.d.ts +1 -0
- package/components/button/button.vue +2 -0
- package/components/button/common.d.ts +2 -0
- package/components/button/index.scss +6 -1
- package/components/calendar/calendar.d.ts +1 -1
- package/components/calendar/calendar.vue +49 -22
- package/components/calendar/index.scss +5 -5
- package/components/calendar/variables.scss +1 -1
- package/components/calendar-input/calendar-input.d.ts +1 -1
- package/components/calendar-month/index.scss +1 -0
- package/components/cascader/cascader.d.ts +6 -6
- package/components/cascader/cascader.vue +9 -4
- package/components/cascader/common.d.ts +3 -3
- package/components/cascader/index.scss +1 -0
- package/components/checkbox-input/checkbox-input.vue +59 -32
- package/components/checkbox-input/index.scss +4 -0
- package/components/config/index.d.ts +23 -0
- package/components/config/index.js +47 -18
- package/components/crop-image/common.d.ts +32 -0
- package/components/crop-image/common.js +2 -0
- package/components/crop-image/crop-image.d.ts +19 -0
- package/components/crop-image/crop-image.vue +671 -0
- package/components/crop-image/index.d.ts +1 -0
- package/components/crop-image/index.scss +81 -0
- package/components/crop-image-agent/common.d.ts +19 -0
- package/components/crop-image-agent/common.js +16 -0
- package/components/crop-image-agent/crop-image-agent.d.ts +9 -0
- package/components/crop-image-agent/crop-image-agent.vue +70 -0
- package/components/crop-image-agent/index.d.ts +1 -0
- package/components/crop-image-agent/index.js +1 -0
- package/components/datetime-picker-input/datetime-picker-input.vue +4 -4
- package/components/datetime-range-picker/datetime-range-picker.vue +4 -3
- package/components/datetime-range-picker-input/datetime-range-picker-input.vue +4 -4
- package/components/dialog/common.d.ts +2 -3
- package/components/dialog/dialog.d.ts +6 -13
- package/components/dialog/dialog.vue +15 -4
- package/components/dialog-agent/dialog-agent.d.ts +1 -1
- package/components/dropdown-item/dropdown-item.vue +6 -6
- package/components/fab/fab.d.ts +1 -1
- package/components/floating-bubble/floating-bubble.vue +14 -19
- package/components/form-item/form-item.vue +4 -3
- package/components/grid/common.d.ts +4 -0
- package/components/grid-item/grid-item.vue +33 -18
- package/components/grid-item/index.scss +12 -4
- package/components/icon/index.scss +1 -0
- package/components/icon/sari.scss +9 -1
- package/components/indexes/common.d.ts +3 -5
- package/components/indexes/indexes.d.ts +2 -0
- package/components/indexes/indexes.vue +45 -109
- package/components/indexes-anchor/indexes-anchor.vue +9 -9
- package/components/indexes-nav/indexes-nav.vue +26 -22
- package/components/input/input.d.ts +4 -4
- package/components/loading/index.scss +1 -1
- package/components/locale/lang/en-US.d.ts +9 -0
- package/components/locale/lang/en-US.js +9 -0
- package/components/locale/lang/zh-CN.d.ts +9 -0
- package/components/locale/lang/zh-CN.js +9 -0
- package/components/navbar/common.d.ts +12 -0
- package/components/navbar/index.scss +17 -10
- package/components/navbar/navbar.d.ts +5 -1
- package/components/navbar/navbar.vue +45 -15
- package/components/navbar/variables.scss +4 -1
- package/components/navbar-item/index.scss +10 -0
- package/components/navbar-item/navbar-item.vue +27 -4
- package/components/navbar-pit/navbar-pit.d.ts +2 -0
- package/components/navbar-pit/navbar-pit.vue +22 -0
- package/components/notify/common.d.ts +1 -0
- package/components/notify/index.scss +12 -7
- package/components/notify/notify.vue +9 -3
- package/components/notify-agent/notify-agent.vue +9 -11
- package/components/pagination/pagination.d.ts +1 -1
- package/components/picker-input/picker-input.vue +4 -4
- package/components/popout/common.d.ts +2 -3
- package/components/popout/popout.d.ts +5 -12
- package/components/popout/popout.vue +16 -5
- package/components/popover/utils.js +2 -4
- package/components/popover-reference/popover-reference.vue +3 -3
- package/components/popup/common.d.ts +5 -3
- package/components/popup/index.scss +25 -3
- package/components/popup/popup.d.ts +1 -1
- package/components/pull-down-refresh/pull-down-refresh.d.ts +1 -1
- package/components/qrcode/qrcode.d.ts +1 -1
- package/components/qrcode/qrcode.vue +4 -7
- package/components/radio-input/index.scss +5 -1
- package/components/radio-input/radio-input.vue +59 -32
- package/components/scroll-spy/common.d.ts +29 -0
- package/components/scroll-spy/common.js +1 -0
- package/components/scroll-spy/index.d.ts +1 -0
- package/components/scroll-spy/index.js +1 -0
- package/components/scroll-spy/scroll-spy.d.ts +28 -0
- package/components/scroll-spy/scroll-spy.vue +120 -0
- package/components/scroll-spy-anchor/common.d.ts +13 -0
- package/components/scroll-spy-anchor/index.d.ts +1 -0
- package/components/scroll-spy-anchor/index.js +1 -0
- package/components/scroll-spy-anchor/scroll-spy-anchor.d.ts +10 -0
- package/components/scroll-spy-anchor/scroll-spy-anchor.vue +50 -0
- package/components/search/search.vue +2 -0
- package/components/share-sheet/share-sheet.vue +3 -2
- package/components/sidebar/common.d.ts +28 -0
- package/components/sidebar/common.js +1 -0
- package/components/sidebar/index.d.ts +1 -0
- package/components/sidebar/index.js +1 -0
- package/components/sidebar/index.scss +15 -0
- package/components/sidebar/sidebar.d.ts +16 -0
- package/components/sidebar/sidebar.vue +136 -0
- package/components/sidebar/variables.scss +20 -0
- package/components/sidebar-item/common.d.ts +16 -0
- package/components/sidebar-item/common.js +1 -0
- package/components/sidebar-item/index.d.ts +1 -0
- package/components/sidebar-item/index.js +1 -0
- package/components/sidebar-item/index.scss +70 -0
- package/components/sidebar-item/sidebar-item.d.ts +14 -0
- package/components/sidebar-item/sidebar-item.vue +111 -0
- package/components/signature/common.d.ts +41 -0
- package/components/signature/common.js +2 -0
- package/components/signature/index.d.ts +1 -0
- package/components/signature/index.js +1 -0
- package/components/signature/index.scss +109 -0
- package/components/signature/signature.d.ts +32 -0
- package/components/signature/signature.vue +580 -0
- package/components/signature/variables-dark.scss +7 -0
- package/components/signature/variables.scss +9 -0
- package/components/status-bar/common.d.ts +17 -0
- package/components/status-bar/common.js +2 -0
- package/components/status-bar/index.d.ts +1 -0
- package/components/status-bar/index.js +1 -0
- package/components/status-bar/index.scss +7 -0
- package/components/status-bar/status-bar.d.ts +12 -0
- package/components/status-bar/status-bar.vue +56 -0
- package/components/style/mixins/ellipsis.scss +7 -0
- package/components/style/mixins/scroll-shadow.scss +40 -0
- package/components/style/mixins.scss +1 -0
- package/components/style/variables.scss +3 -0
- package/components/swiper-dot/swiper-dot.d.ts +1 -1
- package/components/tab/tab.vue +4 -3
- package/components/tabbar/common.d.ts +1 -0
- package/components/tabbar/tabbar.d.ts +2 -0
- package/components/tabbar/tabbar.vue +2 -1
- package/components/table-cell/index.scss +1 -2
- package/components/table-fixation/table-fixation.vue +16 -8
- package/components/tree/tree.vue +6 -4
- package/components/tree-node/tree-node.vue +12 -10
- package/components/upload/upload.vue +3 -2
- package/dark.scss +1 -0
- package/global.d.ts +9 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/index.scss +2 -0
- package/package.json +28 -24
- package/use/index.d.ts +4 -0
- package/use/index.js +4 -0
- package/use/useDragPinch.d.ts +15 -0
- package/use/useDragPinch.js +88 -0
- package/use/useImperative.js +1 -0
- package/use/useInitialVelocity.d.ts +13 -0
- package/use/useInitialVelocity.js +65 -0
- package/use/useMouseDown.js +3 -4
- package/use/useScrollSide.d.ts +6 -0
- package/use/useScrollSide.js +34 -0
- package/use/useScrollSpy.d.ts +19 -0
- package/use/useScrollSpy.js +99 -0
- package/use/useTimeoutLoading.d.ts +6 -0
- package/use/useTimeoutLoading.js +53 -0
- package/use/useZIndex.js +7 -3
- package/utils/bem.d.ts +8 -8
- package/utils/dom.d.ts +3 -69
- package/utils/dom.js +32 -109
- package/utils/file.d.ts +1 -0
- package/utils/file.js +14 -0
- package/utils/geometry.d.ts +67 -0
- package/utils/geometry.js +127 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +2 -0
- package/utils/inertialAnimate.d.ts +10 -0
- package/utils/inertialAnimate.js +42 -0
- package/utils/is.d.ts +8 -0
- package/utils/is.js +8 -0
- package/utils/system.d.ts +2 -0
- package/utils/system.js +6 -3
- package/utils/utils.d.ts +7 -0
- package/utils/utils.js +13 -0
- package/components/_template/_template.d.ts +0 -16
- package/components/_template/_template.vue +0 -45
- package/components/_template/common.d.ts +0 -14
- package/components/_template/index.d.ts +0 -1
- package/components/_template/index.scss +0 -17
- package/components/_template/variables.scss +0 -5
- /package/components/{_template → crop-image}/index.js +0 -0
- /package/components/{_template → scroll-spy-anchor}/common.js +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use './bem' as *;
|
|
2
|
+
|
|
3
|
+
@mixin scroll-shadow {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
&::before,
|
|
7
|
+
&::after {
|
|
8
|
+
content: '';
|
|
9
|
+
position: absolute;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
z-index: 10;
|
|
13
|
+
height: 20rpx;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
touch-action: none;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
transition: box-shadow var(--sar-duration);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::before {
|
|
22
|
+
top: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include m(center, end) {
|
|
30
|
+
&::before {
|
|
31
|
+
box-shadow: var(--sar-scroll-shadow-start);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include m(center, start) {
|
|
36
|
+
&::after {
|
|
37
|
+
box-shadow: var(--sar-scroll-shadow-end);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -158,6 +158,9 @@ page {
|
|
|
158
158
|
--sar-shadow-2xl: 0 10px 50px -12px rgb(0 0 0 / 0.25);
|
|
159
159
|
--sar-shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
|
160
160
|
|
|
161
|
+
--sar-scroll-shadow-start: inset 0 10px 10px -10px rgba(0, 0, 0, 0.1);
|
|
162
|
+
--sar-scroll-shadow-end: inset 0 -10px 10px -10px rgba(0, 0, 0, 0.1);
|
|
163
|
+
|
|
161
164
|
// # 黑色遮罩
|
|
162
165
|
--sar-mask-legible: rgba(0, 0, 0, 0.1);
|
|
163
166
|
--sar-mask: rgba(0, 0, 0, 0.5);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SwiperDotProps } from './common';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<SwiperDotProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SwiperDotProps> & Readonly<{}>, {
|
|
3
3
|
type: "dot" | "dot-bar" | "index" | "title" | "fraction";
|
|
4
|
-
total: number;
|
|
5
4
|
current: number;
|
|
5
|
+
total: number;
|
|
6
6
|
field: string;
|
|
7
7
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
export default _default;
|
package/components/tab/tab.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view :class="tabClass" :style="tabStyle"
|
|
2
|
+
<view :class="tabClass" :style="tabStyle" @click="onClick">
|
|
3
3
|
<slot>
|
|
4
4
|
{{ title }}
|
|
5
5
|
</slot>
|
|
@@ -52,7 +52,7 @@ export default _defineComponent({
|
|
|
52
52
|
});
|
|
53
53
|
const tabId = uniqid();
|
|
54
54
|
const getRect = () => {
|
|
55
|
-
return getBoundingClientRect(
|
|
55
|
+
return getBoundingClientRect(`.${tabId}`, instance);
|
|
56
56
|
};
|
|
57
57
|
const select = () => {
|
|
58
58
|
context.select(props.name);
|
|
@@ -81,7 +81,8 @@ export default _defineComponent({
|
|
|
81
81
|
bem.e("tab"),
|
|
82
82
|
bem.em("tab", "current", isCurrent.value),
|
|
83
83
|
bem.em("tab", "disabled", props.disabled),
|
|
84
|
-
props.rootClass
|
|
84
|
+
props.rootClass,
|
|
85
|
+
tabId
|
|
85
86
|
);
|
|
86
87
|
});
|
|
87
88
|
const tabStyle = computed(() => {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type TabbarProps, type TabbarSlots } from './common';
|
|
2
2
|
declare function __VLS_template(): Readonly<TabbarSlots> & TabbarSlots;
|
|
3
3
|
declare const __VLS_component: import("vue").DefineComponent<TabbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
change: (current: string | number) => any;
|
|
4
5
|
"update:current": (current: string | number) => any;
|
|
5
6
|
}, string, import("vue").PublicProps, Readonly<TabbarProps> & Readonly<{
|
|
7
|
+
onChange?: ((current: string | number) => any) | undefined;
|
|
6
8
|
"onUpdate:current"?: ((current: string | number) => any) | undefined;
|
|
7
9
|
}>, {
|
|
8
10
|
bordered: boolean;
|
|
@@ -28,7 +28,7 @@ export default _defineComponent({
|
|
|
28
28
|
activeColor: { type: String, required: false },
|
|
29
29
|
bordered: { type: Boolean, required: false }
|
|
30
30
|
}, defaultTabbarProps),
|
|
31
|
-
emits: ["update:current"],
|
|
31
|
+
emits: ["update:current", "change"],
|
|
32
32
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
33
33
|
__expose();
|
|
34
34
|
const props = __props;
|
|
@@ -46,6 +46,7 @@ export default _defineComponent({
|
|
|
46
46
|
const select = (name) => {
|
|
47
47
|
innerCurrent.value = name;
|
|
48
48
|
emit("update:current", name);
|
|
49
|
+
emit("change", name);
|
|
49
50
|
};
|
|
50
51
|
provide(
|
|
51
52
|
tabbarContextSymbol,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<scroll-view
|
|
3
|
-
:id="fixationId"
|
|
4
3
|
:class="fixationClass"
|
|
5
4
|
:style="fixationStyle"
|
|
6
5
|
:scroll-y="scrollY"
|
|
@@ -18,7 +17,14 @@
|
|
|
18
17
|
|
|
19
18
|
<script>
|
|
20
19
|
import { defineComponent as _defineComponent } from "vue";
|
|
21
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
computed,
|
|
22
|
+
getCurrentInstance,
|
|
23
|
+
onMounted,
|
|
24
|
+
ref,
|
|
25
|
+
watch,
|
|
26
|
+
nextTick
|
|
27
|
+
} from "vue";
|
|
22
28
|
import {
|
|
23
29
|
classNames,
|
|
24
30
|
stringifyStyle,
|
|
@@ -26,7 +32,6 @@ import {
|
|
|
26
32
|
getBoundingClientRect,
|
|
27
33
|
uniqid
|
|
28
34
|
} from "../../utils";
|
|
29
|
-
import { nextTick } from "vue";
|
|
30
35
|
export default _defineComponent({
|
|
31
36
|
...{
|
|
32
37
|
options: {
|
|
@@ -52,8 +57,10 @@ export default _defineComponent({
|
|
|
52
57
|
const bem = createBem("table");
|
|
53
58
|
const scrollSide = ref(null);
|
|
54
59
|
const onScroll = (event) => {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
const { scrollLeft, scrollWidth } = event.detail;
|
|
61
|
+
const fixationWidth = fixationRect.value.width;
|
|
62
|
+
if (scrollWidth > fixationWidth) {
|
|
63
|
+
scrollSide.value = scrollLeft < 1 ? "left" : scrollWidth - scrollLeft - fixationWidth < 1 ? "right" : "middle";
|
|
57
64
|
}
|
|
58
65
|
};
|
|
59
66
|
const onScrolltoupper = (event) => {
|
|
@@ -76,9 +83,9 @@ export default _defineComponent({
|
|
|
76
83
|
nextTick(setFixationRect);
|
|
77
84
|
});
|
|
78
85
|
const setFixationRect = async () => {
|
|
79
|
-
fixationRect.value = await getBoundingClientRect(
|
|
86
|
+
fixationRect.value = await getBoundingClientRect(`.${fixationId}`, instance);
|
|
80
87
|
};
|
|
81
|
-
uni.onWindowResize(setFixationRect);
|
|
88
|
+
uni.onWindowResize?.(setFixationRect);
|
|
82
89
|
watch(
|
|
83
90
|
scrollSide,
|
|
84
91
|
() => {
|
|
@@ -93,7 +100,8 @@ export default _defineComponent({
|
|
|
93
100
|
bem.e("fixation"),
|
|
94
101
|
bem.em("fixation", "bordered", props.bordered),
|
|
95
102
|
bem.em("fixation", "underline", props.underline),
|
|
96
|
-
props.rootClass
|
|
103
|
+
props.rootClass,
|
|
104
|
+
fixationId
|
|
97
105
|
);
|
|
98
106
|
});
|
|
99
107
|
const fixationStyle = computed(() => {
|
package/components/tree/tree.vue
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="treeClass" :style="treeStyle">
|
|
3
|
-
<
|
|
3
|
+
<template v-for="(node, index) of treeData" :key="node.key">
|
|
4
|
+
<sar-tree-node v-if="node.visible" :index="index" :node="node" />
|
|
5
|
+
</template>
|
|
4
6
|
</view>
|
|
5
7
|
|
|
6
8
|
<sar-popover
|
|
@@ -45,7 +47,7 @@ import {
|
|
|
45
47
|
treeContextSymbol,
|
|
46
48
|
defaultTreeProps
|
|
47
49
|
} from "./common";
|
|
48
|
-
import
|
|
50
|
+
import SarTreeNode from "../tree-node/tree-node.vue";
|
|
49
51
|
import SarPopover from "../popover/popover.vue";
|
|
50
52
|
import { usePopover } from "../popover";
|
|
51
53
|
import SarInput from "../input/input.vue";
|
|
@@ -55,7 +57,7 @@ import { useTranslate } from "../locale";
|
|
|
55
57
|
import { recurAncestor, recurDescendant, recurNodes } from "./utils";
|
|
56
58
|
export default _defineComponent({
|
|
57
59
|
components: {
|
|
58
|
-
|
|
60
|
+
SarTreeNode,
|
|
59
61
|
SarPopover,
|
|
60
62
|
SarInput,
|
|
61
63
|
SarDialog,
|
|
@@ -552,7 +554,7 @@ export default _defineComponent({
|
|
|
552
554
|
return currentEditNode;
|
|
553
555
|
}, set currentEditNode(v) {
|
|
554
556
|
currentEditNode = v;
|
|
555
|
-
}, currentEditType, currentEditValue, mapEditTypeTitle, currentEditTitle, dialogVisible, toastVisible, onPopoverSelect, beforeClose, edit, focused, onVisibleHook, defaultFilterMethod, filter, treeClass, treeStyle,
|
|
557
|
+
}, currentEditType, currentEditValue, mapEditTypeTitle, currentEditTitle, dialogVisible, toastVisible, onPopoverSelect, beforeClose, edit, focused, onVisibleHook, defaultFilterMethod, filter, treeClass, treeStyle, SarTreeNode, SarPopover, SarInput, SarDialog, SarToast };
|
|
556
558
|
return __returned__;
|
|
557
559
|
}
|
|
558
560
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
:id="nodeId"
|
|
4
3
|
:class="nodeClass"
|
|
5
4
|
:style="nodeStyle"
|
|
6
5
|
@touchstart="onNodeTouchStart"
|
|
@@ -68,10 +67,13 @@
|
|
|
68
67
|
</view>
|
|
69
68
|
</view>
|
|
70
69
|
|
|
71
|
-
<
|
|
72
|
-
v-if="!isLeaf && node.expanded"
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
<template
|
|
71
|
+
v-if="!isLeaf && node.expanded && node.children && node.children.length > 0"
|
|
72
|
+
>
|
|
73
|
+
<template v-for="(node, index) of node.children" :key="node.key">
|
|
74
|
+
<sar-tree-node v-if="node.visible" :index="index" :node="node" />
|
|
75
|
+
</template>
|
|
76
|
+
</template>
|
|
75
77
|
|
|
76
78
|
<sar-popover
|
|
77
79
|
v-if="treeContext.draggable"
|
|
@@ -99,7 +101,6 @@ import {
|
|
|
99
101
|
treeContextSymbol
|
|
100
102
|
} from "../tree/common";
|
|
101
103
|
import { useMouseDown, useSimulatedClick, useSimulatedPress } from "../../use";
|
|
102
|
-
import SarTreeBranch from "../tree-branch/tree-branch.vue";
|
|
103
104
|
import SarIcon from "../icon/icon.vue";
|
|
104
105
|
import SarCheckbox from "../checkbox/checkbox.vue";
|
|
105
106
|
import SarPopover from "../popover/popover.vue";
|
|
@@ -107,12 +108,12 @@ import { usePopover } from "../popover";
|
|
|
107
108
|
import { getNodeLevel, recurDescendant } from "../tree/utils";
|
|
108
109
|
export default _defineComponent({
|
|
109
110
|
components: {
|
|
110
|
-
SarTreeBranch,
|
|
111
111
|
SarIcon,
|
|
112
112
|
SarCheckbox,
|
|
113
113
|
SarPopover,
|
|
114
114
|
},
|
|
115
115
|
...{
|
|
116
|
+
name: "SarTreeNode",
|
|
116
117
|
options: {
|
|
117
118
|
virtualHost: true,
|
|
118
119
|
styleIsolation: "shared"
|
|
@@ -215,7 +216,7 @@ export default _defineComponent({
|
|
|
215
216
|
const onDragTouchStart = async (event) => {
|
|
216
217
|
onDragSimulatedPressTouchStart(event);
|
|
217
218
|
onDragSimulatedClickTouchStart(event);
|
|
218
|
-
nodeRect = await getBoundingClientRect(
|
|
219
|
+
nodeRect = await getBoundingClientRect(`.${nodeId}`, instance);
|
|
219
220
|
};
|
|
220
221
|
const onDragTouchMove = (event) => {
|
|
221
222
|
onDragSimulatedPressTouchMove(event);
|
|
@@ -306,7 +307,8 @@ export default _defineComponent({
|
|
|
306
307
|
bem.e("node"),
|
|
307
308
|
bem.em("node", "dragging", dragging.value),
|
|
308
309
|
bem.em("node", "selectable", treeContext.selectable),
|
|
309
|
-
bem.em("node", "active", nodeActive.value)
|
|
310
|
+
bem.em("node", "active", nodeActive.value),
|
|
311
|
+
nodeId
|
|
310
312
|
);
|
|
311
313
|
});
|
|
312
314
|
const nodeStyle = computed(() => {
|
|
@@ -353,7 +355,7 @@ export default _defineComponent({
|
|
|
353
355
|
return obviousNodes;
|
|
354
356
|
}, set obviousNodes(v) {
|
|
355
357
|
obviousNodes = v;
|
|
356
|
-
}, onDragStart, onDragMove, onDragEnd, onDragSimulatedClickTouchStart, onDragSimulatedClickTouchEnd, onDragSimulatedPressTouchStart, onDragSimulatedPressTouchMove, onDragSimulatedPressTouchEnd, onDragTouchStart, onDragTouchMove, onDragTouchEnd, onDragMouseDown, dragId, popover, isLastNode, popoverOptions, onPopoverSelect, isLeaf, onNodeClick, nodeActive, onNodeTouchStart, onNodeTouchEnd, onNodeMouseDown, onSelectionTouchStart, onSelectionTouchEnd, onSelectionMouseDown, editId, getEditRect, onEditTouchStart, onEditTouchEnd, onEditMouseDown, nodeClass, nodeStyle, editClass, indentStyle, arrowClass, selectionClass,
|
|
358
|
+
}, onDragStart, onDragMove, onDragEnd, onDragSimulatedClickTouchStart, onDragSimulatedClickTouchEnd, onDragSimulatedPressTouchStart, onDragSimulatedPressTouchMove, onDragSimulatedPressTouchEnd, onDragTouchStart, onDragTouchMove, onDragTouchEnd, onDragMouseDown, dragId, popover, isLastNode, popoverOptions, onPopoverSelect, isLeaf, onNodeClick, nodeActive, onNodeTouchStart, onNodeTouchEnd, onNodeMouseDown, onSelectionTouchStart, onSelectionTouchEnd, onSelectionMouseDown, editId, getEditRect, onEditTouchStart, onEditTouchEnd, onEditMouseDown, nodeClass, nodeStyle, editClass, indentStyle, arrowClass, selectionClass, SarIcon, SarCheckbox, SarPopover };
|
|
357
359
|
return __returned__;
|
|
358
360
|
}
|
|
359
361
|
});
|
|
@@ -44,7 +44,8 @@ import {
|
|
|
44
44
|
getFileName,
|
|
45
45
|
noop,
|
|
46
46
|
isImageUrl,
|
|
47
|
-
toArray
|
|
47
|
+
toArray,
|
|
48
|
+
isFunction
|
|
48
49
|
} from "../../utils";
|
|
49
50
|
import SarUploadPreview from "../upload-preview/upload-preview.vue";
|
|
50
51
|
import SarIcon from "../icon/icon.vue";
|
|
@@ -163,7 +164,7 @@ export default _defineComponent({
|
|
|
163
164
|
const invalid = [];
|
|
164
165
|
fileList.forEach((item) => {
|
|
165
166
|
const file = item.file;
|
|
166
|
-
if (file && (
|
|
167
|
+
if (file && (isFunction(props.maxSize) && props.maxSize(file) || file.size && typeof props.maxSize === "number" && file.size > props.maxSize)) {
|
|
167
168
|
invalid.push(item);
|
|
168
169
|
} else {
|
|
169
170
|
valid.push(item);
|
package/dark.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use './components/keyboard/variables-dark.scss' as *;
|
|
2
|
+
@use './components/signature/variables-dark.scss' as *;
|
|
2
3
|
@use './components/skeleton/variables-dark.scss' as *;
|
|
3
4
|
@use './components/slider/variables-dark.scss' as *;
|
|
4
5
|
@use './components/style/variables-dark.scss' as *;
|
package/global.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ declare module 'vue' {
|
|
|
20
20
|
SarCollapse: typeof import('./components/collapse/collapse').default
|
|
21
21
|
SarCountDown: typeof import('./components/count-down/count-down').default
|
|
22
22
|
SarCountTo: typeof import('./components/count-to/count-to').default
|
|
23
|
+
SarCropImage: typeof import('./components/crop-image/crop-image').default
|
|
24
|
+
SarCropImageAgent: typeof import('./components/crop-image-agent/crop-image-agent').default
|
|
23
25
|
SarDatetimePicker: typeof import('./components/datetime-picker/datetime-picker').default
|
|
24
26
|
SarDatetimePickerInput: typeof import('./components/datetime-picker-input/datetime-picker-input').default
|
|
25
27
|
SarDatetimeRangePicker: typeof import('./components/datetime-range-picker/datetime-range-picker').default
|
|
@@ -48,6 +50,7 @@ declare module 'vue' {
|
|
|
48
50
|
SarMenu: typeof import('./components/menu/menu').default
|
|
49
51
|
SarNavbar: typeof import('./components/navbar/navbar').default
|
|
50
52
|
SarNavbarItem: typeof import('./components/navbar-item/navbar-item').default
|
|
53
|
+
SarNavbarPit: typeof import('./components/navbar-pit/navbar-pit').default
|
|
51
54
|
SarNoticeBar: typeof import('./components/notice-bar/notice-bar').default
|
|
52
55
|
SarNotify: typeof import('./components/notify/notify').default
|
|
53
56
|
SarNotifyAgent: typeof import('./components/notify-agent/notify-agent').default
|
|
@@ -71,8 +74,13 @@ declare module 'vue' {
|
|
|
71
74
|
SarRate: typeof import('./components/rate/rate').default
|
|
72
75
|
SarResult: typeof import('./components/result/result').default
|
|
73
76
|
SarRow: typeof import('./components/row/row').default
|
|
77
|
+
SarScrollSpy: typeof import('./components/scroll-spy/scroll-spy').default
|
|
78
|
+
SarScrollSpyAnchor: typeof import('./components/scroll-spy-anchor/scroll-spy-anchor').default
|
|
74
79
|
SarSearch: typeof import('./components/search/search').default
|
|
75
80
|
SarShareSheet: typeof import('./components/share-sheet/share-sheet').default
|
|
81
|
+
SarSidebar: typeof import('./components/sidebar/sidebar').default
|
|
82
|
+
SarSidebarItem: typeof import('./components/sidebar-item/sidebar-item').default
|
|
83
|
+
SarSignature: typeof import('./components/signature/signature').default
|
|
76
84
|
SarSkeleton: typeof import('./components/skeleton/skeleton').default
|
|
77
85
|
SarSkeletonAvatar: typeof import('./components/skeleton-avatar/skeleton-avatar').default
|
|
78
86
|
SarSkeletonBlock: typeof import('./components/skeleton-block/skeleton-block').default
|
|
@@ -80,6 +88,7 @@ declare module 'vue' {
|
|
|
80
88
|
SarSkeletonTitle: typeof import('./components/skeleton-title/skeleton-title').default
|
|
81
89
|
SarSlider: typeof import('./components/slider/slider').default
|
|
82
90
|
SarSpace: typeof import('./components/space/space').default
|
|
91
|
+
SarStatusBar: typeof import('./components/status-bar/status-bar').default
|
|
83
92
|
SarStepper: typeof import('./components/stepper/stepper').default
|
|
84
93
|
SarSteps: typeof import('./components/steps/steps').default
|
|
85
94
|
SarSwiperDot: typeof import('./components/swiper-dot/swiper-dot').default
|
package/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export * from './components/collapse';
|
|
|
16
16
|
export * from './components/config';
|
|
17
17
|
export * from './components/count-down';
|
|
18
18
|
export * from './components/count-to';
|
|
19
|
+
export * from './components/crop-image';
|
|
20
|
+
export * from './components/crop-image-agent';
|
|
19
21
|
export * from './components/datetime-picker';
|
|
20
22
|
export * from './components/datetime-picker-input';
|
|
21
23
|
export * from './components/datetime-range-picker';
|
|
@@ -61,11 +63,17 @@ export * from './components/radio';
|
|
|
61
63
|
export * from './components/radio-input';
|
|
62
64
|
export * from './components/rate';
|
|
63
65
|
export * from './components/result';
|
|
66
|
+
export * from './components/scroll-spy';
|
|
67
|
+
export * from './components/scroll-spy-anchor';
|
|
64
68
|
export * from './components/search';
|
|
65
69
|
export * from './components/share-sheet';
|
|
70
|
+
export * from './components/sidebar';
|
|
71
|
+
export * from './components/sidebar-item';
|
|
72
|
+
export * from './components/signature';
|
|
66
73
|
export * from './components/skeleton';
|
|
67
74
|
export * from './components/slider';
|
|
68
75
|
export * from './components/space';
|
|
76
|
+
export * from './components/status-bar';
|
|
69
77
|
export * from './components/stepper';
|
|
70
78
|
export * from './components/steps';
|
|
71
79
|
export * from './components/swiper-dot';
|
package/index.js
CHANGED
|
@@ -16,6 +16,8 @@ export * from './components/collapse';
|
|
|
16
16
|
export * from './components/config';
|
|
17
17
|
export * from './components/count-down';
|
|
18
18
|
export * from './components/count-to';
|
|
19
|
+
export * from './components/crop-image';
|
|
20
|
+
export * from './components/crop-image-agent';
|
|
19
21
|
export * from './components/datetime-picker';
|
|
20
22
|
export * from './components/datetime-picker-input';
|
|
21
23
|
export * from './components/datetime-range-picker';
|
|
@@ -61,11 +63,17 @@ export * from './components/radio';
|
|
|
61
63
|
export * from './components/radio-input';
|
|
62
64
|
export * from './components/rate';
|
|
63
65
|
export * from './components/result';
|
|
66
|
+
export * from './components/scroll-spy';
|
|
67
|
+
export * from './components/scroll-spy-anchor';
|
|
64
68
|
export * from './components/search';
|
|
65
69
|
export * from './components/share-sheet';
|
|
70
|
+
export * from './components/sidebar';
|
|
71
|
+
export * from './components/sidebar-item';
|
|
72
|
+
export * from './components/signature';
|
|
66
73
|
export * from './components/skeleton';
|
|
67
74
|
export * from './components/slider';
|
|
68
75
|
export * from './components/space';
|
|
76
|
+
export * from './components/status-bar';
|
|
69
77
|
export * from './components/stepper';
|
|
70
78
|
export * from './components/steps';
|
|
71
79
|
export * from './components/swiper-dot';
|
package/index.scss
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
@use './components/row/variables.scss' as *;
|
|
53
53
|
@use './components/search/variables.scss' as *;
|
|
54
54
|
@use './components/share-sheet/variables.scss' as *;
|
|
55
|
+
@use './components/sidebar/variables.scss' as *;
|
|
56
|
+
@use './components/signature/variables.scss' as *;
|
|
55
57
|
@use './components/skeleton/variables.scss' as *;
|
|
56
58
|
@use './components/slider/variables.scss' as *;
|
|
57
59
|
@use './components/space/variables.scss' as *;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "sard-uniapp",
|
|
3
3
|
"name": "sard-uniapp",
|
|
4
4
|
"displayName": "sard-uniapp",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.12.0",
|
|
6
6
|
"description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"buildAndRelease": "npm run build && npm run release",
|
|
19
19
|
"push": "git push origin && git push gitee && git push origin --tags && git push gitee --tags",
|
|
20
20
|
"prepare": "husky install",
|
|
21
|
-
"
|
|
21
|
+
"new-component": "tsx ./scripts/new-component.ts",
|
|
22
|
+
"nc": "npm run new-component",
|
|
23
|
+
"new-sub-component": "tsx ./scripts/new-sub-component.ts",
|
|
24
|
+
"nsc": "npm run new-sub-component",
|
|
22
25
|
"eslint": "eslint",
|
|
23
26
|
"prettier": "prettier . --write",
|
|
24
27
|
"prettier:check": "prettier . --check",
|
|
@@ -73,26 +76,26 @@
|
|
|
73
76
|
"@commitlint/config-conventional": "^17.8.1",
|
|
74
77
|
"@commitlint/prompt-cli": "^17.8.1",
|
|
75
78
|
"@dcloudio/types": "^3.4.14",
|
|
76
|
-
"@dcloudio/uni-app": "3.0.0-
|
|
77
|
-
"@dcloudio/uni-app-harmony": "3.0.0-
|
|
78
|
-
"@dcloudio/uni-app-plus": "3.0.0-
|
|
79
|
-
"@dcloudio/uni-automator": "3.0.0-
|
|
80
|
-
"@dcloudio/uni-cli-shared": "3.0.0-
|
|
81
|
-
"@dcloudio/uni-components": "3.0.0-
|
|
82
|
-
"@dcloudio/uni-h5": "3.0.0-
|
|
83
|
-
"@dcloudio/uni-mp-alipay": "3.0.0-
|
|
84
|
-
"@dcloudio/uni-mp-baidu": "3.0.0-
|
|
85
|
-
"@dcloudio/uni-mp-jd": "3.0.0-
|
|
86
|
-
"@dcloudio/uni-mp-kuaishou": "3.0.0-
|
|
87
|
-
"@dcloudio/uni-mp-lark": "3.0.0-
|
|
88
|
-
"@dcloudio/uni-mp-qq": "3.0.0-
|
|
89
|
-
"@dcloudio/uni-mp-toutiao": "3.0.0-
|
|
90
|
-
"@dcloudio/uni-mp-weixin": "3.0.0-
|
|
91
|
-
"@dcloudio/uni-mp-xhs": "3.0.0-
|
|
92
|
-
"@dcloudio/uni-quickapp-webview": "3.0.0-
|
|
93
|
-
"@dcloudio/uni-stacktracey": "3.0.0-
|
|
94
|
-
"@dcloudio/vite-plugin-uni": "3.0.0-
|
|
95
|
-
"@esbuild/darwin-x64": "
|
|
79
|
+
"@dcloudio/uni-app": "3.0.0-4050620250312001",
|
|
80
|
+
"@dcloudio/uni-app-harmony": "3.0.0-4050620250312001",
|
|
81
|
+
"@dcloudio/uni-app-plus": "3.0.0-4050620250312001",
|
|
82
|
+
"@dcloudio/uni-automator": "3.0.0-4050620250312001",
|
|
83
|
+
"@dcloudio/uni-cli-shared": "3.0.0-4050620250312001",
|
|
84
|
+
"@dcloudio/uni-components": "3.0.0-4050620250312001",
|
|
85
|
+
"@dcloudio/uni-h5": "3.0.0-4050620250312001",
|
|
86
|
+
"@dcloudio/uni-mp-alipay": "3.0.0-4050620250312001",
|
|
87
|
+
"@dcloudio/uni-mp-baidu": "3.0.0-4050620250312001",
|
|
88
|
+
"@dcloudio/uni-mp-jd": "3.0.0-4050620250312001",
|
|
89
|
+
"@dcloudio/uni-mp-kuaishou": "3.0.0-4050620250312001",
|
|
90
|
+
"@dcloudio/uni-mp-lark": "3.0.0-4050620250312001",
|
|
91
|
+
"@dcloudio/uni-mp-qq": "3.0.0-4050620250312001",
|
|
92
|
+
"@dcloudio/uni-mp-toutiao": "3.0.0-4050620250312001",
|
|
93
|
+
"@dcloudio/uni-mp-weixin": "3.0.0-4050620250312001",
|
|
94
|
+
"@dcloudio/uni-mp-xhs": "3.0.0-4050620250312001",
|
|
95
|
+
"@dcloudio/uni-quickapp-webview": "3.0.0-4050620250312001",
|
|
96
|
+
"@dcloudio/uni-stacktracey": "3.0.0-4050620250312001",
|
|
97
|
+
"@dcloudio/vite-plugin-uni": "3.0.0-4050620250312001",
|
|
98
|
+
"@esbuild/darwin-x64": "0.20.2",
|
|
96
99
|
"@gunny/perf-test": "^0.1.3",
|
|
97
100
|
"@rollup/rollup-darwin-x64": "^4.24.0",
|
|
98
101
|
"@types/inquirer": "^9.0.7",
|
|
@@ -109,6 +112,7 @@
|
|
|
109
112
|
"eslint-config-prettier": "^8.10.0",
|
|
110
113
|
"eslint-plugin-prettier": "^4.2.1",
|
|
111
114
|
"eslint-plugin-vue": "^9.32.0",
|
|
115
|
+
"fs-extra": "^11.3.0",
|
|
112
116
|
"glob": "^11.0.0",
|
|
113
117
|
"globals": "^15.13.0",
|
|
114
118
|
"husky": "^9.1.7",
|
|
@@ -117,9 +121,9 @@
|
|
|
117
121
|
"lodash-es": "^4.17.21",
|
|
118
122
|
"prettier": "^2.8.8",
|
|
119
123
|
"region-data": "^1.2.3",
|
|
120
|
-
"sard-cli": "^1.1.
|
|
124
|
+
"sard-cli": "^1.1.3",
|
|
121
125
|
"sass": "^1.69.7",
|
|
122
|
-
"tel-area-code": "^1.0
|
|
126
|
+
"tel-area-code": "^1.1.0",
|
|
123
127
|
"ts-custom-error": "^3.3.1",
|
|
124
128
|
"tsx": "^4.19.2",
|
|
125
129
|
"typescript": "~5.6.2",
|
package/use/index.d.ts
CHANGED
|
@@ -9,3 +9,7 @@ export * from './useSlotMachine';
|
|
|
9
9
|
export * from './useMouseDown';
|
|
10
10
|
export * from './useSimulatedClick';
|
|
11
11
|
export * from './useSimulatedPress';
|
|
12
|
+
export * from './useScrollSide';
|
|
13
|
+
export * from './useScrollSpy';
|
|
14
|
+
export * from './useDragPinch';
|
|
15
|
+
export * from './useTimeoutLoading';
|
package/use/index.js
CHANGED
|
@@ -9,3 +9,7 @@ export * from './useSlotMachine';
|
|
|
9
9
|
export * from './useMouseDown';
|
|
10
10
|
export * from './useSimulatedClick';
|
|
11
11
|
export * from './useSimulatedPress';
|
|
12
|
+
export * from './useScrollSide';
|
|
13
|
+
export * from './useScrollSpy';
|
|
14
|
+
export * from './useDragPinch';
|
|
15
|
+
export * from './useTimeoutLoading';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseTouchOptions {
|
|
2
|
+
onOffset?: (offsetX: number, offsetY: number) => void;
|
|
3
|
+
onScale?: (originX: number, originY: number, scale: number) => void;
|
|
4
|
+
onCapture?: () => void;
|
|
5
|
+
onRelease?: (v: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useDragPinch(options: UseTouchOptions): {
|
|
11
|
+
onMouseDown: (event: MouseEvent) => void;
|
|
12
|
+
onTouchStart: (event: TouchEvent) => void;
|
|
13
|
+
onTouchMove: (event: TouchEvent) => void;
|
|
14
|
+
onTouchEnd: (event: TouchEvent) => void;
|
|
15
|
+
};
|