diff --git a/src/action-sheet/action-sheet.json b/src/action-sheet/action-sheet.json
index 7a17be8c2..b92c75019 100644
--- a/src/action-sheet/action-sheet.json
+++ b/src/action-sheet/action-sheet.json
@@ -5,6 +5,6 @@
"t-popup": "../popup/popup",
"t-grid": "../grid/grid",
"t-grid-item": "../grid/grid-item",
- "t-swiper-nav": "../swiper/swiper-nav"
+ "t-swiper-nav": "../swiper-nav/swiper-nav"
}
}
diff --git a/src/swiper-nav/index.ts b/src/swiper-nav/index.ts
new file mode 100644
index 000000000..5dcaf6bf0
--- /dev/null
+++ b/src/swiper-nav/index.ts
@@ -0,0 +1,3 @@
+export * from './type';
+export * from './props';
+export * from './swiper-nav';
diff --git a/src/swiper-nav/props.ts b/src/swiper-nav/props.ts
new file mode 100644
index 000000000..0dcfbf682
--- /dev/null
+++ b/src/swiper-nav/props.ts
@@ -0,0 +1,51 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import { TdSwiperNavProps } from './type';
+const props: TdSwiperNavProps = {
+ /** 当前轮播在哪一项(下标) */
+ current: {
+ type: Number,
+ value: 0,
+ },
+ /** 自定义组件样式 */
+ customStyle: {
+ type: String,
+ value: '',
+ },
+ /** 轮播滑动方向,包括横向滑动和纵向滑动两个方向 */
+ direction: {
+ type: String,
+ value: 'horizontal',
+ },
+ /** 小于这个数字不会显示导航器 */
+ minShowNum: {
+ type: Number,
+ value: 2,
+ },
+ /** 页码信息展示位置 */
+ paginationPosition: {
+ type: String,
+ value: 'bottom',
+ },
+ /** 是否显示两侧的控制按钮 */
+ showControls: {
+ type: Boolean,
+ value: false,
+ },
+ /** 总共的项数 */
+ total: {
+ type: Number,
+ value: 0,
+ },
+ /** 导航器类型,点状(dots)、点条状(dots-bar)、分式(fraction)等 */
+ type: {
+ type: String,
+ value: 'dots',
+ },
+};
+
+export default props;
diff --git a/src/swiper/swiper-nav.json b/src/swiper-nav/swiper-nav.json
similarity index 100%
rename from src/swiper/swiper-nav.json
rename to src/swiper-nav/swiper-nav.json
diff --git a/src/swiper/swiper-nav.less b/src/swiper-nav/swiper-nav.less
similarity index 100%
rename from src/swiper/swiper-nav.less
rename to src/swiper-nav/swiper-nav.less
diff --git a/src/swiper/swiper-nav.ts b/src/swiper-nav/swiper-nav.ts
similarity index 89%
rename from src/swiper/swiper-nav.ts
rename to src/swiper-nav/swiper-nav.ts
index 7152fe005..9927bc32c 100644
--- a/src/swiper/swiper-nav.ts
+++ b/src/swiper-nav/swiper-nav.ts
@@ -1,9 +1,12 @@
import { SuperComponent, wxComponent, RelationsOptions } from '../common/src/index';
import config from '../common/config';
+import { TdSwiperNavProps } from './type';
const { prefix } = config;
const name = `${prefix}-swiper-nav`;
+export interface SwiperNavProps extends TdSwiperNavProps {}
+
@wxComponent()
export default class SwiperNav extends SuperComponent {
externalClasses = [`${prefix}-class`];
@@ -40,7 +43,7 @@ export default class SwiperNav extends SuperComponent {
};
relations: RelationsOptions = {
- './swiper': {
+ '../swiper/swiper': {
type: 'parent',
},
};
diff --git a/src/swiper/swiper-nav.wxml b/src/swiper-nav/swiper-nav.wxml
similarity index 86%
rename from src/swiper/swiper-nav.wxml
rename to src/swiper-nav/swiper-nav.wxml
index 7c1613c91..5fa780c7f 100644
--- a/src/swiper/swiper-nav.wxml
+++ b/src/swiper-nav/swiper-nav.wxml
@@ -1,12 +1,12 @@
-
+