-
Notifications
You must be signed in to change notification settings - Fork 1
/
3536-0fc6a0c94865ed238975.js
1 lines (1 loc) · 39 KB
/
3536-0fc6a0c94865ed238975.js
1
(self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[3536],{63536:(n,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>z});var t=s(73450),p=s(73118),e=s(27378),o=s(57318),c=s(90039),l=s(59934),u=s(98317),i=s(23476),r=s(24246);function k(n,a){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),s.push.apply(s,t)}return s}function d(n){for(var a=1;a<arguments.length;a++){var s=null!=arguments[a]?arguments[a]:{};a%2?k(Object(s),!0).forEach((function(a){(0,t.Z)(n,a,s[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):k(Object(s)).forEach((function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(s,a))}))}return n}var g=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.V,{outline:!0,children:"标签内容"}),(0,r.jsx)(l.I,{children:(0,r.jsx)("a",{href:"#",children:"链接"})})]})},m=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.V,{outline:!0,children:"小标签"}),(0,r.jsx)(c.V,{outline:!0,size:"medium",children:"中标签"}),(0,r.jsx)(c.V,{outline:!0,size:"large",children:"大标签"})]})},h=function(){function n(){var n=e.useState(!0),a=(0,p.Z)(n,2),s=a[0],t=a[1];return(0,r.jsx)("div",{children:(0,r.jsx)(u.S,{selected:s,onChange:n=>{t(n)},children:"选中标签"})})}return(0,r.jsx)(n,{})},y=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.V,{theme:"grey",children:"灰色"}),(0,r.jsx)(c.V,{theme:"red",children:"红色"}),(0,r.jsx)(c.V,{theme:"green",children:"绿色"}),(0,r.jsx)(c.V,{theme:"yellow",children:"黄色"}),(0,r.jsx)(c.V,{theme:"blue",children:"蓝色"}),(0,r.jsx)(c.V,{theme:"grey",outline:!0,children:"灰色"}),(0,r.jsx)(c.V,{theme:"red",outline:!0,children:"红色"}),(0,r.jsx)(c.V,{theme:"green",outline:!0,children:"绿色"}),(0,r.jsx)(c.V,{theme:"yellow",outline:!0,children:"黄色"}),(0,r.jsx)(c.V,{theme:"blue",outline:!0,children:"蓝色"})]})},b=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.V,{style:{color:"#fff",borderColor:"#9370db",backgroundColor:"#9370db"},children:"#9370db"}),(0,r.jsx)(c.V,{style:{borderColor:"#9370db",color:"#9370db"},outline:!0,children:"#9370db"}),(0,r.jsx)(c.V,{style:{borderColor:"#87d068",backgroundColor:"#cfefdf",color:"#00a854"},children:"自定义色彩"}),(0,r.jsx)(c.V,{style:{borderColor:"#778899",backgroundColor:"#778899"},rounded:!1,children:"非圆角"}),(0,r.jsx)(c.V,{style:{borderColor:"#48d1cc",backgroundColor:"#48d1cc",fontSize:14},children:"大标签"})]})},f=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.V,{closable:!0,onClose:n=>{i.g.success("Close tag")},outline:!0,children:"自定义色彩"}),(0,r.jsx)(c.V,{theme:"grey",closable:!0,closeButtonStyle:{color:"#969799"},children:"自定义关闭按钮颜色"})]})};function v(n){return(0,r.jsx)(n.tag,d(d({},n.attributes),{},{dangerouslySetInnerHTML:{__html:n.html}}))}function j(n){return(0,r.jsx)(v,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function T(n){return(0,r.jsx)(v,{tag:"style",html:n.style})}function x(n,a){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(a+=n.offsetTop),x(n.parentNode,a);return a}class C extends e.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{showCode:!1}),(0,t.Z)(this,"toggle",(()=>{this.setState({showCode:!this.state.showCode})}))}render(){var n=this.state.showCode,a=this.props,s=a.title,t=a.src,p=a.children;return(0,r.jsxs)("div",{className:"zandoc-react-demo",children:[(0,r.jsx)("div",{className:"zandoc-react-demo__preview",children:p}),(0,r.jsxs)("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle,children:[(0,r.jsx)("div",{className:"zandoc-react-demo__title",children:(0,r.jsx)("p",{children:s||""})}),(0,r.jsx)("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle ".concat(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})]}),n&&(0,r.jsx)("pre",{className:"zandoc-react-demo__code",children:(0,r.jsx)(v,{tag:"code",html:t,attributes:{className:"language-jsx"}})})]})}}class z extends e.Component{componentDidMount(){var n=location.hash;if(n){var a=document.querySelector('a[href="'.concat(n,'"]'));a&&(0,o.l)(document.documentElement,0,x(a,-9))}}render(){return e.createElement("div",{className:"zandoc-react-container"},e.createElement(T,{style:".zent-tag{\n\tmargin: 0 10px 5px 0;\n}\n\n.zent-tag{\n\tmargin: 0 10px 5px 0;\n}"}),e.createElement(j,{html:'<h2 class="anchor-heading"><a href="#tag-biao-qian">¶</a><a href="javascript:void(0)" id="tag-biao-qian" class="anchor-point"></a>Tag 标签</h2>\n<p>常用于标记对象属性、分类,通常为圆角矩形。</p>\n<h3 class="anchor-heading"><a href="#shi-yong-zhi-nan">¶</a><a href="javascript:void(0)" id="shi-yong-zhi-nan" class="anchor-point"></a>使用指南</h3>\n<ul>\n<li>当需要对内容进行属性、维度的标记,或补充描述时使用</li>\n<li>使用标签进行跨层级的检索</li>\n<li>标签文本建议不超过7个字,展示标签的尺寸可根据需要配置</li>\n</ul>\n<h3 class="anchor-heading"><a href="#dai-ma-yan-shi">¶</a><a href="javascript:void(0)" id="dai-ma-yan-shi" class="anchor-point"></a>代码演示</h3>'}),e.createElement(C,{title:"基础用法",id:"Demobasic",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span><span class="token punctuation">,</span> <span class="token maybe-class-name">LinkTag</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>标签内容<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">LinkTag</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>#<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>链接<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">LinkTag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(g)),e.createElement(C,{title:"标签尺寸",id:"Demosize",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>小标签<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">outline</span> <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>medium<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>中标签<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">outline</span> <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>large<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>大标签<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(m)),e.createElement(C,{title:"可选中标签",id:"Demoselecttag",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span><span class="token punctuation">,</span> <span class="token maybe-class-name">SelectTag</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">function</span> <span class="token function"><span class="token maybe-class-name">Demo</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> <span class="token punctuation">[</span>selected<span class="token punctuation">,</span> setSelected<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token maybe-class-name">React</span><span class="token punctuation">.</span><span class="token method function property-access">useState</span><span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n <span class="token keyword">const</span> <span class="token function-variable function">handleChange</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">selected</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token function">setSelected</span><span class="token punctuation">(</span>selected<span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">SelectTag</span></span> <span class="token attr-name">selected</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>selected<span class="token punctuation">}</span></span> <span class="token attr-name">onChange</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>handleChange<span class="token punctuation">}</span></span><span class="token punctuation">></span></span>选中标签<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">SelectTag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Demo</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(h)),e.createElement(j,{html:'<h4 class="anchor-heading"><a href="#yi-xia-gong-neng-xin-ban-she-ji-yu-yan-yi-fei-qi-jin-zuo-wei-lao-ban-shi-yong-de-can-kao">¶</a><a href="javascript:void(0)" id="yi-xia-gong-neng-xin-ban-she-ji-yu-yan-yi-fei-qi-jin-zuo-wei-lao-ban-shi-yong-de-can-kao" class="anchor-point"></a>以下功能新版设计语言已废弃,仅作为老版使用的参考</h4>'}),e.createElement(C,{title:"两种风格和五种预定样式:`red`,`green`,`yellow`,`blue`,`grey`",id:"Demostyle",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>grey<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>灰色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>red<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>红色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>green<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>绿色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>yellow<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>黄色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>blue<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>蓝色<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>grey<span class="token punctuation">"</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 灰色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>red<span class="token punctuation">"</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 红色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>green<span class="token punctuation">"</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 绿色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>yellow<span class="token punctuation">"</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 黄色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>blue<span class="token punctuation">"</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 蓝色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(y)),e.createElement(C,{title:"支持自定义色彩,非圆角,标签大小",id:"Democustom",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n <span class="token literal-property property">color</span><span class="token operator">:</span> <span class="token string">\'#fff\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">borderColor</span><span class="token operator">:</span> <span class="token string">\'#9370db\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">backgroundColor</span><span class="token operator">:</span> <span class="token string">\'#9370db\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n #9370db\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n <span class="token literal-property property">borderColor</span><span class="token operator">:</span> <span class="token string">\'#9370db\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">color</span><span class="token operator">:</span> <span class="token string">\'#9370db\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">outline</span>\n <span class="token punctuation">></span></span>\n #9370db\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n <span class="token literal-property property">borderColor</span><span class="token operator">:</span> <span class="token string">\'#87d068\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">backgroundColor</span><span class="token operator">:</span> <span class="token string">\'#cfefdf\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">color</span><span class="token operator">:</span> <span class="token string">\'#00a854\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n 自定义色彩\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n <span class="token literal-property property">borderColor</span><span class="token operator">:</span> <span class="token string">\'#778899\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">backgroundColor</span><span class="token operator">:</span> <span class="token string">\'#778899\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">rounded</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n 非圆角\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n <span class="token literal-property property">borderColor</span><span class="token operator">:</span> <span class="token string">\'#48d1cc\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">backgroundColor</span><span class="token operator">:</span> <span class="token string">\'#48d1cc\'</span><span class="token punctuation">,</span>\n <span class="token literal-property property">fontSize</span><span class="token operator">:</span> <span class="token number">14</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n 大标签\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(b)),e.createElement(C,{title:"关闭标签,支持添加关闭事件",id:"Demoonclose",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tag</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Notify</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">const</span> <span class="token function-variable function">closeCallback</span> <span class="token operator">=</span> <span class="token parameter">e</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token maybe-class-name">Notify</span><span class="token punctuation">.</span><span class="token method function property-access">success</span><span class="token punctuation">(</span><span class="token string">\'Close tag\'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n<span class="token keyword">const</span> <span class="token function-variable function">closeCallback2</span> <span class="token operator">=</span> <span class="token parameter">e</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token maybe-class-name">Notify</span><span class="token punctuation">.</span><span class="token method function property-access">success</span><span class="token punctuation">(</span><span class="token string">\'Close tag2\'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">closable</span> <span class="token attr-name">onClose</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>closeCallback<span class="token punctuation">}</span></span> <span class="token attr-name">outline</span><span class="token punctuation">></span></span>\n 自定义色彩\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tag</span></span> <span class="token attr-name">theme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>grey<span class="token punctuation">"</span></span> <span class="token attr-name">closable</span> <span class="token attr-name">closeButtonStyle</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> <span class="token literal-property property">color</span><span class="token operator">:</span> <span class="token string">\'#969799\'</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n 自定义关闭按钮颜色\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tag</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},e.createElement(f)),e.createElement(j,{html:'<h3 class="anchor-heading"><a href="#api">¶</a><a href="javascript:void(0)" id="api" class="anchor-point"></a>API</h3>\n<h4 class="anchor-heading"><a href="#tag">¶</a><a href="javascript:void(0)" id="tag" class="anchor-point"></a>Tag</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>默认值</th>\n<th>备选值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>theme</td>\n<td>标签的预置颜色</td>\n<td>string</td>\n<td><code>\'grey\'</code></td>\n<td><code>\'red\'</code>\n \n|\n \n<code>\'green\'</code>\n \n|\n \n<code>\'yellow\'</code>\n \n|\n \n<code>\'blue\'</code>\n \n|\n \n<code>\'grey\'</code></td>\n</tr>\n<tr>\n<td>outline</td>\n<td>边框有颜色,无底色</td>\n<td>bool</td>\n<td><code>false</code></td>\n<td><code>true</code>\n \n|\n \n<code>false</code></td>\n</tr>\n<tr>\n<td>rounded</td>\n<td>是否有圆角</td>\n<td>bool</td>\n<td><code>true</code></td>\n<td><code>true</code>\n \n|\n \n<code>false</code></td>\n</tr>\n<tr>\n<td>closable</td>\n<td>是否可以关闭</td>\n<td>bool</td>\n<td><code>false</code></td>\n<td><code>true</code>\n \n|\n \n<code>false</code></td>\n</tr>\n<tr>\n<td>visible</td>\n<td>是否显示</td>\n<td>bool</td>\n<td><code>true</code></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>onClose</td>\n<td>关闭时的回调</td>\n<td>func</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>closeButtonStyle</td>\n<td>关闭按钮样式</td>\n<td>React.CSSProperties</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>className</td>\n<td>自定义额外类名</td>\n<td>string</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>自定义样式</td>\n<td>React.CSSProperties</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<blockquote>\n<p>所有参数都是可选,搭配 <code>visible</code> 和 <code>onClose</code> 可以实现关闭效果</p>\n</blockquote>\n<h4 class="anchor-heading"><a href="#linktag">¶</a><a href="javascript:void(0)" id="linktag" class="anchor-point"></a>LinkTag</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>默认值</th>\n<th>备选值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>className</td>\n<td>自定义额外类名</td>\n<td>string</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>自定义样式</td>\n<td>React.CSSProperties</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>linkIconStyle</td>\n<td>自定义链接图标样式</td>\n<td>React.CSSProperties</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#selecttag">¶</a><a href="javascript:void(0)" id="selecttag" class="anchor-point"></a>SelectTag</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>默认值</th>\n<th>备选值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>className</td>\n<td>自定义额外类名</td>\n<td>string</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>自定义样式</td>\n<td>React.CSSProperties</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>selected</td>\n<td>选中状态</td>\n<td>boolean</td>\n<td><code>false</code></td>\n<td><code>true</code>\n \n|\n \n<code>false</code></td>\n</tr>\n<tr>\n<td>onChange</td>\n<td>标签点击后的回调</td>\n<td>func</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<blockquote>\n<p>SelectTag 的选中状态是完全受控的</p>\n</blockquote>'}))}}},59934:(n,a,s)=>{"use strict";s.d(a,{I:()=>l});var t=s(59312),p=s(24246),e=s(27378),o=s(27036),c=s(90039),l=(0,e.forwardRef)((function(n,a){var s=n.className,e=n.children,l=n.linkIconStyle,u=(0,t._T)(n,["className","children","linkIconStyle"]);return(0,p.jsxs)(c.Z,(0,t.pi)({className:"zent-link-tag "+s,ref:a,outline:!0},u,{children:[(0,p.jsx)("div",(0,t.pi)({className:"zent-link-tag-content","data-zv":"10.0.10"},{children:e}),void 0),(0,p.jsx)(o.Z,{type:"right",className:"zent-link-tag-right-icon",style:l},void 0)]}),void 0)}));l.displayName="ZentLinkTag"},98317:(n,a,s)=>{"use strict";s.d(a,{S:()=>u});var t=s(59312),p=s(24246),e=s(60042),o=s.n(e),c=s(27378),l=s(90039),u=(0,c.forwardRef)((function(n,a){var s=n.className,e=n.children,c=n.selected,u=n.onChange,i=(0,t._T)(n,["className","children","selected","onChange"]);return(0,p.jsx)(l.Z,(0,t.pi)({className:o()("zent-select-tag",s,{"zent-select-tag-selected":c}),ref:a,onClick:function(n){null==u||u(!c)},outline:!0},i,{children:e}),void 0)}));u.displayName="ZentSelectTag"},90039:(n,a,s)=>{"use strict";s.d(a,{V:()=>i});var t=s(59312),p=s(24246),e=s(60042),o=s.n(e),c=s(27378),l=s(27036),u={red:!0,green:!0,yellow:!0,blue:!0,grey:!0},i=(0,c.forwardRef)((function(n,a){var s=n.size,e=void 0===s?"small":s,c=n.theme,i=void 0===c?"grey":c,r=n.outline,k=n.rounded,d=void 0===k||k,g=n.closable,m=n.children,h=n.className,y=n.onClose,b=n.closeButtonStyle,f=n.visible,v=void 0===f||f,j=(0,t._T)(n,["size","theme","outline","rounded","closable","children","className","onClose","closeButtonStyle","visible"]);if(!v)return null;var T=u[i]?"-"+i:"",x=r?"-outline":"";return(0,p.jsxs)("div",(0,t.pi)({ref:a,className:o()("zent-tag","zent-tag-style"+T+x,"zent-tag-size-"+e,h,{"zent-tag-rounded":d,"zent-tag-closable":g})},j,{"data-zv":"10.0.10"},{children:[(0,p.jsx)("div",(0,t.pi)({className:"zent-tag-content","data-zv":"10.0.10"},{children:m}),void 0),g?(0,p.jsx)(l.Z,{type:"close",className:"zent-tag-close-btn",onClick:y,style:b},void 0):null]}),void 0)}));i.displayName="ZentTag",a.Z=i}}]);