@aplus-frontend/ui 0.0.28 → 0.0.30
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-download/hooks/index.mjs +4 -3
- package/es/src/ap-download/interface.d.ts +2 -2
- package/es/src/ap-field/date/helper.mjs +5 -5
- package/es/src/ap-field/date-range/index.vue.mjs +15 -15
- package/es/src/ap-form/ap-form-list.vue.mjs +29 -21
- package/es/src/ap-form/ap-form.vue2.mjs +77 -77
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/search-form/index.vue.mjs +123 -99
- package/es/src/ap-form/style/search-form.css +6 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +23 -21
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -11
- package/es/src/ap-upload/apUpload.vue.mjs +42 -36
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +115 -102
- package/es/src/ap-upload/components/Picture.vue2.mjs +121 -111
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +120 -109
- package/es/src/ap-upload/hooks/useOss.d.ts +9 -4
- package/es/src/ap-upload/hooks/useOss.mjs +52 -34
- package/es/src/ap-upload/styles/multiple-file.css +1 -1
- package/es/src/ap-upload/utils/accept.d.ts +3 -0
- package/es/src/ap-upload/utils/accept.mjs +35 -30
- package/es/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
- package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +7 -6
- package/es/src/business/ap-status/interface.d.ts +4 -1
- package/es/src/business/index.d.ts +41 -8
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +9 -8
- package/es/src/config-provider/constants.d.ts +10 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/editable-table/style/index.css +3 -0
- package/es/src/locale/lang/en.mjs +24 -0
- package/es/src/locale/lang/zh-cn.mjs +24 -0
- package/es/src/theme/ap-form/search-form.css +6 -0
- package/es/src/theme/ap-upload/multiple-file.css +1 -1
- package/es/src/theme/editable-table/index.css +3 -0
- package/es/src/work-order-modal/createWorkOrder.d.ts +3 -1
- package/es/src/work-order-modal/interfaces.d.ts +3 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +7 -7
- package/lib/src/ap-download/hooks/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +2 -2
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/search-form.css +6 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -11
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/ap-upload/hooks/useOss.d.ts +9 -4
- package/lib/src/ap-upload/hooks/useOss.js +1 -1
- package/lib/src/ap-upload/styles/multiple-file.css +1 -1
- package/lib/src/ap-upload/utils/accept.d.ts +3 -0
- package/lib/src/ap-upload/utils/accept.js +1 -1
- package/lib/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
- package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-status/interface.d.ts +4 -1
- package/lib/src/business/index.d.ts +41 -8
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +10 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/editable-table/style/index.css +3 -0
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-form/search-form.css +6 -0
- package/lib/src/theme/ap-upload/multiple-file.css +1 -1
- package/lib/src/theme/editable-table/index.css +3 -0
- package/lib/src/work-order-modal/createWorkOrder.d.ts +3 -1
- package/lib/src/work-order-modal/interfaces.d.ts +3 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, computed as p, openBlock as a, createElementBlock as r, normalizeClass as d, unref as c, normalizeStyle as i, Fragment as m, renderList as f, createBlock as g, createCommentVNode as y } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import "./ApStatus.vue.mjs";
|
|
4
4
|
import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
5
5
|
import x from "./ApStatus.vue2.mjs";
|
|
6
|
-
const
|
|
6
|
+
const w = /* @__PURE__ */ l({
|
|
7
7
|
name: "ApStatusGroup",
|
|
8
8
|
__name: "ApStatusGroup",
|
|
9
9
|
props: {
|
|
10
10
|
padding: { default: 8 },
|
|
11
11
|
currentValue: { default: 0 },
|
|
12
12
|
statusList: { default: null },
|
|
13
|
-
style: {}
|
|
13
|
+
style: {},
|
|
14
|
+
show: { type: Boolean, default: !0 }
|
|
14
15
|
},
|
|
15
16
|
setup(o) {
|
|
16
|
-
const t = o, n =
|
|
17
|
+
const t = o, n = p(() => ({
|
|
17
18
|
"padding-left": t.padding + "px",
|
|
18
19
|
"padding-right": t.padding + "px",
|
|
19
20
|
...t.style
|
|
20
21
|
})), { b: s } = _("ap-status-group");
|
|
21
|
-
return (u,
|
|
22
|
+
return (u, h) => t.statusList ? (a(), r("div", {
|
|
22
23
|
key: 0,
|
|
23
24
|
class: d([c(s)()]),
|
|
24
25
|
style: i(n.value)
|
|
@@ -34,5 +35,5 @@ const C = /* @__PURE__ */ p({
|
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
w as default
|
|
38
39
|
};
|
|
@@ -5,12 +5,15 @@ export type ApStatusProps = {
|
|
|
5
5
|
show?: boolean;
|
|
6
6
|
style?: object;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ApStatusGroupItemUnion = Pick<ApStatusProps, 'text' | 'color'> & {
|
|
9
9
|
value: number | string;
|
|
10
10
|
};
|
|
11
|
+
export type ApStatusGroupItemProps = Required<ApStatusGroupItemUnion>;
|
|
11
12
|
export type ApStatusGroupProps = {
|
|
12
13
|
padding: number;
|
|
13
14
|
currentValue: number | string;
|
|
14
15
|
statusList: ApStatusGroupItemProps[] | null;
|
|
15
16
|
style?: object;
|
|
17
|
+
show?: boolean;
|
|
16
18
|
};
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties } from 'vue';
|
|
2
2
|
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
3
3
|
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
|
-
import {
|
|
4
|
+
import { ApStatusProps } from './ap-status/interface';
|
|
5
5
|
export type { ApTitleProps } from './title/interface';
|
|
6
6
|
export type { ApExpandAlertProps } from './expandAlert/interface';
|
|
7
7
|
export type { ApLabelProps } from './ap-label/interface';
|
|
@@ -711,13 +711,19 @@ export declare const ApStatusGroup: {
|
|
|
711
711
|
required: true;
|
|
712
712
|
default: number;
|
|
713
713
|
};
|
|
714
|
+
show: {
|
|
715
|
+
type: PropType<boolean>;
|
|
716
|
+
default: boolean;
|
|
717
|
+
};
|
|
714
718
|
currentValue: {
|
|
715
719
|
type: PropType<string | number>;
|
|
716
720
|
required: true;
|
|
717
721
|
default: number;
|
|
718
722
|
};
|
|
719
723
|
statusList: {
|
|
720
|
-
type: PropType<
|
|
724
|
+
type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
725
|
+
value: string | number;
|
|
726
|
+
}>[] | null>;
|
|
721
727
|
required: true;
|
|
722
728
|
default: null;
|
|
723
729
|
};
|
|
@@ -730,20 +736,29 @@ export declare const ApStatusGroup: {
|
|
|
730
736
|
required: true;
|
|
731
737
|
default: number;
|
|
732
738
|
};
|
|
739
|
+
show: {
|
|
740
|
+
type: PropType<boolean>;
|
|
741
|
+
default: boolean;
|
|
742
|
+
};
|
|
733
743
|
currentValue: {
|
|
734
744
|
type: PropType<string | number>;
|
|
735
745
|
required: true;
|
|
736
746
|
default: number;
|
|
737
747
|
};
|
|
738
748
|
statusList: {
|
|
739
|
-
type: PropType<
|
|
749
|
+
type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
750
|
+
value: string | number;
|
|
751
|
+
}>[] | null>;
|
|
740
752
|
required: true;
|
|
741
753
|
default: null;
|
|
742
754
|
};
|
|
743
755
|
}>>, {
|
|
744
756
|
padding: number;
|
|
757
|
+
show: boolean;
|
|
745
758
|
currentValue: string | number;
|
|
746
|
-
statusList:
|
|
759
|
+
statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
760
|
+
value: string | number;
|
|
761
|
+
}>[] | null;
|
|
747
762
|
}, true, {}, {}, {
|
|
748
763
|
P: {};
|
|
749
764
|
B: {};
|
|
@@ -760,20 +775,29 @@ export declare const ApStatusGroup: {
|
|
|
760
775
|
required: true;
|
|
761
776
|
default: number;
|
|
762
777
|
};
|
|
778
|
+
show: {
|
|
779
|
+
type: PropType<boolean>;
|
|
780
|
+
default: boolean;
|
|
781
|
+
};
|
|
763
782
|
currentValue: {
|
|
764
783
|
type: PropType<string | number>;
|
|
765
784
|
required: true;
|
|
766
785
|
default: number;
|
|
767
786
|
};
|
|
768
787
|
statusList: {
|
|
769
|
-
type: PropType<
|
|
788
|
+
type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
789
|
+
value: string | number;
|
|
790
|
+
}>[] | null>;
|
|
770
791
|
required: true;
|
|
771
792
|
default: null;
|
|
772
793
|
};
|
|
773
794
|
}>>, {}, {}, {}, {}, {
|
|
774
795
|
padding: number;
|
|
796
|
+
show: boolean;
|
|
775
797
|
currentValue: string | number;
|
|
776
|
-
statusList:
|
|
798
|
+
statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
799
|
+
value: string | number;
|
|
800
|
+
}>[] | null;
|
|
777
801
|
}>;
|
|
778
802
|
__isFragment?: undefined;
|
|
779
803
|
__isTeleport?: undefined;
|
|
@@ -787,20 +811,29 @@ export declare const ApStatusGroup: {
|
|
|
787
811
|
required: true;
|
|
788
812
|
default: number;
|
|
789
813
|
};
|
|
814
|
+
show: {
|
|
815
|
+
type: PropType<boolean>;
|
|
816
|
+
default: boolean;
|
|
817
|
+
};
|
|
790
818
|
currentValue: {
|
|
791
819
|
type: PropType<string | number>;
|
|
792
820
|
required: true;
|
|
793
821
|
default: number;
|
|
794
822
|
};
|
|
795
823
|
statusList: {
|
|
796
|
-
type: PropType<
|
|
824
|
+
type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
825
|
+
value: string | number;
|
|
826
|
+
}>[] | null>;
|
|
797
827
|
required: true;
|
|
798
828
|
default: null;
|
|
799
829
|
};
|
|
800
830
|
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
801
831
|
padding: number;
|
|
832
|
+
show: boolean;
|
|
802
833
|
currentValue: string | number;
|
|
803
|
-
statusList:
|
|
834
|
+
statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
|
|
835
|
+
value: string | number;
|
|
836
|
+
}>[] | null;
|
|
804
837
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
|
|
805
838
|
$props: {
|
|
806
839
|
onClick?: (() => void) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig } from './constants';
|
|
3
|
+
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig } from './constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig, SizeType, ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
@@ -148,5 +148,9 @@ export declare const configProviderProps: () => {
|
|
|
148
148
|
type: PropType<"aplus" | "admin">;
|
|
149
149
|
default: string;
|
|
150
150
|
};
|
|
151
|
+
apUpload: {
|
|
152
|
+
type: PropType<ApUploadConfig>;
|
|
153
|
+
default: () => {};
|
|
154
|
+
};
|
|
151
155
|
};
|
|
152
156
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
@@ -8,7 +8,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
8
8
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
9
9
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
10
10
|
import { LocaleType } from '..';
|
|
11
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from './constants';
|
|
11
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from './constants';
|
|
12
12
|
export declare const ConfigProvider: DefineComponent<{
|
|
13
13
|
iconPrefixCls: StringConstructor;
|
|
14
14
|
getTargetContainer: {
|
|
@@ -146,6 +146,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
146
146
|
type: PropType<"aplus" | "admin">;
|
|
147
147
|
default: string;
|
|
148
148
|
};
|
|
149
|
+
apUpload: {
|
|
150
|
+
type: PropType<ApUploadConfig>;
|
|
151
|
+
default: () => {};
|
|
152
|
+
};
|
|
149
153
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
150
154
|
iconPrefixCls: StringConstructor;
|
|
151
155
|
getTargetContainer: {
|
|
@@ -283,6 +287,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
283
287
|
type: PropType<"aplus" | "admin">;
|
|
284
288
|
default: string;
|
|
285
289
|
};
|
|
290
|
+
apUpload: {
|
|
291
|
+
type: PropType<ApUploadConfig>;
|
|
292
|
+
default: () => {};
|
|
293
|
+
};
|
|
286
294
|
}>>, {
|
|
287
295
|
theme: ThemeConfig;
|
|
288
296
|
direction: "ltr" | "rtl";
|
|
@@ -319,5 +327,6 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
319
327
|
api: ApiType;
|
|
320
328
|
scrollbar: ScrollbarGlobalConfig;
|
|
321
329
|
uiMode: "aplus" | "admin";
|
|
330
|
+
apUpload: ApUploadConfig;
|
|
322
331
|
}, {}>;
|
|
323
332
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { provideGlobalConfig as
|
|
1
|
+
import { isVNode as a, defineComponent as n, computed as l, createVNode as f, renderSlot as c } from "vue";
|
|
2
|
+
import { ConfigProvider as d } from "ant-design-vue";
|
|
3
|
+
import { provideGlobalConfig as m } from "./hooks/use-global-config.mjs";
|
|
4
4
|
import { configProviderProps as u } from "./config-provider-props.mjs";
|
|
5
5
|
import { tableDefaultConfig as p } from "./constants.mjs";
|
|
6
6
|
import { mergeAntdProvideConfig as g } from "../utils/config-provider-preset.mjs";
|
|
7
7
|
function b(o) {
|
|
8
|
-
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !
|
|
8
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !a(o);
|
|
9
9
|
}
|
|
10
|
-
const y = /* @__PURE__ */
|
|
10
|
+
const y = /* @__PURE__ */ n({
|
|
11
11
|
name: "AplusConfigProvider",
|
|
12
12
|
props: u(),
|
|
13
13
|
setup(o, {
|
|
@@ -22,11 +22,12 @@ const y = /* @__PURE__ */ a({
|
|
|
22
22
|
...o.table || {}
|
|
23
23
|
},
|
|
24
24
|
scrollbar: o.scrollbar,
|
|
25
|
-
uiMode: o.uiMode
|
|
26
|
-
|
|
25
|
+
uiMode: o.uiMode,
|
|
26
|
+
apUpload: o.apUpload
|
|
27
|
+
})), e = m(i);
|
|
27
28
|
return () => {
|
|
28
29
|
let t;
|
|
29
|
-
return f(
|
|
30
|
+
return f(d, g(o), b(t = c(r, "default", {
|
|
30
31
|
config: e == null ? void 0 : e.value
|
|
31
32
|
})) ? t : {
|
|
32
33
|
default: () => [t]
|
|
@@ -3,6 +3,7 @@ import { InjectionKey, Ref } from 'vue';
|
|
|
3
3
|
import { SizeType, SorterResult } from '../pro-table/types/table';
|
|
4
4
|
import { Fn } from '../type';
|
|
5
5
|
import { CommonOptionItem, ApiSelectOption } from '../pro-form/components/interface';
|
|
6
|
+
import { client } from '@aplus-frontend/oss';
|
|
6
7
|
|
|
7
8
|
export type ConfigProviderContext = Partial<ConfigProviderProps>;
|
|
8
9
|
export declare const configProviderContextKey: InjectionKey<Ref<ConfigProviderContext>>;
|
|
@@ -29,4 +30,13 @@ export type ApiType = {
|
|
|
29
30
|
radioGroup?: (args?: any) => Promise<CommonOptionItem[]>;
|
|
30
31
|
select?: (args?: any) => Promise<ApiSelectOption[]>;
|
|
31
32
|
};
|
|
33
|
+
export type ApUploadConfig = {
|
|
34
|
+
dirName?: string;
|
|
35
|
+
getOssAccess?: Parameters<typeof client.initOssClient>[0]['getOssAccess'];
|
|
36
|
+
needName?: boolean | {
|
|
37
|
+
pathKey?: string;
|
|
38
|
+
nameKey?: string;
|
|
39
|
+
};
|
|
40
|
+
accept?: string;
|
|
41
|
+
};
|
|
32
42
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MaybeRef } from '@aplus-frontend/utils';
|
|
2
2
|
import { App, Ref, ComputedRef, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from '../constants';
|
|
3
|
+
import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from '../constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
@@ -151,4 +151,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
151
151
|
type: PropType<"aplus" | "admin">;
|
|
152
152
|
default: string;
|
|
153
153
|
};
|
|
154
|
+
apUpload: {
|
|
155
|
+
type: PropType<ApUploadConfig>;
|
|
156
|
+
default: () => {};
|
|
157
|
+
};
|
|
154
158
|
}>>>> | undefined;
|
|
@@ -8,7 +8,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
8
8
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
9
9
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
10
10
|
import { LocaleType } from '..';
|
|
11
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from './constants';
|
|
11
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from './constants';
|
|
12
12
|
export * from './config-provider-props';
|
|
13
13
|
export * from './constants';
|
|
14
14
|
export * from './hooks/use-global-config';
|
|
@@ -153,6 +153,10 @@ export declare const APConfigProvider: {
|
|
|
153
153
|
type: PropType<"aplus" | "admin">;
|
|
154
154
|
default: string;
|
|
155
155
|
};
|
|
156
|
+
apUpload: {
|
|
157
|
+
type: PropType<ApUploadConfig>;
|
|
158
|
+
default: () => {};
|
|
159
|
+
};
|
|
156
160
|
}>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
157
161
|
iconPrefixCls: StringConstructor;
|
|
158
162
|
getTargetContainer: {
|
|
@@ -290,6 +294,10 @@ export declare const APConfigProvider: {
|
|
|
290
294
|
type: PropType<"aplus" | "admin">;
|
|
291
295
|
default: string;
|
|
292
296
|
};
|
|
297
|
+
apUpload: {
|
|
298
|
+
type: PropType<ApUploadConfig>;
|
|
299
|
+
default: () => {};
|
|
300
|
+
};
|
|
293
301
|
}>>, {
|
|
294
302
|
theme: ThemeConfig;
|
|
295
303
|
direction: "ltr" | "rtl";
|
|
@@ -326,6 +334,7 @@ export declare const APConfigProvider: {
|
|
|
326
334
|
api: ApiType;
|
|
327
335
|
scrollbar: ScrollbarGlobalConfig;
|
|
328
336
|
uiMode: "aplus" | "admin";
|
|
337
|
+
apUpload: ApUploadConfig;
|
|
329
338
|
}, true, {}, {}, {
|
|
330
339
|
P: {};
|
|
331
340
|
B: {};
|
|
@@ -470,6 +479,10 @@ export declare const APConfigProvider: {
|
|
|
470
479
|
type: PropType<"aplus" | "admin">;
|
|
471
480
|
default: string;
|
|
472
481
|
};
|
|
482
|
+
apUpload: {
|
|
483
|
+
type: PropType<ApUploadConfig>;
|
|
484
|
+
default: () => {};
|
|
485
|
+
};
|
|
473
486
|
}>>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
474
487
|
theme: ThemeConfig;
|
|
475
488
|
direction: "ltr" | "rtl";
|
|
@@ -506,6 +519,7 @@ export declare const APConfigProvider: {
|
|
|
506
519
|
api: ApiType;
|
|
507
520
|
scrollbar: ScrollbarGlobalConfig;
|
|
508
521
|
uiMode: "aplus" | "admin";
|
|
522
|
+
apUpload: ApUploadConfig;
|
|
509
523
|
}>;
|
|
510
524
|
__isFragment?: undefined;
|
|
511
525
|
__isTeleport?: undefined;
|
|
@@ -647,6 +661,10 @@ export declare const APConfigProvider: {
|
|
|
647
661
|
type: PropType<"aplus" | "admin">;
|
|
648
662
|
default: string;
|
|
649
663
|
};
|
|
664
|
+
apUpload: {
|
|
665
|
+
type: PropType<ApUploadConfig>;
|
|
666
|
+
default: () => {};
|
|
667
|
+
};
|
|
650
668
|
}>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
651
669
|
theme: ThemeConfig;
|
|
652
670
|
direction: "ltr" | "rtl";
|
|
@@ -683,6 +701,7 @@ export declare const APConfigProvider: {
|
|
|
683
701
|
api: ApiType;
|
|
684
702
|
scrollbar: ScrollbarGlobalConfig;
|
|
685
703
|
uiMode: "aplus" | "admin";
|
|
704
|
+
apUpload: ApUploadConfig;
|
|
686
705
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
|
|
687
706
|
$props: {
|
|
688
707
|
onClick?: (() => void) | undefined;
|
|
@@ -84,6 +84,30 @@ const e = {
|
|
|
84
84
|
totalLeft: "Total {total} items",
|
|
85
85
|
totalRight: "Page {page}"
|
|
86
86
|
}
|
|
87
|
+
},
|
|
88
|
+
apUpload: {
|
|
89
|
+
update: "上传",
|
|
90
|
+
pictureType: "图片类型",
|
|
91
|
+
videoType: "视频类型",
|
|
92
|
+
audioType: "音频类型",
|
|
93
|
+
documentType: "文档类型",
|
|
94
|
+
allTypes: "全部类型",
|
|
95
|
+
networkAnomaly: "网络异常",
|
|
96
|
+
FailedToObtainOssTemporaryPermissions: "获取oss临时权限失败",
|
|
97
|
+
pleasePass: "请传入",
|
|
98
|
+
supportExtension: "支持扩展名",
|
|
99
|
+
uploadFile: "上传文件",
|
|
100
|
+
fileInitializationException: "文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",
|
|
101
|
+
maxUploadFiles: "最多上传{maxCount}个文件",
|
|
102
|
+
maxUploadPicture: "最多上传{maxCount}个图片",
|
|
103
|
+
maxUploadFileSize: "文件大小不超过{maxSize}MB",
|
|
104
|
+
maxWarnUploadFileSize: "文件大小小于{maxSize}MB",
|
|
105
|
+
maxUploadPictureSize: "图片大小小于{maxSize}MB",
|
|
106
|
+
fileFormatNotSupported: "不支持该格式的文件",
|
|
107
|
+
pictureFormatNotSupported: "不支持该格式的图片",
|
|
108
|
+
imageParsingFailed: "图片解析失败",
|
|
109
|
+
clickOrDragUpload: "点击或将文件拖拽到这里上传",
|
|
110
|
+
foldersNotSupported: "不支持上传文件夹"
|
|
87
111
|
}
|
|
88
112
|
}
|
|
89
113
|
};
|
|
@@ -84,6 +84,30 @@ const e = {
|
|
|
84
84
|
totalLeft: "共 {total} 条记录",
|
|
85
85
|
totalRight: "第 {page} 页"
|
|
86
86
|
}
|
|
87
|
+
},
|
|
88
|
+
apUpload: {
|
|
89
|
+
update: "上传",
|
|
90
|
+
pictureType: "图片类型",
|
|
91
|
+
videoType: "视频类型",
|
|
92
|
+
audioType: "音频类型",
|
|
93
|
+
documentType: "文档类型",
|
|
94
|
+
allTypes: "全部类型",
|
|
95
|
+
networkAnomaly: "网络异常",
|
|
96
|
+
FailedToObtainOssTemporaryPermissions: "获取oss临时权限失败",
|
|
97
|
+
pleasePass: "请传入",
|
|
98
|
+
supportExtension: "支持扩展名",
|
|
99
|
+
uploadFile: "上传文件",
|
|
100
|
+
fileInitializationException: "文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",
|
|
101
|
+
maxUploadFiles: "最多上传{maxCount}个文件",
|
|
102
|
+
maxUploadPicture: "最多上传{maxCount}个图片",
|
|
103
|
+
maxUploadFileSize: "文件大小不超过{maxSize}MB",
|
|
104
|
+
maxWarnUploadFileSize: "文件大小小于{maxSize}MB",
|
|
105
|
+
maxUploadPictureSize: "图片大小小于{maxSize}MB",
|
|
106
|
+
fileFormatNotSupported: "不支持该格式的文件",
|
|
107
|
+
pictureFormatNotSupported: "不支持该格式的图片",
|
|
108
|
+
imageParsingFailed: "图片解析失败",
|
|
109
|
+
clickOrDragUpload: "点击或将文件拖拽到这里上传",
|
|
110
|
+
foldersNotSupported: "不支持上传文件夹"
|
|
87
111
|
}
|
|
88
112
|
}
|
|
89
113
|
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { GetOssAccess } from './interfaces';
|
|
2
|
+
|
|
3
|
+
export declare function createWorkOrderModal(api: (args?: any) => Promise<any>, getOssAccess: GetOssAccess): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { client } from '@aplus-frontend/oss';
|
|
1
2
|
import { ModalProps } from 'ant-design-vue';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -17,7 +18,8 @@ export declare enum DictCode {
|
|
|
17
18
|
TicketsType = "tickets_type",
|
|
18
19
|
TicketsLevel = "tickets_level"
|
|
19
20
|
}
|
|
21
|
+
export type GetOssAccess = Parameters<typeof client.initOssClient>[0]['getOssAccess'];
|
|
20
22
|
export interface WorkOrderModalProps extends ModalProps {
|
|
21
23
|
api: (args?: any) => Promise<any>;
|
|
22
|
-
getOssAccess:
|
|
24
|
+
getOssAccess: GetOssAccess;
|
|
23
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as F, ref as g, openBlock as T, createElementBlock as N, createVNode as t, unref as e, mergeProps as O, h as m, withCtx as n } from "vue";
|
|
2
2
|
import { message as A, Modal as L, Input as P, Textarea as q } from "ant-design-vue";
|
|
3
3
|
import { ApForm as i } from "../ap-form/index.mjs";
|
|
4
4
|
import "./help-message.vue.mjs";
|
|
@@ -15,11 +15,11 @@ import $ from "../ap-form/items/select/index.vue.mjs";
|
|
|
15
15
|
import j from "../ap-form/items/radio/index.vue.mjs";
|
|
16
16
|
import z from "../ap-upload/apUpload.vue.mjs";
|
|
17
17
|
import D from "./help-message.vue2.mjs";
|
|
18
|
-
const
|
|
18
|
+
const ne = /* @__PURE__ */ F({
|
|
19
19
|
__name: "work-order-modal",
|
|
20
20
|
props: {
|
|
21
21
|
api: { type: Function },
|
|
22
|
-
getOssAccess: {
|
|
22
|
+
getOssAccess: {},
|
|
23
23
|
prefixCls: {},
|
|
24
24
|
visible: { type: Boolean },
|
|
25
25
|
open: { type: Boolean },
|
|
@@ -61,7 +61,7 @@ const re = /* @__PURE__ */ w({
|
|
|
61
61
|
},
|
|
62
62
|
emits: ["modalClose", "update:open"],
|
|
63
63
|
setup(C, { emit: x }) {
|
|
64
|
-
const { b: v
|
|
64
|
+
const { b: v } = I("work-order-modal"), c = x, p = g(), a = g(!1), r = C, b = V("api"), { lang: _ } = R(), { value: h, updateValue: B } = S(r, c, {
|
|
65
65
|
valuePropName: "open",
|
|
66
66
|
defaultValue: !0
|
|
67
67
|
}), u = async (l) => {
|
|
@@ -71,7 +71,7 @@ const re = /* @__PURE__ */ w({
|
|
|
71
71
|
locale: _.value
|
|
72
72
|
}));
|
|
73
73
|
return o == null ? void 0 : o.map((y) => ({ label: y.itemText, value: y.itemValue }));
|
|
74
|
-
},
|
|
74
|
+
}, w = async () => {
|
|
75
75
|
var l;
|
|
76
76
|
if (!a.value)
|
|
77
77
|
try {
|
|
@@ -97,7 +97,7 @@ const re = /* @__PURE__ */ w({
|
|
|
97
97
|
"mask-closable": !0,
|
|
98
98
|
wrapClassName: e(v)(),
|
|
99
99
|
closable: !0,
|
|
100
|
-
onOk:
|
|
100
|
+
onOk: w,
|
|
101
101
|
confirmLoading: a.value,
|
|
102
102
|
onCancel: f
|
|
103
103
|
}), {
|
|
@@ -181,5 +181,5 @@ const re = /* @__PURE__ */ w({
|
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
export {
|
|
184
|
-
|
|
184
|
+
ne as default
|
|
185
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@aplus-frontend/oss");function n(){return{client:t.client}}async function i(e){if(!e)throw new Error("请传入getOssAccess");return await t.client.initOssClient({locale:"zh_CN",getOssAccess:e,onFailure:s=>{throw new Error(typeof(s==null?void 0:s.message)=="string"?s.message:"获取oss临时权限失败")}}),n()}exports.useOss=n;exports.useOssInit=i;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface AccessCreate {
|
|
2
2
|
bucket: string;
|
|
3
3
|
regionId: string;
|
|
4
4
|
endpoint: string;
|
|
@@ -28,6 +28,6 @@ export interface ApDownLoadProps {
|
|
|
28
28
|
*/
|
|
29
29
|
disabled?: boolean;
|
|
30
30
|
fileName: string;
|
|
31
|
-
getOssAccess: () => Promise<
|
|
31
|
+
getOssAccess: () => Promise<AccessCreate>;
|
|
32
32
|
}
|
|
33
33
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@aplus-frontend/utils"),u=require("dayjs"),i=(e,o,r=!0)=>{if(!e)return null;let t=e.clone();return t=t.millisecond(0),o.indexOf("ss")===-1&&(t=t.second(r?0:59)),o.indexOf("mm")===-1&&(t=t.minute(r?0:59)),o.indexOf("HH")===-1&&(t=t.hour(r?0:23)),o.indexOf("DD")===-1&&(t=t.date(r?1:0),r||(t=t.month(t.month()+1))),o.indexOf("MM")===-1&&(t=t.month(r?0:12)),t.valueOf()};function f(e){return(o,r,t=!0)=>{const n=i(o,r,t);return e?a.getUtcTimestamp(u(n),e):n}}const m=e=>e&&e.valueOf();exports.formatDay=i;exports.formatDayWithTimezone=f;exports.formatValue=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../date/constant.js");require("../../hooks/index.js");const l=require("lodash-unified"),s=require("dayjs"),R=require("ant-design-vue"),k=require("../date/helper.js"),_=require("@ant-design/icons-vue"),w=require("../../utils/index.js"),h=require("@aplus-frontend/utils"),F=require("../../hooks/useControllableValue.js"),V=e.defineComponent({__name:"index",props:{mode:{default:"edit"},class:{},style:{},id:{},defaultPickerValue:{},placeholder:{},disabled:{type:[Boolean,Array],default:void 0},disabledTime:{},presets:{},ranges:{},separator:{type:[Object,String,Number,Boolean,null,Array],default:void 0},allowEmpty:{},onCalendarChange:{},onFocus:{},onBlur:{},onMousedown:{},onMouseup:{},onMouseenter:{},onMouseleave:{},onClick:{},direction:{},autocomplete:{},activePickerIndex:{},dateRender:{},panelRender:{},dropdownClassName:{},dropdownAlign:{},popupStyle:{},transitionName:{},allowClear:{type:Boolean,default:!0},autofocus:{type:Boolean,default:void 0},tabindex:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},suffixIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},clearIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},getPopupContainer:{},inputRender:{},onOpenChange:{},onContextmenu:{},onKeydown:{},role:{},name:{},picker:{},prefixCls:{},disabledDate:{},monthCellRender:{},locale:{},size:{},bordered:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},showNow:{type:Boolean,default:void 0},order:{type:Boolean,default:void 0},defaultOpenValue:{},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12Hours:{type:Boolean,default:void 0},hourStep:{},minuteStep:{},secondStep:{},hideDisabledOptions:{type:Boolean,default:void 0},disabledHours:{},disabledMinutes:{},disabledSeconds:{},valueFormat:{},emptyText:{default:"--"},value:{},defaultValue:{},onChange:{},onOk:{},format:{default:"Y-D"},timezone:{}},emits:["update:value"],setup(B,{emit:T}){const t=B,O=T,i=e.computed(()=>g.ApFieldDatePresetFormats.indexOf(t.format)>-1),u=e.computed(()=>i.value?g.PRESET_FORMAT_MAP[t.format]:t.format),{value:p,updateValue:y}=F.useControllableValue(t,O),f=k.formatDayWithTimezone(t.timezone),m=e.computed(()=>{var r,d;const o=e.unref(p);if(l.isNil(o)||!(o!=null&&o.length))return o;const a=t.timezone?h.getTimeFormatToZone(e.unref(p)[0],t.timezone):(r=e.unref(p))==null?void 0:r[0],n=t.timezone?h.getTimeFormatToZone(e.unref(p)[1],t.timezone):(d=e.unref(p))==null?void 0:d[1];return console.log("val",o,a,n),[s(a),s(n)]}),C=e.computed(()=>e.unref(i)?t.picker??g.PRESET_FORMAT_PICK_MAP[t.format]:t.picker),P=e.computed(()=>{const o=e.unref(i)?g.PRESET_FORMAT_TIME_MAP[t.format]:{};return{...w.omitUndefined(l.omit(t,["value","onUpdate:value","onChange","onOk","format","mode"])),...o}});function b(o){if(!o){y(o);return}let a=l.isString(o[0])?s(o[0]):o[0],n=l.isString(o[1])?s(o[1]):o[1];console.log(a,n),e.unref(i)?y([f(a,e.unref(u)),f(n,e.unref(u),!1)]):y([k.formatValue(a),k.formatValue(n)])}function D(o){var c;const a=l.isString(o[0])?s(o[0]):o[0],n=l.isString(o[1])?s(o[1]):o[1],r=o[0]?e.unref(i)?f(a,e.unref(u)):a.valueOf():null,d=o[1]?e.unref(i)?f(n,e.unref(u),!1):n.valueOf():null;(c=t.onOk)==null||c.call(t,[r,d])}function M(o,a){var v,S;if(l.isNil(o)){(v=t.onChange)==null||v.call(t,o,a);return}const n=l.isString(o[0])?s(o[0]):o[0],r=l.isString(o[1])?s(o[1]):o[1],d=o[0]?e.unref(i)?f(n,e.unref(u)):n.valueOf():null,c=o[1]?e.unref(i)?f(r,e.unref(u),!1):r.valueOf():null;(S=t.onChange)==null||S.call(t,[d,c],a)}return(o,a)=>{var n,r;return o.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((n=m.value[0])==null?void 0:n.format(u.value))+" ",1),e.renderSlot(o.$slots,"readModeSeparator",{},()=>[e.createVNode(e.unref(_.SwapRightOutlined))]),e.createTextVNode(" "+e.toDisplayString((r=m.value[1])==null?void 0:r.format(u.value)),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.emptyText),1)],64))],64)):(e.openBlock(),e.createBlock(e.unref(R.DatePicker).RangePicker,e.mergeProps({key:1},P.value,{value:m.value,"onUpdate:value":b,onChange:M,picker:C.value,format:u.value,onOk:D}),e.createSlots({_:2},[e.renderList(e.unref(l.omit)(o.$slots,"readModeSeparator"),(d,c)=>({name:c,fn:e.withCtx(v=>[e.renderSlot(o.$slots,c,e.normalizeProps(e.guardReactiveProps(v||{})))])}))]),1040,["value","picker","format"]))}}});exports.default=V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),y=require("./context.js"),F=require("lodash-unified"),V=t.defineComponent({name:"ApFormList",__name:"ap-form-list",props:{name:{},initialValue:{}},setup(f){let s=1;const i=[],u=f,{model:o,updateModel:r,internalInstance:l}=y.useInjectForm();t.onMounted(()=>{l==null||l.registerField({name:u.name,initialValue:u.initialValue})});const a=t.computed(()=>F.isArray(u.name)?u.name.reduce((e,n)=>e==null?void 0:e.value[n],o):o==null?void 0:o.value[u.name]);function d(e=void 0){const n=t.unref(a)?[...t.unref(a),e]:[e];i.push(s),s+=1,r==null||r(u.name,n)}function p(e){let n=t.unref(a)||[];n=[...n.slice(0,e),...n.slice(e+1)],i.splice(e,1),r==null||r(u.name,n)}const _={add:d,remove:p},v=t.computed(()=>(t.unref(a)||[]).map((n,c)=>{let m=i[c];return typeof m>"u"&&(i[c]=s,m=s,s+=1),{key:m,fieldName:c,name:[u.name,c],value:n}}));return(e,n)=>t.renderSlot(e.$slots,"default",{fields:v.value,actions:_})}});exports.default=V;
|