You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the swiper-container to customize the web component through the Element method, and found that the injectStyles property was aligned and injected through the Vue method. This is a problem that the dom is bound to a string, and the style value of the array is passed.
For testing purposes, I set the array value directly to the injectStyles property, and the strings spliced by commas are bound on the dom.
I'm pretty sure this is a problem with swiper's handling of this attribute when defining the Element component. Through the official demo, there is no problem with the cdn import method used, but the swiper installed through npm has this problem.
// In this example, view the properties bound by dom through the browser, and the result is
// el.injectStyles="1,2,3,4,5"
<swiper-container :inject-styles="[1,2,3,4,5]">
…
</swiper-container>
At present, only the attribute injectStyles has been found to be problematic, and others have not been found yet.
Check that this is really a bug
Reproduction link
no
Bug description
I used the swiper-container to customize the web component through the Element method, and found that the injectStyles property was aligned and injected through the Vue method. This is a problem that the dom is bound to a string, and the style value of the array is passed.
For testing purposes, I set the array value directly to the injectStyles property, and the strings spliced by commas are bound on the dom.
I'm pretty sure this is a problem with swiper's handling of this attribute when defining the Element component. Through the official demo, there is no problem with the cdn import method used, but the swiper installed through npm has this problem.
At present, only the attribute injectStyles has been found to be problematic, and others have not been found yet.
The official website explains how to use it: https://swiperjs.com/element#usage-with-vue
Expected Behavior
normal injection style
Actual Behavior
cannot inject styles
Swiper version
9.2.0
Platform/Target and Browser Versions
Windows
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: