fix(style): :resize-method is not avaliable on ios (#18914)

This commit is contained in:
yqrashawn 2024-03-06 15:25:43 +08:00 committed by GitHub
parent a538e2896e
commit 33e637ff71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 4 deletions

View File

@ -25,10 +25,15 @@
(defn image
[{:keys [source] :as props}]
[image-native
(if (string? source)
(assoc props :source {:uri source})
props)])
(let [props (cond-> props
platform/ios?
(dissoc :resize-method)
(and (:style props) platform/ios?)
(update :style dissoc :resize-method))]
[image-native
(if (string? source)
(assoc props :source {:uri source})
props)]))
(defn image-get-size
[uri]