Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui-react
提交
5bd21869
N
nutui-react
项目概览
京东前端
/
nutui-react
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui-react
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5bd21869
编写于
1月 05, 2022
作者:
O
oasis-cloud
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: doc 支持增量在线调试
上级
edf4dc83
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
5 deletion
+15
-5
src/packages/button/doc.md
src/packages/button/doc.md
+3
-1
src/sites/doc/App.scss
src/sites/doc/App.scss
+9
-0
src/sites/doc/App.tsx
src/sites/doc/App.tsx
+2
-1
src/sites/doc/components/demoblock/demoblock.tsx
src/sites/doc/components/demoblock/demoblock.tsx
+1
-3
未找到文件。
src/packages/button/doc.md
浏览文件 @
5bd21869
...
@@ -16,7 +16,8 @@ import { Button } from '@nutui/nutui-react';
...
@@ -16,7 +16,8 @@ import { Button } from '@nutui/nutui-react';
按钮支持
`default`
、
`primary`
、
`info`
、
`warning`
、
`danger`
、
`success`
六种类型,默认为
`default`
。
按钮支持
`default`
、
`primary`
、
`info`
、
`warning`
、
`danger`
、
`success`
六种类型,默认为
`default`
。
```
html
:::demo
```
tsx
<
Button
type
=
"primary"
>
主要按钮
</
Button
>
<
Button
type
=
"primary"
>
主要按钮
</
Button
>
<
Button
type
=
"info"
>
信息按钮
</
Button
>
<
Button
type
=
"info"
>
信息按钮
</
Button
>
<
Button
type
=
"default"
>
默认按钮
</
Button
>
<
Button
type
=
"default"
>
默认按钮
</
Button
>
...
@@ -24,6 +25,7 @@ import { Button } from '@nutui/nutui-react';
...
@@ -24,6 +25,7 @@ import { Button } from '@nutui/nutui-react';
<
Button
type
=
"warning"
>
警告按钮
</
Button
>
<
Button
type
=
"warning"
>
警告按钮
</
Button
>
<
Button
type
=
"success"
>
成功按钮
</
Button
>
<
Button
type
=
"success"
>
成功按钮
</
Button
>
```
```
:::
### 朴素按钮
### 朴素按钮
...
...
src/sites/doc/App.scss
浏览文件 @
5bd21869
...
@@ -57,3 +57,12 @@
...
@@ -57,3 +57,12 @@
}
}
}
}
}
}
.nutui-react--demo-button
{
display
:
none
;
}
.nutui-react--demo-wrapper
{
.nutui-react--demo-button
{
display
:
block
;
}
}
src/sites/doc/App.tsx
浏览文件 @
5bd21869
...
@@ -22,7 +22,7 @@ function myRemarkPlugin() {
...
@@ -22,7 +22,7 @@ function myRemarkPlugin() {
data
.
hName
=
'
div
'
data
.
hName
=
'
div
'
data
.
hProperties
=
{
data
.
hProperties
=
{
class
:
'
demo
'
,
class
:
'
nutui-react--demo-wrapper
'
,
}
}
}
}
})
})
...
@@ -46,6 +46,7 @@ const App = () => {
...
@@ -46,6 +46,7 @@ const App = () => {
remarkPlugins
=
{
[
remarkGfm
,
remarkDirective
,
myRemarkPlugin
]
}
remarkPlugins
=
{
[
remarkGfm
,
remarkDirective
,
myRemarkPlugin
]
}
components
=
{
{
components
=
{
{
code
({
node
,
inline
,
className
,
children
,
...
props
})
{
code
({
node
,
inline
,
className
,
children
,
...
props
})
{
console
.
log
(
'
props
'
,
node
)
const
match
=
/language-
(\w
+
)
/
.
exec
(
className
||
''
)
const
match
=
/language-
(\w
+
)
/
.
exec
(
className
||
''
)
return
!
inline
&&
match
?
(
return
!
inline
&&
match
?
(
<
Demoblock
text
=
{
String
(
children
).
replace
(
/
\n
$/
,
''
)
}
>
<
Demoblock
text
=
{
String
(
children
).
replace
(
/
\n
$/
,
''
)
}
>
...
...
src/sites/doc/components/demoblock/demoblock.tsx
浏览文件 @
5bd21869
...
@@ -3,12 +3,10 @@ interface A {
...
@@ -3,12 +3,10 @@ interface A {
text
:
string
text
:
string
}
}
const
DemoBlock
:
React
.
FunctionComponent
<
A
>
=
(
props
)
=>
{
const
DemoBlock
:
React
.
FunctionComponent
<
A
>
=
(
props
)
=>
{
console
.
log
(
props
.
children
)
return
(
return
(
<>
<>
{
props
.
children
}
{
props
.
children
}
{
props
.
text
}
<
div
className
=
"nutui-react--demo-button"
>
{
props
.
text
}
</
div
>
xxxx
</>
</>
)
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录