Skip to content

Commit

Permalink
docs: 官网icon的demo浮动导致icon超出盒子之外问题修复 (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiangXvFan authored Aug 15, 2024
1 parent a4f0596 commit 4b0d153
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 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>
)
}

0 comments on commit 4b0d153

Please sign in to comment.