@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.cjs.js CHANGED
@@ -42838,16 +42838,6 @@ props.modelValue.forEach((item, index) => {
42838
42838
  });
42839
42839
  });
42840
42840
 
42841
- console.log('joker测试 000', props.modelValue);
42842
- console.log('joker测试 111', fileList_box.value);
42843
-
42844
- vue.watch(()=>props.modelValue, (newVal, oldVal) => {
42845
- console.log('joker测试 222', newVal);
42846
- });
42847
- vue.watch(()=>fileList_box.value, (newVal, oldVal) => {
42848
- console.log('joker测试 333', newVal);
42849
- });
42850
-
42851
42841
  const style = vue.reactive({
42852
42842
  avatarBox: {
42853
42843
  width: myProps_box.avatar.width,
@@ -42901,7 +42891,7 @@ const hdl = {
42901
42891
  success (response, file, fileList) { // 上传
42902
42892
  // 重置文件列表, 注意:通过使用splice保持响应性
42903
42893
  // 只能上传一个图片
42904
- fileList_box.value.splice(0, fileList_box.value.length, ...JSON.parse(JSON.stringify(fileList)));
42894
+ fileList_box.value.splice(0, fileList_box.value.length, file);
42905
42895
  if (response.code === 0) {
42906
42896
  const arr = [];
42907
42897
  fileList_box.value.forEach(i=>{
@@ -42940,7 +42930,8 @@ return (_ctx, _cache) => {
42940
42930
  "before-upload": hdl.beforeUpload,
42941
42931
  "on-preview": hdl.preview,
42942
42932
  "on-remove": hdl.remove,
42943
- "on-success": hdl.success
42933
+ "on-success": hdl.success,
42934
+ limit: 1
42944
42935
  }, {
42945
42936
  default: vue.withCtx(() => [
42946
42937
  (vue.unref(fileList_box).length>0 && vue.unref(fileList_box)[0].response && vue.unref(fileList_box)[0].response.data && vue.unref(fileList_box)[0].response.data.src)