Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/AntmJS/vantui into doc_tabbar
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiangXvFan committed Aug 27, 2024
2 parents 67c077c + 4c35c25 commit 718fe88
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/vantui/src/icon/demo/demo1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Row, Col, Icon } from '@antmjs/vantui'

export default function Demo() {
return (
<>
<View style={{ overflow: 'hidden' }}>
<Row>
<View className="demo-block__title">基本用法</View>
<Col className="col" span="6">
Expand Down Expand Up @@ -70,6 +70,6 @@ export default function Demo() {
<Icon name="demo3" classPrefix="page-icon" size="40px" />
</Col>
</Row>
</>
</View>
)
}
6 changes: 3 additions & 3 deletions packages/vantui/src/icon/demo/demo2.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Text } from '@tarojs/components'
import { Text, View } from '@tarojs/components'
import icons from '@vant/icons'
import { Col, Icon } from '@antmjs/vantui'
import * as computed from '../wxs'

export default function Demo() {
return (
<>
<View style={{ overflow: 'hidden' }}>
{icons.basic.map((name, i) => (
<Col
key={i}
Expand All @@ -17,6 +17,6 @@ export default function Demo() {
<Text>{name}</Text>
</Col>
))}
</>
</View>
)
}
7 changes: 4 additions & 3 deletions packages/vantui/src/icon/demo/demo3.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Text } from '@tarojs/components'
import { Text, View } from '@tarojs/components'
import icons from '@vant/icons'
import { Col, Icon } from '@antmjs/vantui'
import * as computed from '../wxs'

export default function Demo() {
return (
<>
//BFC 解决浮动盒子不撑开问题
<View style={{ overflow: 'hidden' }}>
{icons.outline.map((name, i) => (
<Col
key={i}
Expand All @@ -17,6 +18,6 @@ export default function Demo() {
<Text style={{ textAlign: 'center' }}>{name}</Text>
</Col>
))}
</>
</View>
)
}
7 changes: 4 additions & 3 deletions packages/vantui/src/icon/demo/demo4.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Text } from '@tarojs/components'
import { Text, View } from '@tarojs/components'
import icons from '@vant/icons'
import { Col, Icon } from '@antmjs/vantui'
import * as computed from '../wxs'

export default function Demo() {
return (
<>
//BFC 解决浮动盒子不撑开问题
<View style={{ overflow: 'hidden' }}>
{icons.filled.map((name, i) => (
<Col
key={i}
Expand All @@ -17,6 +18,6 @@ export default function Demo() {
<Text style={{ textAlign: 'center' }}>{name}</Text>
</Col>
))}
</>
</View>
)
}
34 changes: 33 additions & 1 deletion packages/vantui/types/tree-select.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { FunctionComponent, TouchEvent, ReactNode } from 'react'
import { ViewProps } from '@tarojs/components'
export interface TreeSelectProps extends ViewProps {
/**
* @description 分类显示所需的数据
* @default []
*/
items?: {
text: number | string
badge?: number | string
Expand All @@ -12,12 +16,34 @@ export interface TreeSelectProps extends ViewProps {
disabled?: boolean
}[]
}[]
/**
* @description 右侧选中项的 id,支持传入数组
* @default -
*/
activeId?: string | number | number[] | string[]
/**
* @description 左侧选中项的索引
* @default 0
*/
mainActiveIndex?: number
value?: number
/**
* @description 高度,默认单位为px
* @default 300
*/
height?: number | string
/**
* @description 右侧项最大选中个数
* @default Infinity
*/
max?: number
/**
* @description 自定义右侧栏选中状态的图标
* @default success
*/
selectedIcon?: string
/**
* @description 点击右侧选择项时触发
*/
onClickItem?: (
event: TouchEvent & {
detail: {
Expand All @@ -27,7 +53,13 @@ export interface TreeSelectProps extends ViewProps {
}
},
) => void
/**
* @description 点击左侧导航时触发
*/
onClickNav?: (event: { detail: { index: number } }) => void
/**
* @description 自定义右侧的显示内容
*/
renderContent?: ReactNode
}
declare const TreeSelect: FunctionComponent<TreeSelectProps>
Expand Down

0 comments on commit 718fe88

Please sign in to comment.