mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
types(SubmitBar): add SubmitBarTextAlign type
This commit is contained in:
parent
ecd2fb4f13
commit
f95567ade7
@ -127,7 +127,7 @@ export default {
|
|||||||
The component exports the following type definitions:
|
The component exports the following type definitions:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { SubmitBarProps } from 'vant';
|
import type { SubmitBarProps, SubmitBarTextAlign } from 'vant';
|
||||||
```
|
```
|
||||||
|
|
||||||
## Theming
|
## Theming
|
||||||
|
@ -134,7 +134,7 @@ export default {
|
|||||||
组件导出以下类型定义:
|
组件导出以下类型定义:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { SubmitBarProps } from 'vant';
|
import type { SubmitBarProps, SubmitBarTextAlign } from 'vant';
|
||||||
```
|
```
|
||||||
|
|
||||||
## 主题定制
|
## 主题定制
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
import {
|
import { PropType, defineComponent, ExtractPropTypes } from 'vue';
|
||||||
PropType,
|
|
||||||
CSSProperties,
|
|
||||||
defineComponent,
|
|
||||||
ExtractPropTypes,
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
import {
|
||||||
truthProp,
|
truthProp,
|
||||||
makeStringProp,
|
makeStringProp,
|
||||||
@ -17,6 +12,8 @@ import { Button, ButtonType } from '../button';
|
|||||||
|
|
||||||
const [name, bem, t] = createNamespace('submit-bar');
|
const [name, bem, t] = createNamespace('submit-bar');
|
||||||
|
|
||||||
|
export type SubmitBarTextAlign = 'left' | 'right';
|
||||||
|
|
||||||
const submitBarProps = {
|
const submitBarProps = {
|
||||||
tip: String,
|
tip: String,
|
||||||
label: String,
|
label: String,
|
||||||
@ -25,7 +22,7 @@ const submitBarProps = {
|
|||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
currency: makeStringProp('¥'),
|
currency: makeStringProp('¥'),
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
textAlign: String as PropType<CSSProperties['textAlign']>,
|
textAlign: String as PropType<SubmitBarTextAlign>,
|
||||||
buttonText: String,
|
buttonText: String,
|
||||||
buttonType: makeStringProp<ButtonType>('danger'),
|
buttonType: makeStringProp<ButtonType>('danger'),
|
||||||
buttonColor: String,
|
buttonColor: String,
|
||||||
|
@ -3,4 +3,4 @@ import _SubmitBar from './SubmitBar';
|
|||||||
|
|
||||||
export const SubmitBar = withInstall(_SubmitBar);
|
export const SubmitBar = withInstall(_SubmitBar);
|
||||||
export default SubmitBar;
|
export default SubmitBar;
|
||||||
export type { SubmitBarProps } from './SubmitBar';
|
export type { SubmitBarProps, SubmitBarTextAlign } from './SubmitBar';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user