@guodun/antdv 1.4.5 → 1.4.7

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.
@@ -90,12 +90,71 @@ function g(e) {
90
90
  return !!(e && typeof e == "object");
91
91
  }
92
92
  function _(e, t, n) {
93
- return {
94
- width: v(e?.width, v(t?.width, n.width)),
95
- height: v(e?.height, v(t?.height, n.height))
93
+ return y(e) || y(t) || {
94
+ width: b(e?.width, b(t?.width, n.width)),
95
+ height: b(e?.height, b(t?.height, n.height))
96
96
  };
97
97
  }
98
- function v(e, t) {
98
+ var v = [
99
+ {
100
+ pointWidth: 595.5,
101
+ pointHeight: 842.25,
102
+ cssWidth: 794,
103
+ cssHeight: 1123
104
+ },
105
+ {
106
+ pointWidth: 842.25,
107
+ pointHeight: 595.5,
108
+ cssWidth: 1123,
109
+ cssHeight: 794
110
+ },
111
+ {
112
+ pointWidth: 419.25,
113
+ pointHeight: 595.5,
114
+ cssWidth: 559,
115
+ cssHeight: 794
116
+ },
117
+ {
118
+ pointWidth: 595.5,
119
+ pointHeight: 419.25,
120
+ cssWidth: 794,
121
+ cssHeight: 559
122
+ },
123
+ {
124
+ pointWidth: 842.25,
125
+ pointHeight: 1190.25,
126
+ cssWidth: 1123,
127
+ cssHeight: 1587
128
+ },
129
+ {
130
+ pointWidth: 1190.25,
131
+ pointHeight: 842.25,
132
+ cssWidth: 1587,
133
+ cssHeight: 1123
134
+ },
135
+ {
136
+ pointWidth: 612,
137
+ pointHeight: 792,
138
+ cssWidth: 816,
139
+ cssHeight: 1056
140
+ },
141
+ {
142
+ pointWidth: 612,
143
+ pointHeight: 1008,
144
+ cssWidth: 816,
145
+ cssHeight: 1344
146
+ }
147
+ ];
148
+ function y(e) {
149
+ let t = Number(e?.width), n = Number(e?.height);
150
+ if (!Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0) return;
151
+ let r = v.find((e) => Math.abs(t - e.pointWidth) <= 1.1 && Math.abs(n - e.pointHeight) <= 1.1);
152
+ return r ? {
153
+ width: r.cssWidth,
154
+ height: r.cssHeight
155
+ } : void 0;
156
+ }
157
+ function b(e, t) {
99
158
  let n = Number(e);
100
159
  return Number.isFinite(n) && n > 0 ? n : t;
101
160
  }