-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Tencent/tdesign-vue into…
… develop
- Loading branch information
Showing
84 changed files
with
2,149 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<t-jumper layout="vertical" @change="handleChange" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
methods: { | ||
handleChange(ctx) { | ||
console.log('ctx', ctx); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<t-space direction="vertical" style="text-align: center"> | ||
<t-jumper size="small" /> | ||
<t-jumper /> | ||
<t-jumper size="large" /> | ||
</t-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<t-jumper :tips="tips" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
tips: { prev: '前尘忆梦', current: '回到现在', next: '展望未来' }, | ||
}; | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### Jumper Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
disabled | Boolean / Object | - | Typescript:`boolean | JumperDisabledConfig` `type JumperDisabledConfig = { prev?: boolean; current?: boolean; next?: boolean; }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts) | N | ||
layout | String | horizontal | horizontal or vertical。options:horizontal/vertical | N | ||
showCurrent | Boolean | true | Typescript:`boolean` | N | ||
size | String | medium | Button size。options:small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N | ||
tips | Object | - | Typescript:`boolean | JumperTipsConfig` `type JumperTipsConfig = { prev?: string; current?: string; next?: string; }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts) | N | ||
variant | String | text | options:text/outline | N | ||
onChange | Function | | TS 类型:`(context: {e: MouseEvent, trigger: JumperTrigger}) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts)。<br/>`type JumperTrigger = 'prev' | 'current' | 'next'`<br/> | N | ||
|
||
### Jumper Events | ||
|
||
name | params | description | ||
-- | -- | -- | ||
change | `(context: {e: MouseEvent, trigger: JumperTrigger})` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts)。<br/>`type JumperTrigger = 'prev' | 'current' | 'next'`<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### Jumper Props | ||
|
||
名称 | 类型 | 默认值 | 说明 | 必传 | ||
-- | -- | -- | -- | -- | ||
disabled | Boolean / Object | - | 按钮禁用配置。TS 类型:`boolean | JumperDisabledConfig` `type JumperDisabledConfig = { prev?: boolean; current?: boolean; next?: boolean; }`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts) | N | ||
layout | String | horizontal | 按钮方向。可选项:horizontal/vertical | N | ||
showCurrent | Boolean | true | 是否展示当前按钮。TS 类型:`boolean` | N | ||
size | String | medium | 按钮尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N | ||
tips | Object | - | 提示文案配置,值为 `true` 显示默认文案;值为 `false` 不显示提示文案;值类型为对象则单独配置文案内容。TS 类型:`boolean | JumperTipsConfig` `type JumperTipsConfig = { prev?: string; current?: string; next?: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts) | N | ||
variant | String | text | 按钮形式。可选项:text/outline | N | ||
onChange | Function | | TS 类型:`(context: {e: MouseEvent, trigger: JumperTrigger}) => void`<br/>按钮点击事件回调。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts)。<br/>`type JumperTrigger = 'prev' | 'current' | 'next'`<br/> | N | ||
|
||
### Jumper Events | ||
|
||
名称 | 参数 | 描述 | ||
-- | -- | -- | ||
change | `(context: {e: MouseEvent, trigger: JumperTrigger})` | 按钮点击事件回调。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/jumper/type.ts)。<br/>`type JumperTrigger = 'prev' | 'current' | 'next'`<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- 该脚本为自动生成,如有需要请在 /script/generate-usage.js 中调整 --> | ||
<template> | ||
<base-usage :code="usageCode" :config-list="configList" :panel-list="panelList" @PanelChange="onPanelChange"> | ||
<template #jumper="{ configProps }"> | ||
<t-jumper v-bind="configProps"></t-jumper> | ||
</template> | ||
</base-usage> | ||
</template> | ||
|
||
<script setup lang="jsx"> | ||
/* eslint-disable */ | ||
import { ref, onMounted } from '@vue/composition-api'; | ||
import configJson from './props.json'; | ||
const configList = ref(configJson); | ||
const panelList = [{ label: 'jumper', value: 'jumper' }]; | ||
const usageCodeMap = { jumper: '\n <t-jumper v-bind="configProps"></t-jumper>\n ' }; | ||
const usageCode = ref(`<template>${usageCodeMap[panelList[0].value].trim()}</template>`); | ||
function onPanelChange(panel) { | ||
usageCode.value = `<template>${usageCodeMap[panel].trim()}</template>`; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[ | ||
{ | ||
"name": "disabled", | ||
"type": "Boolean", | ||
"defaultValue": false, | ||
"options": [] | ||
}, | ||
{ | ||
"name": "layout", | ||
"type": "enum", | ||
"defaultValue": "horizontal", | ||
"options": [ | ||
{ | ||
"label": "horizontal", | ||
"value": "horizontal" | ||
}, | ||
{ | ||
"label": "vertical", | ||
"value": "vertical" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "showCurrent", | ||
"type": "Boolean", | ||
"defaultValue": true, | ||
"options": [] | ||
}, | ||
{ | ||
"name": "size", | ||
"type": "enum", | ||
"defaultValue": "medium", | ||
"options": [ | ||
{ | ||
"label": "small", | ||
"value": "small" | ||
}, | ||
{ | ||
"label": "medium", | ||
"value": "medium" | ||
}, | ||
{ | ||
"label": "large", | ||
"value": "large" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "variant", | ||
"type": "enum", | ||
"defaultValue": "text", | ||
"options": [ | ||
{ | ||
"label": "text", | ||
"value": "text" | ||
}, | ||
{ | ||
"label": "outline", | ||
"value": "outline" | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.