@aplus-frontend/ui 0.5.10 → 0.5.12

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.
Files changed (44) hide show
  1. package/es/src/ap-field/select/index.vue.d.ts +12 -12
  2. package/es/src/ap-modal/index.d.ts +9 -2
  3. package/es/src/ap-modal/index.mjs +23 -8
  4. package/es/src/ap-modal/interface.d.ts +2 -1
  5. package/es/src/ap-modal/utils/createModal.mjs +43 -40
  6. package/es/src/ap-modal/utils/index.d.ts +1 -0
  7. package/es/src/ap-modal/utils/index.mjs +6 -4
  8. package/es/src/ap-modal/utils/methods.d.ts +3 -0
  9. package/es/src/ap-modal/utils/methods.mjs +34 -0
  10. package/es/src/ap-modal/utils/util.d.ts +1 -0
  11. package/es/src/ap-modal/utils/util.mjs +4 -0
  12. package/es/src/ap-table/constants.d.ts +6 -6
  13. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  14. package/es/src/business/ap-group-search/index.d.ts +18 -18
  15. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
  16. package/es/src/utils/config-provider-preset.mjs +21 -17
  17. package/es/src/utils/index.d.ts +1 -0
  18. package/es/src/utils/index.mjs +25 -21
  19. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  20. package/es/src/work-order-modal/work-order-modal.vue.mjs +27 -27
  21. package/lib/src/ap-field/select/index.vue.d.ts +12 -12
  22. package/lib/src/ap-modal/index.d.ts +9 -2
  23. package/lib/src/ap-modal/index.js +1 -1
  24. package/lib/src/ap-modal/interface.d.ts +2 -1
  25. package/lib/src/ap-modal/utils/createModal.js +1 -1
  26. package/lib/src/ap-modal/utils/index.d.ts +1 -0
  27. package/lib/src/ap-modal/utils/index.js +1 -1
  28. package/lib/src/ap-modal/utils/methods.d.ts +3 -0
  29. package/lib/src/ap-modal/utils/methods.js +1 -0
  30. package/lib/src/ap-modal/utils/util.d.ts +1 -0
  31. package/lib/src/ap-modal/utils/util.js +1 -0
  32. package/lib/src/ap-table/constants.d.ts +6 -6
  33. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  34. package/lib/src/business/ap-group-search/index.d.ts +18 -18
  35. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
  36. package/lib/src/utils/config-provider-preset.js +1 -1
  37. package/lib/src/utils/index.d.ts +1 -0
  38. package/lib/src/utils/index.js +1 -1
  39. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  40. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  41. package/package.json +1 -1
  42. package/theme/ap-tag/ap-tag.css +6 -6
  43. package/theme/ap-tag/ap-tag.less +1 -2
  44. package/theme/index.css +6 -6
