mooho-base-admin-plus 2.2.9 → 2.2.10

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/history.md CHANGED
@@ -11,3 +11,4 @@
11
11
  2.2.7 - 静态选项支持数字
12
12
  2.2.8 - 增加描述类型控件
13
13
  2.2.9 - 枚举类型加载时不再判断 source 字段
14
+ 2.2.10 - 图片上传控件可设置接受的文件格式
@@ -36294,7 +36294,8 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
36294
36294
  "on-preview": $options.onUploadPreview,
36295
36295
  "on-remove": $options.onUploadRemove,
36296
36296
  disabled: $props.readonly,
36297
- accept: $props.accept,
36297
+ accept: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => "." + item.replaceAll(".", "")).join(",") : null,
36298
+ format: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => item.replaceAll(".", "")) : null,
36298
36299
  multiple: true,
36299
36300
  type: $props.draggable ? "drag" : "select"
36300
36301
  }, {
@@ -36319,7 +36320,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
36319
36320
  ])) : createCommentVNode("v-if", true)
36320
36321
  ]),
36321
36322
  _: 1
36322
- }, 8, ["action", "headers", "default-file-list", "before-upload", "on-success", "on-preview", "on-remove", "disabled", "accept", "type"]),
36323
+ }, 8, ["action", "headers", "default-file-list", "before-upload", "on-success", "on-preview", "on-remove", "disabled", "accept", "format", "type"]),
36323
36324
  withDirectives(createVNode$1(_component_Input, {
36324
36325
  type: "text",
36325
36326
  "model-value": $props.modelValue,
@@ -36355,6 +36356,9 @@ const _sfc_main$z = {
36355
36356
  },
36356
36357
  height: {
36357
36358
  type: Number
36359
+ },
36360
+ accept: {
36361
+ type: String
36358
36362
  }
36359
36363
  },
36360
36364
  computed: {
@@ -36489,7 +36493,8 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
36489
36493
  }), 128)),
36490
36494
  !$props.readonly ? (openBlock(), createBlock(_component_Upload, {
36491
36495
  key: 0,
36492
- accept: "image/*",
36496
+ accept: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => "." + item.replaceAll(".", "")).join(",") : "image/*",
36497
+ format: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => item.replaceAll(".", "")) : null,
36493
36498
  action: _ctx.uploadURL,
36494
36499
  headers: _ctx.uploadHeaders,
36495
36500
  "show-upload-list": false,
@@ -36510,7 +36515,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
36510
36515
  ], 4)) : createCommentVNode("v-if", true)
36511
36516
  ]),
36512
36517
  _: 1
36513
- }, 8, ["action", "headers", "before-upload", "on-success"])) : createCommentVNode("v-if", true),
36518
+ }, 8, ["accept", "format", "action", "headers", "before-upload", "on-success"])) : createCommentVNode("v-if", true),
36514
36519
  withDirectives(createVNode$1(_component_Input, {
36515
36520
  type: "text",
36516
36521
  "model-value": $props.modelValue
@@ -38021,8 +38026,9 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
38021
38026
  readonly: $props.readonly || column.isReadonly,
38022
38027
  maxCount: column.maxLength,
38023
38028
  height: column.controlHeight,
38024
- width: column.controlWidth
38025
- }, null, 8, ["model-value", "onUpdate:modelValue", "readonly", "maxCount", "height", "width"])) : column.controlType === "Slider" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
38029
+ width: column.controlWidth,
38030
+ accept: column.pattern
38031
+ }, null, 8, ["model-value", "onUpdate:modelValue", "readonly", "maxCount", "height", "width", "accept"])) : column.controlType === "Slider" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
38026
38032
  !$props.readonly && !column.isReadonly ? (openBlock(), createBlock(_component_Slider, {
38027
38033
  key: 0,
38028
38034
  "model-value": _ctx.parseData($data.data, column.code),
@@ -39524,7 +39530,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
39524
39530
  ]),
39525
39531
  _: 1
39526
39532
  }, 16)) : createCommentVNode("v-if", true),
39527
- $data.data.controlType == "Attachment" ? (openBlock(), createBlock(_component_Col, normalizeProps(mergeProps({ key: 32 }, _ctx.grid8)), {
39533
+ $data.data.controlType == "Attachment" || $data.data.controlType == "Image" ? (openBlock(), createBlock(_component_Col, normalizeProps(mergeProps({ key: 32 }, _ctx.grid8)), {
39528
39534
  default: withCtx(() => [
39529
39535
  createVNode$1(_component_FormItem, {
39530
39536
  label: "\u63A5\u53D7\u7684\u6587\u4EF6\u7C7B\u578B",