Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: n-flex 自 2.37.0 提供该组件。 #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions src/ui/naiveUi/naiveUi2/flex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "NFlex",
"props": {
"align": {
"value": [
"start",
"end",
"center",
"baseline",
"stretch"
],
"description": "Vertically arranged",
"default": "undefined",
"type": "start / end / center / baseline / stretch",
"description_zh": "垂直排列方式"
},
"inline": {
"value": "",
"description": "Whether it is an inline element",
"default": "false",
"type": "boolean",
"description_zh": "是否为行内元素"
},
"justify": {
"value": [
"start",
"end",
"center",
"space-around",
"space-between",
"space-evenly"
],
"description": "Arrange it horizontally",
"default": "start",
"type": "start / end / center / space-around / space-between / space-evenly",
"description_zh": "水平排列方式"
},
"size": {
"value": [
"small",
"medium",
"large"
],
"description": "When it is a number, it is the horizontal and vertical spacing; For arrays, it is [horizontal spacing, vertical spacing]",
"default": "medium",
"type": "small / medium / large / number / [number, number]",
"description_zh": "为数字时,是水平和垂直间距;为数组时,是 [水平间距, 垂直间距]"
},
"vertical": {
"value": "",
"description": "Whether it is vertically laid out",
"default": "false",
"type": "boolean",
"description_zh": "是否垂直布局"
},
"wrap": {
"value": "",
"description": "Whether or not to break the line",
"default": "true",
"type": "boolean",
"description_zh": "是否超出换行"
}
},
"methods": [],
"typeDetail": {},
"events": [],
"link": "https://www.naiveui.com/en-US/dark/components/flex",
"link_zh": "https://www.naiveui.com/zh-CN/dark/components/flex"
}
8 changes: 8 additions & 0 deletions src/ui/naiveUi/naiveUi2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import dataTable from './dataTable.json'
import form from './form.json'
import formItem from './formItem.json'
import formItemGi from './formItemGi.json'
import flex from './flex.json'
import tabs from './tabs.json'
import tab from './tab.json'
import tabPane from './tabPane.json'
Expand Down Expand Up @@ -120,6 +121,7 @@ export function naiveUi2() {
form,
formItem,
formItemGi,
flex,
tabs,
tab,
tabPane,
Expand Down Expand Up @@ -406,6 +408,12 @@ Definitely Maybe
<n-button>Oops!</n-button>
<n-button>Long! Long! Cross the line!</n-button>
</n-space>`],
[flex, '弹性布局', `<n-flex>
<n-button>Oops!</n-button>
<n-button>Oops!</n-button>
<n-button>Oops!</n-button>
<n-button>Long! Long! Cross the line!</n-button>
</n-flex>`],
[spin, '加载', '<n-spin size="small" />'],
[statistic, '统计数据', '<n-statistic label="统计数据" :value="99"></n-statistic'],
[steps, '步骤', `<n-steps
Expand Down