@@ -87,8 +87,8 @@ declare const ApExtensionSelect: {
87
87
  popupClassName: StringConstructor;
88
88
  dropdownClassName: StringConstructor;
89
89
  placement: {
90
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
91
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
90
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
91
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
92
92
  };
93
93
  status: {
94
94
  type: PropType<"" | "error" | "warning">;
@@ -269,8 +269,8 @@ declare const ApExtensionSelect: {
269
269
  popupClassName: StringConstructor;
270
270
  dropdownClassName: StringConstructor;
271
271
  placement: {
272
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
273
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
272
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
273
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
274
274
  };
275
275
  status: {
276
276
  type: PropType<"" | "error" | "warning">;
@@ -444,8 +444,8 @@ declare const ApExtensionSelect: {
444
444
  popupClassName: StringConstructor;
445
445
  dropdownClassName: StringConstructor;
446
446
  placement: {
447
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
448
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
447
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
448
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
449
449
  };
450
450
  status: {
451
451
  type: PropType<"" | "error" | "warning">;
@@ -623,8 +623,8 @@ declare const ApPopoverSelect: {
623
623
  popupClassName: StringConstructor;
624
624
  dropdownClassName: StringConstructor;
625
625
  placement: {
626
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
627
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
626
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
627
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
628
628
  };
629
629
  status: {
630
630
  type: PropType<"" | "error" | "warning">;
@@ -799,8 +799,8 @@ declare const ApPopoverSelect: {
799
799
  popupClassName: StringConstructor;
800
800
  dropdownClassName: StringConstructor;
801
801
  placement: {
802
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
803
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
802
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
803
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
804
804
  };
805
805
  status: {
806
806
  type: PropType<"" | "error" | "warning">;
@@ -946,7 +946,7 @@ declare const ApPopoverSelect: {
946
946
  status: "" | "error" | "warning";
947
947
  defaultValue: SelectValue;
948
948
  'onUpdate:value': (val: SelectValue) => void;
949
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
949
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
950
950
  loading: boolean;
951
951
  bordered: boolean;
952
952
  allowClear: boolean;
@@ -1010,8 +1010,8 @@ declare const ApPopoverSelect: {
1010
1010
  popupClassName: StringConstructor;
1011
1011
  dropdownClassName: StringConstructor;
1012
1012
  placement: {
1013
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1014
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1013
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1014
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1015
1015
  };
1016
1016
  status: {
1017
1017
  type: PropType<"" | "error" | "warning">;
@@ -1157,7 +1157,7 @@ declare const ApPopoverSelect: {
1157
1157
  status: "" | "error" | "warning";
1158
1158
  defaultValue: SelectValue;
1159
1159
  'onUpdate:value': (val: SelectValue) => void;
1160
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1160
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1161
1161
  loading: boolean;
1162
1162
  bordered: boolean;
1163
1163
  allowClear: boolean;
@@ -1209,8 +1209,8 @@ declare const ApPopoverSelect: {
1209
1209
  popupClassName: StringConstructor;
1210
1210
  dropdownClassName: StringConstructor;
1211
1211
  placement: {
1212
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1213
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1212
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1213
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1214
1214
  };
1215
1215
  status: {
1216
1216
  type: PropType<"" | "error" | "warning">;
@@ -1385,8 +1385,8 @@ declare const ApPopoverSelect: {
1385
1385
  popupClassName: StringConstructor;
1386
1386
  dropdownClassName: StringConstructor;
1387
1387
  placement: {
1388
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1389
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1388
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1389
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1390
1390
  };
1391
1391
  status: {
1392
1392
  type: PropType<"" | "error" | "warning">;
@@ -49,8 +49,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
49
49
  popupClassName: StringConstructor;
50
50
  dropdownClassName: StringConstructor;
51
51
  placement: {
52
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
53
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
52
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
53
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
54
54
  };
55
55
  status: {
56
56
  type: PropType<"" | "error" | "warning">;
@@ -196,7 +196,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
196
196
  status: "" | "error" | "warning";
197
197
  defaultValue: SelectValue;
198
198
  'onUpdate:value': (val: SelectValue) => void;
199
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
199
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
200
200
  loading: boolean;
201
201
  bordered: boolean;
202
202
  allowClear: boolean;
@@ -260,8 +260,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
260
260
  popupClassName: StringConstructor;
261
261
  dropdownClassName: StringConstructor;
262
262
  placement: {
263
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
264
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
263
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
264
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
265
265
  };
266
266
  status: {
267
267
  type: PropType<"" | "error" | "warning">;
@@ -407,7 +407,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
407
407
  status: "" | "error" | "warning";
408
408
  defaultValue: SelectValue;
409
409
  'onUpdate:value': (val: SelectValue) => void;
410
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
410
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
411
411
  loading: boolean;
412
412
  bordered: boolean;
413
413
  allowClear: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lodash-unified");function i(e,n){var t,r;return e!=null&&e.parentElement?e.parentElement.classList.contains(n)?(t=e.parentElement)!=null&&t.parentElement?(r=e.parentElement.parentElement.className)==null?void 0:r.includes("basic-table"):!1:i(e.parentElement,n):!1}const u=e=>i(e,"ant-form")&&(e==null?void 0:e.parentNode)||(document==null?void 0:document.body),f=({text:e})=>{const n=t=>t==null||t==="";return Array.isArray(e)?n(e[0])?"--":e[0]:n(e)?"--":e},c=!1,s={getPopupContainer:u,transformCellText:f,autoInsertSpaceInButton:c};function l(e){const n={...e},t=Object.keys(s);for(const r of t)a.isUndefined(n[r])&&(n[r]=s[r]);return n}function d(e,n){const t={...n},r=Object.keys(e);for(const o of r)a.isUndefined(e[o])||(t[o]=e[o]);return t}exports.antdConfigProviderPresets=s;exports.autoInsertSpaceInButton=c;exports.getPopupContainer=u;exports.mergeAntdProvideConfig=l;exports.mergeAntdProviderConfigWithCache=d;exports.transformCellText=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("lodash-unified"),a=require("./index.js");function u(e,n){var t,r;return e!=null&&e.parentElement?e.parentElement.classList.contains(n)?(t=e.parentElement)!=null&&t.parentElement?(r=e.parentElement.parentElement.className)==null?void 0:r.includes("basic-table"):!1:u(e.parentElement,n):!1}const f=e=>{var n,t;return u(e,"ant-form")?(e==null?void 0:e.parentNode)||((n=a.getTopWindow().document)==null?void 0:n.body):(t=a.getTopWindow().document)==null?void 0:t.body},c=({text:e})=>{const n=t=>t==null||t==="";return Array.isArray(e)?n(e[0])?"--":e[0]:n(e)?"--":e},d=!1,s={getPopupContainer:f,transformCellText:c,autoInsertSpaceInButton:d};function l(e){const n={...e},t=Object.keys(s);for(const r of t)i.isUndefined(n[r])&&(n[r]=s[r]);return n}function m(e,n){const t={...n},r=Object.keys(e);for(const o of r)i.isUndefined(e[o])||(t[o]=e[o]);return t}exports.antdConfigProviderPresets=s;exports.autoInsertSpaceInButton=d;exports.getPopupContainer=f;exports.mergeAntdProvideConfig=l;exports.mergeAntdProviderConfigWithCache=m;exports.transformCellText=c;
@@ -40,3 +40,4 @@ export declare function runFunction<T extends any[]>(func: any, ...restParams: T
40
40
  */
41
41
  export declare function getRouteType(): "history" | "hash";
42
42
  export declare function getScrollbarSize(): number;
43
+ export declare function getTopWindow(): Window;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),f=require("lodash-unified"),l=require("@vueuse/core");function a(e){return(e==null?void 0:e.parentNode)??document.body}function d(e){return typeof e<"u"}function y(e){const t={};return Object.keys(e).map(n=>{t[n]=s.unref(e[n])}),t}function p(e,t=[],n){const o=Object.assign({},e),u=Object.keys(o);for(let r=0;r<u.length;r+=1){const i=u[r];(t.includes(i)||n!=null&&n(i,o[i]))&&delete o[i]}return o}function g(e){return/^[A-Z][A-Za-z]*$/.test(e)}function c(e){if(Array.isArray(e))return e.map(t=>c(t));if(typeof e=="object"&&e!==null){const t={};for(const n in e)t[n]=c(e[n]);return s.markRaw(t)}return e}function m(e){const t={...e};for(const n of Object.keys(t))f.isUndefined(t[n])&&delete t[n];return t}function h(e,...t){return typeof e=="function"?e(...t):e}function v(){const e="history";return typeof window>"u"?e:window.location.href.includes("#/")?"hash":e}function b(){if(!l.isClient)return 15;const e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const t=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),t}exports.convertReactiveToRaw=c;exports.getDynamicProps=y;exports.getPopupContainer=a;exports.getRouteType=v;exports.getScrollbarSize=b;exports.isDef=d;exports.isPascalCase=g;exports.omitUndefined=m;exports.omitWhen=p;exports.runFunction=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),f=require("lodash-unified"),l=require("@vueuse/core");function d(e){return(e==null?void 0:e.parentNode)??document.body}function a(e){return typeof e<"u"}function y(e){const t={};return Object.keys(e).map(n=>{t[n]=s.unref(e[n])}),t}function p(e,t=[],n){const o=Object.assign({},e),u=Object.keys(o);for(let r=0;r<u.length;r+=1){const i=u[r];(t.includes(i)||n!=null&&n(i,o[i]))&&delete o[i]}return o}function g(e){return/^[A-Z][A-Za-z]*$/.test(e)}function c(e){if(Array.isArray(e))return e.map(t=>c(t));if(typeof e=="object"&&e!==null){const t={};for(const n in e)t[n]=c(e[n]);return s.markRaw(t)}return e}function w(e){const t={...e};for(const n of Object.keys(t))f.isUndefined(t[n])&&delete t[n];return t}function m(e,...t){return typeof e=="function"?e(...t):e}function h(){const e="history";return typeof window>"u"?e:window.location.href.includes("#/")?"hash":e}function v(){if(!l.isClient)return 15;const e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const t=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),t}function b(){return(window.top!==window?window.top:window)??window}exports.convertReactiveToRaw=c;exports.getDynamicProps=y;exports.getPopupContainer=d;exports.getRouteType=h;exports.getScrollbarSize=v;exports.getTopWindow=b;exports.isDef=a;exports.isPascalCase=g;exports.omitUndefined=w;exports.omitWhen=p;exports.runFunction=m;
@@ -106,7 +106,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
106
106
  readonly hideRequiredMark?: boolean | undefined;
107
107
  readonly validateOnRuleChange?: boolean | undefined;
108
108
  readonly scrollToFirstError?: boolean | Options<any> | undefined;
109
- readonly onFieldsChange?: ((changedFields: FieldData[], allFields: ** @type { typeof __VLS_ctx.formRef } */).FieldData[]) => void) | undefined;
109
+ readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
110
110
  readonly onFinish?: ((values: any) => void) | undefined;
111
111
  readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
112
112
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),s=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const i=require("./interfaces.js");require("../config-provider/index.js");require("../hooks/index.js");const _=require("../config-provider/hooks/use-locale.js"),q=require("../config-provider/hooks/use-namespace.js"),M=require("../config-provider/hooks/use-global-config.js"),F=require("../hooks/useControllableValue.js"),N=require("../ap-form/items/select/index.vue.js"),T=require("../ap-form/items/radio/index.vue.js"),B=require("../ap-upload/apUpload.vue.js"),V=require("./help-message.vue2.js"),L=e.defineComponent({__name:"work-order-modal",props:{api:{type:Function},getOssAccess:{},prefixCls:{},visible:{type:Boolean},open:{type:Boolean},confirmLoading:{type:Boolean},title:{},closable:{type:Boolean},closeIcon:{},onOk:{type:Function},onCancel:{type:Function},"onUpdate:visible":{type:Function},"onUpdate:open":{type:Function},onChange:{type:Function},afterClose:{type:Function},centered:{type:Boolean},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean},forceRender:{type:Boolean},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function]},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean},keyboard:{type:Boolean},wrapProps:{},focusTriggerAfterClose:{type:Boolean},modalRender:{type:Function},mousePosition:{}},emits:["update:open","modalClose"],setup(g,{emit:v}){const{t}=_.useLocale(),{b:w}=q.useNamespace("work-order-modal"),p=v,d=e.ref(),a=e.ref(!1),l=g,b=M.useGlobalConfig("api"),{lang:C}=_.useLocale(),x=e.computed(()=>i.langMap[C.value]??"zh_CN"),{value:c,updateValue:h}=F.useControllableValue(l,p,{valuePropName:"open",defaultValue:!0}),f=async o=>{var n,k;const r=await((k=(n=b.value)==null?void 0:n.select)==null?void 0:k.call(n,{dictCode:o,locale:x.value}));return r==null?void 0:r.map(y=>({label:y.itemText,value:y.itemValue}))},O=async()=>{var o;if(!a.value)try{a.value=!0;const r=await((o=d.value)==null?void 0:o.validateFields());await l.api(r),a.value=!1,u.message.success("操作成功"),m()}catch{a.value=!1;return}},m=()=>{h(!1),c.value=!1,setTimeout(()=>{console.log(c.value)},500),p("modalClose")};return(o,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(u.Modal),e.mergeProps(l,{width:600,centered:!0,open:e.unref(c),title:e.unref(t)("ap.workOrderModal.createTickets"),"ok-text":e.unref(t)("ap.workOrderModal.submit"),"cancel-text":e.unref(t)("ap.workOrderModal.cancel"),mask:!0,"mask-closable":!0,"wrap-class-name":e.unref(w)(),closable:!0,"confirm-loading":a.value,onOk:O,onCancel:m}),{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm),{ref_key:"formRef",ref:d,colon:""},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsTitle"),name:"ticketsTitle",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Input),{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),maxlength:50,"show-count":!0},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(N.default),{label:e.unref(t)("ap.workOrderModal.ticketsType"),name:"ticketsType",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),request:()=>f(e.unref(i.DictCode).TicketsType)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsDetail"),name:"ticketsContent",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Textarea),{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),maxlength:300,"show-count":!1},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(T.default),{label:e.unref(t)("ap.workOrderModal.ticketsLevel"),name:"ticketsLevel",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{request:()=>f(e.unref(i.DictCode).TicketsLevel)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{name:"files",label:e.unref(t)("ap.workOrderModal.fileLabel")},{default:e.withCtx(()=>[e.createVNode(e.unref(B.default),{"dir-name":"WorkOrder","get-oss-access":l.getOssAccess,type:"multipleFile","need-name":{pathKey:"filePath",nameKey:"fileName"},accept:".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx","max-count":10,"max-size":50,"sub-title":e.h(V.default)},null,8,["get-oss-access","sub-title"])]),_:1},8,["label"])]),_:1},512)]),_:1},16,["open","title","ok-text","cancel-text","wrap-class-name","confirm-loading"])]))}});exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),s=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const i=require("./interfaces.js");require("../config-provider/index.js");require("../hooks/index.js");const _=require("../config-provider/hooks/use-locale.js"),O=require("../config-provider/hooks/use-namespace.js"),T=require("../config-provider/hooks/use-global-config.js"),F=require("../hooks/useControllableValue.js"),M=require("../ap-form/items/select/index.vue.js"),N=require("../ap-form/items/radio/index.vue.js"),B=require("../ap-upload/apUpload.vue.js"),V=require("./help-message.vue2.js"),L=e.defineComponent({__name:"work-order-modal",props:{api:{type:Function},getOssAccess:{},prefixCls:{},visible:{type:Boolean},open:{type:Boolean},confirmLoading:{type:Boolean},title:{},closable:{type:Boolean},closeIcon:{},onOk:{type:Function},onCancel:{type:Function},"onUpdate:visible":{type:Function},"onUpdate:open":{type:Function},onChange:{type:Function},afterClose:{type:Function},centered:{type:Boolean},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean},forceRender:{type:Boolean},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function]},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean},keyboard:{type:Boolean},wrapProps:{},focusTriggerAfterClose:{type:Boolean},modalRender:{type:Function},mousePosition:{}},emits:["update:open","modalClose"],setup(g,{emit:v}){const{t}=_.useLocale(),{b}=O.useNamespace("work-order-modal"),p=v,d=e.ref(),a=e.ref(!1),l=g,w=T.useGlobalConfig("api"),{lang:x}=_.useLocale(),C=e.computed(()=>i.langMap[x.value]??"zh_CN"),{value:c,updateValue:h}=F.useControllableValue(l,p,{valuePropName:"open",defaultValue:!0}),f=async r=>{var n,k;const o=await((k=(n=w.value)==null?void 0:n.select)==null?void 0:k.call(n,{dictCode:r,locale:C.value}));return o==null?void 0:o.map(y=>({label:y.itemText,value:y.itemValue}))},q=async()=>{var r;if(!a.value)try{a.value=!0;const o=await((r=d.value)==null?void 0:r.validateFields());await l.api(o),a.value=!1,u.message.success("操作成功"),m()}catch{a.value=!1;return}},m=()=>{h(!1),c.value=!1,setTimeout(()=>{console.log(c.value)},500),p("modalClose")};return(r,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(u.Modal),e.mergeProps(l,{width:600,centered:!0,open:e.unref(c),title:e.unref(t)("ap.workOrderModal.createTickets"),"ok-text":e.unref(t)("ap.workOrderModal.submit"),"cancel-text":e.unref(t)("ap.workOrderModal.cancel"),mask:!0,"mask-closable":!0,"wrap-class-name":e.unref(b)(),closable:!0,"confirm-loading":a.value,onOk:q,onCancel:m}),{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm),{ref_key:"formRef",ref:d,colon:""},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsTitle"),name:"ticketsTitle",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Input),{placeholder:e.unref(t)("ap.common.inputText"),maxlength:50,"show-count":!0},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(M.default),{label:e.unref(t)("ap.workOrderModal.ticketsType"),name:"ticketsType",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{placeholder:e.unref(t)("ap.common.chooseText"),request:()=>f(e.unref(i.DictCode).TicketsType)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{label:e.unref(t)("ap.workOrderModal.ticketsDetail"),name:"ticketsContent",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}]},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Textarea),{placeholder:e.unref(t)("ap.workOrderModal.pleaseEntry"),maxlength:300,"show-count":!1},null,8,["placeholder"])]),_:1},8,["label","rules"]),e.createVNode(e.unref(N.default),{label:e.unref(t)("ap.workOrderModal.ticketsLevel"),name:"ticketsLevel",rules:[{required:!0,message:e.unref(t)("ap.workOrderModal.noEmpty")}],field:{request:()=>f(e.unref(i.DictCode).TicketsLevel)}},null,8,["label","rules","field"]),e.createVNode(e.unref(s.ApForm).FormItem,{name:"files",label:e.unref(t)("ap.workOrderModal.fileLabel")},{default:e.withCtx(()=>[e.createVNode(e.unref(B.default),{"dir-name":"WorkOrder","get-oss-access":l.getOssAccess,type:"multipleFile","need-name":{pathKey:"filePath",nameKey:"fileName"},accept:".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx","max-count":10,"max-size":50,"sub-title":e.h(V.default)},null,8,["get-oss-access","sub-title"])]),_:1},8,["label"])]),_:1},512)]),_:1},16,["open","title","ok-text","cancel-text","wrap-class-name","confirm-loading"])]))}});exports.default=L;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -4,7 +4,7 @@
4
4
  display: inline-block;
5
5
  max-width: 100%;
6
6
  }
7
- .aplus-tag-inner-wrapper {
7
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper {
8
8
  display: inline-block;
9
9
  border-radius: 4px;
10
10
  border: 1px solid var(--tag-main-color);
@@ -12,30 +12,30 @@
12
12
  box-sizing: border-box;
13
13
  color: var(--tag-main-color);
14
14
  }
15
- .aplus-tag-inner-wrapper--large {
15
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--large {
16
16
  padding: 0 8px;
17
17
  line-height: 26px;
18
18
  height: 28px;
19
19
  font-size: 14px;
20
20
  }
21
- .aplus-tag-inner-wrapper--middle {
21
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--middle {
22
22
  line-height: 22px;
23
23
  padding: 0 8px;
24
24
  height: 24px;
25
25
  font-size: 12px;
26
26
  }
27
- .aplus-tag-inner-wrapper--small {
27
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--small {
28
28
  padding: 0 6px;
29
29
  line-height: 19px;
30
30
  height: 20px;
31
31
  font-size: 12px;
32
32
  }
33
- .aplus-tag-inner-wrapper--disabled {
33
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--disabled {
34
34
  border: 1px solid #DEE4ED;
35
35
  background-color: #526a900f;
36
36
  color: #8896b0;
37
37
  }
38
- .aplus-tag-inner-wrapper--disabled-admin {
38
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--disabled-admin {
39
39
  border: 1px solid #d9d9d9;
40
40
  background-color: #9999990f;
41
41
  color: #999;
@@ -8,14 +8,13 @@
8
8
  max-width: 100%;
9
9
  }
10
10
 
11
- &-inner-wrapper {
11
+ &-wrapper &-inner-wrapper {
12
12
  display: inline-block;
13
13
  border-radius: 4px;
14
14
  border: 1px solid var(--tag-main-color);
15
15
  background-color: var(--tag-main-color-opacity);
16
16
  box-sizing: border-box;
17
17
  color: var(--tag-main-color);
18
-
19
18
  &--large {
20
19
  padding: 0 8px;
21
20
  line-height: 26px;
package/theme/index.css CHANGED
@@ -1185,7 +1185,7 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
1185
1185
  display: inline-block;
1186
1186
  max-width: 100%;
1187
1187
  }
1188
- .aplus-tag-inner-wrapper {
1188
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper {
1189
1189
  display: inline-block;
1190
1190
  border-radius: 4px;
1191
1191
  border: 1px solid var(--tag-main-color);
@@ -1193,30 +1193,30 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
1193
1193
  box-sizing: border-box;
1194
1194
  color: var(--tag-main-color);
1195
1195
  }
1196
- .aplus-tag-inner-wrapper--large {
1196
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--large {
1197
1197
  padding: 0 8px;
1198
1198
  line-height: 26px;
1199
1199
  height: 28px;
1200
1200
  font-size: 14px;
1201
1201
  }
1202
- .aplus-tag-inner-wrapper--middle {
1202
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--middle {
1203
1203
  line-height: 22px;
1204
1204
  padding: 0 8px;
1205
1205
  height: 24px;
1206
1206
  font-size: 12px;
1207
1207
  }
1208
- .aplus-tag-inner-wrapper--small {
1208
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--small {
1209
1209
  padding: 0 6px;
1210
1210
  line-height: 19px;
1211
1211
  height: 20px;
1212
1212
  font-size: 12px;
1213
1213
  }
1214
- .aplus-tag-inner-wrapper--disabled {
1214
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--disabled {
1215
1215
  border: 1px solid #DEE4ED;
1216
1216
  background-color: #526a900f;
1217
1217
  color: #8896b0;
1218
1218
  }
1219
- .aplus-tag-inner-wrapper--disabled-admin {
1219
+ .aplus-tag-wrapper .aplus-tag-inner-wrapper--disabled-admin {
1220
1220
  border: 1px solid #d9d9d9;
1221
1221
  background-color: #9999990f;
1222
1222
  color: #999;