@yoooloo42/joker 1.0.237 → 1.0.238

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
- let fileList_box = reactive([]);
42824
+ let fileList_box = ref([]);
42825
42825
  props.modelValue.forEach((item, index) => {
42826
- fileList_box.push({
42826
+ fileList_box.value.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.splice(0, fileList_box.length);
42883
+ fileList_box.value.splice(0, fileList_box.value.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.splice(0, fileList_box.length, ...JSON.parse(JSON.stringify(fileList)));
42890
+ fileList_box.value.splice(0, fileList_box.value.length, ...JSON.parse(JSON.stringify(fileList)));
42891
42891
  if (response.code === 0) {
42892
42892
  const arr = [];
42893
- fileList_box.forEach(i=>{
42893
+ fileList_box.value.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.splice(0, fileList_box.length);
42906
+ fileList_box.value.splice(0, fileList_box.value.length);
42907
42907
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
42908
42908
  emit("update:modelValue", []);
42909
42909
  }