diff --git a/compiled/alipay/demo/pages/GuideTour/index.axml b/compiled/alipay/demo/pages/GuideTour/index.axml index bd1c39657..86f5ef53e 100644 --- a/compiled/alipay/demo/pages/GuideTour/index.axml +++ b/compiled/alipay/demo/pages/GuideTour/index.axml @@ -24,7 +24,11 @@ items="{{ list }}" visible="{{ slotVisible }}" onCancel="closeTour" - onChange="onChange"> + onChange="onChange" + jumpText="跳过" + gotItText="知道了" + prevStepText="上一步" + nextStepText="下一步"> - 跳过 + {{ jumpText }} - 上一步 + {{ prevStepText }} - 下一步 + {{ nextStepText }} - 知道了 + {{ gotItText }} diff --git a/compiled/alipay/src/GuideTour/index.md b/compiled/alipay/src/GuideTour/index.md index 8023cfb51..47dabf55f 100644 --- a/compiled/alipay/src/GuideTour/index.md +++ b/compiled/alipay/src/GuideTour/index.md @@ -36,6 +36,10 @@ toc: 'content' | `visible` | 是否显示 | `boolean` | `false`| | `onCancel` | 关闭回调 | `() => void` | - | | `onChange` | 步骤改变回调 | `(index: number) => void` | - | +| `jumpText` | 跳过按钮的文案 | `string` | '跳过' | +| `prevStepText`| 上一步按钮的文案 | `string` | '上一步' | +| `nextStepText`| 下一步按钮的文案 | `string` | '下一步' | +| `gotItText`| 知道了按钮的文案 | `string` | '知道了' | ### GuideTourItem diff --git a/compiled/alipay/src/GuideTour/props.ts b/compiled/alipay/src/GuideTour/props.ts index f53489bc2..1c03eb1a0 100644 --- a/compiled/alipay/src/GuideTour/props.ts +++ b/compiled/alipay/src/GuideTour/props.ts @@ -65,6 +65,26 @@ export interface IGuideTour extends IBaseProps { * @description 步骤改变回调 */ onChange: (index: number) => boolean; + /** + * @description 上一步按钮文案 + * @default "上一步" + */ + prevStepText?: string; + /** + * @description 下一步按钮文案 + * @default "下一步" + */ + nextStepText?: string; + /** + * @description 知道了按钮文案 + * @default "知道了" + */ + gotItText?: string; + /** + * @description 跳过按钮文案 + * @default "跳过" + */ + jumpText?: string; } export const GuideTourDefaultProps: Partial = { @@ -72,6 +92,10 @@ export const GuideTourDefaultProps: Partial = { swiperable: false, items: [], defaultCurrent: 0, + gotItText: '知道了', + nextStepText: '下一步', + prevStepText: '上一步', + jumpText: '跳过' }; export const GuideTourFunctionalProps: Partial = { diff --git a/compiled/wechat/src/GuideTour/index.md b/compiled/wechat/src/GuideTour/index.md index 8023cfb51..47dabf55f 100644 --- a/compiled/wechat/src/GuideTour/index.md +++ b/compiled/wechat/src/GuideTour/index.md @@ -36,6 +36,10 @@ toc: 'content' | `visible` | 是否显示 | `boolean` | `false`| | `onCancel` | 关闭回调 | `() => void` | - | | `onChange` | 步骤改变回调 | `(index: number) => void` | - | +| `jumpText` | 跳过按钮的文案 | `string` | '跳过' | +| `prevStepText`| 上一步按钮的文案 | `string` | '上一步' | +| `nextStepText`| 下一步按钮的文案 | `string` | '下一步' | +| `gotItText`| 知道了按钮的文案 | `string` | '知道了' | ### GuideTourItem diff --git a/compiled/wechat/src/GuideTour/index.wxml b/compiled/wechat/src/GuideTour/index.wxml index 4219518b5..b98ada4dc 100644 --- a/compiled/wechat/src/GuideTour/index.wxml +++ b/compiled/wechat/src/GuideTour/index.wxml @@ -20,7 +20,7 @@ inline size="small" bind:tap="onCancel"> - 跳过 + {{ jumpText }} - 上一步 + {{ prevStepText }} - 下一步 + {{ nextStepText }} - 知道了 + {{ gotItText }} diff --git a/compiled/wechat/src/GuideTour/props.js b/compiled/wechat/src/GuideTour/props.js index b4795d4a6..a9fcdd20d 100644 --- a/compiled/wechat/src/GuideTour/props.js +++ b/compiled/wechat/src/GuideTour/props.js @@ -3,6 +3,10 @@ export var GuideTourDefaultProps = { swiperable: false, items: [], defaultCurrent: 0, + gotItText: '知道了', + nextStepText: '下一步', + prevStepText: '上一步', + jumpText: '跳过' }; export var GuideTourFunctionalProps = { maskStyle: '', diff --git a/demo/pages/GuideTour/index.axml.tsx b/demo/pages/GuideTour/index.axml.tsx index 7c60e729b..8e6ef14d2 100644 --- a/demo/pages/GuideTour/index.axml.tsx +++ b/demo/pages/GuideTour/index.axml.tsx @@ -46,6 +46,10 @@ export default ({ visible={slotVisible} onCancel="closeTour" onChange="onChange" + jumpText='跳过' + gotItText='知道了' + prevStepText='上一步' + nextStepText='下一步' > step-{props.index} diff --git a/src/GuideTour/index.axml.tsx b/src/GuideTour/index.axml.tsx index 85f0c3bd0..c778aeaae 100644 --- a/src/GuideTour/index.axml.tsx +++ b/src/GuideTour/index.axml.tsx @@ -24,6 +24,10 @@ export default ( items, visible, swiperable, + jumpText, + nextStepText, + prevStepText, + gotItText }: TSXMLProps, { mixin, current }: InternalData ) => ( @@ -43,7 +47,7 @@ export default ( {utils.checkShowJump(mixin.value, items) && ( - 跳过 + {jumpText} )} {utils.checkShowPrev(mixin.value, items) && ( @@ -53,7 +57,7 @@ export default ( onTap="onPrev" data-currentValue={mixin.value} > - 上一步 + {prevStepText} )} {utils.checkShowNext(mixin.value, items) && ( @@ -63,12 +67,12 @@ export default ( onTap="onNext" data-currentValue={mixin.value} > - 下一步 + {nextStepText} )} {utils.checkShowKnow(mixin.value, items) && ( - 知道了 + {gotItText} )} diff --git a/src/GuideTour/index.md b/src/GuideTour/index.md index 8023cfb51..47dabf55f 100644 --- a/src/GuideTour/index.md +++ b/src/GuideTour/index.md @@ -36,6 +36,10 @@ toc: 'content' | `visible` | 是否显示 | `boolean` | `false`| | `onCancel` | 关闭回调 | `() => void` | - | | `onChange` | 步骤改变回调 | `(index: number) => void` | - | +| `jumpText` | 跳过按钮的文案 | `string` | '跳过' | +| `prevStepText`| 上一步按钮的文案 | `string` | '上一步' | +| `nextStepText`| 下一步按钮的文案 | `string` | '下一步' | +| `gotItText`| 知道了按钮的文案 | `string` | '知道了' | ### GuideTourItem diff --git a/src/GuideTour/props.ts b/src/GuideTour/props.ts index f53489bc2..1c03eb1a0 100644 --- a/src/GuideTour/props.ts +++ b/src/GuideTour/props.ts @@ -65,6 +65,26 @@ export interface IGuideTour extends IBaseProps { * @description 步骤改变回调 */ onChange: (index: number) => boolean; + /** + * @description 上一步按钮文案 + * @default "上一步" + */ + prevStepText?: string; + /** + * @description 下一步按钮文案 + * @default "下一步" + */ + nextStepText?: string; + /** + * @description 知道了按钮文案 + * @default "知道了" + */ + gotItText?: string; + /** + * @description 跳过按钮文案 + * @default "跳过" + */ + jumpText?: string; } export const GuideTourDefaultProps: Partial = { @@ -72,6 +92,10 @@ export const GuideTourDefaultProps: Partial = { swiperable: false, items: [], defaultCurrent: 0, + gotItText: '知道了', + nextStepText: '下一步', + prevStepText: '上一步', + jumpText: '跳过' }; export const GuideTourFunctionalProps: Partial = {