@uiw/doc 4.13.9 → 4.13.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/asset-manifest.json +18 -18
- package/web/index.html +1 -1
- package/web/static/css/{main.12b9013f.css → main.16434244.css} +2 -2
- package/web/static/css/main.16434244.css.map +1 -0
- package/web/static/js/{2316.eee2d477.chunk.js → 2316.de77050f.chunk.js} +2 -2
- package/web/static/js/2316.de77050f.chunk.js.map +1 -0
- package/web/static/js/2854.ff43f045.chunk.js +3 -0
- package/web/static/js/{2854.3e64c006.chunk.js.LICENSE.txt → 2854.ff43f045.chunk.js.LICENSE.txt} +0 -0
- package/web/static/js/2854.ff43f045.chunk.js.map +1 -0
- package/web/static/js/6536.8d9d4af6.chunk.js +2 -0
- package/web/static/js/6536.8d9d4af6.chunk.js.map +1 -0
- package/web/static/js/{7313.c64ca191.chunk.js → 7313.558b6522.chunk.js} +2 -2
- package/web/static/js/{7313.c64ca191.chunk.js.map → 7313.558b6522.chunk.js.map} +1 -1
- package/web/static/js/766.c8931dff.chunk.js +2 -0
- package/web/static/js/766.c8931dff.chunk.js.map +1 -0
- package/web/static/js/9188.b7ce0cf2.chunk.js +2 -0
- package/web/static/js/9188.b7ce0cf2.chunk.js.map +1 -0
- package/web/static/js/{main.1a6d716d.js → main.2c9f6cd8.js} +2 -2
- package/web/static/js/main.2c9f6cd8.js.map +1 -0
- package/web/static/css/main.12b9013f.css.map +0 -1
- package/web/static/js/2316.eee2d477.chunk.js.map +0 -1
- package/web/static/js/2854.3e64c006.chunk.js +0 -3
- package/web/static/js/2854.3e64c006.chunk.js.map +0 -1
- package/web/static/js/6536.6aaaba5b.chunk.js +0 -2
- package/web/static/js/6536.6aaaba5b.chunk.js.map +0 -1
- package/web/static/js/766.7ba76965.chunk.js +0 -2
- package/web/static/js/766.7ba76965.chunk.js.map +0 -1
- package/web/static/js/9188.636af533.chunk.js +0 -2
- package/web/static/js/9188.636af533.chunk.js.map +0 -1
- package/web/static/js/main.1a6d716d.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6536],{36536:function(n,t,e){e.r(t),t.default='Popover \u6c14\u6ce1\u5361\u7247\n===\n\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-popover/file/README.md)\n[](https://www.npmjs.com/package/@uiw/react-popover)\n[](https://npmjs.com/@uiw/react-popover)\n\n\u70b9\u51fb/\u9f20\u6807\u79fb\u5165\u5143\u7d20\uff0c\u5f39\u51fa\u6c14\u6ce1\u5f0f\u7684\u5361\u7247\u6d6e\u5c42\u3002\n\n```jsx\nimport { Popover } from \'uiw\';\n// or\nimport Popover from \'@uiw/react-popover\';\n```\n\n### \u57fa\u7840\u7528\u6cd5\n\n\u6700\u7b80\u5355\u7684\u7528\u6cd5\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Popover, Card, Icon,Row,Col, Button } from \'uiw\';\n\nclass Demo extends React.Component {\n constructor() {\n super();\n this.state = {\n isOpen: false,\n }\n }\n onClick() {\n this.setState({ isOpen: false });\n }\n handleVisibleChange(isOpen) {\n this.setState({ isOpen });\n }\n render() {\n return (\n <Row style={{ alignItems: \'center\' }}>\n <Popover\n trigger="click"\n placement="top"\n isOpen={this.state.isOpen}\n onVisibleChange={this.handleVisibleChange.bind(this)}\n content={\n <Card bordered={false} title="Card\u6807\u9898" extra={<a href="#">\u66f4\u591a</a>} style={{ width: 200 }}>\n <div>Are you sure you want to delete these items? You won\'t be able to recover them.</div>\n <div style={{ display: "flex", justifyContent: "flex-end", marginTop: 15 }}>\n <Button size="small" onClick={this.onClick.bind(this)}>\n Cancel\n </Button>\n <Button type="danger" size="small" onClick={this.onClick.bind(this)}>\n Delete\n </Button>\n </div>\n </Card>\n }\n >\n <Button active={this.state.isOpen}>\u5f39\u51fa\u76ee\u6807</Button>\n </Popover>\n <div style={{ marginLeft: 20 }}>\n <Popover\n trigger="click"\n placement="top"\n content={\n <Card bordered={false} title="Card\u6807\u9898" extra={<a href="#">\u66f4\u591a</a>} style={{ width: 200 }}>\n <div>Are you sure you want to delete these items? You won\'t be able to recover them.</div>\n <div style={{ display: "flex", justifyContent: "flex-end", marginTop: 15 }}>\n <Button size="small" onClick={this.onClick.bind(this)}>\n Cancel\n </Button>\n <Button type="danger" size="small" onClick={this.onClick.bind(this)}>\n Delete\n </Button>\n </div>\n </Card>\n }\n >\n <Icon type="setting" color="#343a40" style={{ fontSize: 20 }} />\n </Popover>\n </div>\n </Row>\n )\n }\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u4f4d\u7f6e\n\n\u4f4d\u7f6e\u6709 `12` \u4e2a\u65b9\u5411\uff0c\u6839\u636e `placement` \u53c2\u6570\u6765\u8bbe\u7f6e\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Popover, Card, Button } from \'uiw\';\n\nconst btnStl = {position: \'relative\', width: 70 }\nconst content = (\n <Card bordered={false} style={{ width: 120 }}>\n <div>Are you sure you want to delete these items? You won\'t be able to recover them.</div>\n </Card>\n)\nconst Demo = () => (\n <div>\n <div style={{ position: \'relative\' }}>\n\n <Popover trigger="click" placement="topLeft" content={content}>\n <Button style={{ ...btnStl, left: 70 }}>TL</Button>\n </Popover>\n <Popover trigger="click" placement="top" content={content}>\n <Button style={{ ...btnStl, left: 70}}>Top</Button>\n </Popover>\n <Popover trigger="click" placement="topRight" content={content}>\n <Button style={{ ...btnStl, left: 70 }}>TR</Button>\n </Popover>\n\n </div>\n <div style={{ position: \'relative\', paddingTop: 10 }}>\n\n <Popover trigger="click" placement="leftTop" content={content}>\n <Button style={{ ...btnStl }}>LT</Button>\n </Popover>\n <Popover trigger="click" placement="rightTop" content={content}>\n <Button style={{ ...btnStl, left: 216 }}>RT</Button>\n </Popover>\n\n </div>\n <div style={{ position: \'relative\', paddingTop: 10 }}>\n\n <Popover trigger="click" placement="left" content={content}>\n <Button style={{ ...btnStl }}>Left</Button>\n </Popover>\n <Popover trigger="click" placement="right" content={content}>\n <Button style={{ ...btnStl, left: 216 }}>Right</Button>\n </Popover>\n\n </div>\n <div style={{ position: \'relative\', paddingTop: 10 }}>\n\n <Popover trigger="click" placement="leftBottom" content={content}>\n <Button style={{ ...btnStl }}>LB</Button>\n </Popover>\n <Popover trigger="click" placement="rightBottom" content={content}>\n <Button style={{ ...btnStl, left: 216 }}>RB</Button>\n </Popover>\n\n </div>\n <div style={{ position: \'relative\', paddingTop: 10 }}>\n\n <Popover trigger="click" placement="bottomLeft" content={content}>\n <Button style={{ ...btnStl, left: 70 }}>BL</Button>\n </Popover>\n <Popover trigger="click" placement="bottom" content={content}>\n <Button style={{ ...btnStl, left: 70 }}>Bottom</Button>\n </Popover>\n <Popover trigger="click" placement="bottomRight" content={content}>\n <Button style={{ ...btnStl, left: 70 }}>BR</Button>\n </Popover>\n\n </div>\n </div>\n)\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u9f20\u6807\u7ecf\u8fc7\u5f39\u51fa\u76ee\u6807\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from \'react-dom\';\nimport { Popover, Card, Button } from \'uiw\';\n\nconst btnStl = {position: \'relative\', width: 70 }\nconst content = (\n <Card\n style={{ width: 220 }}\n bordered={false}\n title="Card\u6807\u9898"\n footer={\n <span>\u8fd9\u91cc\u662f\u9875\u811a</span>\n }\n >\n <div>\u8fd9\u662f\u4f60\u9f20\u6807\u7ecf\u8fc7\u5f39\u51fa\u7684\u76ee\u6807\u3002</div>\n </Card>\n)\nconst Demo = () => (\n <div>\n <Popover trigger="hover" placement="top" content={content}>\n <Button>\u9f20\u6807\u7ecf\u8fc7\u5f39\u51fa\u76ee\u6807</Button>\n </Popover>\n </div>\n)\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u7126\u70b9\u5c55\u793a\n\n\u901a\u8fc7\u8bbe\u7f6e `trigger="focus"` \u8ba9 `Input` \u7ec4\u4ef6\u5728\u83b7\u53d6\u7126\u70b9\u7684\u65f6\u5019\u5c55\u793a `Popover`\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Popover, Card, Button, Input } from \'uiw\';\n\nconst btnStl = {position: \'relative\', width: 70 }\nclass Demo extends React.Component {\n constructor() {\n super();\n this.state = {\n isOpen: false,\n value: \'\',\n }\n }\n onClick(val) {\n const state = { isOpen: false }\n if (val) {\n state.value = val;\n }\n if (val === null) state.value = \'\';\n this.setState({ ...state });\n }\n handleVisibleChange(isOpen) {\n this.setState({ isOpen });\n }\n onChange(e) {\n this.setState({ value: e.target.value });\n }\n renderPopup() {\n return (\n <Card\n style={{ width: 220 }}\n bordered={false}\n footer={\n <div style={{ display: "flex", justifyContent: "flex-end" }}>\n <Button size="small" onClick={this.onClick.bind(this, undefined)}>\n \u53d6\u6d88\n </Button>\n <Button size="small" onClick={this.onClick.bind(this, null)}>\n \u6e05\u7a7a\n </Button>\n <Button type="success" size="small" onClick={this.onClick.bind(this, \'\u8fd9\u662f\u5411 Input \u8f93\u5165\u6846\u63d2\u5165\u7684\u5185\u5bb9\')}>\n \u63d2\u5165\u5185\u5bb9\n </Button>\n </div>\n }\n >\n <div>\u901a\u8fc7\u8bbe\u7f6e `trigger="focus"` \u8ba9 `Input` \u7ec4\u4ef6\u5728\u83b7\u53d6\u7126\u70b9\u7684\u65f6\u5019\u5c55\u793a `Popover`</div>\n </Card>\n )\n }\n render() {\n return (\n <div>\n <div style={{ width: 200 }}>\n <Popover\n trigger="focus"\n placement="top"\n isOpen={this.state.isOpen}\n onVisibleChange={this.handleVisibleChange.bind(this)}\n content={this.renderPopup()}\n >\n <Input placeholder="\u8bf7\u8f93\u5165\u5185\u5bb9" value={this.state.value} onChange={this.onChange.bind(this)}/>\n </Popover>\n </div>\n </div>\n )\n }\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n### usePortal\n\n\u8bbe\u7f6e `usePortal={false}` \u5c06\u6a21\u6001\u5bf9\u8bdd\u6846\u751f\u6210\u5230\u6839\u8282\u70b9\u7684\u91cc\u9762\uff0c\u8fd9\u6837\u4e3a\u4e86\u8ba1\u7b97\u4f4d\u7f6e\u51c6\u786e\uff0c\u4f60\u9700\u8981\u5c06\u7236\u5c42\u6837\u5f0f\u8bbe\u4e3a `position: relative;` \u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Popover, Card, Button } from \'uiw\';\n\nclass Demo extends React.Component {\n constructor() {\n super();\n this.state = {\n isOpen: false,\n }\n }\n onClick() {\n this.setState({ isOpen: false });\n }\n handleVisibleChange(isOpen) {\n this.setState({ isOpen });\n }\n render() {\n return (\n <div>\n <div style={{ position: \'relative\' }}>\n <Popover\n trigger="click"\n placement="right"\n usePortal={false}\n isOpen={this.state.isOpen}\n onVisibleChange={this.handleVisibleChange.bind(this)}\n content={\n <Card bordered={false} title="Card\u6807\u9898" extra={<a href="#">\u66f4\u591a</a>} style={{ width: 200 }}>\n <div>Are you sure you want to delete these items? You won\'t be able to recover them.</div>\n <div style={{ display: "flex", justifyContent: "flex-end", marginTop: 15 }}>\n <Button size="small" onClick={this.onClick.bind(this)}>\n Cancel\n </Button>\n <Button type="danger" size="small" onClick={this.onClick.bind(this)}>\n Delete\n </Button>\n </div>\n </Card>\n }\n >\n <Button>\u5f39\u51fa\u76ee\u6807</Button>\n </Popover>\n </div>\n </div>\n )\n }\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## Props\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c |\n|--------- |-------- |--------- |-------- |\n| content | \u663e\u793a\u7684\u5185\u5bb9 | String,React.ReactNode | - |\n| placement | \u6c14\u6ce1\u6846\u4f4d\u7f6e\uff0c\u53ef\u73b0\u5b9e\u7bad\u5934\u5728\u4e0d\u540c\u7684\u65b9\u4f4d | Enum{`top`, `topLeft`, `topRight`,<br /> `left`, `leftTop`, `leftBottom`,<br /> `right`, `rightTop`, `rightBottom`,<br /> `bottom`, `bottomLeft`, `bottomRight`} | `top` |\n| visibleArrow | \u662f\u5426\u663e\u793a\u7bad\u5934 | Boolean | `true` |\n| delay | \u5ef6\u8fdf\u8fdb\u5165\u548c\u6d88\u5931\uff0c`{ show: 2000, hide: 4000 }` \u6216\u8005\u76f4\u63a5\u8bbe\u7f6e `2000`\uff0c\u53ea\u5bf9 `trigger=hover` \u6709\u6548\uff0c\u7ee7\u627f `<OverlayTrigger />` \u7ec4\u4ef6\u5c5e\u6027 | Object/Number | - |\n| trigger| \u60ac\u505c/\u70b9\u51fb\u5f39\u51fa\u7a97\u53e3\uff0c\u7ee7\u627f `<OverlayTrigger />` \u7ec4\u4ef6\u5c5e\u6027 | Enum{`hover`, `click`, `focus`} | `hover` |\n| disabled | \u662f\u5426\u7981\u7528\u5f39\u51fa\u76ee\u6807 | Boolean | `false` |\n| isOpen | \u9ed8\u8ba4\u662f\u5426\u663e\u793a\u5f39\u7a97\uff0c\u7ee7\u627f `<OverlayTrigger />` \u7ec4\u4ef6\u5c5e\u6027 | Boolean | `false` |\n| autoAdjustOverflow | \u5f39\u51fa\u5c42\u88ab\u906e\u6321\u65f6\u81ea\u52a8\u8c03\u6574\u4f4d\u7f6e\uff0c\u7ee7\u627f `<OverlayTrigger />` \u7ec4\u4ef6\u5c5e\u6027 | Boolean | `false` |\n| onVisibleChange | \u663e\u793a\u9690\u85cf\u7684\u56de\u8c03\uff0c\u7ee7\u627f `<OverlayTrigger />` \u7ec4\u4ef6\u5c5e\u6027 | Function(isVisible:bool) | - |\n\n\u66f4\u591a\u5c5e\u6027\u8bf7\u53c2\u8003 [OverlayTrigger](#/components/overlay-trigger)\u3002\n'}}]);
|
|
2
|
+
//# sourceMappingURL=6536.8d9d4af6.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/6536.8d9d4af6.chunk.js","mappings":"gHAAA","sources":["../../packages/react-popover/README.md"],"sourcesContent":["export default \"Popover 气泡卡片\\n===\\n\\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-popover/file/README.md)\\n[](https://www.npmjs.com/package/@uiw/react-popover)\\n[](https://npmjs.com/@uiw/react-popover)\\n\\n点击/鼠标移入元素,弹出气泡式的卡片浮层。\\n\\n```jsx\\nimport { Popover } from 'uiw';\\n// or\\nimport Popover from '@uiw/react-popover';\\n```\\n\\n### 基础用法\\n\\n最简单的用法。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Popover, Card, Icon,Row,Col, Button } from 'uiw';\\n\\nclass Demo extends React.Component {\\n constructor() {\\n super();\\n this.state = {\\n isOpen: false,\\n }\\n }\\n onClick() {\\n this.setState({ isOpen: false });\\n }\\n handleVisibleChange(isOpen) {\\n this.setState({ isOpen });\\n }\\n render() {\\n return (\\n <Row style={{ alignItems: 'center' }}>\\n <Popover\\n trigger=\\\"click\\\"\\n placement=\\\"top\\\"\\n isOpen={this.state.isOpen}\\n onVisibleChange={this.handleVisibleChange.bind(this)}\\n content={\\n <Card bordered={false} title=\\\"Card标题\\\" extra={<a href=\\\"#\\\">更多</a>} style={{ width: 200 }}>\\n <div>Are you sure you want to delete these items? You won't be able to recover them.</div>\\n <div style={{ display: \\\"flex\\\", justifyContent: \\\"flex-end\\\", marginTop: 15 }}>\\n <Button size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Cancel\\n </Button>\\n <Button type=\\\"danger\\\" size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Delete\\n </Button>\\n </div>\\n </Card>\\n }\\n >\\n <Button active={this.state.isOpen}>弹出目标</Button>\\n </Popover>\\n <div style={{ marginLeft: 20 }}>\\n <Popover\\n trigger=\\\"click\\\"\\n placement=\\\"top\\\"\\n content={\\n <Card bordered={false} title=\\\"Card标题\\\" extra={<a href=\\\"#\\\">更多</a>} style={{ width: 200 }}>\\n <div>Are you sure you want to delete these items? You won't be able to recover them.</div>\\n <div style={{ display: \\\"flex\\\", justifyContent: \\\"flex-end\\\", marginTop: 15 }}>\\n <Button size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Cancel\\n </Button>\\n <Button type=\\\"danger\\\" size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Delete\\n </Button>\\n </div>\\n </Card>\\n }\\n >\\n <Icon type=\\\"setting\\\" color=\\\"#343a40\\\" style={{ fontSize: 20 }} />\\n </Popover>\\n </div>\\n </Row>\\n )\\n }\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 位置\\n\\n位置有 `12` 个方向,根据 `placement` 参数来设置。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Popover, Card, Button } from 'uiw';\\n\\nconst btnStl = {position: 'relative', width: 70 }\\nconst content = (\\n <Card bordered={false} style={{ width: 120 }}>\\n <div>Are you sure you want to delete these items? You won't be able to recover them.</div>\\n </Card>\\n)\\nconst Demo = () => (\\n <div>\\n <div style={{ position: 'relative' }}>\\n\\n <Popover trigger=\\\"click\\\" placement=\\\"topLeft\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70 }}>TL</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"top\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70}}>Top</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"topRight\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70 }}>TR</Button>\\n </Popover>\\n\\n </div>\\n <div style={{ position: 'relative', paddingTop: 10 }}>\\n\\n <Popover trigger=\\\"click\\\" placement=\\\"leftTop\\\" content={content}>\\n <Button style={{ ...btnStl }}>LT</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"rightTop\\\" content={content}>\\n <Button style={{ ...btnStl, left: 216 }}>RT</Button>\\n </Popover>\\n\\n </div>\\n <div style={{ position: 'relative', paddingTop: 10 }}>\\n\\n <Popover trigger=\\\"click\\\" placement=\\\"left\\\" content={content}>\\n <Button style={{ ...btnStl }}>Left</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"right\\\" content={content}>\\n <Button style={{ ...btnStl, left: 216 }}>Right</Button>\\n </Popover>\\n\\n </div>\\n <div style={{ position: 'relative', paddingTop: 10 }}>\\n\\n <Popover trigger=\\\"click\\\" placement=\\\"leftBottom\\\" content={content}>\\n <Button style={{ ...btnStl }}>LB</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"rightBottom\\\" content={content}>\\n <Button style={{ ...btnStl, left: 216 }}>RB</Button>\\n </Popover>\\n\\n </div>\\n <div style={{ position: 'relative', paddingTop: 10 }}>\\n\\n <Popover trigger=\\\"click\\\" placement=\\\"bottomLeft\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70 }}>BL</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"bottom\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70 }}>Bottom</Button>\\n </Popover>\\n <Popover trigger=\\\"click\\\" placement=\\\"bottomRight\\\" content={content}>\\n <Button style={{ ...btnStl, left: 70 }}>BR</Button>\\n </Popover>\\n\\n </div>\\n </div>\\n)\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 鼠标经过弹出目标\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Popover, Card, Button } from 'uiw';\\n\\nconst btnStl = {position: 'relative', width: 70 }\\nconst content = (\\n <Card\\n style={{ width: 220 }}\\n bordered={false}\\n title=\\\"Card标题\\\"\\n footer={\\n <span>这里是页脚</span>\\n }\\n >\\n <div>这是你鼠标经过弹出的目标。</div>\\n </Card>\\n)\\nconst Demo = () => (\\n <div>\\n <Popover trigger=\\\"hover\\\" placement=\\\"top\\\" content={content}>\\n <Button>鼠标经过弹出目标</Button>\\n </Popover>\\n </div>\\n)\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 焦点展示\\n\\n通过设置 `trigger=\\\"focus\\\"` 让 `Input` 组件在获取焦点的时候展示 `Popover`\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Popover, Card, Button, Input } from 'uiw';\\n\\nconst btnStl = {position: 'relative', width: 70 }\\nclass Demo extends React.Component {\\n constructor() {\\n super();\\n this.state = {\\n isOpen: false,\\n value: '',\\n }\\n }\\n onClick(val) {\\n const state = { isOpen: false }\\n if (val) {\\n state.value = val;\\n }\\n if (val === null) state.value = '';\\n this.setState({ ...state });\\n }\\n handleVisibleChange(isOpen) {\\n this.setState({ isOpen });\\n }\\n onChange(e) {\\n this.setState({ value: e.target.value });\\n }\\n renderPopup() {\\n return (\\n <Card\\n style={{ width: 220 }}\\n bordered={false}\\n footer={\\n <div style={{ display: \\\"flex\\\", justifyContent: \\\"flex-end\\\" }}>\\n <Button size=\\\"small\\\" onClick={this.onClick.bind(this, undefined)}>\\n 取消\\n </Button>\\n <Button size=\\\"small\\\" onClick={this.onClick.bind(this, null)}>\\n 清空\\n </Button>\\n <Button type=\\\"success\\\" size=\\\"small\\\" onClick={this.onClick.bind(this, '这是向 Input 输入框插入的内容')}>\\n 插入内容\\n </Button>\\n </div>\\n }\\n >\\n <div>通过设置 `trigger=\\\"focus\\\"` 让 `Input` 组件在获取焦点的时候展示 `Popover`</div>\\n </Card>\\n )\\n }\\n render() {\\n return (\\n <div>\\n <div style={{ width: 200 }}>\\n <Popover\\n trigger=\\\"focus\\\"\\n placement=\\\"top\\\"\\n isOpen={this.state.isOpen}\\n onVisibleChange={this.handleVisibleChange.bind(this)}\\n content={this.renderPopup()}\\n >\\n <Input placeholder=\\\"请输入内容\\\" value={this.state.value} onChange={this.onChange.bind(this)}/>\\n </Popover>\\n </div>\\n </div>\\n )\\n }\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### usePortal\\n\\n设置 `usePortal={false}` 将模态对话框生成到根节点的里面,这样为了计算位置准确,你需要将父层样式设为 `position: relative;` 。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Popover, Card, Button } from 'uiw';\\n\\nclass Demo extends React.Component {\\n constructor() {\\n super();\\n this.state = {\\n isOpen: false,\\n }\\n }\\n onClick() {\\n this.setState({ isOpen: false });\\n }\\n handleVisibleChange(isOpen) {\\n this.setState({ isOpen });\\n }\\n render() {\\n return (\\n <div>\\n <div style={{ position: 'relative' }}>\\n <Popover\\n trigger=\\\"click\\\"\\n placement=\\\"right\\\"\\n usePortal={false}\\n isOpen={this.state.isOpen}\\n onVisibleChange={this.handleVisibleChange.bind(this)}\\n content={\\n <Card bordered={false} title=\\\"Card标题\\\" extra={<a href=\\\"#\\\">更多</a>} style={{ width: 200 }}>\\n <div>Are you sure you want to delete these items? You won't be able to recover them.</div>\\n <div style={{ display: \\\"flex\\\", justifyContent: \\\"flex-end\\\", marginTop: 15 }}>\\n <Button size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Cancel\\n </Button>\\n <Button type=\\\"danger\\\" size=\\\"small\\\" onClick={this.onClick.bind(this)}>\\n Delete\\n </Button>\\n </div>\\n </Card>\\n }\\n >\\n <Button>弹出目标</Button>\\n </Popover>\\n </div>\\n </div>\\n )\\n }\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## Props\\n\\n| 参数 | 说明 | 类型 | 默认值 |\\n|--------- |-------- |--------- |-------- |\\n| content | 显示的内容 | String,React.ReactNode | - |\\n| placement | 气泡框位置,可现实箭头在不同的方位 | Enum{`top`, `topLeft`, `topRight`,<br /> `left`, `leftTop`, `leftBottom`,<br /> `right`, `rightTop`, `rightBottom`,<br /> `bottom`, `bottomLeft`, `bottomRight`} | `top` |\\n| visibleArrow | 是否显示箭头 | Boolean | `true` |\\n| delay | 延迟进入和消失,`{ show: 2000, hide: 4000 }` 或者直接设置 `2000`,只对 `trigger=hover` 有效,继承 `<OverlayTrigger />` 组件属性 | Object/Number | - |\\n| trigger| 悬停/点击弹出窗口,继承 `<OverlayTrigger />` 组件属性 | Enum{`hover`, `click`, `focus`} | `hover` |\\n| disabled | 是否禁用弹出目标 | Boolean | `false` |\\n| isOpen | 默认是否显示弹窗,继承 `<OverlayTrigger />` 组件属性 | Boolean | `false` |\\n| autoAdjustOverflow | 弹出层被遮挡时自动调整位置,继承 `<OverlayTrigger />` 组件属性 | Boolean | `false` |\\n| onVisibleChange | 显示隐藏的回调,继承 `<OverlayTrigger />` 组件属性 | Function(isVisible:bool) | - |\\n\\n更多属性请参考 [OverlayTrigger](#/components/overlay-trigger)。\\n\";"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7313],{67313:function(e,n,l){l.r(n),n.default="SearchSelect \u641c\u7d22\u9009\u62e9\u5668\n===\n\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-search-select/file/README.md)\n[](https://www.npmjs.com/package/@uiw/react-search-select)\n[](https://npmjs.com/@uiw/react-search-select)\n\n\u641c\u7d22\u9009\u62e9\u5668\n\n```jsx\nimport { SearchSelect, Row ,Col } from 'uiw';\n// or\nimport SearchSelect from '@uiw/react-search-select';\n```\n\n## \u57fa\u7840\u793a\u4f8b\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { SearchSelect,Row,Col } from 'uiw';\n\nconst Demo = () => {\n const selectOption=[\n { label: 'a1', value: 1 },\n { label: 'a2', value: 2 },\n { label: 'a3', value: 3 },\n { label: 'a4', value: 4 },\n { label: 'a5', value: 5 },\n { label: 'a6', value: 6 },\n { label: 'a7', value: 7 },\n { label: 'a8', value: 8 },\n ]\n\n const [option, setOption] = React.useState(selectOption);\n const [loading, setLoading] = React.useState(false);\n const [values, setValues] = React.useState([{label: 'a7', value: 7},{label: 'a8', value: 8}]);\n const [value, setValue] = React.useState([{label: 'a7', value: 7}]);\n\n function handleSearch(e) {\n setLoading(true)\n setTimeout(() => {\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\n setOption([...filterOpion]);\n setLoading(false);\n }, 500);\n }\n\n return(\n <Row gutter={20}>\n <Row>\n <SearchSelect\n mode=\"multiple\"\n style={{ width: 176 }}\n showSearch={true}\n labelInValue={true}\n maxTagCount={6}\n allowClear\n value={values}\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n // onSelect={(value)=>console.log('onSelect',value)}\n loading={loading}\n option={option}\n onChange={(value) => {\n console.log('value', value)\n setValues(value)\n }}\n />\n </Row>\n <Row>\n <SearchSelect\n mode=\"single\"\n style={{ width: 176 }}\n showSearch={true}\n labelInValue={true}\n maxTagCount={6}\n allowClear\n value={value}\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n // onSelect={(value)=>console.log('onSelect',value)}\n loading={loading}\n option={option}\n onChange={(value) => {\n console.log('value', value)\n setValue(value)\n }}\n />\n </Row>\n </Row>\n );\n};\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u5728\u8868\u5355\u4e2d\u4f7f\u7528\n\n\u5728 [`<Form />`](#/components/form) \u8868\u5355\u4e2d\u5e94\u7528 `<SearchSelect />` \u7ec4\u4ef6\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true&noScroll=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Form, Row, Col, SearchSelect, Button, Notify } from 'uiw';\n\nconst Demo = () => {\n const selectOption =[\n { label: 'a1', value: 1 },\n { label: 'a2', value: 2 },\n { label: 'a3', value: 3 },\n { label: 'a4', value: 4 },\n { label: 'a5', value: 5 },\n { label: 'a6', value: 6 },\n { label: 'a7', value: 7 },\n { label: 'a8', value: 8 },\n ];\n const [option, setOption] = React.useState(selectOption);\n const [loading, setLoading] = React.useState(false);\n\n function handleSearch(e) {\n setLoading(true)\n setTimeout(() => {\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\n setOption([...filterOpion]);\n setLoading(false);\n }, 500);\n }\n\n return (\n <div>\n <Form\n onSubmitError={(error) => {\n if (error.filed) {\n return { ...error.filed };\n }\n return null;\n }}\n onSubmit={({initial, current}) => {\n const errorObj = {};\n if (!current.selectField) {\n errorObj.selectField = '\u9ed8\u8ba4\u9700\u8981\u9009\u62e9\u5185\u5bb9\uff0c\u9009\u62e9\u5165\u5185\u5bb9';\n }\n if(Object.keys(errorObj).length > 0) {\n const err = new Error();\n err.filed = errorObj;\n Notify.error({ title: '\u63d0\u4ea4\u5931\u8d25\uff01', description: '\u8bf7\u786e\u8ba4\u63d0\u4ea4\u8868\u5355\u662f\u5426\u6b63\u786e\uff01' });\n throw err;\n }\n Notify.success({\n title: '\u63d0\u4ea4\u6210\u529f\uff01',\n description: `\u8868\u5355\u63d0\u4ea4\u6210\u529f\uff0c\u9009\u62e9\u503c\u4e3a\uff1a${current.selectField}\uff0c\u5c06\u81ea\u52a8\u586b\u5145\u521d\u59cb\u5316\u503c\uff01`,\n });\n }}\n fields={{\n selectField: {\n initialValue:[{label: 'a7', value: 7},{label: 'a8', value: 8}],\n children: (\n <SearchSelect\n allowClear\n labelInValue={true}\n showSearch={true}\n mode=\"multiple\"\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n onChange={(v)=>{\n console.log('onChange',v)\n }}\n option={option}\n loading={loading}\n />\n )\n },\n selectSingle: {\n initialValue:[{label: 'a7', value: 7}],\n children: (\n <SearchSelect\n mode=\"single\"\n labelInValue={true}\n showSearch={true}\n allowClear\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n onChange={(v)=>{\n console.log('onChange',v)\n }}\n option={option}\n loading={loading}\n />\n )\n },\n }}\n >\n {({ fields, state, canSubmit }) => {\n return (\n <div>\n <Row gutter={20}>\n <Col fixed>{fields.selectField}</Col>\n </Row>\n <Row gutter={20}>\n <Col fixed>{fields.selectSingle}</Col>\n </Row>\n <Row>\n <Col fixed>\n <Button disabled={!canSubmit()} type=\"primary\" htmlType=\"submit\">\u63d0\u4ea4</Button>\n </Col>\n </Row>\n <Row>\n <Col>\n <pre style={{ padding: 10, marginTop: 10 }}>\n {JSON.stringify(state.current, null, 2)}\n </pre>\n </Col>\n </Row>\n </div>\n )\n }}\n </Form>\n </div>\n );\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## Props\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u7248\u672c |\n| ---- | ---- | ---- | ---- | ---- |\n| allowClear | \u652f\u6301\u6e05\u9664 | Boolean | `false` | - |\n| disabled | \u7981\u7528\u9009\u62e9\u5668 | Boolean | `false` | - |\n| mode | \u9009\u62e9\u6a21\u5f0f: `multiple` `single` | String | `single` | - |\n| defaultValue | \u6307\u5b9a\u9ed8\u8ba4\u9009\u4e2d\u7684\u6761\u76ee | String/Number | - | - |\n| value | \u6307\u5b9a\u5f53\u524d\u9009\u4e2d\u7684\u6761\u76ee\uff0c\u591a\u9009\u65f6\u4e3a\u4e00\u4e2a\u6570\u7ec4 | String \\| Number \\| String[] \\| Number[] \\| LabeledValue \\| LabeledValue[] | - | - |\n| placeholder | \u9009\u62e9\u6846\u9ed8\u8ba4\u6587\u5b57 | String | - | - |\n| maxTagCount | \u591a\u9009\u6a21\u5f0f\u4e0b\u5c55\u793atag\u7684\u4e2a\u6570,\u9ed8\u8ba4\u6240\u6709 | number | - | - |\n| labelInValue | \u5f00\u542f\u4f1a\u628a Select \u7684 value \u7c7b\u578b\u4ece `string/number` \u53d8\u4e3a `{ value: string/number, label: string }` | Boolean | `false` | - |\n| showSearch | \
|
|
2
|
-
//# sourceMappingURL=7313.
|
|
1
|
+
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7313],{67313:function(e,n,l){l.r(n),n.default="SearchSelect \u641c\u7d22\u9009\u62e9\u5668\n===\n\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-search-select/file/README.md)\n[](https://www.npmjs.com/package/@uiw/react-search-select)\n[](https://npmjs.com/@uiw/react-search-select)\n\n\u641c\u7d22\u9009\u62e9\u5668\n\n```jsx\nimport { SearchSelect, Row ,Col } from 'uiw';\n// or\nimport SearchSelect from '@uiw/react-search-select';\n```\n\n## \u57fa\u7840\u793a\u4f8b\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { SearchSelect,Row,Col } from 'uiw';\n\nconst Demo = () => {\n const selectOption=[\n { label: 'a1', value: 1 },\n { label: 'a2', value: 2 },\n { label: 'a3', value: 3 },\n { label: 'a4', value: 4 },\n { label: 'a5', value: 5 },\n { label: 'a6', value: 6 },\n { label: 'a7', value: 7 },\n { label: 'a8', value: 8 },\n ]\n\n const [option, setOption] = React.useState(selectOption);\n const [loading, setLoading] = React.useState(false);\n const [values, setValues] = React.useState([{label: 'a7', value: 7},{label: 'a8', value: 8}]);\n const [value, setValue] = React.useState([{label: 'a7', value: 7}]);\n\n function handleSearch(e) {\n setLoading(true)\n setTimeout(() => {\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\n setOption([...filterOpion]);\n setLoading(false);\n }, 500);\n }\n\n return(\n <Row gutter={20}>\n <Row>\n <SearchSelect\n mode=\"multiple\"\n style={{ width: 176 }}\n showSearch={true}\n labelInValue={true}\n maxTagCount={6}\n allowClear\n value={values}\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n // onSelect={(value)=>console.log('onSelect',value)}\n loading={loading}\n option={option}\n onChange={(value) => {\n console.log('value', value)\n setValues(value)\n }}\n />\n </Row>\n <Row>\n <SearchSelect\n mode=\"single\"\n style={{ width: 176 }}\n showSearch={true}\n labelInValue={true}\n maxTagCount={6}\n allowClear\n value={value}\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n // onSelect={(value)=>console.log('onSelect',value)}\n loading={loading}\n option={option}\n onChange={(value) => {\n console.log('value', value)\n setValue(value)\n }}\n />\n </Row>\n </Row>\n );\n};\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u5728\u8868\u5355\u4e2d\u4f7f\u7528\n\n\u5728 [`<Form />`](#/components/form) \u8868\u5355\u4e2d\u5e94\u7528 `<SearchSelect />` \u7ec4\u4ef6\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true&noScroll=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Form, Row, Col, SearchSelect, Button, Notify } from 'uiw';\n\nconst Demo = () => {\n const selectOption =[\n { label: 'a1', value: 1 },\n { label: 'a2', value: 2 },\n { label: 'a3', value: 3 },\n { label: 'a4', value: 4 },\n { label: 'a5', value: 5 },\n { label: 'a6', value: 6 },\n { label: 'a7', value: 7 },\n { label: 'a8', value: 8 },\n ];\n const [option, setOption] = React.useState(selectOption);\n const [loading, setLoading] = React.useState(false);\n\n function handleSearch(e) {\n setLoading(true)\n setTimeout(() => {\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\n setOption([...filterOpion]);\n setLoading(false);\n }, 500);\n }\n\n return (\n <div>\n <Form\n onSubmitError={(error) => {\n if (error.filed) {\n return { ...error.filed };\n }\n return null;\n }}\n onSubmit={({initial, current}) => {\n const errorObj = {};\n if (!current.selectField) {\n errorObj.selectField = '\u9ed8\u8ba4\u9700\u8981\u9009\u62e9\u5185\u5bb9\uff0c\u9009\u62e9\u5165\u5185\u5bb9';\n }\n if(Object.keys(errorObj).length > 0) {\n const err = new Error();\n err.filed = errorObj;\n Notify.error({ title: '\u63d0\u4ea4\u5931\u8d25\uff01', description: '\u8bf7\u786e\u8ba4\u63d0\u4ea4\u8868\u5355\u662f\u5426\u6b63\u786e\uff01' });\n throw err;\n }\n Notify.success({\n title: '\u63d0\u4ea4\u6210\u529f\uff01',\n description: `\u8868\u5355\u63d0\u4ea4\u6210\u529f\uff0c\u9009\u62e9\u503c\u4e3a\uff1a${current.selectField}\uff0c\u5c06\u81ea\u52a8\u586b\u5145\u521d\u59cb\u5316\u503c\uff01`,\n });\n }}\n fields={{\n selectField: {\n initialValue:[{label: 'a7', value: 7},{label: 'a8', value: 8}],\n children: (\n <SearchSelect\n allowClear\n labelInValue={true}\n showSearch={true}\n mode=\"multiple\"\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n onChange={(v)=>{\n console.log('onChange',v)\n }}\n option={option}\n loading={loading}\n />\n )\n },\n selectSingle: {\n initialValue:[{label: 'a7', value: 7}],\n children: (\n <SearchSelect\n mode=\"single\"\n labelInValue={true}\n showSearch={true}\n allowClear\n disabled={false}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n onSearch={handleSearch}\n onChange={(v)=>{\n console.log('onChange',v)\n }}\n option={option}\n loading={loading}\n />\n )\n },\n }}\n >\n {({ fields, state, canSubmit }) => {\n return (\n <div>\n <Row gutter={20}>\n <Col fixed>{fields.selectField}</Col>\n </Row>\n <Row gutter={20}>\n <Col fixed>{fields.selectSingle}</Col>\n </Row>\n <Row>\n <Col fixed>\n <Button disabled={!canSubmit()} type=\"primary\" htmlType=\"submit\">\u63d0\u4ea4</Button>\n </Col>\n </Row>\n <Row>\n <Col>\n <pre style={{ padding: 10, marginTop: 10 }}>\n {JSON.stringify(state.current, null, 2)}\n </pre>\n </Col>\n </Row>\n </div>\n )\n }}\n </Form>\n </div>\n );\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## Props\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u7248\u672c |\n| ---- | ---- | ---- | ---- | ---- |\n| allowClear | \u652f\u6301\u6e05\u9664 | Boolean | `false` | - |\n| disabled | \u7981\u7528\u9009\u62e9\u5668 | Boolean | `false` | - |\n| mode | \u9009\u62e9\u6a21\u5f0f: `multiple` `single` | String | `single` | - |\n| defaultValue | \u6307\u5b9a\u9ed8\u8ba4\u9009\u4e2d\u7684\u6761\u76ee | String/Number | - | - |\n| value | \u6307\u5b9a\u5f53\u524d\u9009\u4e2d\u7684\u6761\u76ee\uff0c\u591a\u9009\u65f6\u4e3a\u4e00\u4e2a\u6570\u7ec4 | String \\| Number \\| String[] \\| Number[] \\| LabeledValue \\| LabeledValue[] | - | - |\n| placeholder | \u9009\u62e9\u6846\u9ed8\u8ba4\u6587\u5b57 | String | - | - |\n| maxTagCount | \u591a\u9009\u6a21\u5f0f\u4e0b\u5c55\u793atag\u7684\u4e2a\u6570,\u9ed8\u8ba4\u6240\u6709 | number | - | - |\n| labelInValue | \u5f00\u542f\u4f1a\u628a Select \u7684 value \u7c7b\u578b\u4ece `string/number` \u53d8\u4e3a `{ value: string/number, label: string }` | Boolean | `false` | - |\n| showSearch | \u662f\u5426\u53ef\u641c\u7d22 | Boolean | - | - |\n| size | \u9009\u62e9\u6846\u5c3a\u5bf8 | Enum{large, default, small } | `default` | - |\n| tagProps | \u5c06\u53c2\u6570\u4f20\u9012\u7ed9 [`<Tag>`](https://uiwjs.github.io/#/components/tag) \u7ec4\u4ef6 | `TagProps` | `{}` | `4.13.0` |\n| onChange | \u9009\u4e2d option\uff0c\u6216 input \u7684 value\uff0c\u8c03\u7528\u6b64\u51fd\u6570 | function(value:String \\| Number \\| String[] \\| Number[] \\| LabeledValue \\| LabeledValue[]) | - | - |\n| onSearch | \u6587\u672c\u6846\u503c\u53d8\u5316\u65f6\u56de\u8c03 | function(value: String) | - | - |\n| onSelect | \u88ab\u9009\u4e2d\u65f6\u8c03\u7528\uff0c\u53c2\u6570\u4e3a\u9009\u4e2d\u9879\u7684 value | function(value: String/Number ) | - | - |\n| loading | \u52a0\u8f7d\u4e2d\u72b6\u6001 | Boolean | `false` | - |\n"}}]);
|
|
2
|
+
//# sourceMappingURL=7313.558b6522.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/7313.
|
|
1
|
+
{"version":3,"file":"static/js/7313.558b6522.chunk.js","mappings":"gHAAA","sources":["../../packages/react-search-select/README.md"],"sourcesContent":["export default \"SearchSelect 搜索选择器\\n===\\n\\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-search-select/file/README.md)\\n[](https://www.npmjs.com/package/@uiw/react-search-select)\\n[](https://npmjs.com/@uiw/react-search-select)\\n\\n搜索选择器\\n\\n```jsx\\nimport { SearchSelect, Row ,Col } from 'uiw';\\n// or\\nimport SearchSelect from '@uiw/react-search-select';\\n```\\n\\n## 基础示例\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { SearchSelect,Row,Col } from 'uiw';\\n\\nconst Demo = () => {\\n const selectOption=[\\n { label: 'a1', value: 1 },\\n { label: 'a2', value: 2 },\\n { label: 'a3', value: 3 },\\n { label: 'a4', value: 4 },\\n { label: 'a5', value: 5 },\\n { label: 'a6', value: 6 },\\n { label: 'a7', value: 7 },\\n { label: 'a8', value: 8 },\\n ]\\n\\n const [option, setOption] = React.useState(selectOption);\\n const [loading, setLoading] = React.useState(false);\\n const [values, setValues] = React.useState([{label: 'a7', value: 7},{label: 'a8', value: 8}]);\\n const [value, setValue] = React.useState([{label: 'a7', value: 7}]);\\n\\n function handleSearch(e) {\\n setLoading(true)\\n setTimeout(() => {\\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\\n setOption([...filterOpion]);\\n setLoading(false);\\n }, 500);\\n }\\n\\n return(\\n <Row gutter={20}>\\n <Row>\\n <SearchSelect\\n mode=\\\"multiple\\\"\\n style={{ width: 176 }}\\n showSearch={true}\\n labelInValue={true}\\n maxTagCount={6}\\n allowClear\\n value={values}\\n disabled={false}\\n placeholder=\\\"请输入选择\\\"\\n onSearch={handleSearch}\\n // onSelect={(value)=>console.log('onSelect',value)}\\n loading={loading}\\n option={option}\\n onChange={(value) => {\\n console.log('value', value)\\n setValues(value)\\n }}\\n />\\n </Row>\\n <Row>\\n <SearchSelect\\n mode=\\\"single\\\"\\n style={{ width: 176 }}\\n showSearch={true}\\n labelInValue={true}\\n maxTagCount={6}\\n allowClear\\n value={value}\\n disabled={false}\\n placeholder=\\\"请输入选择\\\"\\n onSearch={handleSearch}\\n // onSelect={(value)=>console.log('onSelect',value)}\\n loading={loading}\\n option={option}\\n onChange={(value) => {\\n console.log('value', value)\\n setValue(value)\\n }}\\n />\\n </Row>\\n </Row>\\n );\\n};\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 在表单中使用\\n\\n在 [`<Form />`](#/components/form) 表单中应用 `<SearchSelect />` 组件。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true&noScroll=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Form, Row, Col, SearchSelect, Button, Notify } from 'uiw';\\n\\nconst Demo = () => {\\n const selectOption =[\\n { label: 'a1', value: 1 },\\n { label: 'a2', value: 2 },\\n { label: 'a3', value: 3 },\\n { label: 'a4', value: 4 },\\n { label: 'a5', value: 5 },\\n { label: 'a6', value: 6 },\\n { label: 'a7', value: 7 },\\n { label: 'a8', value: 8 },\\n ];\\n const [option, setOption] = React.useState(selectOption);\\n const [loading, setLoading] = React.useState(false);\\n\\n function handleSearch(e) {\\n setLoading(true)\\n setTimeout(() => {\\n const filterOpion= selectOption.filter(item=>!!item.label.includes(e.trim()))\\n setOption([...filterOpion]);\\n setLoading(false);\\n }, 500);\\n }\\n\\n return (\\n <div>\\n <Form\\n onSubmitError={(error) => {\\n if (error.filed) {\\n return { ...error.filed };\\n }\\n return null;\\n }}\\n onSubmit={({initial, current}) => {\\n const errorObj = {};\\n if (!current.selectField) {\\n errorObj.selectField = '默认需要选择内容,选择入内容';\\n }\\n if(Object.keys(errorObj).length > 0) {\\n const err = new Error();\\n err.filed = errorObj;\\n Notify.error({ title: '提交失败!', description: '请确认提交表单是否正确!' });\\n throw err;\\n }\\n Notify.success({\\n title: '提交成功!',\\n description: `表单提交成功,选择值为:${current.selectField},将自动填充初始化值!`,\\n });\\n }}\\n fields={{\\n selectField: {\\n initialValue:[{label: 'a7', value: 7},{label: 'a8', value: 8}],\\n children: (\\n <SearchSelect\\n allowClear\\n labelInValue={true}\\n showSearch={true}\\n mode=\\\"multiple\\\"\\n disabled={false}\\n placeholder=\\\"请输入选择\\\"\\n onSearch={handleSearch}\\n onChange={(v)=>{\\n console.log('onChange',v)\\n }}\\n option={option}\\n loading={loading}\\n />\\n )\\n },\\n selectSingle: {\\n initialValue:[{label: 'a7', value: 7}],\\n children: (\\n <SearchSelect\\n mode=\\\"single\\\"\\n labelInValue={true}\\n showSearch={true}\\n allowClear\\n disabled={false}\\n placeholder=\\\"请输入选择\\\"\\n onSearch={handleSearch}\\n onChange={(v)=>{\\n console.log('onChange',v)\\n }}\\n option={option}\\n loading={loading}\\n />\\n )\\n },\\n }}\\n >\\n {({ fields, state, canSubmit }) => {\\n return (\\n <div>\\n <Row gutter={20}>\\n <Col fixed>{fields.selectField}</Col>\\n </Row>\\n <Row gutter={20}>\\n <Col fixed>{fields.selectSingle}</Col>\\n </Row>\\n <Row>\\n <Col fixed>\\n <Button disabled={!canSubmit()} type=\\\"primary\\\" htmlType=\\\"submit\\\">提交</Button>\\n </Col>\\n </Row>\\n <Row>\\n <Col>\\n <pre style={{ padding: 10, marginTop: 10 }}>\\n {JSON.stringify(state.current, null, 2)}\\n </pre>\\n </Col>\\n </Row>\\n </div>\\n )\\n }}\\n </Form>\\n </div>\\n );\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## Props\\n\\n| 参数 | 说明 | 类型 | 默认值 | 版本 |\\n| ---- | ---- | ---- | ---- | ---- |\\n| allowClear | 支持清除 | Boolean | `false` | - |\\n| disabled | 禁用选择器 | Boolean | `false` | - |\\n| mode | 选择模式: `multiple` `single` | String | `single` | - |\\n| defaultValue | 指定默认选中的条目 | String/Number | - | - |\\n| value | 指定当前选中的条目,多选时为一个数组 | String \\\\| Number \\\\| String[] \\\\| Number[] \\\\| LabeledValue \\\\| LabeledValue[] | - | - |\\n| placeholder | 选择框默认文字 | String | - | - |\\n| maxTagCount | 多选模式下展示tag的个数,默认所有 | number | - | - |\\n| labelInValue | 开启会把 Select 的 value 类型从 `string/number` 变为 `{ value: string/number, label: string }` | Boolean | `false` | - |\\n| showSearch | 是否可搜索 | Boolean | - | - |\\n| size | 选择框尺寸 | Enum{large, default, small } | `default` | - |\\n| tagProps | 将参数传递给 [`<Tag>`](https://uiwjs.github.io/#/components/tag) 组件 | `TagProps` | `{}` | `4.13.0` |\\n| onChange | 选中 option,或 input 的 value,调用此函数 | function(value:String \\\\| Number \\\\| String[] \\\\| Number[] \\\\| LabeledValue \\\\| LabeledValue[]) | - | - |\\n| onSearch | 文本框值变化时回调 | function(value: String) | - | - |\\n| onSelect | 被选中时调用,参数为选中项的 value | function(value: String/Number ) | - | - |\\n| loading | 加载中状态 | Boolean | `false` | - |\\n\";"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[766],{80766:function(e,n,l){l.r(n),n.default="SearchTree \u5e26\u641c\u7d22\u7684Tree\u9009\u62e9\u63a7\u4ef6\n===\n\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-search-tree/file/README.md)\n[](https://www.npmjs.com/package/@uiw/react-search-tree)\n[](https://npmjs.com/@uiw/react-search-tree)\n\n\u4f7f\u7528\u6811\u9009\u62e9\u63a7\u4ef6\u53ef\u4ee5\u5b8c\u6574\u5c55\u73b0\u5176\u4e2d\u7684\u5c42\u7ea7\u5173\u7cfb\uff0c\u5e76\u5177\u6709\u9009\u4e2d\u72b6\u6001\u3002\u65b0\u7ec4\u4ef6 v4.11.7+ \u652f\u6301\u3002\n\n```jsx\nimport { SearchTree } from 'uiw';\n// or\nimport SearchTree from '@uiw/react-search-tree';\n```\n\n### \u57fa\u7840\u5b9e\u4f8b\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React, { useState, useEffect, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { SearchTree } from 'uiw';\n\nconst data = [\n {\n label: '\u4e0a\u6d77\u5e02',\n key: 1,\n children:[\n { label: '\u9ec4\u6d66\u533a', key: 2 },\n { label: '\u5362\u6e7e\u533a', key: 3 },\n {\n label: '\u5f90\u6c47\u533a',\n key: 4,\n children:[\n { label: '\u534a\u6dde\u56ed\u8def\u8857\u9053', key: 6 },\n { label: '\u5357\u4eac\u4e1c\u8def\u8857\u9053', key: 7 },\n { label: '\u5916\u6ee9\u8857\u9053', key: 8 },\n ]\n },\n ]\n },\n {\n label: '\u5317\u4eac\u5e02',\n key: 9,\n children:[\n { label: '\u4e1c\u57ce\u533a', key: 10 },\n { label: '\u897f\u57ce\u533a', key: 11 },\n {\n label: '\u5d07\u6587\u533a',\n key: 12,\n children:[\n { label: '\u4e1c\u82b1\u5e02\u8857\u9053', key: 13 },\n { label: '\u4f53\u80b2\u9986\u8def\u8857\u9053', key: 14 },\n { label: '\u524d\u95e8\u8857\u9053', key: 15 },\n ]\n },\n ]\n },\n { label: '\u6fb3\u95e8', key: 16 },\n];\n\nconst datas =[\n { label: '\u4e0a\u6d77\u5e02', key: 0 },\n {\n label: '\u5317\u4eac\u5e02', key: 1,\n children:[\n { label: '\u4e1c\u57ce\u533a', key: 10 },\n ]\n },\n { label: '\u6210\u90fd\u5e02', key: 2 },\n]\n\nconst Demo = () => {\n\nconst [value,valueSet]=useState([{ label: '\u9ec4\u6d66\u533a', key: 12 }])\nconst [values,valuesSet]=useState([{ label: '\u5317\u4eac\u5e02', key: 1 }])\nconst [valueSinge,valueSingeSet]=useState([{ label: '\u4e0a\u6d77\u5e02', key: '1-0-0' }])\n\nconst onChange=(selectd, selectedAll, isChecked)=>{\n console.log('SearchTree-> onChange',selectedAll, selectd, isChecked)\n valueSet(selectedAll)\n}\n\nconst onChanges=(selectd, selectedAll, isChecked)=>{\n console.log('SearchTree-> onChange',selectedAll, selectd, isChecked)\n valuesSet(selectedAll)\n}\n\nconst onChangeSinge=(selectd, selectedAll, isChecked)=>{\n console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)\n valueSingeSet(selectedAll)\n}\n\n return (\n <>\n <Row>\n <Col >\n <label>\u591a\u9009</label>\n <SearchTree\n style={{ width:300 }}\n allowClear={true}\n onSearch={(searchValue)=>console.log('multiple',searchValue)}\n onChange={onChange}\n value={value}\n options={data}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n </Col>\n </Row>\n <label>\u5355\u9009</label>\n <Row>\n <SearchTree\n style={{width:300}}\n loading={true}\n multiple={false}\n allowClear={true}\n onSearch={(searchValue)=>console.log('singe',searchValue)}\n onChange={onChanges}\n value={values}\n options={datas}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n <Col style={{marginLeft:20}}>\n <SearchTree\n style={{width:300}}\n multiple={false}\n allowClear={true}\n onSearch={(searchValue)=>console.log('singe',searchValue)}\n onChange={onChangeSinge}\n value={valueSinge}\n options={data}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n </Col>\n </Row>\n </>\n )\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## \u81ea\u5b9a\u4e49\u7a7a\u9009\u9879\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React, { useState, useEffect, useRef } from 'react';\nimport { SearchTree } from 'uiw';\n\nconst Demo = () => {\n return(\n <>\n <SearchTree\n style={{ width:200 }}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n <SearchTree\n style={{ width:200,marginTop:5 }}\n emptyOption={<span>\u6682\u65e0\u6570\u636e..</span>}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n </>\n )\n}\n\nReactDOM.render(<Demo />, _mount_);\n```\n\n## Form\u4e2d\u4f7f\u7528\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React, { useState, useEffect, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Form, Button, SearchTree, Card, Row, Col } from 'uiw';;\n\n\nconst Demo = () => {\nconst form=useRef()\n\n const data = [\n {\n label: '\u4e0a\u6d77\u5e02',\n key: '1-0-0',\n children:[\n { label: '\u9ec4\u6d66\u533a', key: '1-0-1' },\n { label: '\u5362\u6e7e\u533a', key: '1-0-2' },\n {\n label: '\u5f90\u6c47\u533a',\n key: '1-0-3',\n children:[\n { label: '\u534a\u6dde\u56ed\u8def\u8857\u9053', key: '1-1-0' },\n { label: '\u5357\u4eac\u4e1c\u8def\u8857\u9053', key: '1-2-0' },\n { label: '\u5916\u6ee9\u8857\u9053', key: '1-3-0' },\n ]\n },\n ]\n },\n {\n label: '\u5317\u4eac\u5e02',\n key: '2-0-0',\n children:[\n { label: '\u4e1c\u57ce\u533a', key: '2-1-0' },\n { label: '\u897f\u57ce\u533a', key: '2-2-0' },\n {\n label: '\u5d07\u6587\u533a',\n key: '2-3-0',\n children:[\n { label: '\u4e1c\u82b1\u5e02\u8857\u9053', key: '2-3-1' },\n { label: '\u4f53\u80b2\u9986\u8def\u8857\u9053', key: '2-3-2' },\n { label: '\u524d\u95e8\u8857\u9053', key: '2-3-3' },\n ]\n },\n ]\n },\n { label: '\u6fb3\u95e8', key: '3' },\n ];\n\n const setValue=()=>{\n form.current.setFields({\n searchTree: [{ label: '\u4e1c\u57ce\u533a', key: '2-1-0' }, { label: '\u5916\u6ee9\u8857\u9053', key: '1-3-0' }],\n searchTreeSinge:[{ label: '\u524d\u95e8\u8857\u9053', key: '2-3-3' }]\n })\n }\n\n const resetValue=()=>{\n form.current.resetForm()\n }\n\n return (\n <div>\n <Form\n ref={form}\n onSubmitError={(error) => {\n if (error.filed) {\n return { ...error.filed };\n }\n return null;\n }}\n onSubmit={({initial, current}) => {\n const errorObj = {};\n if (!current.searchTree) {\n errorObj.searchTree = '\u9ed8\u8ba4\u9700\u8981\u9009\u62e9\u5185\u5bb9\uff0c\u9009\u62e9\u5165\u5185\u5bb9';\n }\n if(Object.keys(errorObj).length > 0) {\n const err = new Error();\n err.filed = errorObj;\n Notify.error({ title: '\u63d0\u4ea4\u5931\u8d25\uff01', description: '\u8bf7\u786e\u8ba4\u63d0\u4ea4\u8868\u5355\u662f\u5426\u6b63\u786e\uff01' });\n throw err;\n }\n Notify.success({\n title: '\u63d0\u4ea4\u6210\u529f\uff01',\n description: `\u8868\u5355\u63d0\u4ea4\u6210\u529f\uff0c\u9009\u62e9\u503c\u4e3a\uff1a${current.selectField}\uff0c\u5c06\u81ea\u52a8\u586b\u5145\u521d\u59cb\u5316\u503c\uff01`,\n });\n }}\n fields={{\n searchTree: {\n initialValue:[ { label: '\u9ec4\u6d66\u533a', key: '1-0-1' }, { label: '\u5362\u6e7e\u533a', key: '1-0-2' }],\n children: (\n <SearchTree\n allowClear={true}\n onSearch={(searchValue)=>console.log('SearchTree-> SearchTreeOption',searchValue)}\n onChange={(selectd, selectedAll, isChecked)=>console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)}\n options={data}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n )\n },\n searchTreeSinge: {\n initialValue:[{ label: '\u4e1c\u82b1\u5e02\u8857\u9053', key: '2-3-1' }],\n children: (\n <SearchTree\n multiple={false}\n allowClear={true}\n onSearch={(searchValue)=>console.log('SearchTree-> SearchTreeOption',searchValue)}\n onChange={(selectd, selectedAll, isChecked)=>console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)}\n options={data}\n placeholder=\"\u8bf7\u8f93\u5165\u9009\u62e9\"\n />\n )\n },\n }}\n >\n {({ fields, state, canSubmit }) => {\n return (\n <div>\n <Row style={{display:'flex',flexDirection:'column'}}>\n <div>\u591a\u9009</div>\n <Col >{fields.searchTree}</Col>\n </Row>\n <Row style={{display:'flex',flexDirection:'column'}}>\n <label>\u5355\u9009</label>\n <Col >{fields.searchTreeSinge}</Col>\n </Row>\n <Row>\n <Col fixed>\n <Button disabled={!canSubmit()} type=\"primary\" htmlType=\"submit\">\u63d0\u4ea4</Button>\n <Button onClick={setValue} type=\"primary\" >setValue</Button>\n <Button onClick={resetValue} type=\"primary\" >\u91cd\u7f6e</Button>\n </Col>\n </Row>\n <Row>\n <Col>\n <pre style={{ padding: 10, marginTop: 10 }}>\n {JSON.stringify(state.current, null, 2)}\n </pre>\n </Col>\n </Row>\n </div>\n )\n }}\n </Form>\n </div>\n );\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## Props\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c |\n|--------- |-------- |--------- |-------- |\n| allowClear | \u652f\u6301\u6e05\u9664 | Boolean | `false` |\n| disabled | \u7981\u7528\u9009\u62e9\u5668 | Boolean | `false` |\n| multiple | \u662f\u5426\u53ef\u4ee5\u591a\u9009 | Boolean | `true` |\n| value | \u6307\u5b9a\u5f53\u524d\u9009\u4e2d\u7684\u6761\u76ee | [{label:string, key:string}] | - |\n| options | \u4e0b\u62c9\u6570\u636e\u6e90,\u53ef\u53c2\u8003Tree\u4e0b\u62c9\u6570\u636e\u6e90 | [{label:string, key:string, children: [{label:string, key:string}] }] | - |\n| placeholder | \u9009\u62e9\u6846\u9ed8\u8ba4\u6587\u5b57 | String | - |\n| size | \u9009\u62e9\u6846\u5c3a\u5bf8 | Enum{large, default, small } | `default` |\n| onChange | \u9009\u4e2d option\uff0c\u6216 input \u7684 value\uff0c\u8c03\u7528\u6b64\u51fd\u6570 | function(selectd, selectdAll, isChecked)=>void | - |\n| onSearch | \u6587\u672c\u6846\u503c\u53d8\u5316\u65f6\u56de\u8c03 | function(searchValue) | - |\n| loading | \u52a0\u8f7d\u4e2d\u72b6\u6001 | Boolean | `false` |\n| emptyOption | \u81ea\u5b9a\u4e49\u4e0b\u62c9\u9009\u9879\u4e3a\u7a7a\u65f6\u663e\u793a\u5185\u5bb9 | React.ReactNode | [Empty](https://uiwjs.github.io/#/components/empty) |\n\n"}}]);
|
|
2
|
+
//# sourceMappingURL=766.c8931dff.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/766.c8931dff.chunk.js","mappings":"+GAAA","sources":["../../packages/react-search-tree/README.md"],"sourcesContent":["export default \"SearchTree 带搜索的Tree选择控件\\n===\\n\\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-search-tree/file/README.md)\\n[](https://www.npmjs.com/package/@uiw/react-search-tree)\\n[](https://npmjs.com/@uiw/react-search-tree)\\n\\n使用树选择控件可以完整展现其中的层级关系,并具有选中状态。新组件 v4.11.7+ 支持。\\n\\n```jsx\\nimport { SearchTree } from 'uiw';\\n// or\\nimport SearchTree from '@uiw/react-search-tree';\\n```\\n\\n### 基础实例\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React, { useState, useEffect, useRef } from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { SearchTree } from 'uiw';\\n\\nconst data = [\\n {\\n label: '上海市',\\n key: 1,\\n children:[\\n { label: '黄浦区', key: 2 },\\n { label: '卢湾区', key: 3 },\\n {\\n label: '徐汇区',\\n key: 4,\\n children:[\\n { label: '半淞园路街道', key: 6 },\\n { label: '南京东路街道', key: 7 },\\n { label: '外滩街道', key: 8 },\\n ]\\n },\\n ]\\n },\\n {\\n label: '北京市',\\n key: 9,\\n children:[\\n { label: '东城区', key: 10 },\\n { label: '西城区', key: 11 },\\n {\\n label: '崇文区',\\n key: 12,\\n children:[\\n { label: '东花市街道', key: 13 },\\n { label: '体育馆路街道', key: 14 },\\n { label: '前门街道', key: 15 },\\n ]\\n },\\n ]\\n },\\n { label: '澳门', key: 16 },\\n];\\n\\nconst datas =[\\n { label: '上海市', key: 0 },\\n {\\n label: '北京市', key: 1,\\n children:[\\n { label: '东城区', key: 10 },\\n ]\\n },\\n { label: '成都市', key: 2 },\\n]\\n\\nconst Demo = () => {\\n\\nconst [value,valueSet]=useState([{ label: '黄浦区', key: 12 }])\\nconst [values,valuesSet]=useState([{ label: '北京市', key: 1 }])\\nconst [valueSinge,valueSingeSet]=useState([{ label: '上海市', key: '1-0-0' }])\\n\\nconst onChange=(selectd, selectedAll, isChecked)=>{\\n console.log('SearchTree-> onChange',selectedAll, selectd, isChecked)\\n valueSet(selectedAll)\\n}\\n\\nconst onChanges=(selectd, selectedAll, isChecked)=>{\\n console.log('SearchTree-> onChange',selectedAll, selectd, isChecked)\\n valuesSet(selectedAll)\\n}\\n\\nconst onChangeSinge=(selectd, selectedAll, isChecked)=>{\\n console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)\\n valueSingeSet(selectedAll)\\n}\\n\\n return (\\n <>\\n <Row>\\n <Col >\\n <label>多选</label>\\n <SearchTree\\n style={{ width:300 }}\\n allowClear={true}\\n onSearch={(searchValue)=>console.log('multiple',searchValue)}\\n onChange={onChange}\\n value={value}\\n options={data}\\n placeholder=\\\"请输入选择\\\"\\n />\\n </Col>\\n </Row>\\n <label>单选</label>\\n <Row>\\n <SearchTree\\n style={{width:300}}\\n loading={true}\\n multiple={false}\\n allowClear={true}\\n onSearch={(searchValue)=>console.log('singe',searchValue)}\\n onChange={onChanges}\\n value={values}\\n options={datas}\\n placeholder=\\\"请输入选择\\\"\\n />\\n <Col style={{marginLeft:20}}>\\n <SearchTree\\n style={{width:300}}\\n multiple={false}\\n allowClear={true}\\n onSearch={(searchValue)=>console.log('singe',searchValue)}\\n onChange={onChangeSinge}\\n value={valueSinge}\\n options={data}\\n placeholder=\\\"请输入选择\\\"\\n />\\n </Col>\\n </Row>\\n </>\\n )\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## 自定义空选项\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React, { useState, useEffect, useRef } from 'react';\\nimport { SearchTree } from 'uiw';\\n\\nconst Demo = () => {\\n return(\\n <>\\n <SearchTree\\n style={{ width:200 }}\\n placeholder=\\\"请输入选择\\\"\\n />\\n <SearchTree\\n style={{ width:200,marginTop:5 }}\\n emptyOption={<span>暂无数据..</span>}\\n placeholder=\\\"请输入选择\\\"\\n />\\n </>\\n )\\n}\\n\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## Form中使用\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React, { useState, useEffect, useRef } from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Form, Button, SearchTree, Card, Row, Col } from 'uiw';;\\n\\n\\nconst Demo = () => {\\nconst form=useRef()\\n\\n const data = [\\n {\\n label: '上海市',\\n key: '1-0-0',\\n children:[\\n { label: '黄浦区', key: '1-0-1' },\\n { label: '卢湾区', key: '1-0-2' },\\n {\\n label: '徐汇区',\\n key: '1-0-3',\\n children:[\\n { label: '半淞园路街道', key: '1-1-0' },\\n { label: '南京东路街道', key: '1-2-0' },\\n { label: '外滩街道', key: '1-3-0' },\\n ]\\n },\\n ]\\n },\\n {\\n label: '北京市',\\n key: '2-0-0',\\n children:[\\n { label: '东城区', key: '2-1-0' },\\n { label: '西城区', key: '2-2-0' },\\n {\\n label: '崇文区',\\n key: '2-3-0',\\n children:[\\n { label: '东花市街道', key: '2-3-1' },\\n { label: '体育馆路街道', key: '2-3-2' },\\n { label: '前门街道', key: '2-3-3' },\\n ]\\n },\\n ]\\n },\\n { label: '澳门', key: '3' },\\n ];\\n\\n const setValue=()=>{\\n form.current.setFields({\\n searchTree: [{ label: '东城区', key: '2-1-0' }, { label: '外滩街道', key: '1-3-0' }],\\n searchTreeSinge:[{ label: '前门街道', key: '2-3-3' }]\\n })\\n }\\n\\n const resetValue=()=>{\\n form.current.resetForm()\\n }\\n\\n return (\\n <div>\\n <Form\\n ref={form}\\n onSubmitError={(error) => {\\n if (error.filed) {\\n return { ...error.filed };\\n }\\n return null;\\n }}\\n onSubmit={({initial, current}) => {\\n const errorObj = {};\\n if (!current.searchTree) {\\n errorObj.searchTree = '默认需要选择内容,选择入内容';\\n }\\n if(Object.keys(errorObj).length > 0) {\\n const err = new Error();\\n err.filed = errorObj;\\n Notify.error({ title: '提交失败!', description: '请确认提交表单是否正确!' });\\n throw err;\\n }\\n Notify.success({\\n title: '提交成功!',\\n description: `表单提交成功,选择值为:${current.selectField},将自动填充初始化值!`,\\n });\\n }}\\n fields={{\\n searchTree: {\\n initialValue:[ { label: '黄浦区', key: '1-0-1' }, { label: '卢湾区', key: '1-0-2' }],\\n children: (\\n <SearchTree\\n allowClear={true}\\n onSearch={(searchValue)=>console.log('SearchTree-> SearchTreeOption',searchValue)}\\n onChange={(selectd, selectedAll, isChecked)=>console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)}\\n options={data}\\n placeholder=\\\"请输入选择\\\"\\n />\\n )\\n },\\n searchTreeSinge: {\\n initialValue:[{ label: '东花市街道', key: '2-3-1' }],\\n children: (\\n <SearchTree\\n multiple={false}\\n allowClear={true}\\n onSearch={(searchValue)=>console.log('SearchTree-> SearchTreeOption',searchValue)}\\n onChange={(selectd, selectedAll, isChecked)=>console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)}\\n options={data}\\n placeholder=\\\"请输入选择\\\"\\n />\\n )\\n },\\n }}\\n >\\n {({ fields, state, canSubmit }) => {\\n return (\\n <div>\\n <Row style={{display:'flex',flexDirection:'column'}}>\\n <div>多选</div>\\n <Col >{fields.searchTree}</Col>\\n </Row>\\n <Row style={{display:'flex',flexDirection:'column'}}>\\n <label>单选</label>\\n <Col >{fields.searchTreeSinge}</Col>\\n </Row>\\n <Row>\\n <Col fixed>\\n <Button disabled={!canSubmit()} type=\\\"primary\\\" htmlType=\\\"submit\\\">提交</Button>\\n <Button onClick={setValue} type=\\\"primary\\\" >setValue</Button>\\n <Button onClick={resetValue} type=\\\"primary\\\" >重置</Button>\\n </Col>\\n </Row>\\n <Row>\\n <Col>\\n <pre style={{ padding: 10, marginTop: 10 }}>\\n {JSON.stringify(state.current, null, 2)}\\n </pre>\\n </Col>\\n </Row>\\n </div>\\n )\\n }}\\n </Form>\\n </div>\\n );\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## Props\\n\\n| 参数 | 说明 | 类型 | 默认值 |\\n|--------- |-------- |--------- |-------- |\\n| allowClear | 支持清除 | Boolean | `false` |\\n| disabled | 禁用选择器 | Boolean | `false` |\\n| multiple | 是否可以多选 | Boolean | `true` |\\n| value | 指定当前选中的条目 | [{label:string, key:string}] | - |\\n| options | 下拉数据源,可参考Tree下拉数据源 | [{label:string, key:string, children: [{label:string, key:string}] }] | - |\\n| placeholder | 选择框默认文字 | String | - |\\n| size | 选择框尺寸 | Enum{large, default, small } | `default` |\\n| onChange | 选中 option,或 input 的 value,调用此函数 | function(selectd, selectdAll, isChecked)=>void | - |\\n| onSearch | 文本框值变化时回调 | function(searchValue) | - |\\n| loading | 加载中状态 | Boolean | `false` |\\n| emptyOption | 自定义下拉选项为空时显示内容 | React.ReactNode | [Empty](https://uiwjs.github.io/#/components/empty) |\\n\\n\";"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9188],{49188:function(e,n,t){t.r(n),n.default="Progress \u8fdb\u5ea6\u6761\n===\n\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-progress/file/README.md)\n[](https://www.npmjs.com/package/@uiw/react-progress)\n[](https://npmjs.com/@uiw/react-progress)\n\n\u7528\u4e8e\u5c55\u793a\u64cd\u4f5c\u8fdb\u5ea6\uff0c\u544a\u77e5\u7528\u6237\u5f53\u524d\u72b6\u6001\u548c\u9884\u671f\u3002\n\n```jsx\nimport { Progress } from 'uiw';\nconst { Line, Circle } = Progress;\n// or\nimport Progress from '@uiw/react-progress';\n```\n\n### \u57fa\u672c\u7528\u6cd5\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nconst { Line } = Progress;\nconst sty = {marginBottom:10}\nconst Demo = () => (\n <div>\n <Progress.Line style={sty} percent={30} />\n <Line style={sty} percent={50} status=\"active\" />\n <Line style={sty} percent={70} status=\"exception\" />\n <Line style={sty} percent={100} />\n <Line style={sty} percent={50} showText={false} />\n </div>\n);\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u8fdb\u5ea6\u6761\u5927\u5c0f\u8bbe\u7f6e\n\n\u8bbe\u7f6e\u53c2\u6570`strokeWidth`\u5373\u53ef\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nconst { Line } = Progress;\nconst sty = {marginBottom:10}\nconst Demo = () => (\n <div>\n <Progress.Line style={sty} strokeWidth={6} percent={30} />\n <Line style={sty} strokeWidth={14} percent={50} status=\"active\" />\n <Line style={sty} strokeWidth={18} percent={70} status=\"exception\" />\n <Line style={sty} strokeWidth={12} percent={100} />\n <Line style={sty} strokeWidth={14} percent={50} showText={false} />\n </div>\n);\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u5706\u5708\u8fdb\u5ea6\u6761\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nconst { Circle } = Progress;\nconst sty = {marginBottom:10}\nconst Demo = () => (\n <div>\n <Progress.Circle style={sty} percent={30} />\n <Circle style={sty} percent={75} />\n <Circle style={sty} percent={70} status=\"exception\" />\n <Circle style={sty} percent={100} />\n </div>\n);\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u4e0d\u540c\u5c3a\u5bf8\u5706\u5708\u8fdb\u5ea6\u6761\n\n\u901a\u8fc7`strokeWidth`\u8bbe\u7f6e\u5706\u5708\u8fdb\u5ea6\u5bbd\u5e26\uff0c\u901a\u8fc7`width`\uff08`type=\"circle\"`\u6709\u6548\uff09\u8bbe\u7f6e\u5706\u5708\u5927\u5c0f\uff0c\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nlet sty = {marginRight:15}\nconst Demo = () => (\n <div>\n <Progress.Circle style={sty} width={80} strokeWidth={2} percent={30} />\n <Progress.Circle style={sty} width={100} strokeWidth={10} percent={75} />\n <Progress.Circle style={sty} percent={70} status=\"exception\" />\n <Progress.Circle style={sty} width={100} strokeWidth={3} percent={75} />\n </div>\n);\nReactDOM.render(<Demo />, _mount_);\n```\n\n### \u52a8\u6001\u5c55\u793a\n\n\u8fdb\u5ea6\u6761\u52a8\u6001\u5c55\u793a\u66f4\u76f4\u89c2\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nclass Demo extends React.Component {\n constructor(props){\n super(props);\n this.state = {\n percent: 50,\n }\n }\n increase(){\n let percent = this.state.percent + 10;\n if (percent > 100) {\n percent = 100;\n }\n this.setState({ percent });\n }\n decline(){\n let percent = this.state.percent - 10;\n if (percent < 0) {\n percent = 0;\n }\n this.setState({ percent });\n }\n render() {\n let sty = {marginRight:15}\n return (\n <div style={{maxWidth:400}}>\n <Progress.Line percent={this.state.percent} />\n <Progress.Circle percent={this.state.percent} />\n <div>\n <button onClick={this.decline.bind(this)}>minus -</button>\n <button onClick={this.increase.bind(this)}>plus +</button>\n </div>\n </div>\n )\n }\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n## \u81ea\u5b9a\u4e49\u6587\u5b57\u683c\u5f0f\n\n`format` \u5c5e\u6027\u6307\u5b9a\u683c\u5f0f\u3002\n\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Progress } from 'uiw';\n\nconst sty = {marginRight:10}\nclass Demo extends React.Component {\n render() {\n return (\n <div>\n <Progress.Circle style={sty} percent={80} type=\"circle\" format={percent => (\n <span>\n {`${percent} %`}\n <div style={{padding:\"10px 0 0 0\",fontSize:21}}>\u5df2\u5b8c\u6210</div>\n </span>\n )}/>\n <Progress.Circle style={sty} percent={70} status=\"exception\" type=\"circle\" format={percent => (\n <span>\n {`${percent} %`}\n <div style={{padding:\"10px 0 0 0\",fontSize:21}}>\u5df2\u5173\u95ed</div>\n </span>\n )}/>\n <Progress.Circle style={sty} percent={100} type=\"circle\" format={percent => `\u5df2\u5b8c\u6210`}/>\n <Progress.Line style={sty} percent={70} format={percent => `${percent}\u2103`}/>\n <Progress.Line strokeWidth={18} percent={1} status=\"exception\" />\n </div>\n )\n }\n}\nReactDOM.render(<Demo />, _mount_);\n```\n\n\n## API\n\n| \u53c2\u6570 | \u8bf4\u660e | \u7c7b\u578b | \u9ed8\u8ba4\u503c |\n|------ |-------- |---------- |-------- |\n| percent | \u767e\u5206\u6bd4 | Number | `0` |\n| showText | \u662f\u5426\u663e\u793a\u8fdb\u5ea6\u6761\u6587\u5b57\u5185\u5bb9 | Boolean | `true` |\n| format | \u5185\u5bb9\u7684\u6a21\u677f\u51fd\u6570\uff0c\u81ea\u5b9a\u4e49\u6587\u5b57\u683c\u5f0f\u3002 | Function | - |\n| strokeWidth | \u8fdb\u5ea6\u6761\u7ebf\u7684\u5bbd\u5ea6 | Number | `6` |\n| width | \u5706\u5f62\u8fdb\u5ea6\u6761\u753b\u5e03\u5bbd\u5ea6\uff0c\u5355\u4f4d px ,`type=\"circle\"`\u6709\u6548| Number | `126` |\n| status | \u72b6\u6001\uff0c\u53ef\u9009\uff1a`success` `exception` `active` | Enum{'`success`', '`exception`'} | - |\n"}}]);
|
|
2
|
+
//# sourceMappingURL=9188.b7ce0cf2.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/9188.b7ce0cf2.chunk.js","mappings":"gHAAA","sources":["../../packages/react-progress/README.md"],"sourcesContent":["export default \"Progress 进度条\\n===\\n\\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-progress/file/README.md)\\n[](https://www.npmjs.com/package/@uiw/react-progress)\\n[](https://npmjs.com/@uiw/react-progress)\\n\\n用于展示操作进度,告知用户当前状态和预期。\\n\\n```jsx\\nimport { Progress } from 'uiw';\\nconst { Line, Circle } = Progress;\\n// or\\nimport Progress from '@uiw/react-progress';\\n```\\n\\n### 基本用法\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nconst { Line } = Progress;\\nconst sty = {marginBottom:10}\\nconst Demo = () => (\\n <div>\\n <Progress.Line style={sty} percent={30} />\\n <Line style={sty} percent={50} status=\\\"active\\\" />\\n <Line style={sty} percent={70} status=\\\"exception\\\" />\\n <Line style={sty} percent={100} />\\n <Line style={sty} percent={50} showText={false} />\\n </div>\\n);\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 进度条大小设置\\n\\n设置参数`strokeWidth`即可\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nconst { Line } = Progress;\\nconst sty = {marginBottom:10}\\nconst Demo = () => (\\n <div>\\n <Progress.Line style={sty} strokeWidth={6} percent={30} />\\n <Line style={sty} strokeWidth={14} percent={50} status=\\\"active\\\" />\\n <Line style={sty} strokeWidth={18} percent={70} status=\\\"exception\\\" />\\n <Line style={sty} strokeWidth={12} percent={100} />\\n <Line style={sty} strokeWidth={14} percent={50} showText={false} />\\n </div>\\n);\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 圆圈进度条\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nconst { Circle } = Progress;\\nconst sty = {marginBottom:10}\\nconst Demo = () => (\\n <div>\\n <Progress.Circle style={sty} percent={30} />\\n <Circle style={sty} percent={75} />\\n <Circle style={sty} percent={70} status=\\\"exception\\\" />\\n <Circle style={sty} percent={100} />\\n </div>\\n);\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 不同尺寸圆圈进度条\\n\\n通过`strokeWidth`设置圆圈进度宽带,通过`width`(`type=\\\"circle\\\"`有效)设置圆圈大小,\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nlet sty = {marginRight:15}\\nconst Demo = () => (\\n <div>\\n <Progress.Circle style={sty} width={80} strokeWidth={2} percent={30} />\\n <Progress.Circle style={sty} width={100} strokeWidth={10} percent={75} />\\n <Progress.Circle style={sty} percent={70} status=\\\"exception\\\" />\\n <Progress.Circle style={sty} width={100} strokeWidth={3} percent={75} />\\n </div>\\n);\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n### 动态展示\\n\\n进度条动态展示更直观。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nclass Demo extends React.Component {\\n constructor(props){\\n super(props);\\n this.state = {\\n percent: 50,\\n }\\n }\\n increase(){\\n let percent = this.state.percent + 10;\\n if (percent > 100) {\\n percent = 100;\\n }\\n this.setState({ percent });\\n }\\n decline(){\\n let percent = this.state.percent - 10;\\n if (percent < 0) {\\n percent = 0;\\n }\\n this.setState({ percent });\\n }\\n render() {\\n let sty = {marginRight:15}\\n return (\\n <div style={{maxWidth:400}}>\\n <Progress.Line percent={this.state.percent} />\\n <Progress.Circle percent={this.state.percent} />\\n <div>\\n <button onClick={this.decline.bind(this)}>minus -</button>\\n <button onClick={this.increase.bind(this)}>plus +</button>\\n </div>\\n </div>\\n )\\n }\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n## 自定义文字格式\\n\\n`format` 属性指定格式。\\n\\n<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->\\n```jsx\\nimport React from 'react';\\nimport ReactDOM from 'react-dom';\\nimport { Progress } from 'uiw';\\n\\nconst sty = {marginRight:10}\\nclass Demo extends React.Component {\\n render() {\\n return (\\n <div>\\n <Progress.Circle style={sty} percent={80} type=\\\"circle\\\" format={percent => (\\n <span>\\n {`${percent} %`}\\n <div style={{padding:\\\"10px 0 0 0\\\",fontSize:21}}>已完成</div>\\n </span>\\n )}/>\\n <Progress.Circle style={sty} percent={70} status=\\\"exception\\\" type=\\\"circle\\\" format={percent => (\\n <span>\\n {`${percent} %`}\\n <div style={{padding:\\\"10px 0 0 0\\\",fontSize:21}}>已关闭</div>\\n </span>\\n )}/>\\n <Progress.Circle style={sty} percent={100} type=\\\"circle\\\" format={percent => `已完成`}/>\\n <Progress.Line style={sty} percent={70} format={percent => `${percent}℃`}/>\\n <Progress.Line strokeWidth={18} percent={1} status=\\\"exception\\\" />\\n </div>\\n )\\n }\\n}\\nReactDOM.render(<Demo />, _mount_);\\n```\\n\\n\\n## API\\n\\n| 参数 | 说明 | 类型 | 默认值 |\\n|------ |-------- |---------- |-------- |\\n| percent | 百分比 | Number | `0` |\\n| showText | 是否显示进度条文字内容 | Boolean | `true` |\\n| format | 内容的模板函数,自定义文字格式。 | Function | - |\\n| strokeWidth | 进度条线的宽度 | Number | `6` |\\n| width | 圆形进度条画布宽度,单位 px ,`type=\\\"circle\\\"`有效| Number | `126` |\\n| status | 状态,可选:`success` `exception` `active` | Enum{'`success`', '`exception`'} | - |\\n\";"],"names":[],"sourceRoot":""}
|