@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.cjs.js CHANGED
@@ -42825,9 +42825,9 @@ const myProps_box = vue.reactive(unclassified.deepClone.deepMerge(
42825
42825
  unclassified.deepClone.deepClone(ly0default.myProps),
42826
42826
  props.myProps
42827
42827
  ));
42828
- let fileList_box = vue.reactive([]);
42828
+ let fileList_box = vue.ref([]);
42829
42829
  props.modelValue.forEach((item, index) => {
42830
- fileList_box.push({
42830
+ fileList_box.value.push({
42831
42831
  name: item.substring(item.lastIndexOf('/') + 1) ?? 'Old_' + index,
42832
42832
  url: item,
42833
42833
  response: {
@@ -42884,17 +42884,17 @@ const hdl = {
42884
42884
  remove (file, fileList) { // 文件列表移除文件时的钩子
42885
42885
  // 重置文件列表, 注意:通过使用splice保持响应性
42886
42886
  // 因为只能上传一个图片,移除即清空
42887
- fileList_box.splice(0, fileList_box.length);
42887
+ fileList_box.value.splice(0, fileList_box.value.length);
42888
42888
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
42889
42889
  emit("update:modelValue", []);
42890
42890
  },
42891
42891
  success (response, file, fileList) { // 上传
42892
42892
  // 重置文件列表, 注意:通过使用splice保持响应性
42893
42893
  // 只能上传一个图片
42894
- fileList_box.splice(0, fileList_box.length, ...JSON.parse(JSON.stringify(fileList)));
42894
+ fileList_box.value.splice(0, fileList_box.value.length, ...JSON.parse(JSON.stringify(fileList)));
42895
42895
  if (response.code === 0) {
42896
42896
  const arr = [];
42897
- fileList_box.forEach(i=>{
42897
+ fileList_box.value.forEach(i=>{
42898
42898
  arr.push(i.response.data.src);
42899
42899
  });
42900
42900
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
@@ -42907,7 +42907,7 @@ const hdl = {
42907
42907
  },
42908
42908
  deleteAll () { // 删除全部已上传文件
42909
42909
  // 重置文件列表, 注意:通过使用splice保持响应性
42910
- fileList_box.splice(0, fileList_box.length);
42910
+ fileList_box.value.splice(0, fileList_box.value.length);
42911
42911
  // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
42912
42912
  emit("update:modelValue", []);
42913
42913
  }