sard-uniapp 1.0.4 → 1.1.0-alpha.1
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 +32 -0
- package/components/_template/common.d.ts +15 -0
- package/components/_template/common.js +4 -0
- package/components/_template/index.d.ts +1 -0
- package/components/_template/index.js +1 -0
- package/components/button/common.d.ts +3 -3
- package/components/col/col.vue +2 -2
- package/components/dialog/common.d.ts +1 -1
- package/components/dialog-agent/common.d.ts +1 -1
- package/components/input/common.d.ts +1 -1
- package/components/notify/common.d.ts +1 -1
- package/components/notify-agent/common.d.ts +1 -1
- package/components/progress-bar/progress-bar.vue +1 -1
- package/components/progress-circle/progress-circle.vue +1 -1
- package/components/result/common.d.ts +1 -1
- package/components/share-sheet/share-sheet.vue +1 -1
- package/components/slider/common.d.ts +1 -0
- package/components/slider/slider.vue +16 -2
- package/components/stepper/common.d.ts +1 -1
- package/components/style/index.d.ts +1 -0
- package/components/style/index.js +1 -0
- package/components/tag/common.d.ts +2 -2
- package/components/tag/tag.vue +3 -17
- package/components/toast/common.d.ts +3 -3
- package/components/toast/common.js +1 -1
- package/components/toast-agent/common.d.ts +4 -4
- package/components/upload/utils.d.ts +24 -0
- package/components/upload/utils.js +53 -0
- package/package.json +2 -1
- package/utils/date.d.ts +1 -1
package/changelog.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## 1.1.0-alpha.1 (2024-04-03)
|
|
2
|
+
|
|
3
|
+
* docs: update quickstart.md ([fa280f6](https://github.com/sutras/sard-uniapp/commit/fa280f6))
|
|
4
|
+
* build: 新增changelog构建流程 ([e1e862d](https://github.com/sutras/sard-uniapp/commit/e1e862d))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## <small>1.0.5 (2024-03-30)</small>
|
|
9
|
+
|
|
10
|
+
* fix: 修复打包组件缺少文件的问题 ([21c032f](https://github.com/sutras/sard-uniapp/commit/21c032f))
|
|
11
|
+
* test(test): 完善测试用例 ([49f9967](https://github.com/sutras/sard-uniapp/commit/49f9967))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## <small>1.0.4 (2024-01-12)</small>
|
|
16
|
+
|
|
17
|
+
* fix(sard-uniapp): 修复打包缺少tag组件的bug ([c78f26c](https://github.com/sutras/sard-uniapp/commit/c78f26c))
|
|
18
|
+
* docs(doc): global component type prompt ([fb7d84e](https://github.com/sutras/sard-uniapp/commit/fb7d84e))
|
|
19
|
+
* build(sard-uniapp): update npm files field ([004ce1e](https://github.com/sutras/sard-uniapp/commit/004ce1e))
|
|
20
|
+
* add LICENSE. ([8082335](https://github.com/sutras/sard-uniapp/commit/8082335))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## <small>1.0.2 (2023-12-23)</small>
|
|
25
|
+
|
|
26
|
+
* fix(global): fixed bugs ([eee4541](https://github.com/sutras/sard-uniapp/commit/eee4541))
|
|
27
|
+
* feat: 新增基础组件 ([8e6385e](https://github.com/sutras/sard-uniapp/commit/8e6385e))
|
|
28
|
+
* feat(global): 新增组件 ([5c65aab](https://github.com/sutras/sard-uniapp/commit/5c65aab))
|
|
29
|
+
* chore: 基础框架搭建 ([212fc3a](https://github.com/sutras/sard-uniapp/commit/212fc3a))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PropType, type StyleValue } from 'vue';
|
|
2
|
+
export interface _TemplateProps {
|
|
3
|
+
rootStyle?: StyleValue;
|
|
4
|
+
rootClass?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const _templateProps: {
|
|
7
|
+
rootStyle: PropType<StyleValue>;
|
|
8
|
+
rootClass: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
export interface _TemplateSlots {
|
|
11
|
+
default(props: Record<string, never>): any;
|
|
12
|
+
}
|
|
13
|
+
export interface _TemplateEmits {
|
|
14
|
+
(e: 'click', event: any): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {} from './common';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,15 +16,15 @@ export declare const buttonProps: {
|
|
|
16
16
|
rootStyle: PropType<StyleValue>;
|
|
17
17
|
rootClass: StringConstructor;
|
|
18
18
|
type: {
|
|
19
|
-
type: PropType<"
|
|
19
|
+
type: PropType<"default" | "text" | "pale" | "mild" | "outline" | "pale-text" | undefined>;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
theme: {
|
|
23
|
-
type: PropType<"
|
|
23
|
+
type: PropType<"primary" | "info" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined>;
|
|
24
24
|
default: string;
|
|
25
25
|
};
|
|
26
26
|
size: {
|
|
27
|
-
type: PropType<"
|
|
27
|
+
type: PropType<"small" | "medium" | "mini" | "large" | undefined>;
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
30
|
round: BooleanConstructor;
|
package/components/col/col.vue
CHANGED
|
@@ -30,8 +30,8 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
30
30
|
const colClass = computed(() => {
|
|
31
31
|
return classNames(
|
|
32
32
|
bem.b(),
|
|
33
|
-
bem.m(props.span, props.span),
|
|
34
|
-
bem.m(`offset-${props.
|
|
33
|
+
bem.m(props.span, props.span !== void 0),
|
|
34
|
+
bem.m(`offset-${props.offset}`, props.offset !== void 0),
|
|
35
35
|
props.rootClass
|
|
36
36
|
);
|
|
37
37
|
});
|
|
@@ -17,7 +17,7 @@ export declare const dialogAgentProps: {
|
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
19
|
buttonType: {
|
|
20
|
-
type: import("vue").PropType<NonNullable<"
|
|
20
|
+
type: import("vue").PropType<NonNullable<"round" | "text" | undefined>>;
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
showCancel: {
|
|
@@ -71,7 +71,7 @@ export declare const inputProps: {
|
|
|
71
71
|
type: BooleanConstructor;
|
|
72
72
|
default: boolean;
|
|
73
73
|
};
|
|
74
|
-
inputmode: PropType<"
|
|
74
|
+
inputmode: PropType<"search" | "text" | "url" | "email" | "none" | "decimal" | "numeric" | "tel" | undefined>;
|
|
75
75
|
autoHeight: BooleanConstructor;
|
|
76
76
|
fixed: BooleanConstructor;
|
|
77
77
|
showConfirmBar: {
|
|
@@ -15,7 +15,7 @@ export declare const notifyProps: {
|
|
|
15
15
|
rootStyle: PropType<StyleValue>;
|
|
16
16
|
rootClass: StringConstructor;
|
|
17
17
|
type: {
|
|
18
|
-
type: PropType<"
|
|
18
|
+
type: PropType<"primary" | "success" | "warning" | "error" | undefined>;
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
21
|
message: StringConstructor;
|
|
@@ -10,7 +10,7 @@ export declare const notifyAgentProps: {
|
|
|
10
10
|
rootStyle: import("vue").PropType<import("vue").StyleValue>;
|
|
11
11
|
rootClass: StringConstructor;
|
|
12
12
|
type: {
|
|
13
|
-
type: import("vue").PropType<"
|
|
13
|
+
type: import("vue").PropType<"primary" | "success" | "warning" | "error" | undefined>;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
16
|
message: StringConstructor;
|
|
@@ -58,7 +58,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
58
58
|
return `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3e%3ccircle stroke='black' fill='none' stroke-width='${props.thickness}' cx='50' cy='50' r='${radius.value}' /%3e%3c/svg%3e")`;
|
|
59
59
|
});
|
|
60
60
|
const progressCircleClass = computed(() => {
|
|
61
|
-
return classNames(bem.b(), bem.m(props.status), props.rootClass);
|
|
61
|
+
return classNames(bem.b(), bem.m(props.status, props.status), props.rootClass);
|
|
62
62
|
});
|
|
63
63
|
const progressCircleStyle = computed(() => {
|
|
64
64
|
return stringifyStyle(
|
|
@@ -13,7 +13,7 @@ export declare const resultProps: {
|
|
|
13
13
|
rootStyle: PropType<StyleValue>;
|
|
14
14
|
rootClass: StringConstructor;
|
|
15
15
|
status: {
|
|
16
|
-
type: PropType<NonNullable<"
|
|
16
|
+
type: PropType<NonNullable<"info" | "success" | "warning" | "error" | "question" | undefined>>;
|
|
17
17
|
default: string;
|
|
18
18
|
};
|
|
19
19
|
icon: StringConstructor;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<view :class="shareSheetClass" :style="shareSheetStyle">
|
|
9
9
|
<view v-if="title || description" :class="bem.e('header')">
|
|
10
10
|
<view v-if="title" :class="bem.e('title')">
|
|
11
|
-
{{
|
|
11
|
+
{{ title }}
|
|
12
12
|
</view>
|
|
13
13
|
<view v-if="description" :class="bem.e('description')">
|
|
14
14
|
{{ description }}
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"
|
|
32
32
|
@touchstart="onTouchStart($event, 0)"
|
|
33
33
|
@touchmove.stop.prevent="onTouchMove($event, 0)"
|
|
34
|
+
@touchend="onTouchEnd()"
|
|
35
|
+
@touchcancel="onTouchEnd()"
|
|
34
36
|
@mousedown="onMouseDown($event, 0)"
|
|
35
37
|
>
|
|
36
38
|
<slot name="start-thumb" :value="rangeValue[0]">
|
|
@@ -49,6 +51,8 @@
|
|
|
49
51
|
"
|
|
50
52
|
@touchstart="onTouchStart($event, 1)"
|
|
51
53
|
@touchmove.stop.prevent="onTouchMove($event, 1)"
|
|
54
|
+
@touchend="onTouchEnd()"
|
|
55
|
+
@touchcancel="onTouchEnd()"
|
|
52
56
|
@mousedown="onMouseDown($event, 1)"
|
|
53
57
|
>
|
|
54
58
|
<slot name="end-thumb" :value="rangeValue[1]">
|
|
@@ -102,7 +106,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
102
106
|
...__default__,
|
|
103
107
|
__name: "slider",
|
|
104
108
|
props: sliderProps,
|
|
105
|
-
emits: ["update:model-value"],
|
|
109
|
+
emits: ["update:model-value", "change"],
|
|
106
110
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
107
111
|
__expose();
|
|
108
112
|
const props = __props;
|
|
@@ -171,6 +175,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
171
175
|
if (nextValue !== void 0) {
|
|
172
176
|
innerValue.value = nextValue;
|
|
173
177
|
emit("update:model-value", nextValue);
|
|
178
|
+
emit("change", nextValue);
|
|
174
179
|
}
|
|
175
180
|
};
|
|
176
181
|
let downCoord = {
|
|
@@ -226,6 +231,14 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
226
231
|
emit("update:model-value", nextValue);
|
|
227
232
|
}
|
|
228
233
|
};
|
|
234
|
+
const onTouchEnd = () => {
|
|
235
|
+
if (isDisabled.value || isReadonly.value) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (!arrayEqual(toArray(downValue), toArray(innerValue.value))) {
|
|
239
|
+
emit("change", innerValue.value);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
229
242
|
const onMouseDown = (event, index) => {
|
|
230
243
|
const info = uni.getSystemInfoSync();
|
|
231
244
|
onTouchStart(
|
|
@@ -240,6 +253,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
240
253
|
);
|
|
241
254
|
};
|
|
242
255
|
const upHandler = () => {
|
|
256
|
+
onTouchEnd();
|
|
243
257
|
document.removeEventListener("mouseup", upHandler);
|
|
244
258
|
document.removeEventListener("mousemove", moveHandler);
|
|
245
259
|
};
|
|
@@ -352,7 +366,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
352
366
|
return downCoord;
|
|
353
367
|
}, set downCoord(v) {
|
|
354
368
|
downCoord = v;
|
|
355
|
-
}, onTouchStart, onTouchMove, onMouseDown, rangeValue, rangePercent, scales, sliderClass, sliderStyle, thumbStyle, valueClass, valueStyle, get classNames() {
|
|
369
|
+
}, onTouchStart, onTouchMove, onTouchEnd, onMouseDown, rangeValue, rangePercent, scales, sliderClass, sliderStyle, thumbStyle, valueClass, valueStyle, get classNames() {
|
|
356
370
|
return classNames;
|
|
357
371
|
}, get stringifyStyle() {
|
|
358
372
|
return stringifyStyle;
|
|
@@ -30,7 +30,7 @@ export declare const stepperProps: {
|
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
|
-
valueOnClear: PropType<number | "
|
|
33
|
+
valueOnClear: PropType<number | "max" | "min" | undefined>;
|
|
34
34
|
step: {
|
|
35
35
|
type: NumberConstructor;
|
|
36
36
|
default: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,14 +15,14 @@ export declare const tagProps: {
|
|
|
15
15
|
rootStyle: PropType<StyleValue>;
|
|
16
16
|
rootClass: StringConstructor;
|
|
17
17
|
theme: {
|
|
18
|
-
type: PropType<"
|
|
18
|
+
type: PropType<"default" | "primary" | "info" | "secondary" | "success" | "warning" | "danger" | undefined>;
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
21
|
plain: BooleanConstructor;
|
|
22
22
|
round: BooleanConstructor;
|
|
23
23
|
mark: BooleanConstructor;
|
|
24
24
|
size: {
|
|
25
|
-
type: PropType<"
|
|
25
|
+
type: PropType<"small" | "medium" | "large" | undefined>;
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
28
|
color: StringConstructor;
|
package/components/tag/tag.vue
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="tagClass" :style="tagStyle" @click="$emit('click', $event)">
|
|
3
3
|
<slot></slot>
|
|
4
|
-
<view
|
|
5
|
-
v-if="closable"
|
|
6
|
-
:class="iconClass"
|
|
7
|
-
:style="iconStyle"
|
|
8
|
-
@click="$emit('close', $event)"
|
|
9
|
-
>
|
|
4
|
+
<view v-if="closable" :class="iconClass" @click="$emit('close', $event)">
|
|
10
5
|
<sar-icon name="close" />
|
|
11
6
|
</view>
|
|
12
7
|
</view>
|
|
@@ -56,18 +51,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
56
51
|
);
|
|
57
52
|
});
|
|
58
53
|
const iconClass = computed(() => {
|
|
59
|
-
return classNames(
|
|
60
|
-
bem.e("close"),
|
|
61
|
-
bem.em("close", props.theme),
|
|
62
|
-
bem.em("close", `${props.theme}-plain`, props.plain)
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
const iconStyle = computed(() => {
|
|
66
|
-
return stringifyStyle({
|
|
67
|
-
color: props.plain ? props.color : props.textColor
|
|
68
|
-
});
|
|
54
|
+
return classNames(bem.e("close"));
|
|
69
55
|
});
|
|
70
|
-
const __returned__ = { props, bem, tagClass, tagStyle, iconClass,
|
|
56
|
+
const __returned__ = { props, bem, tagClass, tagStyle, iconClass, SarIcon };
|
|
71
57
|
return __returned__;
|
|
72
58
|
}
|
|
73
59
|
});
|
|
@@ -3,7 +3,7 @@ export interface ToastProps {
|
|
|
3
3
|
rootStyle?: StyleValue;
|
|
4
4
|
rootClass?: string;
|
|
5
5
|
type?: 'text' | 'loading' | 'success' | 'fail';
|
|
6
|
-
title?: string;
|
|
6
|
+
title?: string | number;
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
position?: 'top' | 'center' | 'bottom';
|
|
9
9
|
overlay?: boolean;
|
|
@@ -15,10 +15,10 @@ export declare const toastProps: {
|
|
|
15
15
|
rootStyle: PropType<StyleValue>;
|
|
16
16
|
rootClass: StringConstructor;
|
|
17
17
|
type: {
|
|
18
|
-
type: PropType<NonNullable<"
|
|
18
|
+
type: PropType<NonNullable<"text" | "loading" | "success" | "fail" | undefined>>;
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
|
-
title: StringConstructor;
|
|
21
|
+
title: (StringConstructor | NumberConstructor)[];
|
|
22
22
|
visible: BooleanConstructor;
|
|
23
23
|
position: {
|
|
24
24
|
type: PropType<NonNullable<"center" | "top" | "bottom" | undefined>>;
|
|
@@ -10,10 +10,10 @@ export declare const toastAgentProps: {
|
|
|
10
10
|
rootStyle: import("vue").PropType<import("vue").StyleValue>;
|
|
11
11
|
rootClass: StringConstructor;
|
|
12
12
|
type: {
|
|
13
|
-
type: import("vue").PropType<NonNullable<"
|
|
13
|
+
type: import("vue").PropType<NonNullable<"text" | "loading" | "success" | "fail" | undefined>>;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
-
title: StringConstructor;
|
|
16
|
+
title: (StringConstructor | NumberConstructor)[];
|
|
17
17
|
visible: BooleanConstructor;
|
|
18
18
|
position: {
|
|
19
19
|
type: import("vue").PropType<NonNullable<"center" | "top" | "bottom" | undefined>>;
|
|
@@ -40,10 +40,10 @@ export declare const mapIdImperative: Record<string, {
|
|
|
40
40
|
export type ToastOptions = ToastAgentProps;
|
|
41
41
|
export interface ToastSimpleShowFunction {
|
|
42
42
|
(options: ToastOptions): void;
|
|
43
|
-
(title
|
|
43
|
+
(title?: string | number, options?: ToastOptions): void;
|
|
44
44
|
}
|
|
45
45
|
export interface ToastShowFunction {
|
|
46
|
-
(optionsOrTitle
|
|
46
|
+
(optionsOrTitle?: string | number | ToastOptions, options?: ToastOptions, internalType?: ToastOptions['type']): void;
|
|
47
47
|
}
|
|
48
48
|
export type ToastFunction = ToastSimpleShowFunction & {
|
|
49
49
|
success: ToastSimpleShowFunction;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface chooseMediaOptions {
|
|
2
|
+
count?: number;
|
|
3
|
+
mediaType?: 'image' | 'video';
|
|
4
|
+
sourceType?: ('album' | 'camera')[];
|
|
5
|
+
maxDuration?: number;
|
|
6
|
+
sizeType?: ('original' | 'compressed')[];
|
|
7
|
+
camera?: 'back' | 'front';
|
|
8
|
+
success?: (result: chooseMediaResult) => void;
|
|
9
|
+
fail?: (err: any) => void;
|
|
10
|
+
complete?: () => void;
|
|
11
|
+
}
|
|
12
|
+
interface chooseMediaResult {
|
|
13
|
+
tempFiles: {
|
|
14
|
+
tempFilePath: string;
|
|
15
|
+
size: number;
|
|
16
|
+
duration: number;
|
|
17
|
+
height: number;
|
|
18
|
+
width: number;
|
|
19
|
+
fileType: 'image' | 'video';
|
|
20
|
+
}[];
|
|
21
|
+
type: 'image' | 'video';
|
|
22
|
+
}
|
|
23
|
+
export declare function chooseMedia(options: chooseMediaOptions): void;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { toArray } from '../../utils';
|
|
2
|
+
export function chooseMedia(options) {
|
|
3
|
+
const { count = 9, mediaType = 'image', sourceType = ['album', 'camera'], maxDuration = 10, sizeType = ['original', 'compressed'], camera = 'back', success, fail, complete, } = options;
|
|
4
|
+
if (mediaType === 'image') {
|
|
5
|
+
return uni.chooseImage({
|
|
6
|
+
count,
|
|
7
|
+
sizeType,
|
|
8
|
+
sourceType,
|
|
9
|
+
success(res) {
|
|
10
|
+
success?.({
|
|
11
|
+
type: 'image',
|
|
12
|
+
tempFiles: toArray(res.tempFiles).map((file) => {
|
|
13
|
+
return {
|
|
14
|
+
tempFilePath: file.path,
|
|
15
|
+
size: file.size,
|
|
16
|
+
duration: 0,
|
|
17
|
+
height: 0,
|
|
18
|
+
width: 0,
|
|
19
|
+
fileType: 'image',
|
|
20
|
+
};
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
fail,
|
|
25
|
+
complete,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return uni.chooseVideo({
|
|
30
|
+
sourceType,
|
|
31
|
+
compressed: sizeType.includes('compressed'),
|
|
32
|
+
maxDuration,
|
|
33
|
+
camera,
|
|
34
|
+
success(res) {
|
|
35
|
+
success?.({
|
|
36
|
+
type: 'video',
|
|
37
|
+
tempFiles: [
|
|
38
|
+
{
|
|
39
|
+
tempFilePath: res.tempFilePath,
|
|
40
|
+
size: res.size,
|
|
41
|
+
duration: res.duration,
|
|
42
|
+
height: res.height,
|
|
43
|
+
width: res.width,
|
|
44
|
+
fileType: 'video',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
fail,
|
|
50
|
+
complete,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
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.0.
|
|
5
|
+
"version": "1.1.0-alpha.1",
|
|
6
6
|
"description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uniapp",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"vue": "^3.2.45"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
31
32
|
"region-data": "^1.0.6"
|
|
32
33
|
},
|
|
33
34
|
"author": "wuzhitao",
|
package/utils/date.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function isLeapYear(year: number): boolean;
|
|
2
|
-
export declare function getDaysInMonth(year: number, month: number):
|
|
2
|
+
export declare function getDaysInMonth(year: number, month: number): 29 | 28 | 30 | 31;
|
|
3
3
|
export declare function getDayOnFirstOfMonth(year: number, month: number): number;
|
|
4
4
|
export declare function getDaysInDate(date: Date): number;
|
|
5
5
|
export declare function toDateNumber(date: Date): number;
|