@yoooloo42/joker 1.0.239 → 1.0.241

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
@@ -42834,16 +42834,6 @@ props.modelValue.forEach((item, index) => {
42834
42834
  });
42835
42835
  });
42836
42836
 
42837
- console.log('joker测试 000', props.modelValue);
42838
- console.log('joker测试 111', fileList_box.value);
42839
-
42840
- watch(()=>props.modelValue, (newVal, oldVal) => {
42841
- console.log('joker测试 222', newVal);
42842
- });
42843
- watch(()=>fileList_box.value, (newVal, oldVal) => {
42844
- console.log('joker测试 333', newVal);
42845
- });
42846
-
42847
42837
  const style = reactive({
42848
42838
  avatarBox: {
42849
42839
  width: myProps_box.avatar.width,
@@ -42897,7 +42887,7 @@ const hdl = {
42897
42887
  success (response, file, fileList) { // 上传
42898
42888
  // 重置文件列表, 注意:通过使用splice保持响应性
42899
42889
  // 只能上传一个图片
42900
- fileList_box.value.splice(0, fileList_box.value.length, ...JSON.parse(JSON.stringify(fileList)));
42890
+ fileList_box.value.splice(0, fileList_box.value.length, file);
42901
42891
  if (response.code === 0) {
42902
42892
  const arr = [];
42903
42893
  fileList_box.value.forEach(i=>{
@@ -42936,7 +42926,8 @@ return (_ctx, _cache) => {
42936
42926
  "before-upload": hdl.beforeUpload,
42937
42927
  "on-preview": hdl.preview,
42938
42928
  "on-remove": hdl.remove,
42939
- "on-success": hdl.success
42929
+ "on-success": hdl.success,
42930
+ limit: 1
42940
42931
  }, {
42941
42932
  default: withCtx(() => [
42942
42933
  (unref(fileList_box).length>0 && unref(fileList_box)[0].response && unref(fileList_box)[0].response.data && unref(fileList_box)[0].response.data.src)