File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
components/tree/__tests__/__snapshots__ Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -185,3 +185,25 @@ exports[`renders ./components/tree/demo/search.md correctly 1`] = `
185
185
</ul >
186
186
</div >
187
187
`;
188
+
189
+ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
190
+ <ul role = " tree" unselectable = " on" class = " ant-tree ant-tree-show-line ant-tree-icon-hide" >
191
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-open" ><span class = " ant-tree-switcher ant-tree-switcher_open" ><i slot = " switcherIcon" aria-label = " icon: down" class = " anticon anticon-down ant-tree-switcher-icon" ><svg viewBox = " 64 64 896 896" data-icon = " down" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" ></path ></svg ></i ></span ><span title = " parent 1" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open" ><span class = " ant-tree-title" >parent 1</span ></span >
192
+ <ul data-expanded = " true" role = " group" class = " ant-tree-child-tree ant-tree-child-tree-open" >
193
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-open" ><span class = " ant-tree-switcher ant-tree-switcher_open" ><i slot = " switcherIcon" aria-label = " icon: down" class = " anticon anticon-down ant-tree-switcher-icon" ><svg viewBox = " 64 64 896 896" data-icon = " down" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" ></path ></svg ></i ></span ><span title = " parent 1-0" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open" ><span class = " ant-tree-title" >parent 1-0</span ></span >
194
+ <ul data-expanded = " true" role = " group" class = " ant-tree-child-tree ant-tree-child-tree-open" >
195
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-close" ><span class = " ant-tree-switcher ant-tree-switcher-noop" ><i aria-label = " icon: file" class = " ant-tree-switcher-line-icon anticon anticon-file" ><svg viewBox = " 64 64 896 896" data-icon = " file" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z" ></path ></svg ></i ></span ><span title = " leaf" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal" ><span class = " ant-tree-title" >leaf</span ></span ></li >
196
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-close" ><span class = " ant-tree-switcher ant-tree-switcher-noop" ><i aria-label = " icon: file" class = " ant-tree-switcher-line-icon anticon anticon-file" ><svg viewBox = " 64 64 896 896" data-icon = " file" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z" ></path ></svg ></i ></span ><span title = " leaf" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal" ><span class = " ant-tree-title" >leaf</span ></span ></li >
197
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-close" ><span class = " ant-tree-switcher ant-tree-switcher-noop" ><i aria-label = " icon: file" class = " ant-tree-switcher-line-icon anticon anticon-file" ><svg viewBox = " 64 64 896 896" data-icon = " file" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z" ></path ></svg ></i ></span ><span title = " leaf" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal" ><span class = " ant-tree-title" >leaf</span ></span ></li >
198
+ </ul >
199
+ </li >
200
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-close" ><span class = " ant-tree-switcher ant-tree-switcher_close" ><i slot = " switcherIcon" aria-label = " icon: down" class = " anticon anticon-down ant-tree-switcher-icon" ><svg viewBox = " 64 64 896 896" data-icon = " down" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" ></path ></svg ></i ></span ><span title = " parent 1-1" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close" ><span class = " ant-tree-title" >parent 1-1</span ></span >
201
+ <!---->
202
+ </li >
203
+ <li role = " treeitem" class = " ant-tree-treenode-switcher-close" ><span class = " ant-tree-switcher ant-tree-switcher_close" ><i slot = " switcherIcon" aria-label = " icon: down" class = " anticon anticon-down ant-tree-switcher-icon" ><svg viewBox = " 64 64 896 896" data-icon = " down" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" focusable = " false" class = " " ><path d = " M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" ></path ></svg ></i ></span ><span title = " parent 1-2" class = " ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close" ><span class = " ant-tree-title" >parent 1-2</span ></span >
204
+ <!---->
205
+ </li >
206
+ </ul >
207
+ </li >
208
+ </ul >
209
+ `;
You can’t perform that action at this time.
0 commit comments