mali-ui-plus 1.0.164 → 1.0.166

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.
@@ -4064,7 +4064,7 @@ var last = __webpack_require__(3544);
4064
4064
  var has = __webpack_require__(7677);
4065
4065
  var get = __webpack_require__(8960);
4066
4066
  var set = __webpack_require__(1527);
4067
- var groupBy = __webpack_require__(112);
4067
+ var groupBy = __webpack_require__(7253);
4068
4068
  var countBy = __webpack_require__(3201);
4069
4069
  var range = __webpack_require__(5748);
4070
4070
  var destructuring = __webpack_require__(2421);
@@ -4738,7 +4738,7 @@ module.exports = copyWithin;
4738
4738
  /***/ 3201:
4739
4739
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4740
4740
 
4741
- var groupBy = __webpack_require__(112);
4741
+ var groupBy = __webpack_require__(7253);
4742
4742
  var objectEach = __webpack_require__(2192);
4743
4743
 
4744
4744
  /**
@@ -6014,7 +6014,7 @@ module.exports = getYearWeek;
6014
6014
 
6015
6015
  /***/ }),
6016
6016
 
6017
- /***/ 112:
6017
+ /***/ 7253:
6018
6018
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
6019
6019
 
6020
6020
  __webpack_require__(7658);
@@ -6930,7 +6930,7 @@ var last = __webpack_require__(3544);
6930
6930
  var has = __webpack_require__(7677);
6931
6931
  var get = __webpack_require__(8960);
6932
6932
  var set = __webpack_require__(1527);
6933
- var groupBy = __webpack_require__(112);
6933
+ var groupBy = __webpack_require__(7253);
6934
6934
  var countBy = __webpack_require__(3201);
6935
6935
  var range = __webpack_require__(5748);
6936
6936
  var destructuring = __webpack_require__(2421);
@@ -40455,6 +40455,7 @@ const MlTextareavue_type_script_lang_ts_setup_true_hoisted_1 = {
40455
40455
  type: String,
40456
40456
  default: 'none'
40457
40457
  },
40458
+ autosize: Object,
40458
40459
  showWordCount: {
40459
40460
  type: Boolean,
40460
40461
  default: true
@@ -40527,13 +40528,14 @@ const MlTextareavue_type_script_lang_ts_setup_true_hoisted_1 = {
40527
40528
  maxlength: __props.maxLength,
40528
40529
  placeholder: __props.placeholder,
40529
40530
  "show-word-count": __props.showWordCount,
40531
+ autosize: __props.autosize,
40530
40532
  readonly: __props.readonly,
40531
40533
  disabled: __props.disabled,
40532
40534
  resize: __props.resize,
40533
40535
  onInput: inputEvent,
40534
40536
  onFocus: focusEvent,
40535
40537
  onBlur: blurEvent
40536
- }, null, 8, ["modelValue", "rows", "maxlength", "placeholder", "show-word-count", "readonly", "disabled", "resize"]));
40538
+ }, null, 8, ["modelValue", "rows", "maxlength", "placeholder", "show-word-count", "autosize", "readonly", "disabled", "resize"]));
40537
40539
  };
40538
40540
  }
40539
40541
  }));
@@ -62216,8 +62218,8 @@ const style_removeClass = (el, cls) => {
62216
62218
  };
