@blueking/date-picker 2.0.0-beta.8 → 3.0.0-beta.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/README.md +15 -10
- package/package.json +14 -81
- package/typings/components/baseline-select.vue.d.ts +12 -0
- package/typings/components/common-submit.vue.d.ts +10 -19
- package/typings/components/common-tab.vue.d.ts +10 -14
- package/typings/components/date-list.vue.d.ts +15 -0
- package/typings/components/date-panel.vue.d.ts +9 -28
- package/typings/components/date-picker.vue.d.ts +8 -15
- package/typings/components/date-title.vue.d.ts +6 -0
- package/typings/components/natural-picker.vue.d.ts +6 -13
- package/typings/components/panel-wrapper.vue.d.ts +12 -21
- package/typings/components/recent-picker.vue.d.ts +10 -28
- package/typings/components/timezone-picker.vue.d.ts +14 -19
- package/typings/date-picker.vue.d.ts +21 -44
- package/typings/hooks/use-keydown-enter.d.ts +1 -0
- package/typings/hooks/use-validate.d.ts +17 -0
- package/typings/lang/lang.d.ts +14 -4
- package/typings/utils/constant.d.ts +8 -5
- package/typings/utils/cookie.d.ts +4 -0
- package/typings/utils/date.d.ts +38 -15
- package/typings/utils/duration.d.ts +5 -0
- package/typings/utils/index.d.ts +4 -3
- package/typings/utils/provider.d.ts +20 -0
- package/typings/utils/store.d.ts +1 -1
- package/typings/utils/timezone.d.ts +4 -4
- package/typings/utils/types.d.ts +22 -14
- package/typings/vue2.d.ts +20 -2
- package/typings/vue3.d.ts +7 -2
- package/vue2/config.json +1 -1
- package/vue2/index.es.min.js +25195 -18806
- package/vue2/index.iife.min.js +36661 -76
- package/vue2/index.umd.min.js +29072 -57
- package/vue2/vue2.css +3520 -1
- package/vue3/config.json +1 -1
- package/vue3/index.es.min.js +2957 -1717
- package/vue3/index.iife.min.js +29559 -57
- package/vue3/index.umd.min.js +4551 -2
- package/vue3/vue3.css +796 -1
- package/typings/utils/utils.d.ts +0 -15
package/README.md
CHANGED
|
@@ -80,16 +80,20 @@ export default {
|
|
|
80
80
|
|
|
81
81
|
### 属性列表
|
|
82
82
|
|
|
83
|
-
| 属性名
|
|
84
|
-
|
|
|
85
|
-
| behavior
|
|
86
|
-
| commonUseList
|
|
87
|
-
| disabled
|
|
88
|
-
| format
|
|
89
|
-
| modelValue
|
|
90
|
-
| needTimezone
|
|
91
|
-
| timezone
|
|
92
|
-
|
|
|
83
|
+
| 属性名 | 描述 | 属性类型 | 默认值 |
|
|
84
|
+
| ----------------- | -------------------------------- | ----------------------------------------------------------------- | ---------- |
|
|
85
|
+
| behavior | 组件展示风格 | `'normal' \| 'simplicity'` | 'normal' |
|
|
86
|
+
| commonUseList | 常用列表 | `DateValue[]` | |
|
|
87
|
+
| disabled | 是否禁用 | `boolean` | |
|
|
88
|
+
| format | 日期转换显示格式 | `string` | |
|
|
89
|
+
| modelValue | 日期值 | `DateValue \| dayjs.Dayjs[] \| number[] \| string[] \| undefined` | |
|
|
90
|
+
| needTimezone | 是否展示时区 | `boolean` | |
|
|
91
|
+
| timezone | 时区值 | `string` | 浏览器时区 |
|
|
92
|
+
| validDateRange | 有效可选的日期范围 | `DateValue \| undefined` | |
|
|
93
|
+
| version | 版本号 用于控制本地缓存 | `number \| string` | '1.0' |
|
|
94
|
+
| minDuration | 最小可选时间跨度毫秒值 | `number` | |
|
|
95
|
+
| maxDuration | 最大可选时间跨度毫秒值 | `number` | |
|
|
96
|
+
| enableFormatClick | 可支持的时间格式是否可以点击切换 | `boolean` | false |
|
|
93
97
|
|
|
94
98
|
### 事件列表
|
|
95
99
|
|
|
@@ -97,3 +101,4 @@ export default {
|
|
|
97
101
|
| ----------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
98
102
|
| update:modelValue | value, info | value: IDatePickerProps['modelValue']<br/>info: Array<br/>{<br/>dayjs: dayjs.Dayjs \| null;<br/>formatText: null \| string;<br/>} | 更新date值的事件,以及相关信息 |
|
|
99
103
|
| update:timezone | value, timezoneInfo | value: string<br/>timezoneInfo: ITimezoneItem | 更新时区值的事件,以及时区信息 |
|
|
104
|
+
| update:format | value | value: string | 更新时间格式的值 |
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/date-picker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "蓝鲸监控平台日期时间选择",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tencent BlueKing",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prepublishOnly": "run-p build dts",
|
|
9
|
+
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
10
|
+
"build": "tsx ./scripts/vite.build.ts",
|
|
11
|
+
"dts": "vue-tsc --project tsconfig.dts.json",
|
|
12
|
+
"prettier": "prettier ./src ./scripts ./playground --write",
|
|
13
|
+
"visualize": "vite-bundle-visualizer -c scripts/vite.vusualizer.ts"
|
|
14
|
+
},
|
|
7
15
|
"exports": {
|
|
8
16
|
".": {
|
|
9
17
|
"types": "./typings/vue3.d.ts",
|
|
@@ -21,7 +29,8 @@
|
|
|
21
29
|
"default": "./vue2/index.es.min.js"
|
|
22
30
|
},
|
|
23
31
|
"./vue3/*": "./vue3/*",
|
|
24
|
-
"./vue2/*": "./vue2/*"
|
|
32
|
+
"./vue2/*": "./vue2/*",
|
|
33
|
+
"./src/*": "./src/*"
|
|
25
34
|
},
|
|
26
35
|
"typesVersions": {
|
|
27
36
|
"*": {
|
|
@@ -49,85 +58,9 @@
|
|
|
49
58
|
"registry": "https://registry.npmjs.org/"
|
|
50
59
|
},
|
|
51
60
|
"peerDependencies": {
|
|
52
|
-
"@blueking/bkui-library": "0.0.0-beta.4",
|
|
53
|
-
"bkui-vue": "^
|
|
61
|
+
"@blueking/bkui-library": "^0.0.0-beta.4",
|
|
62
|
+
"bkui-vue": "^2.0.1",
|
|
54
63
|
"dayjs": "^1.11.10",
|
|
55
|
-
"vue": "^3
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@types/node": "^20.12.3",
|
|
59
|
-
"@types/prompts": "^2.4.9",
|
|
60
|
-
"@types/semver": "^7.5.8",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
62
|
-
"@typescript-eslint/parser": "^7.5.0",
|
|
63
|
-
"@vitejs/plugin-vue": "^5.0.4",
|
|
64
|
-
"bkui-vue": "1.0.3-beta.25",
|
|
65
|
-
"eslint": "^8.57.0",
|
|
66
|
-
"eslint-config-prettier": "^9.1.0",
|
|
67
|
-
"eslint-config-tencent": "^1.0.4",
|
|
68
|
-
"eslint-plugin-codecc": "^0.3.0",
|
|
69
|
-
"eslint-plugin-perfectionist": "^2.7.0",
|
|
70
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
71
|
-
"eslint-plugin-vue": "^9.24.0",
|
|
72
|
-
"execa": "^8.0.1",
|
|
73
|
-
"less": "^4.2.0",
|
|
74
|
-
"lint-staged": "^15.2.2",
|
|
75
|
-
"npm-run-all": "^4.1.5",
|
|
76
|
-
"picocolors": "^1.0.0",
|
|
77
|
-
"postcss-html": "^1.6.0",
|
|
78
|
-
"postcss-scss": "^4.0.9",
|
|
79
|
-
"prettier": "^3.2.5",
|
|
80
|
-
"prompts": "^2.4.2",
|
|
81
|
-
"sass": "^1.72.0",
|
|
82
|
-
"semver": "^7.6.0",
|
|
83
|
-
"simple-git-hooks": "^2.11.1",
|
|
84
|
-
"stylelint": "^16.3.1",
|
|
85
|
-
"stylelint-config-recess-order": "^5.0.0",
|
|
86
|
-
"stylelint-config-recommended-vue": "1.5.0",
|
|
87
|
-
"stylelint-config-standard": "^36.0.0",
|
|
88
|
-
"stylelint-order": "^6.0.4",
|
|
89
|
-
"stylelint-scss": "^6.2.1",
|
|
90
|
-
"terser": "^5.30.2",
|
|
91
|
-
"ts-node": "^10.9.2",
|
|
92
|
-
"tslib": "^2.6.2",
|
|
93
|
-
"tsx": "^4.7.1",
|
|
94
|
-
"typescript": "^5.4.3",
|
|
95
|
-
"vite": "^5.2.7",
|
|
96
|
-
"vite-bundle-visualizer": "^1.1.0",
|
|
97
|
-
"vite-plugin-css-injected-by-js": "^3.5.0",
|
|
98
|
-
"vite-plugin-inspect": "^0.8.3",
|
|
99
|
-
"vue": "^3.4.21",
|
|
100
|
-
"vue-eslint-parser": "^9.4.2",
|
|
101
|
-
"vue-tsc": "^2.0.7",
|
|
102
|
-
"zip-a-folder": "^3.1.6"
|
|
103
|
-
},
|
|
104
|
-
"engines": {
|
|
105
|
-
"node": ">=18.16.0"
|
|
106
|
-
},
|
|
107
|
-
"browserslist": [
|
|
108
|
-
"> 0.5%",
|
|
109
|
-
"last 2 versions",
|
|
110
|
-
"Firefox ESR",
|
|
111
|
-
"not dead"
|
|
112
|
-
],
|
|
113
|
-
"simple-git-hooks": {
|
|
114
|
-
"pre-commit": "lint-staged",
|
|
115
|
-
"commit-msg": "node scripts/verify.commit.mjs"
|
|
116
|
-
},
|
|
117
|
-
"lint-staged": {
|
|
118
|
-
"*.{js,json}": [
|
|
119
|
-
"prettier --write"
|
|
120
|
-
],
|
|
121
|
-
"*.ts?(x)": [
|
|
122
|
-
"eslint --fix"
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
"scripts": {
|
|
126
|
-
"release": "tsx scripts/release.ts",
|
|
127
|
-
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
128
|
-
"build": "tsx ./scripts/vite.build.ts",
|
|
129
|
-
"dts": "vue-tsc --project tsconfig.dts.json",
|
|
130
|
-
"prettier": "prettier ./src ./scripts ./playground --write",
|
|
131
|
-
"visualize": "vite-bundle-visualizer -c scripts/vite.vusualizer.ts"
|
|
64
|
+
"vue": "^3"
|
|
132
65
|
}
|
|
133
66
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
"update:modelValue": (value: string) => any;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
}> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
disableTips?: string | undefined;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
/**
|
|
4
3
|
* 是否禁用
|
|
5
4
|
*/
|
|
6
|
-
disabled?: boolean
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
disableTips?: string;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
submit: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
11
10
|
/**
|
|
12
11
|
* 是否禁用
|
|
13
12
|
*/
|
|
14
|
-
disabled?: boolean
|
|
15
|
-
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
disableTips?: string;
|
|
15
|
+
}> & Readonly<{
|
|
16
16
|
onSubmit?: (() => any) | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToOption<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { ICommonTabItem } from '../utils';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
import type { DateMode, ICommonTabItem } from '../utils';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
/** modelValue 选中的tab */
|
|
5
5
|
modelValue: {
|
|
6
6
|
required: true;
|
|
@@ -11,11 +11,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
required: true;
|
|
12
12
|
type: PropType<ICommonTabItem[]>;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (args_0: DateMode) => any;
|
|
16
|
+
confirm: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
18
|
/** modelValue 选中的tab */
|
|
20
19
|
modelValue: {
|
|
21
20
|
required: true;
|
|
@@ -26,11 +25,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
25
|
required: true;
|
|
27
26
|
type: PropType<ICommonTabItem[]>;
|
|
28
27
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}>>, {
|
|
34
|
-
showDeleteAll: boolean;
|
|
35
|
-
}, {}>;
|
|
28
|
+
}>> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((args_0: DateMode) => any) | undefined;
|
|
30
|
+
onConfirm?: (() => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
32
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DateRange, DateValue } from '../utils';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
dateList: DateRange[];
|
|
4
|
+
defaultDate: DateRange;
|
|
5
|
+
isRecent: boolean;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
change: (date: DateValue) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
9
|
+
dateList: DateRange[];
|
|
10
|
+
defaultDate: DateRange;
|
|
11
|
+
isRecent: boolean;
|
|
12
|
+
}> & Readonly<{
|
|
13
|
+
onChange?: ((date: DateValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs, { Dayjs } from 'dayjs';
|
|
2
2
|
interface Props {
|
|
3
|
-
|
|
3
|
+
disableNow?: boolean;
|
|
4
4
|
/**
|
|
5
5
|
* 格式化字符串 例如 YYYY-MM-DD HH:mm:ss(参考dayjs https://dayjs.gitee.io/docs/zh-CN/durations/format)
|
|
6
6
|
*/
|
|
@@ -14,36 +14,17 @@ interface Props {
|
|
|
14
14
|
*/
|
|
15
15
|
minDate?: Dayjs;
|
|
16
16
|
modelValue?: Dayjs;
|
|
17
|
+
showTitle?: boolean;
|
|
17
18
|
title?: string;
|
|
18
19
|
}
|
|
19
|
-
declare const _default: import("vue").DefineComponent<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"update:isNow": (args_0: boolean) => void;
|
|
24
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
25
|
-
format: string;
|
|
26
|
-
}>>> & {
|
|
20
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:modelValue": (date: dayjs.Dayjs) => any;
|
|
22
|
+
"update:isNow": (args_0: boolean) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
27
24
|
"onUpdate:modelValue"?: ((date: dayjs.Dayjs) => any) | undefined;
|
|
28
25
|
"onUpdate:isNow"?: ((args_0: boolean) => any) | undefined;
|
|
29
|
-
}
|
|
26
|
+
}>, {
|
|
30
27
|
format: string;
|
|
31
|
-
|
|
28
|
+
showTitle: boolean;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
30
|
export default _default;
|
|
33
|
-
type __VLS_WithDefaults<P, D> = {
|
|
34
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
-
default: D[K];
|
|
36
|
-
}> : P[K];
|
|
37
|
-
};
|
|
38
|
-
type __VLS_Prettify<T> = {
|
|
39
|
-
[K in keyof T]: T[K];
|
|
40
|
-
} & {};
|
|
41
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
-
type __VLS_TypePropsToOption<T> = {
|
|
43
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
-
} : {
|
|
46
|
-
type: import('vue').PropType<T[K]>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { type DateValue } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
value: DateRange;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
},
|
|
5
|
+
}, {
|
|
6
|
+
handleSubmit: () => void;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
change: (value: DateValue) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
8
10
|
value: DateRange;
|
|
9
|
-
}
|
|
11
|
+
}> & Readonly<{
|
|
10
12
|
onChange?: ((value: DateValue) => any) | undefined;
|
|
11
|
-
}, {}, {}>;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
13
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type __VLS_TypePropsToOption<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: import('vue').PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
confirm: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onConfirm?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -4,18 +4,11 @@ interface IProps {
|
|
|
4
4
|
/** 已选择自然日期 */
|
|
5
5
|
value?: DateRange;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: import("vue").DefineComponent<
|
|
8
|
-
|
|
9
|
-
},
|
|
7
|
+
declare const _default: import("vue").DefineComponent<IProps, {
|
|
8
|
+
handleSubmit: () => void;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
change: (value: NaturalDateValue) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
10
12
|
onChange?: ((value: NaturalDateValue) => any) | undefined;
|
|
11
|
-
}, {}, {}>;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
13
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type __VLS_TypePropsToOption<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: import('vue').PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { type DateValue } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
3
|
import { type ITimezoneItem } from '../utils/timezone';
|
|
4
|
-
declare const _default: import("vue").DefineComponent<
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
defaultDate: DateRange;
|
|
6
|
-
needTimezone?: boolean
|
|
7
|
-
timezone?: string
|
|
8
|
-
}
|
|
9
|
-
change: (value: DateValue) =>
|
|
10
|
-
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) =>
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
6
|
+
needTimezone?: boolean;
|
|
7
|
+
timezone?: string;
|
|
8
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
change: (value: DateValue) => any;
|
|
10
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
12
12
|
defaultDate: DateRange;
|
|
13
|
-
needTimezone?: boolean
|
|
14
|
-
timezone?: string
|
|
15
|
-
}
|
|
16
|
-
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
13
|
+
needTimezone?: boolean;
|
|
14
|
+
timezone?: string;
|
|
15
|
+
}> & Readonly<{
|
|
17
16
|
onChange?: ((value: DateValue) => any) | undefined;
|
|
18
|
-
|
|
17
|
+
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToOption<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FutureDateValue, type RecentDateValue, DateMode } from '../utils';
|
|
2
2
|
import { DateRange } from '../utils/date';
|
|
3
3
|
interface IProps {
|
|
4
|
+
baselineTime?: string;
|
|
4
5
|
type: DateMode.FUTURE | DateMode.RECENT;
|
|
5
6
|
value?: DateRange;
|
|
6
7
|
}
|
|
7
|
-
declare const _default: import("vue").DefineComponent<
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
change: (value:
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
onChange?: ((value: RecentDateValue | FutureDateValue) => any) | undefined;
|
|
15
|
-
}, {
|
|
8
|
+
declare const _default: import("vue").DefineComponent<IProps, {
|
|
9
|
+
handleSubmit: () => void;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
change: (value: FutureDateValue | RecentDateValue) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
13
|
+
onChange?: ((value: FutureDateValue | RecentDateValue) => any) | undefined;
|
|
14
|
+
}>, {
|
|
16
15
|
type: DateMode.FUTURE | DateMode.RECENT;
|
|
17
|
-
}, {}>;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
17
|
export default _default;
|
|
19
|
-
type __VLS_WithDefaults<P, D> = {
|
|
20
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
21
|
-
default: D[K];
|
|
22
|
-
}> : P[K];
|
|
23
|
-
};
|
|
24
|
-
type __VLS_Prettify<T> = {
|
|
25
|
-
[K in keyof T]: T[K];
|
|
26
|
-
} & {};
|
|
27
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
-
type __VLS_TypePropsToOption<T> = {
|
|
29
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
-
} : {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { type ITimezoneItem } from '../utils/timezone';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { type ITimeZoneGroup, type ITimezoneItem } from '../utils/timezone';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
timezoneOptions?: ITimeZoneGroup[];
|
|
4
|
+
value: string;
|
|
5
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
"update:value": (value: string, info: ITimezoneItem) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
8
|
+
timezoneOptions?: ITimeZoneGroup[];
|
|
9
|
+
value: string;
|
|
10
|
+
}> & Readonly<{
|
|
11
|
+
"onUpdate:value"?: ((value: string, info: ITimezoneItem) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
timezoneOptions: ITimeZoneGroup[];
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
15
|
export default _default;
|
|
12
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
-
type __VLS_TypePropsToOption<T> = {
|
|
14
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
-
} : {
|
|
17
|
-
type: import('vue').PropType<T[K]>;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
import 'bkui-vue/lib/styles/reset.css';
|
|
2
1
|
import dayjs from 'dayjs';
|
|
3
2
|
import { type DateValue, type IDatePickerProps } from './utils';
|
|
4
3
|
import { type ITimezoneItem } from './utils/timezone';
|
|
5
|
-
declare const _default: import("vue").DefineComponent<
|
|
6
|
-
behavior: string;
|
|
7
|
-
commonUseList: any;
|
|
8
|
-
format: string;
|
|
9
|
-
needTimezone: boolean;
|
|
10
|
-
version: string;
|
|
11
|
-
}>, {
|
|
4
|
+
declare const _default: import("vue").DefineComponent<IDatePickerProps, {
|
|
12
5
|
handleHidePanel: () => void;
|
|
13
6
|
handleShowPanel: () => void;
|
|
14
|
-
},
|
|
15
|
-
"update:modelValue": (value:
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:modelValue": (value: DateValue | undefined, info: {
|
|
16
9
|
dayjs: dayjs.Dayjs | null;
|
|
17
|
-
formatText:
|
|
18
|
-
}[]) =>
|
|
19
|
-
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
format: string;
|
|
24
|
-
needTimezone: boolean;
|
|
25
|
-
version: string;
|
|
26
|
-
}>>> & {
|
|
27
|
-
"onUpdate:modelValue"?: ((value: string[] | DateValue | dayjs.Dayjs[] | number[] | undefined, info: {
|
|
10
|
+
formatText: null | string;
|
|
11
|
+
}[], rawVal: DateValue) => any;
|
|
12
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => any;
|
|
13
|
+
"update:format": (value: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<IDatePickerProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: DateValue | undefined, info: {
|
|
28
16
|
dayjs: dayjs.Dayjs | null;
|
|
29
|
-
formatText:
|
|
30
|
-
}[]) => any) | undefined;
|
|
17
|
+
formatText: null | string;
|
|
18
|
+
}[], rawVal: DateValue) => any) | undefined;
|
|
31
19
|
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
32
|
-
|
|
20
|
+
"onUpdate:format"?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
33
22
|
behavior: "normal" | "simplicity";
|
|
34
|
-
|
|
23
|
+
id: string;
|
|
35
24
|
format: string;
|
|
25
|
+
commonUseList: DateValue[] | {
|
|
26
|
+
id: DateValue;
|
|
27
|
+
name: string;
|
|
28
|
+
}[];
|
|
29
|
+
version: number | string;
|
|
30
|
+
enableFormatClick: boolean;
|
|
36
31
|
needTimezone: boolean;
|
|
37
|
-
|
|
38
|
-
}, {}>;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
33
|
export default _default;
|
|
40
|
-
type __VLS_WithDefaults<P, D> = {
|
|
41
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
42
|
-
default: D[K];
|
|
43
|
-
}> : P[K];
|
|
44
|
-
};
|
|
45
|
-
type __VLS_Prettify<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
47
|
-
} & {};
|
|
48
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
49
|
-
type __VLS_TypePropsToOption<T> = {
|
|
50
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
51
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
52
|
-
} : {
|
|
53
|
-
type: import('vue').PropType<T[K]>;
|
|
54
|
-
required: true;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useKeydownEnter(callback: (event: KeyboardEvent) => void): () => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type DateValue } from '../utils';
|
|
2
|
+
import { DateRange } from '../utils/date';
|
|
3
|
+
import type { Dayjs } from 'dayjs';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @description: 提交前日期的校验
|
|
7
|
+
* 1、校验时间范围是否在可选范围内
|
|
8
|
+
* 2、校验时间范围是否小于最小时间间隔
|
|
9
|
+
* 3、校验时间范围是否大于最大时间间隔
|
|
10
|
+
*/
|
|
11
|
+
export declare const useValidate: () => {
|
|
12
|
+
validDateRange: import("vue").Ref<DateRange | undefined, DateRange | undefined>;
|
|
13
|
+
validMsg: import("vue").Ref<string, string>;
|
|
14
|
+
validateDateRange: (validDate: DateRange) => boolean;
|
|
15
|
+
validateDateValue: (validDate: DateValue) => boolean;
|
|
16
|
+
validateDayjs: (validDate: Dayjs) => boolean;
|
|
17
|
+
};
|