qidian-vue-ui 1.0.89 → 1.0.91

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.
@@ -12336,7 +12336,7 @@ function parseRelaxedJSON(str, options) {
12336
12336
  const endObj = str.lastIndexOf("}");
12337
12337
  const startArr = str.indexOf("[");
12338
12338
  const endArr = str.lastIndexOf("]");
12339
- if (startObj > -1 && endObj > -1 && endObj > startObj) {
12339
+ if (startObj > -1 && (startObj < startArr || startArr === -1) && endObj > -1 && (endObj > endArr || endArr === -1) && endObj > startObj) {
12340
12340
  str = str.slice(startObj, endObj + 1);
12341
12341
  } else if (startArr > -1 && endArr > -1 && endArr > startArr) {
12342
12342
  str = str.slice(startArr, endArr + 1);
@@ -12760,8 +12760,8 @@ const QdConfigProvider = defineComponent({
12760
12760
  watchEffect(async () => {
12761
12761
  const localeMap = {
12762
12762
  "zh-CN": () => Promise.resolve().then(() => zhCN$1),
12763
- "zh-TW": () => import("./zh-TW-DtCk016l.mjs"),
12764
- "en-US": () => import("./en-US-B06bZxl_.mjs")
12763
+ "zh-TW": () => import("./zh-TW-CiABPzok.mjs"),
12764
+ "en-US": () => import("./en-US-CsNKuhlB.mjs")
12765
12765
  };
12766
12766
  const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
12767
12767
  const [err, res] = await to(
@@ -54758,9 +54758,10 @@ const qdUploadProps = {
54758
54758
  del: void 0
54759
54759
  };
54760
54760
  const qdUploadSizeLimit = {
54761
+ size: 5,
54761
54762
  unit: "MB"
54762
54763
  };
54763
- const acceptMap = {
54764
+ const qdUploadAcceptMap = {
54764
54765
  default: [
54765
54766
  ".doc",
54766
54767
  ".docx",
@@ -54800,6 +54801,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54800
54801
  __name: "index",
54801
54802
  props: /* @__PURE__ */ mergeDefaults({
54802
54803
  modelValue: {},
54804
+ action: { type: [String, Function] },
54805
+ bucketConfigKey: {},
54803
54806
  convStr: { type: [Boolean, String] },
54804
54807
  valueMode: {},
54805
54808
  theme: {},
@@ -54809,7 +54812,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54809
54812
  listOssByUrls: {},
54810
54813
  del: {},
54811
54814
  abridgeName: {},
54812
- action: {},
54813
54815
  allowUploadDuplicateFile: { type: Boolean },
54814
54816
  autoUpload: { type: Boolean },
54815
54817
  beforeAllFilesUpload: { type: Function },
@@ -54927,12 +54929,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54927
54929
  listOssByIds,
54928
54930
  listOssByUrls,
54929
54931
  del,
54932
+ action,
54933
+ bucketConfigKey,
54930
54934
  showImageFileName,
54931
54935
  showUploadProgress,
54932
54936
  draggable,
54933
54937
  ...uploadOptions
54934
54938
  } = props;
54935
- const reSizeLimit = isEmpty(sizeLimit) ? void 0 : easyCopy(qdUploadSizeLimit);
54939
+ const globalUploadPropsV = globalUploadProps.value;
54940
+ const reAction = action || globalUploadPropsV?.action;
54941
+ const actionUrl = typeof reAction === "string" ? reAction : reAction?.(bucketConfigKey);
54942
+ const reSizeLimit = easyCopy(qdUploadSizeLimit);
54936
54943
  if (reSizeLimit) {
54937
54944
  if (typeof sizeLimit === "number") {
54938
54945
  reSizeLimit.size = sizeLimit;
@@ -54941,7 +54948,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54941
54948
  Object.assign(reSizeLimit, { message: t("sizeLimitMessage") }, sizeLimit);
54942
54949
  }
54943
54950
  }
54944
- const acceptStr = (accept ? accept : theme.includes("image") ? acceptMap.image : acceptMap.default).join(",");
54951
+ const acceptStr = (accept ? accept : theme.includes("image") ? qdUploadAcceptMap.image : qdUploadAcceptMap.default).join(",");
54945
54952
  const reBeforeUpload = (file) => {
54946
54953
  if (beforeUpload) return beforeUpload(file);
54947
54954
  if (accept && !isTypeByName(file.name, accept)) {
@@ -55002,6 +55009,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55002
55009
  fileList.value.splice(context.index, 1);
55003
55010
  };
55004
55011
  const reUploadOptions = {
55012
+ action: actionUrl,
55005
55013
  theme: ["custom", "file", "file-input", "file-flow", "image", "image-flow"].includes(theme) ? theme : "custom",
55006
55014
  sizeLimit: reSizeLimit,
55007
55015
  accept: acceptStr,
@@ -55017,10 +55025,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55017
55025
  draggable: onlyView ? false : draggable,
55018
55026
  ...uploadOptions
55019
55027
  };
55020
- const globalUploadPropsV = globalUploadProps.value;
55021
55028
  if (globalUploadPropsV) {
55022
55029
  Object.entries(globalUploadPropsV).forEach(([key, value]) => {
55023
- if (isEmpty(value)) return;
55030
+ if (["action"].includes(key) || isEmpty(value)) return;
55024
55031
  reUploadOptions[key] = value;
55025
55032
  });
55026
55033
  }
@@ -55290,30 +55297,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55290
55297
  };
55291
55298
  }
55292
55299
  });
55293
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14a99db6"]]);
55300
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f0674a59"]]);
55294
55301
  export {
55295
- qdFormGrid as A,
55296
- QdGrid as B,
55297
- QdGridItem as C,
55298
- PROVIDE_GRID_WIDTH_KEY as D,
55299
- PROVIDE_GRID_ITEM_PROPS_KEY as E,
55300
- QdServiceTable as F,
55301
- QdServiceList as G,
55302
- select as H,
55303
- index as I,
55304
- hasPermiDirective as J,
55305
- hasPermi as K,
55306
- hasRoleDirective as L,
55307
- hasRole as M,
55308
- useAgentChat as N,
55309
- useModal as O,
55302
+ qdFormGutter as A,
55303
+ qdFormGrid as B,
55304
+ QdGrid as C,
55305
+ QdGridItem as D,
55306
+ PROVIDE_GRID_WIDTH_KEY as E,
55307
+ PROVIDE_GRID_ITEM_PROPS_KEY as F,
55308
+ QdServiceTable as G,
55309
+ QdServiceList as H,
55310
+ select as I,
55311
+ index as J,
55312
+ qdUploadAcceptMap as K,
55313
+ hasPermiDirective as L,
55314
+ hasPermi as M,
55315
+ hasRoleDirective as N,
55316
+ hasRole as O,
55310
55317
  PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE as P,
55311
55318
  QdConfigProvider as Q,
55312
- useDict as R,
55313
- useDictDynamic as S,
55314
- useReadonly as T,
55315
- useDisabled as U,
55316
- auth as V,
55319
+ useAgentChat as R,
55320
+ useModal as S,
55321
+ useDict as T,
55322
+ useDictDynamic as U,
55323
+ useReadonly as V,
55324
+ useDisabled as W,
55325
+ auth as X,
55317
55326
  _typeof as _,
55318
55327
  _sfc_main$j as a,
55319
55328
  _sfc_main$i as b,
@@ -55322,24 +55331,24 @@ export {
55322
55331
  qdAsyncCompute as e,
55323
55332
  qdUseComputeValue as f,
55324
55333
  getValueByPath as g,
55325
- defineQdCrudTable as h,
55334
+ QdCrudSearch as h,
55326
55335
  index$2 as i,
55327
- defineQdCrudList as j,
55328
- _sfc_main$e as k,
55336
+ defineQdCrudTable as j,
55337
+ defineQdCrudList as k,
55329
55338
  list as l,
55330
- _sfc_main$9 as m,
55331
- _sfc_main$5 as n,
55332
- radioGroup as o,
55339
+ _sfc_main$e as m,
55340
+ _sfc_main$9 as n,
55341
+ _sfc_main$5 as o,
55333
55342
  parseVModelPath as p,
55334
55343
  qdCompute as q,
55335
55344
  resolveVModelBinding as r,
55336
55345
  setValueByPath as s,
55337
55346
  table as t,
55338
- checkboxGroup as u,
55339
- tag as v,
55340
- index$1 as w,
55341
- _sfc_main$a as x,
55342
- QdFormItem as y,
55343
- qdFormGutter as z
55347
+ radioGroup as u,
55348
+ checkboxGroup as v,
55349
+ tag as w,
55350
+ index$1 as x,
55351
+ _sfc_main$a as y,
55352
+ QdFormItem as z
55344
55353
  };
55345
- //# sourceMappingURL=index-Bs_BBkKT.mjs.map
55354
+ //# sourceMappingURL=index-nH2m5m9w.mjs.map