62217
62219
  const getStyle = (element, styleName) => {
62218
62220
  var _a;
62219
- if (!isClient || !element || !styleName) return "";
62220
- let key = camelize(styleName);
62221
+ if (!shared_isClient || !element || !styleName) return "";
62222
+ let key = shared_esm_bundler_camelize(styleName);
62221
62223
  if (key === "float") key = "cssFloat";
62222
62224
  try {
62223
62225
  const style = element.style[key];
@@ -69405,6 +69407,39 @@ notify._context = null;
69405
69407
 
69406
69408
  const ElNotification = withInstallFunction(notify, "$notify");
69407
69409
 
69410
+ ;// CONCATENATED MODULE: ./modal/notify.ts
69411
+
69412
+
69413
+ const MaliNotify = {
69414
+ success(option) {
69415
+ const opts = xe_utils_default().isString(option) ? {
69416
+ content: option
69417
+ } : {
69418
+ ...option
69419
+ };
69420
+ return ElNotification.success({
69421
+ title: opts.title,
69422
+ message: opts.content || '操作成功'
69423
+ });
69424
+ },
69425
+ error(option) {
69426
+ const opts = xe_utils_default().isString(option) ? {
69427
+ content: option
69428
+ } : {
69429
+ ...option
69430
+ };
69431
+ return ElNotification.error({
69432
+ title: opts.title,
69433
+ message: opts.content || '操作失败'
69434
+ });
69435
+ },
69436
+ hide() {
69437
+ return new Promise(resolve => {
69438
+ setTimeout(resolve, 2000);
69439
+ });
69440
+ }
69441
+ };
69442
+ /* harmony default export */ var modal_notify = (MaliNotify);
69408
69443
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/ml-form/MlForm.vue?vue&type=script&lang=ts&setup=true
69409
69444
 
69410
69445
 
@@ -69580,9 +69615,9 @@ const ElNotification = withInstallFunction(notify, "$notify");
69580
69615
  const $form = xForm.value;
69581
69616
  const errMap = await $form?.validate();
69582
69617
  if (errMap && props.ruleMsg) {
69583
- ElNotification.warning({
69618
+ modal_notify.error({
69584
69619
  title: '提示',
69585
- message: '请将必填字段填写完整'
69620
+ content: '请将必填字段填写完整'
69586
69621
  });
69587
69622
  }
69588
69623
  return errMap;
@@ -69618,9 +69653,9 @@ const ElNotification = withInstallFunction(notify, "$notify");
69618
69653
  };
69619
69654
  const submitInvalidEvent = params => {
69620
69655
  if (props.ruleMsg) {
69621
- ElNotification.warning({
69656
+ modal_notify.error({
69622
69657
  title: '提示',
69623
- message: '请将必填字段填写完整'
69658
+ content: '请将必填字段填写完整'
69624
69659
  });
69625
69660
  }
69626
69661
  emit('submit-invalid', params);
@@ -74851,47 +74886,318 @@ const MaliModal = {
74851
74886
  }
74852
74887
  };
74853
74888
  /* harmony default export */ var modal_modal_0 = (MaliModal);
74854
- ;// CONCATENATED MODULE: ./modal/notify.ts
74889
+ ;// CONCATENATED MODULE: ./node_modules/element-plus/es/components/loading/src/loading.mjs
74855
74890
 
74856
74891
 
74857
- const MaliNotify = {
74858
- success(option) {
74859
- const opts = xe_utils_default().isString(option) ? {
74860
- content: option
74861
- } : {
74862
- ...option
74863
- };
74864
- return ElNotification.success({
74865
- title: opts.title,
74866
- message: opts.content || '操作成功'
74867
- });
74892
+
74893
+
74894
+
74895
+ function createLoadingComponent(options) {
74896
+ let afterLeaveTimer;
74897
+ const ns = useNamespace("loading");
74898
+ const afterLeaveFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
74899
+ const data = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
74900
+ ...options,
74901
+ originalPosition: "",
74902
+ originalOverflow: "",
74903
+ visible: false
74904
+ });
74905
+ function setText(text) {
74906
+ data.text = text;
74907
+ }
74908
+ function destroySelf() {
74909
+ const target = data.parent;
74910
+ if (!target.vLoadingAddClassList) {
74911
+ let loadingNumber = target.getAttribute("loading-number");
74912
+ loadingNumber = Number.parseInt(loadingNumber) - 1;
74913
+ if (!loadingNumber) {
74914
+ style_removeClass(target, ns.bm("parent", "relative"));
74915
+ target.removeAttribute("loading-number");
74916
+ } else {
74917
+ target.setAttribute("loading-number", loadingNumber.toString());
74918
+ }
74919
+ style_removeClass(target, ns.bm("parent", "hidden"));
74920
+ }
74921
+ removeElLoadingChild();
74922
+ loadingInstance.unmount();
74923
+ }
74924
+ function removeElLoadingChild() {
74925
+ var _a, _b;
74926
+ (_b = (_a = vm.$el) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.removeChild(vm.$el);
74927
+ }
74928
+ function close() {
74929
+ var _a;
74930
+ if (options.beforeClose && !options.beforeClose()) return;
74931
+ afterLeaveFlag.value = true;
74932
+ clearTimeout(afterLeaveTimer);
74933
+ afterLeaveTimer = window.setTimeout(handleAfterLeave, 400);
74934
+ data.visible = false;
74935
+ (_a = options.closed) == null ? void 0 : _a.call(options);
74936
+ }
74937
+ function handleAfterLeave() {
74938
+ if (!afterLeaveFlag.value) return;
74939
+ const target = data.parent;
74940
+ afterLeaveFlag.value = false;
74941
+ target.vLoadingAddClassList = void 0;
74942
+ destroySelf();
74943
+ }
74944
+ const elLoadingComponent = {
74945
+ name: "ElLoading",
74946
+ setup() {
74947
+ return () => {
74948
+ const svg = data.spinner || data.svg;
74949
+ const spinner = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)("svg", {
74950
+ class: "circular",
74951
+ viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
74952
+ ...(svg ? {
74953
+ innerHTML: svg
74954
+ } : {})
74955
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)("circle", {
74956
+ class: "path",
74957
+ cx: "25",
74958
+ cy: "25",
74959
+ r: "20",
74960
+ fill: "none"
74961
+ })]);
74962
+ const spinnerText = data.text ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)("p", {
74963
+ class: ns.b("text")
74964
+ }, [data.text]) : void 0;
74965
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.Transition, {
74966
+ name: ns.b("fade"),
74967
+ onAfterLeave: handleAfterLeave
74968
+ }, {
74969
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)("div", {
74970
+ style: {
74971
+ backgroundColor: data.background || ""
74972
+ },
74973
+ class: [ns.b("mask"), data.customClass, data.fullscreen ? "is-fullscreen" : ""]
74974
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)("div", {
74975
+ class: ns.b("spinner")
74976
+ }, [spinner, spinnerText])]), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, data.visible]])])
74977
+ });
74978
+ };
74979
+ }
74980
+ };
74981
+ const loadingInstance = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createApp)(elLoadingComponent);
74982
+ const vm = loadingInstance.mount(document.createElement("div"));
74983
+ return {
74984
+ ...(0,external_commonjs_vue_commonjs2_vue_root_Vue_.toRefs)(data),
74985
+ setText,
74986
+ removeElLoadingChild,
74987
+ close,
74988
+ handleAfterLeave,
74989
+ vm,
74990
+ get $el() {
74991
+ return vm.$el;
74992
+ }
74993
+ };
74994
+ }
74995
+
74996
+ ;// CONCATENATED MODULE: ./node_modules/element-plus/es/components/loading/src/service.mjs
74997
+
74998
+
74999
+
75000
+
75001
+
75002
+
75003
+
75004
+
75005
+
75006
+ let fullscreenInstance = void 0;
75007
+ const service_Loading = function (options = {}) {
75008
+ if (!shared_isClient) return void 0;
75009
+ const resolved = resolveOptions(options);
75010
+ if (resolved.fullscreen && fullscreenInstance) {
75011
+ return fullscreenInstance;
75012
+ }
75013
+ const instance = createLoadingComponent({
75014
+ ...resolved,
75015
+ closed: () => {
75016
+ var _a;
75017
+ (_a = resolved.closed) == null ? void 0 : _a.call(resolved);
75018
+ if (resolved.fullscreen) fullscreenInstance = void 0;
75019
+ }
75020
+ });
75021
+ addStyle(resolved, resolved.parent, instance);
75022
+ addClassList(resolved, resolved.parent, instance);
75023
+ resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
75024
+ let loadingNumber = resolved.parent.getAttribute("loading-number");
75025
+ if (!loadingNumber) {
75026
+ loadingNumber = "1";
75027
+ } else {
75028
+ loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
75029
+ }
75030
+ resolved.parent.setAttribute("loading-number", loadingNumber);
75031
+ resolved.parent.appendChild(instance.$el);
75032
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => instance.visible.value = resolved.visible);
75033
+ if (resolved.fullscreen) {
75034
+ fullscreenInstance = instance;
75035
+ }
75036
+ return instance;
75037
+ };
75038
+ const resolveOptions = options => {
75039
+ var _a, _b, _c, _d;
75040
+ let target;
75041
+ if (shared_esm_bundler_isString(options.target)) {
75042
+ target = (_a = document.querySelector(options.target)) != null ? _a : document.body;
75043
+ } else {
75044
+ target = options.target || document.body;
75045
+ }
75046
+ return {
75047
+ parent: target === document.body || options.body ? document.body : target,
75048
+ background: options.background || "",
75049
+ svg: options.svg || "",
75050
+ svgViewBox: options.svgViewBox || "",
75051
+ spinner: options.spinner || false,
75052
+ text: options.text || "",
75053
+ fullscreen: target === document.body && ((_b = options.fullscreen) != null ? _b : true),
75054
+ lock: (_c = options.lock) != null ? _c : false,
75055
+ customClass: options.customClass || "",
75056
+ visible: (_d = options.visible) != null ? _d : true,
75057
+ target
75058
+ };
75059
+ };
75060
+ const addStyle = async (options, parent, instance) => {
75061
+ const {
75062
+ nextZIndex
75063
+ } = useZIndex();
75064
+ const maskStyle = {};
75065
+ if (options.fullscreen) {
75066
+ instance.originalPosition.value = getStyle(document.body, "position");
75067
+ instance.originalOverflow.value = getStyle(document.body, "overflow");
75068
+ maskStyle.zIndex = nextZIndex();
75069
+ } else if (options.parent === document.body) {
75070
+ instance.originalPosition.value = getStyle(document.body, "position");
75071
+ await (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
75072
+ for (const property of ["top", "left"]) {
75073
+ const scroll = property === "top" ? "scrollTop" : "scrollLeft";
75074
+ maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
75075
+ }
75076
+ for (const property of ["height", "width"]) {
75077
+ maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
75078
+ }
75079
+ } else {
75080
+ instance.originalPosition.value = getStyle(parent, "position");
75081
+ }
75082
+ for (const [key, value] of Object.entries(maskStyle)) {
75083
+ instance.$el.style[key] = value;
75084
+ }
75085
+ };
75086
+ const addClassList = (options, parent, instance) => {
75087
+ const ns = useNamespace("loading");
75088
+ if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) {
75089
+ style_addClass(parent, ns.bm("parent", "relative"));
75090
+ } else {
75091
+ style_removeClass(parent, ns.bm("parent", "relative"));
75092
+ }
75093
+ if (options.fullscreen && options.lock) {
75094
+ style_addClass(parent, ns.bm("parent", "hidden"));
75095
+ } else {
75096
+ style_removeClass(parent, ns.bm("parent", "hidden"));
75097
+ }
75098
+ };
75099
+
75100
+ ;// CONCATENATED MODULE: ./node_modules/element-plus/es/components/loading/src/directive.mjs
75101
+
75102
+
75103
+
75104
+ const INSTANCE_KEY = Symbol("ElLoading");
75105
+ const createInstance = (el, binding) => {
75106
+ var _a, _b, _c, _d;
75107
+ const vm = binding.instance;
75108
+ const getBindingProp = key => shared_esm_bundler_isObject(binding.value) ? binding.value[key] : void 0;
75109
+ const resolveExpression = key => {
75110
+ const data = shared_esm_bundler_isString(key) && (vm == null ? void 0 : vm[key]) || key;
75111
+ if (data) return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(data);else return data;
75112
+ };
75113
+ const getProp = name => resolveExpression(getBindingProp(name) || el.getAttribute(`element-loading-${hyphenate(name)}`));
75114
+ const fullscreen = (_a = getBindingProp("fullscreen")) != null ? _a : binding.modifiers.fullscreen;
75115
+ const options = {
75116
+ text: getProp("text"),
75117
+ svg: getProp("svg"),
75118
+ svgViewBox: getProp("svgViewBox"),
75119
+ spinner: getProp("spinner"),
75120
+ background: getProp("background"),
75121
+ customClass: getProp("customClass"),
75122
+ fullscreen,
75123
+ target: (_b = getBindingProp("target")) != null ? _b : fullscreen ? void 0 : el,
75124
+ body: (_c = getBindingProp("body")) != null ? _c : binding.modifiers.body,
75125
+ lock: (_d = getBindingProp("lock")) != null ? _d : binding.modifiers.lock
75126
+ };
75127
+ el[INSTANCE_KEY] = {
75128
+ options,
75129
+ instance: service_Loading(options)
75130
+ };
75131
+ };
75132
+ const updateOptions = (newOptions, originalOptions) => {
75133
+ for (const key of Object.keys(originalOptions)) {
75134
+ if ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.isRef)(originalOptions[key])) originalOptions[key].value = newOptions[key];
75135
+ }
75136
+ };
75137
+ const vLoading = {
75138
+ mounted(el, binding) {
75139
+ if (binding.value) {
75140
+ createInstance(el, binding);
75141
+ }
74868
75142
  },
74869
- error(option) {
75143
+ updated(el, binding) {
75144
+ const instance = el[INSTANCE_KEY];
75145
+ if (binding.oldValue !== binding.value) {
75146
+ if (binding.value && !binding.oldValue) {
75147
+ createInstance(el, binding);
75148
+ } else if (binding.value && binding.oldValue) {
75149
+ if (shared_esm_bundler_isObject(binding.value)) updateOptions(binding.value, instance.options);
75150
+ } else {
75151
+ instance == null ? void 0 : instance.instance.close();
75152
+ }
75153
+ }
75154
+ },
75155
+ unmounted(el) {
75156
+ var _a;
75157
+ (_a = el[INSTANCE_KEY]) == null ? void 0 : _a.instance.close();
75158
+ }
75159
+ };
75160
+
75161
+ ;// CONCATENATED MODULE: ./node_modules/element-plus/es/components/loading/index.mjs
75162
+
75163
+
75164
+
75165
+
75166
+
75167
+ const ElLoading = {
75168
+ install(app) {
75169
+ app.directive("loading", vLoading);
75170
+ app.config.globalProperties.$loading = service_Loading;
75171
+ },
75172
+ directive: vLoading,
75173
+ service: service_Loading
75174
+ };
75175
+
75176
+ ;// CONCATENATED MODULE: ./modal/loading.ts
75177
+
75178
+
75179
+ let loadingInstance1 = null;
75180
+ const MaliLoading = {
75181
+ show(option) {
75182
+ if (loadingInstance1) {
75183
+ loadingInstance1.close();
75184
+ }
74870
75185
  const opts = xe_utils_default().isString(option) ? {
74871
75186
  content: option
74872
75187
  } : {
74873
75188
  ...option
74874
75189
  };
74875
- return ElNotification.error({
74876
- title: opts.title,
74877
- message: opts.content || '操作失败'
74878
- });
74879
- },
74880
- hide() {
74881
- return new Promise(resolve => {
74882
- setTimeout(resolve, 2000);
75190
+ loadingInstance1 = ElLoading.service({
75191
+ fullscreen: true,
75192
+ text: opts.content
74883
75193
  });
74884
- }
74885
- };
74886
- /* harmony default export */ var modal_notify = (MaliNotify);
74887
- ;// CONCATENATED MODULE: ./modal/loading.ts
74888
- // import XEUtils from 'xe-utils'
74889
- const MaliLoading = {
74890
- show() {
74891
- // const opts = XEUtils.isString(option) ? { content: option } : { ...option }
74892
75194
  return Promise.resolve();
74893
75195
  },
74894
75196
  hide() {
75197
+ if (loadingInstance1) {
75198
+ loadingInstance1.close();
75199
+ loadingInstance1 = null;
75200
+ }
74895
75201
  return Promise.resolve();
74896
75202
  }
74897
75203
  };
@@ -75414,9 +75720,13 @@ VXETable.renderer.mixin({
75414
75720
  const {
75415
75721
  field
75416
75722
  } = column;
75723
+ const {
75724
+ props
75725
+ } = renderOpts;
75417
75726
  const cellValue = xe_utils_default().get(row, field);
75418
75727
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("ml-amount-text"), {
75419
- "modelValue": cellValue
75728
+ "modelValue": cellValue,
75729
+ "simplify": props && !!props.simplify
75420
75730
  }, null);
75421
75731
  }
75422
75732
  },
@@ -77169,7 +77479,7 @@ function index_config(options) {
77169
77479
  return config_0;
77170
77480
  }
77171
77481
  const MaliUI = {
77172
- version: "1.0.163",
77482
+ version: "1.0.165",
77173
77483
  install: index_install,
77174
77484
  config: index_config,
77175
77485
  renderer: {