@yoooloo42/joker 1.0.234 → 1.0.236

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/dist/index.esm.js CHANGED
@@ -42821,9 +42821,9 @@ const myProps_box = reactive(unclassified.deepClone.deepMerge(
42821
42821
  unclassified.deepClone.deepClone(ly0default.myProps),
42822
42822
  props.myProps
42823
42823
  ));
42824
- const fileList_box = ref([]);
42824
+ const fileList_box = reactive([]);
42825
42825
  props.modelValue.forEach((item, index) => {
42826
- fileList_box.value.push({
42826
+ fileList_box.push({
42827
42827
  name: item.substring(item.lastIndexOf('/') + 1) ?? 'Old_' + index,
42828
42828
  url: item,
42829
42829
  response: {
@@ -42880,17 +42880,17 @@ const hdl = {
42880
42880
  remove (file, fileList) { // 文件列表移除文件时的钩子
42881
42881
  // 重置文件列表, 注意:通过使用splice保持响应性
42882
42882
  // 因为只能上传一个图片,移除即清空
42883
- fileList_box.value.splice(0, fileList_box.value.length);
42883
+ fileList_box.splice(0, fileList_box.length);
42884
42884
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
42885
42885
  emit("update:modelValue", []);
42886
42886
  },
42887
42887
  success (response, file, fileList) { // 上传
42888
42888
  // 重置文件列表, 注意:通过使用splice保持响应性
42889
42889
  // 只能上传一个图片
42890
- fileList_box.value = fileList;
42890
+ fileList_box.splice(0, fileList_box.length, ...JSON.parse(JSON.stringify(fileList)));
42891
42891
  if (response.code === 0) {
42892
42892
  const arr = [];
42893
- fileList_box.value.forEach(i=>{
42893
+ fileList_box.forEach(i=>{
42894
42894
  arr.push(i.response.data.src);
42895
42895
  });
42896
42896
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
@@ -42903,7 +42903,7 @@ const hdl = {
42903
42903
  },
42904
42904
  deleteAll () { // 删除全部已上传文件
42905
42905
  // 重置文件列表, 注意:通过使用splice保持响应性
42906
- fileList_box.value.splice(0, fileList_box.value.length);
42906
+ fileList_box.splice(0, fileList_box.length);
42907
42907
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
42908
42908
  emit("update:modelValue", []);
42909
42909
  }
@@ -42920,8 +42920,8 @@ return (_ctx, _cache) => {
42920
42920
  class: "avatar",
42921
42921
  style: normalizeStyle(style.avatarBox),
42922
42922
  action: myProps_box.uploadUrl,
42923
- "file-list": fileList_box.value,
42924
- "onUpdate:fileList": _cache[0] || (_cache[0] = $event => ((fileList_box).value = $event)),
42923
+ "file-list": fileList_box,
42924
+ "onUpdate:fileList": _cache[0] || (_cache[0] = $event => ((fileList_box) = $event)),
42925
42925
  "show-file-list": false,
42926
42926
  "before-upload": hdl.beforeUpload,
42927
42927
  "on-preview": hdl.preview,
@@ -42929,10 +42929,10 @@ return (_ctx, _cache) => {
42929
42929
  "on-success": hdl.success
42930
42930
  }, {
42931
42931
  default: withCtx(() => [
42932
- (fileList_box.value.length>0 && fileList_box.value[0].response && fileList_box.value[0].response.data && fileList_box.value[0].response.data.src)
42932
+ (fileList_box.length>0 && fileList_box[0].response && fileList_box[0].response.data && fileList_box[0].response.data.src)
42933
42933
  ? (openBlock(), createElementBlock("img", {
42934
42934
  key: 0,
42935
- src: fileList_box.value[0].response.data.src,
42935
+ src: fileList_box[0].response.data.src,
42936
42936
  class: "avatar",
42937
42937
  style: normalizeStyle(style.avatarImage)
42938
42938
  }, null, 12 /* STYLE, PROPS */, _hoisted_1$a))
@@ -42949,7 +42949,7 @@ return (_ctx, _cache) => {
42949
42949
  ]),
42950
42950
  _: 1 /* STABLE */
42951
42951
  }, 8 /* PROPS */, ["style", "action", "file-list", "before-upload", "on-preview", "on-remove", "on-success"]),
42952
- (fileList_box.value.length>0 && fileList_box.value[0].response && fileList_box.value[0].response.data && fileList_box.value[0].response.data.src)
42952
+ (fileList_box.length>0 && fileList_box[0].response && fileList_box[0].response.data && fileList_box[0].response.data.src)
42953
42953
  ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
42954
42954
  createVNode(_component_el_button, {
42955
42955
  size: "small",