@slidejs/runner-swiper 0.1.3 → 0.1.4
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/.turbo/turbo-build.log +6 -20
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -8
- package/dist/index.mjs +415 -405
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/adapter.ts +4 -2
- package/src/index.ts +2 -2
- package/src/runner.ts +25 -4
- package/src/types.ts +7 -8
package/src/types.ts
CHANGED
|
@@ -4,20 +4,19 @@
|
|
|
4
4
|
* 定义 Swiper 适配器的选项和配置
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { Swiper } from 'swiper';
|
|
8
8
|
import type { AdapterOptions } from '@slidejs/runner';
|
|
9
9
|
|
|
10
|
+
// Swiper 构造函数的第二个参数类型
|
|
11
|
+
type SwiperOptions = ConstructorParameters<typeof Swiper>[1];
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* SwiperAdapter 选项
|
|
12
15
|
*
|
|
13
|
-
* Swiper CSS
|
|
14
|
-
*
|
|
15
|
-
* import 'swiper/css';
|
|
16
|
-
* import 'swiper/css/navigation';
|
|
17
|
-
* import 'swiper/css/pagination';
|
|
18
|
-
* ```
|
|
16
|
+
* 注意:所有必需的 Swiper CSS(包括核心 CSS、Navigation CSS 和 Pagination CSS)
|
|
17
|
+
* 都会在创建 runner 时自动注入,无需手动导入。
|
|
19
18
|
*
|
|
20
|
-
*
|
|
19
|
+
* Keyboard、Navigation 和 Pagination 模块已在适配器中自动注册,
|
|
21
20
|
* 无需在配置中再次指定 modules。
|
|
22
21
|
*/
|
|
23
22
|
export interface SwiperAdapterOptions extends AdapterOptions {
|