@deskhero/dh_ui 2.86.1 → 2.86.2

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/dh_ui.es.js CHANGED
@@ -99912,7 +99912,7 @@ var Vje = { class: "cropper-wrapper_div" }, Hje = {
99912
99912
  let t = new FileReader();
99913
99913
  t.onload = () => {
99914
99914
  i.value.src = t.result, i.value.onload = async () => {
99915
- u.value || x(), g(i.value);
99915
+ u.value || x(), await w(), g(i.value);
99916
99916
  };
99917
99917
  }, t.readAsDataURL(e);
99918
99918
  }
@@ -99952,17 +99952,17 @@ var Vje = { class: "cropper-wrapper_div" }, Hje = {
99952
99952
  });
99953
99953
  }
99954
99954
  function x() {
99955
- let { value: e } = i, { width: t, height: n } = e, a = r?.width ?? 0, o = r?.height ?? 0, s = a / o, c = t / n, l = c > s, d = l ? a : o * c, f = l ? a / c : o;
99956
- p.value = d, u.value = f;
99955
+ let { value: e } = i, t = e.naturalWidth / e.naturalHeight, n = r?.width ?? 0, a = r?.height ?? 0, o = n, s = n / t;
99956
+ a && s > a && (s = a, o = a * t), p.value = o, u.value = s;
99957
99957
  }
99958
99958
  return (t, n) => (M(), s("div", Vje, [e.image ? (M(), s("div", Hje, [
99959
99959
  c("div", {
99960
99960
  id: "cropper-container",
99961
99961
  class: T({ "rounded-crop": e.isRound }),
99962
- style: D(r.height ? {
99963
- "max-width": p.value + "px",
99964
- height: u.value + "px"
99965
- } : { "max-width": e.width + "px" })
99962
+ style: D({
99963
+ width: p.value + "px",
99964
+ height: u.value ? u.value + "px" : void 0
99965
+ })
99966
99966
  }, [c("img", {
99967
99967
  id: "cropper-image",
99968
99968
  ref_key: "croppingImage",