@yoooloo42/joker 1.0.234 → 1.0.235

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,6 +42838,18 @@ props.modelValue.forEach((item, index) => {
42838
42838
  });
42839
42839
  });
42840
42840
 
42841
+ const imgSrc = vue.computed(()=>{
42842
+ if(
42843
+ fileList_box.length>0 &&
42844
+ fileList_box[0].response &&
42845
+ fileList_box[0].response.data &&
42846
+ fileList_box[0].response.data.src
42847
+ ){
42848
+ return fileList_box[0].response.data.src
42849
+ }
42850
+ return ''
42851
+ });
42852
+
42841
42853
  const style = vue.reactive({
42842
42854
  avatarBox: {
42843
42855
  width: myProps_box.avatar.width,
@@ -42891,7 +42903,7 @@ const hdl = {
42891
42903
  success (response, file, fileList) { // 上传
42892
42904
  // 重置文件列表, 注意:通过使用splice保持响应性
42893
42905
  // 只能上传一个图片
42894
- fileList_box.value = fileList;
42906
+ fileList_box.value.splice(0, fileList_box.value.length, ...JSON.parse(JSON.stringify(fileList)));
42895
42907
  if (response.code === 0) {
42896
42908
  const arr = [];
42897
42909
  fileList_box.value.forEach(i=>{
@@ -42933,10 +42945,10 @@ return (_ctx, _cache) => {
42933
42945
  "on-success": hdl.success
42934
42946
  }, {
42935
42947
  default: vue.withCtx(() => [
42936
- (fileList_box.value.length>0 && fileList_box.value[0].response && fileList_box.value[0].response.data && fileList_box.value[0].response.data.src)
42948
+ (!!imgSrc.value)
42937
42949
  ? (vue.openBlock(), vue.createElementBlock("img", {
42938
42950
  key: 0,
42939
- src: fileList_box.value[0].response.data.src,
42951
+ src: imgSrc.value,
42940
42952
  class: "avatar",
42941
42953
  style: vue.normalizeStyle(style.avatarImage)
42942
42954
  }, null, 12 /* STYLE, PROPS */, _hoisted_1$a))