@aplus-frontend/ui 0.0.1-beta.4 → 0.0.1-beta.5
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/es/src/ap-field/date/constant.d.ts +11 -1
- package/es/src/ap-field/date/helper.d.ts +3 -0
- package/es/src/ap-field/date/interface.d.ts +1 -0
- package/es/src/ap-field/index.d.ts +2 -1
- package/es/src/ap-field/interface.d.ts +6 -6
- package/es/src/hooks/useControllableValue.mjs +9 -9
- package/es/src/modal/style/index.css +2 -2
- package/es/src/theme/modal/index.css +2 -2
- package/lib/src/ap-field/date/constant.d.ts +11 -1
- package/lib/src/ap-field/date/helper.d.ts +3 -0
- package/lib/src/ap-field/date/interface.d.ts +1 -0
- package/lib/src/ap-field/index.d.ts +2 -1
- package/lib/src/ap-field/interface.d.ts +6 -6
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/modal/style/index.css +2 -2
- package/lib/src/theme/modal/index.css +2 -2
- package/package.json +3 -3
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { PickerMode } from 'ant-design-vue/es/vc-picker/interface';
|
|
2
|
+
import { ApFormatPresetType } from './interface';
|
|
3
|
+
|
|
4
|
+
export declare const ApFieldDatePresetFormats: string[];
|
|
5
|
+
export declare const PRESET_FORMAT_MAP: Record<ApFormatPresetType, string>;
|
|
6
|
+
export declare const PRESET_FORMAT_PICK_MAP: Record<ApFormatPresetType, PickerMode>;
|
|
7
|
+
export declare const PRESET_FORMAT_TIME_MAP: Record<ApFormatPresetType, {
|
|
8
|
+
showTime: boolean;
|
|
9
|
+
showSecond?: boolean;
|
|
10
|
+
showMinute?: boolean;
|
|
11
|
+
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as ApFieldText } from './text/index.vue';
|
|
2
2
|
import { default as ApFiledCheckbox } from './checkbox/index.vue';
|
|
3
|
+
import { default as ApFiledDate } from './date/index.vue';
|
|
3
4
|
|
|
4
5
|
export * from './interface';
|
|
5
|
-
export { ApFieldText, ApFiledCheckbox };
|
|
6
|
+
export { ApFieldText, ApFiledCheckbox, ApFiledDate };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { InputProps, CheckboxGroupProps } from 'ant-design-vue';
|
|
1
|
+
import { InputProps, CheckboxGroupProps, DatePickerProps } from 'ant-design-vue';
|
|
2
2
|
import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { PickerBaseProps, PickerDateProps, PickerTimeProps } from 'ant-design-vue/es/date-picker/generatePicker';
|
|
3
|
+
import { ApFormatPresetType } from './date/interface';
|
|
4
|
+
import { PanelMode } from 'ant-design-vue/es/vc-picker/interface';
|
|
6
5
|
|
|
7
6
|
export type FieldMode = 'read' | 'edit';
|
|
8
7
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
@@ -21,11 +20,12 @@ export type ApFieldCheckboxProps = BasicApFieldProps<CheckboxGroupProps> & {
|
|
|
21
20
|
emptyText?: string;
|
|
22
21
|
request?: () => Promise<CheckboxGroupProps['options']>;
|
|
23
22
|
};
|
|
24
|
-
export type
|
|
25
|
-
export type ApFieldDateProps = BasicApFieldProps<OmitValue<PickerBaseProps<Dayjs>> | OmitValue<PickerDateProps<Dayjs>> | OmitValue<PickerTimeProps<Dayjs>>> & {
|
|
23
|
+
export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' | 'value' | 'defaultValue'>> & {
|
|
26
24
|
emptyText?: string;
|
|
27
25
|
value?: number | null;
|
|
28
26
|
defaultValue?: number;
|
|
29
27
|
onChange?: (ts: number | null, dayStr: string) => void;
|
|
28
|
+
onOk?: (ts: number | null) => void;
|
|
30
29
|
format?: ApFormatPresetType;
|
|
30
|
+
pickerMode?: PanelMode | undefined;
|
|
31
31
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as v, watch as c } from "vue";
|
|
2
|
-
function
|
|
3
|
-
const d = (e == null ? void 0 : e.defaultValuePropName) || "defaultValue",
|
|
4
|
-
|
|
2
|
+
function t(a, f, e) {
|
|
3
|
+
const d = (e == null ? void 0 : e.defaultValuePropName) || "defaultValue", u = (e == null ? void 0 : e.valuePropName) || "value", r = v(
|
|
4
|
+
a[d] || (e == null ? void 0 : e.defaultValue)
|
|
5
5
|
);
|
|
6
|
-
function m(
|
|
7
|
-
u
|
|
6
|
+
function m(l) {
|
|
7
|
+
a[u] === void 0 && (r.value = l), f(`update:${u}`, l);
|
|
8
8
|
}
|
|
9
9
|
return c(
|
|
10
|
-
() => u
|
|
11
|
-
(
|
|
12
|
-
u
|
|
10
|
+
() => a[u],
|
|
11
|
+
(l) => {
|
|
12
|
+
a[u] !== void 0 && (r.value = l);
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
immediate: !0
|
|
@@ -20,5 +20,5 @@ function V(u, f, e) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
t as useControllableValue
|
|
24
24
|
};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: 520px;
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
|
-
.ant-modal .ant-modal-body > .scrollbar {
|
|
21
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar {
|
|
22
22
|
padding: 14px;
|
|
23
23
|
}
|
|
24
24
|
.ant-modal-title {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.ant-modal .ant-modal-body {
|
|
32
32
|
padding: 0;
|
|
33
33
|
}
|
|
34
|
-
.ant-modal .ant-modal-body > .scrollbar > .scrollbar__bar.is-horizontal {
|
|
34
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar > .aplus-scrollbar__bar.is-horizontal {
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
.ant-modal-large {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: 520px;
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
|
-
.ant-modal .ant-modal-body > .scrollbar {
|
|
21
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar {
|
|
22
22
|
padding: 14px;
|
|
23
23
|
}
|
|
24
24
|
.ant-modal-title {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.ant-modal .ant-modal-body {
|
|
32
32
|
padding: 0;
|
|
33
33
|
}
|
|
34
|
-
.ant-modal .ant-modal-body > .scrollbar > .scrollbar__bar.is-horizontal {
|
|
34
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar > .aplus-scrollbar__bar.is-horizontal {
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
.ant-modal-large {
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { PickerMode } from 'ant-design-vue/es/vc-picker/interface';
|
|
2
|
+
import { ApFormatPresetType } from './interface';
|
|
3
|
+
|
|
4
|
+
export declare const ApFieldDatePresetFormats: string[];
|
|
5
|
+
export declare const PRESET_FORMAT_MAP: Record<ApFormatPresetType, string>;
|
|
6
|
+
export declare const PRESET_FORMAT_PICK_MAP: Record<ApFormatPresetType, PickerMode>;
|
|
7
|
+
export declare const PRESET_FORMAT_TIME_MAP: Record<ApFormatPresetType, {
|
|
8
|
+
showTime: boolean;
|
|
9
|
+
showSecond?: boolean;
|
|
10
|
+
showMinute?: boolean;
|
|
11
|
+
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as ApFieldText } from './text/index.vue';
|
|
2
2
|
import { default as ApFiledCheckbox } from './checkbox/index.vue';
|
|
3
|
+
import { default as ApFiledDate } from './date/index.vue';
|
|
3
4
|
|
|
4
5
|
export * from './interface';
|
|
5
|
-
export { ApFieldText, ApFiledCheckbox };
|
|
6
|
+
export { ApFieldText, ApFiledCheckbox, ApFiledDate };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { InputProps, CheckboxGroupProps } from 'ant-design-vue';
|
|
1
|
+
import { InputProps, CheckboxGroupProps, DatePickerProps } from 'ant-design-vue';
|
|
2
2
|
import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { PickerBaseProps, PickerDateProps, PickerTimeProps } from 'ant-design-vue/es/date-picker/generatePicker';
|
|
3
|
+
import { ApFormatPresetType } from './date/interface';
|
|
4
|
+
import { PanelMode } from 'ant-design-vue/es/vc-picker/interface';
|
|
6
5
|
|
|
7
6
|
export type FieldMode = 'read' | 'edit';
|
|
8
7
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
@@ -21,11 +20,12 @@ export type ApFieldCheckboxProps = BasicApFieldProps<CheckboxGroupProps> & {
|
|
|
21
20
|
emptyText?: string;
|
|
22
21
|
request?: () => Promise<CheckboxGroupProps['options']>;
|
|
23
22
|
};
|
|
24
|
-
export type
|
|
25
|
-
export type ApFieldDateProps = BasicApFieldProps<OmitValue<PickerBaseProps<Dayjs>> | OmitValue<PickerDateProps<Dayjs>> | OmitValue<PickerTimeProps<Dayjs>>> & {
|
|
23
|
+
export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' | 'value' | 'defaultValue'>> & {
|
|
26
24
|
emptyText?: string;
|
|
27
25
|
value?: number | null;
|
|
28
26
|
defaultValue?: number;
|
|
29
27
|
onChange?: (ts: number | null, dayStr: string) => void;
|
|
28
|
+
onOk?: (ts: number | null) => void;
|
|
30
29
|
format?: ApFormatPresetType;
|
|
30
|
+
pickerMode?: PanelMode | undefined;
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue");function c(u,t,e){const f=(e==null?void 0:e.defaultValuePropName)||"defaultValue",a=(e==null?void 0:e.valuePropName)||"value",r=d.ref(u[f]||(e==null?void 0:e.defaultValue));function v(l){u[a]===void 0&&(r.value=l),t(`update:${a}`,l)}return d.watch(()=>u[a],l=>{u[a]!==void 0&&(r.value=l)},{immediate:!0}),{value:r,updateValue:v}}exports.useControllableValue=c;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: 520px;
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
|
-
.ant-modal .ant-modal-body > .scrollbar {
|
|
21
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar {
|
|
22
22
|
padding: 14px;
|
|
23
23
|
}
|
|
24
24
|
.ant-modal-title {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.ant-modal .ant-modal-body {
|
|
32
32
|
padding: 0;
|
|
33
33
|
}
|
|
34
|
-
.ant-modal .ant-modal-body > .scrollbar > .scrollbar__bar.is-horizontal {
|
|
34
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar > .aplus-scrollbar__bar.is-horizontal {
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
.ant-modal-large {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: 520px;
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
|
-
.ant-modal .ant-modal-body > .scrollbar {
|
|
21
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar {
|
|
22
22
|
padding: 14px;
|
|
23
23
|
}
|
|
24
24
|
.ant-modal-title {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.ant-modal .ant-modal-body {
|
|
32
32
|
padding: 0;
|
|
33
33
|
}
|
|
34
|
-
.ant-modal .ant-modal-body > .scrollbar > .scrollbar__bar.is-horizontal {
|
|
34
|
+
.ant-modal .ant-modal-body > .aplus-scrollbar > .aplus-scrollbar__bar.is-horizontal {
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
.ant-modal-large {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"dayjs": "^1.11.11",
|
|
52
52
|
"lodash-unified": "^1.0.3",
|
|
53
53
|
"sortablejs": "^1.15.2",
|
|
54
|
-
"@aplus-frontend/
|
|
55
|
-
"@aplus-frontend/
|
|
54
|
+
"@aplus-frontend/utils": "1.0.5",
|
|
55
|
+
"@aplus-frontend/hooks": "1.0.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"ant-design-vue": "^4.2.1"
|