neko-ui 2.8.21 → 2.8.22
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/es/avatar/README.mdx +10 -0
- package/es/avatar/examples/basic.md +14 -0
- package/es/avatar/examples/group.md +57 -0
- package/es/avatar/examples/size.md +21 -0
- package/es/avatar/style.js +2 -2
- package/es/avatar/style.js.map +1 -1
- package/es/back-top/README.mdx +10 -0
- package/es/back-top/examples/basic.md +19 -0
- package/es/back-top/examples/mount.md +36 -0
- package/es/back-top/examples/target.md +46 -0
- package/es/basic-config/README.mdx +11 -0
- package/es/button/README.mdx +10 -0
- package/es/button/examples/basic.md +21 -0
- package/es/button/examples/block.md +33 -0
- package/es/button/examples/circle.md +21 -0
- package/es/button/examples/danger.md +23 -0
- package/es/button/examples/dashed.md +21 -0
- package/es/button/examples/disabled.md +35 -0
- package/es/button/examples/fill.md +21 -0
- package/es/button/examples/flat.md +21 -0
- package/es/button/examples/ghost.md +21 -0
- package/es/button/examples/icon.md +30 -0
- package/es/button/examples/link.md +21 -0
- package/es/button/examples/size.md +23 -0
- package/es/capture-screen/README.mdx +10 -0
- package/es/capture-screen/examples/basic.md +13 -0
- package/es/capture-screen/examples/custom-save.md +30 -0
- package/es/capture-screen/examples/preview.md +13 -0
- package/es/capture-screen/examples/recorder-save.md +13 -0
- package/es/carousel/README.mdx +10 -0
- package/es/carousel/examples/autoplay.md +21 -0
- package/es/carousel/examples/basic.md +23 -0
- package/es/carousel/examples/dots.md +23 -0
- package/es/carousel/examples/header.md +38 -0
- package/es/checkbox/README.mdx +10 -0
- package/es/checkbox/examples/basic.md +31 -0
- package/es/checkbox/examples/check-all.md +37 -0
- package/es/checkbox/examples/disabled-all.md +28 -0
- package/es/checkbox/examples/disabled-option.md +35 -0
- package/es/checkbox/examples/field-names.md +40 -0
- package/es/checkbox/examples/status.md +37 -0
- package/es/checkbox/examples/vertical.md +36 -0
- package/es/code/README.mdx +10 -0
- package/es/code/examples/basic.md +19 -0
- package/es/code/examples/diff.md +45 -0
- package/es/code/examples/line-number.md +18 -0
- package/es/code/examples/live-edit.md +20 -0
- package/es/code/examples/toolbar.md +18 -0
- package/es/code/index.js +2 -2
- package/es/code/index.js.map +1 -1
- package/es/color-palette/README.mdx +10 -0
- package/es/color-palette/examples/default-value.md +25 -0
- package/es/color-palette/examples/hexa.md +13 -0
- package/es/color-palette/examples/hsla.md +13 -0
- package/es/color-palette/examples/rgba.md +13 -0
- package/es/color-picker/README.mdx +10 -0
- package/es/color-picker/examples/basic.md +12 -0
- package/es/color-picker/examples/default-value.md +20 -0
- package/es/color-picker/examples/size.md +17 -0
- package/es/cron/README.mdx +10 -0
- package/es/cron/examples/basic.md +19 -0
- package/es/cron/examples/card.md +12 -0
- package/es/cron/examples/show-cron.md +12 -0
- package/es/date-picker/README.mdx +10 -0
- package/es/date-picker/examples/basic.md +24 -0
- package/es/date-picker/examples/date.md +13 -0
- package/es/date-picker/examples/disbaled.md +13 -0
- package/es/date-picker/examples/header.md +13 -0
- package/es/date-picker/examples/month.md +13 -0
- package/es/date-picker/examples/time.md +15 -0
- package/es/date-picker/examples/today.md +13 -0
- package/es/date-picker/examples/year.md +13 -0
- package/es/dropdown/README.mdx +10 -0
- package/es/dropdown/examples/arrow.md +59 -0
- package/es/dropdown/examples/basic.md +17 -0
- package/es/dropdown/examples/click.md +45 -0
- package/es/dropdown/examples/context-menu.md +66 -0
- package/es/dropdown/examples/field-names.md +44 -0
- package/es/dropdown/examples/icon.md +30 -0
- package/es/dropdown/examples/multiple.md +45 -0
- package/es/dropdown/examples/no-data.md +16 -0
- package/es/dropdown/examples/placement.md +59 -0
- package/es/dropdown/examples/toggle.md +36 -0
- package/es/highlight-text/README.mdx +10 -0
- package/es/highlight-text/examples/basic.md +19 -0
- package/es/highlight-text/examples/mut.md +47 -0
- package/es/highlight-text/examples/not-hightlight.md +19 -0
- package/es/img/README.mdx +10 -0
- package/es/img/examples/basic.md +17 -0
- package/es/img/examples/close-mask.md +21 -0
- package/es/img/examples/disabled.md +16 -0
- package/es/img/examples/error.md +13 -0
- package/es/img/examples/esc.md +21 -0
- package/es/img/examples/open-change.md +25 -0
- package/es/input/README.mdx +10 -0
- package/es/input/examples/basic.md +31 -0
- package/es/input/examples/prefix&suffix.md +33 -0
- package/es/input/examples/size.md +21 -0
- package/es/input/examples/status.md +23 -0
- package/es/input-number/README.mdx +10 -0
- package/es/input-number/examples/basic.md +26 -0
- package/es/input-number/examples/formatter.md +36 -0
- package/es/input-number/examples/max-min.md +13 -0
- package/es/katex/README.mdx +42 -0
- package/es/katex/examples/block.md +25 -0
- package/es/katex/examples/inline.md +19 -0
- package/es/md/README.mdx +10 -0
- package/es/md/examples/in-children.md +23 -0
- package/es/md/examples/in-text.md +32 -0
- package/es/md/examples/math.md +36 -0
- package/es/menu/README.mdx +10 -0
- package/es/menu/examples/basic.md +17 -0
- package/es/menu/examples/field-names.md +42 -0
- package/es/menu/examples/icon.md +125 -0
- package/es/menu/examples/multiple.md +42 -0
- package/es/modal/README.mdx +10 -0
- package/es/modal/examples/basic.md +56 -0
- package/es/modal/examples/close-icon.md +57 -0
- package/es/modal/examples/esc-closable.md +64 -0
- package/es/modal/examples/mask-blur.md +56 -0
- package/es/modal/examples/mask-closable.md +64 -0
- package/es/notification/README.mdx +11 -0
- package/es/notification/examples/basic.md +35 -0
- package/es/notification/examples/close.md +35 -0
- package/es/notification/examples/type.md +84 -0
- package/es/notification/examples/update.md +52 -0
- package/es/pagination/README.mdx +10 -0
- package/es/pagination/examples/basic.md +13 -0
- package/es/pagination/examples/onchange.md +29 -0
- package/es/pagination/examples/size.md +23 -0
- package/es/pagination/examples/total-text.md +42 -0
- package/es/popover/README.mdx +10 -0
- package/es/popover/examples/basic.md +35 -0
- package/es/popover/examples/click.md +15 -0
- package/es/popover/examples/context-menu.md +58 -0
- package/es/popover/examples/controlled.md +47 -0
- package/es/provider/README.mdx +10 -0
- package/es/provider/examples/scheme.md +14 -0
- package/es/radio/README.mdx +10 -0
- package/es/radio/examples/basic.md +19 -0
- package/es/radio/examples/disabled-option.md +19 -0
- package/es/radio/examples/disabled.md +19 -0
- package/es/radio/examples/field-names.md +39 -0
- package/es/radio/examples/layout-vertical.md +19 -0
- package/es/radio/examples/status.md +31 -0
- package/es/segmented/README.mdx +10 -0
- package/es/segmented/examples/basic.md +18 -0
- package/es/segmented/examples/custom-field-names.md +43 -0
- package/es/segmented/examples/disabled-option.md +29 -0
- package/es/segmented/examples/disabled.md +18 -0
- package/es/segmented/examples/icon.md +28 -0
- package/es/segmented/examples/options.md +21 -0
- package/es/select/README.mdx +10 -0
- package/es/select/examples/basic.md +44 -0
- package/es/select/examples/disabled-option.md +21 -0
- package/es/select/examples/disabled.md +24 -0
- package/es/select/examples/field-names.md +40 -0
- package/es/select/examples/item-suffix.md +84 -0
- package/es/select/examples/multiple.md +61 -0
- package/es/select/examples/no-data.md +12 -0
- package/es/select/examples/prefix-icon.md +74 -0
- package/es/skeleton/README.mdx +10 -0
- package/es/skeleton/examples/animation.md +13 -0
- package/es/skeleton/examples/avatar.md +13 -0
- package/es/skeleton/examples/basic.md +12 -0
- package/es/skeleton/examples/rows.md +13 -0
- package/es/skeleton/examples/title.md +12 -0
- package/es/spin/README.mdx +10 -0
- package/es/spin/examples/basic.md +67 -0
- package/es/switch/README.mdx +10 -0
- package/es/switch/examples/basic.md +24 -0
- package/es/switch/examples/checked-text.md +17 -0
- package/es/switch/examples/disabled.md +15 -0
- package/es/switch/examples/loading.md +17 -0
- package/es/table/README.mdx +10 -0
- package/es/table/examples/basic.md +29 -0
- package/es/table/examples/key.md +29 -0
- package/es/table/examples/order.md +29 -0
- package/es/table/examples/pagination.md +67 -0
- package/es/table/examples/render.md +92 -0
- package/es/table/examples/size.md +52 -0
- package/es/table/examples/summary.md +40 -0
- package/es/tabs/README.mdx +10 -0
- package/es/tabs/examples/add-remove.md +115 -0
- package/es/tabs/examples/animated.md +33 -0
- package/es/tabs/examples/basic.md +32 -0
- package/es/tabs/examples/card.md +33 -0
- package/es/tabs/examples/center.md +33 -0
- package/es/tabs/examples/disabled-tab.md +34 -0
- package/es/tabs/examples/disabled.md +33 -0
- package/es/tabs/examples/extra.md +65 -0
- package/es/tag/README.mdx +10 -0
- package/es/tag/examples/basic.md +28 -0
- package/es/tag/examples/bordered.md +19 -0
- package/es/tag/examples/color.md +25 -0
- package/es/tag/examples/icon.md +21 -0
- package/es/tag/examples/type.md +19 -0
- package/es/theme/README.mdx +10 -0
- package/es/theme/examples/colors.md +123 -0
- package/es/theme/examples/theme.md +19 -0
- package/es/theme/index.js.map +1 -1
- package/es/tree/README.mdx +10 -0
- package/es/tree/examples/basic.md +108 -0
- package/es/tree/examples/custom-render.md +115 -0
- package/es/tree/examples/direction.md +100 -0
- package/es/tree/examples/field-names.md +114 -0
- package/es/tree/examples/multiple.md +117 -0
- package/es/tree/examples/readonly.md +90 -0
- package/es/tree/examples/render-tree-string1.md +70 -0
- package/es/tree/examples/render-tree-string2.md +52 -0
- package/es/tree/examples/schema.md +130 -0
- package/es/tree/examples/size.md +125 -0
- package/es/tree/examples/toggle.md +71 -0
- package/es/typography/README.mdx +10 -0
- package/es/typography/examples/basic.md +27 -0
- package/es/typography/examples/tag.md +25 -0
- package/es/typography/examples/truncated.md +17 -0
- package/lib/avatar/README.mdx +10 -0
- package/lib/avatar/examples/basic.md +14 -0
- package/lib/avatar/examples/group.md +57 -0
- package/lib/avatar/examples/size.md +21 -0
- package/lib/avatar/style.js +2 -2
- package/lib/avatar/style.js.map +1 -1
- package/lib/back-top/README.mdx +10 -0
- package/lib/back-top/examples/basic.md +19 -0
- package/lib/back-top/examples/mount.md +36 -0
- package/lib/back-top/examples/target.md +46 -0
- package/lib/basic-config/README.mdx +11 -0
- package/lib/button/README.mdx +10 -0
- package/lib/button/examples/basic.md +21 -0
- package/lib/button/examples/block.md +33 -0
- package/lib/button/examples/circle.md +21 -0
- package/lib/button/examples/danger.md +23 -0
- package/lib/button/examples/dashed.md +21 -0
- package/lib/button/examples/disabled.md +35 -0
- package/lib/button/examples/fill.md +21 -0
- package/lib/button/examples/flat.md +21 -0
- package/lib/button/examples/ghost.md +21 -0
- package/lib/button/examples/icon.md +30 -0
- package/lib/button/examples/link.md +21 -0
- package/lib/button/examples/size.md +23 -0
- package/lib/capture-screen/README.mdx +10 -0
- package/lib/capture-screen/examples/basic.md +13 -0
- package/lib/capture-screen/examples/custom-save.md +30 -0
- package/lib/capture-screen/examples/preview.md +13 -0
- package/lib/capture-screen/examples/recorder-save.md +13 -0
- package/lib/carousel/README.mdx +10 -0
- package/lib/carousel/examples/autoplay.md +21 -0
- package/lib/carousel/examples/basic.md +23 -0
- package/lib/carousel/examples/dots.md +23 -0
- package/lib/carousel/examples/header.md +38 -0
- package/lib/checkbox/README.mdx +10 -0
- package/lib/checkbox/examples/basic.md +31 -0
- package/lib/checkbox/examples/check-all.md +37 -0
- package/lib/checkbox/examples/disabled-all.md +28 -0
- package/lib/checkbox/examples/disabled-option.md +35 -0
- package/lib/checkbox/examples/field-names.md +40 -0
- package/lib/checkbox/examples/status.md +37 -0
- package/lib/checkbox/examples/vertical.md +36 -0
- package/lib/code/README.mdx +10 -0
- package/lib/code/examples/basic.md +19 -0
- package/lib/code/examples/diff.md +45 -0
- package/lib/code/examples/line-number.md +18 -0
- package/lib/code/examples/live-edit.md +20 -0
- package/lib/code/examples/toolbar.md +18 -0
- package/lib/code/index.js +2 -2
- package/lib/code/index.js.map +1 -1
- package/lib/color-palette/README.mdx +10 -0
- package/lib/color-palette/examples/default-value.md +25 -0
- package/lib/color-palette/examples/hexa.md +13 -0
- package/lib/color-palette/examples/hsla.md +13 -0
- package/lib/color-palette/examples/rgba.md +13 -0
- package/lib/color-picker/README.mdx +10 -0
- package/lib/color-picker/examples/basic.md +12 -0
- package/lib/color-picker/examples/default-value.md +20 -0
- package/lib/color-picker/examples/size.md +17 -0
- package/lib/cron/README.mdx +10 -0
- package/lib/cron/examples/basic.md +19 -0
- package/lib/cron/examples/card.md +12 -0
- package/lib/cron/examples/show-cron.md +12 -0
- package/lib/date-picker/README.mdx +10 -0
- package/lib/date-picker/examples/basic.md +24 -0
- package/lib/date-picker/examples/date.md +13 -0
- package/lib/date-picker/examples/disbaled.md +13 -0
- package/lib/date-picker/examples/header.md +13 -0
- package/lib/date-picker/examples/month.md +13 -0
- package/lib/date-picker/examples/time.md +15 -0
- package/lib/date-picker/examples/today.md +13 -0
- package/lib/date-picker/examples/year.md +13 -0
- package/lib/dropdown/README.mdx +10 -0
- package/lib/dropdown/examples/arrow.md +59 -0
- package/lib/dropdown/examples/basic.md +17 -0
- package/lib/dropdown/examples/click.md +45 -0
- package/lib/dropdown/examples/context-menu.md +66 -0
- package/lib/dropdown/examples/field-names.md +44 -0
- package/lib/dropdown/examples/icon.md +30 -0
- package/lib/dropdown/examples/multiple.md +45 -0
- package/lib/dropdown/examples/no-data.md +16 -0
- package/lib/dropdown/examples/placement.md +59 -0
- package/lib/dropdown/examples/toggle.md +36 -0
- package/lib/highlight-text/README.mdx +10 -0
- package/lib/highlight-text/examples/basic.md +19 -0
- package/lib/highlight-text/examples/mut.md +47 -0
- package/lib/highlight-text/examples/not-hightlight.md +19 -0
- package/lib/img/README.mdx +10 -0
- package/lib/img/examples/basic.md +17 -0
- package/lib/img/examples/close-mask.md +21 -0
- package/lib/img/examples/disabled.md +16 -0
- package/lib/img/examples/error.md +13 -0
- package/lib/img/examples/esc.md +21 -0
- package/lib/img/examples/open-change.md +25 -0
- package/lib/input/README.mdx +10 -0
- package/lib/input/examples/basic.md +31 -0
- package/lib/input/examples/prefix&suffix.md +33 -0
- package/lib/input/examples/size.md +21 -0
- package/lib/input/examples/status.md +23 -0
- package/lib/input-number/README.mdx +10 -0
- package/lib/input-number/examples/basic.md +26 -0
- package/lib/input-number/examples/formatter.md +36 -0
- package/lib/input-number/examples/max-min.md +13 -0
- package/lib/katex/README.mdx +42 -0
- package/lib/katex/examples/block.md +25 -0
- package/lib/katex/examples/inline.md +19 -0
- package/lib/md/README.mdx +10 -0
- package/lib/md/examples/in-children.md +23 -0
- package/lib/md/examples/in-text.md +32 -0
- package/lib/md/examples/math.md +36 -0
- package/lib/menu/README.mdx +10 -0
- package/lib/menu/examples/basic.md +17 -0
- package/lib/menu/examples/field-names.md +42 -0
- package/lib/menu/examples/icon.md +125 -0
- package/lib/menu/examples/multiple.md +42 -0
- package/lib/modal/README.mdx +10 -0
- package/lib/modal/examples/basic.md +56 -0
- package/lib/modal/examples/close-icon.md +57 -0
- package/lib/modal/examples/esc-closable.md +64 -0
- package/lib/modal/examples/mask-blur.md +56 -0
- package/lib/modal/examples/mask-closable.md +64 -0
- package/lib/notification/README.mdx +11 -0
- package/lib/notification/examples/basic.md +35 -0
- package/lib/notification/examples/close.md +35 -0
- package/lib/notification/examples/type.md +84 -0
- package/lib/notification/examples/update.md +52 -0
- package/lib/pagination/README.mdx +10 -0
- package/lib/pagination/examples/basic.md +13 -0
- package/lib/pagination/examples/onchange.md +29 -0
- package/lib/pagination/examples/size.md +23 -0
- package/lib/pagination/examples/total-text.md +42 -0
- package/lib/popover/README.mdx +10 -0
- package/lib/popover/examples/basic.md +35 -0
- package/lib/popover/examples/click.md +15 -0
- package/lib/popover/examples/context-menu.md +58 -0
- package/lib/popover/examples/controlled.md +47 -0
- package/lib/provider/README.mdx +10 -0
- package/lib/provider/examples/scheme.md +14 -0
- package/lib/radio/README.mdx +10 -0
- package/lib/radio/examples/basic.md +19 -0
- package/lib/radio/examples/disabled-option.md +19 -0
- package/lib/radio/examples/disabled.md +19 -0
- package/lib/radio/examples/field-names.md +39 -0
- package/lib/radio/examples/layout-vertical.md +19 -0
- package/lib/radio/examples/status.md +31 -0
- package/lib/segmented/README.mdx +10 -0
- package/lib/segmented/examples/basic.md +18 -0
- package/lib/segmented/examples/custom-field-names.md +43 -0
- package/lib/segmented/examples/disabled-option.md +29 -0
- package/lib/segmented/examples/disabled.md +18 -0
- package/lib/segmented/examples/icon.md +28 -0
- package/lib/segmented/examples/options.md +21 -0
- package/lib/select/README.mdx +10 -0
- package/lib/select/examples/basic.md +44 -0
- package/lib/select/examples/disabled-option.md +21 -0
- package/lib/select/examples/disabled.md +24 -0
- package/lib/select/examples/field-names.md +40 -0
- package/lib/select/examples/item-suffix.md +84 -0
- package/lib/select/examples/multiple.md +61 -0
- package/lib/select/examples/no-data.md +12 -0
- package/lib/select/examples/prefix-icon.md +74 -0
- package/lib/skeleton/README.mdx +10 -0
- package/lib/skeleton/examples/animation.md +13 -0
- package/lib/skeleton/examples/avatar.md +13 -0
- package/lib/skeleton/examples/basic.md +12 -0
- package/lib/skeleton/examples/rows.md +13 -0
- package/lib/skeleton/examples/title.md +12 -0
- package/lib/spin/README.mdx +10 -0
- package/lib/spin/examples/basic.md +67 -0
- package/lib/switch/README.mdx +10 -0
- package/lib/switch/examples/basic.md +24 -0
- package/lib/switch/examples/checked-text.md +17 -0
- package/lib/switch/examples/disabled.md +15 -0
- package/lib/switch/examples/loading.md +17 -0
- package/lib/table/README.mdx +10 -0
- package/lib/table/examples/basic.md +29 -0
- package/lib/table/examples/key.md +29 -0
- package/lib/table/examples/order.md +29 -0
- package/lib/table/examples/pagination.md +67 -0
- package/lib/table/examples/render.md +92 -0
- package/lib/table/examples/size.md +52 -0
- package/lib/table/examples/summary.md +40 -0
- package/lib/tabs/README.mdx +10 -0
- package/lib/tabs/examples/add-remove.md +115 -0
- package/lib/tabs/examples/animated.md +33 -0
- package/lib/tabs/examples/basic.md +32 -0
- package/lib/tabs/examples/card.md +33 -0
- package/lib/tabs/examples/center.md +33 -0
- package/lib/tabs/examples/disabled-tab.md +34 -0
- package/lib/tabs/examples/disabled.md +33 -0
- package/lib/tabs/examples/extra.md +65 -0
- package/lib/tag/README.mdx +10 -0
- package/lib/tag/examples/basic.md +28 -0
- package/lib/tag/examples/bordered.md +19 -0
- package/lib/tag/examples/color.md +25 -0
- package/lib/tag/examples/icon.md +21 -0
- package/lib/tag/examples/type.md +19 -0
- package/lib/theme/README.mdx +10 -0
- package/lib/theme/examples/colors.md +123 -0
- package/lib/theme/examples/theme.md +19 -0
- package/lib/theme/index.js.map +1 -1
- package/lib/tree/README.mdx +10 -0
- package/lib/tree/examples/basic.md +108 -0
- package/lib/tree/examples/custom-render.md +115 -0
- package/lib/tree/examples/direction.md +100 -0
- package/lib/tree/examples/field-names.md +114 -0
- package/lib/tree/examples/multiple.md +117 -0
- package/lib/tree/examples/readonly.md +90 -0
- package/lib/tree/examples/render-tree-string1.md +70 -0
- package/lib/tree/examples/render-tree-string2.md +52 -0
- package/lib/tree/examples/schema.md +130 -0
- package/lib/tree/examples/size.md +125 -0
- package/lib/tree/examples/toggle.md +71 -0
- package/lib/typography/README.mdx +10 -0
- package/lib/typography/examples/basic.md +27 -0
- package/lib/typography/examples/tag.md +25 -0
- package/lib/typography/examples/truncated.md +17 -0
- package/package.json +13 -13
- package/umd/assets/svg/favicon.svg +1 -0
- package/umd/index.js +2 -2
- package/umd/js/523fd5cd0ae65592.js +1 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 多选模式
|
|
3
|
+
description: 将 `multiple` 属性设置为 `true` 来开启多选模式; 重复点击同一项时,如果已选中则取消选中。
|
|
4
|
+
order: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree multiple="true"></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
|
|
12
|
+
el.onchange = function (e) {
|
|
13
|
+
const [key, item] = e.detail;
|
|
14
|
+
el.value = key;
|
|
15
|
+
console.log('html', item);
|
|
16
|
+
};
|
|
17
|
+
el.data = [
|
|
18
|
+
{
|
|
19
|
+
title: '文件名称',
|
|
20
|
+
subTitle: 'object',
|
|
21
|
+
key: 'a',
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
title: '备注',
|
|
25
|
+
subTitle: 'object',
|
|
26
|
+
key: 'a.b',
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
title: '备注',
|
|
30
|
+
subTitle: 'string',
|
|
31
|
+
key: 'a.b.x',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '编号',
|
|
39
|
+
subTitle: 'object',
|
|
40
|
+
key: 'b',
|
|
41
|
+
children: [
|
|
42
|
+
{
|
|
43
|
+
title: '备注',
|
|
44
|
+
subTitle: 'string',
|
|
45
|
+
key: 'b2',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '是否有效',
|
|
49
|
+
subTitle: 'boolean',
|
|
50
|
+
key: 'c2',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
</script>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```jsx
|
|
59
|
+
function Demo() {
|
|
60
|
+
let el;
|
|
61
|
+
const data = [
|
|
62
|
+
{
|
|
63
|
+
title: '文件名称',
|
|
64
|
+
subTitle: 'object',
|
|
65
|
+
key: 'a',
|
|
66
|
+
children: [
|
|
67
|
+
{
|
|
68
|
+
title: '备注',
|
|
69
|
+
subTitle: 'object',
|
|
70
|
+
key: 'a.b',
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
title: '备注',
|
|
74
|
+
subTitle: 'string',
|
|
75
|
+
key: 'a.b.x',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: '编号',
|
|
83
|
+
subTitle: 'object',
|
|
84
|
+
key: 'b',
|
|
85
|
+
children: [
|
|
86
|
+
{
|
|
87
|
+
title: '备注',
|
|
88
|
+
subTitle: 'string',
|
|
89
|
+
key: 'b2',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
title: '是否有效',
|
|
93
|
+
subTitle: 'boolean',
|
|
94
|
+
key: 'c2',
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<n-tree
|
|
102
|
+
ref={(e) => (el = e)}
|
|
103
|
+
data={data}
|
|
104
|
+
multiple
|
|
105
|
+
// 或者使用数据绑定
|
|
106
|
+
value={[]}
|
|
107
|
+
onChange={(e) => {
|
|
108
|
+
if (el) {
|
|
109
|
+
const [key, item] = e.detail;
|
|
110
|
+
el.value = key;
|
|
111
|
+
console.log('jsx', item);
|
|
112
|
+
}
|
|
113
|
+
}}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 只读模式
|
|
3
|
+
description: 通过设置 `readonly` 属性来开启只读模式, 不会触发 `onchange` 事件
|
|
4
|
+
order: 7
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree readonly="true" value="fileName.code"></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
|
|
12
|
+
el.onchange = function (e) {
|
|
13
|
+
// 不会触发
|
|
14
|
+
console.log(e);
|
|
15
|
+
};
|
|
16
|
+
el.data = [
|
|
17
|
+
{
|
|
18
|
+
title: '文件地址',
|
|
19
|
+
subTitle: 'fileAddr',
|
|
20
|
+
key: 'fileAddr',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
subTitle: 'fileName',
|
|
24
|
+
title: '文件名称',
|
|
25
|
+
key: 'fileName',
|
|
26
|
+
children: [
|
|
27
|
+
{
|
|
28
|
+
title: '编号',
|
|
29
|
+
subTitle: 'fileName.code',
|
|
30
|
+
key: 'fileName.code',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: '编号',
|
|
36
|
+
subTitle: 'code',
|
|
37
|
+
key: 'code',
|
|
38
|
+
children: [
|
|
39
|
+
{
|
|
40
|
+
title: '是否有效',
|
|
41
|
+
subTitle: 'valid',
|
|
42
|
+
key: 'valid',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
</script>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```jsx
|
|
51
|
+
<n-tree
|
|
52
|
+
data={[
|
|
53
|
+
{
|
|
54
|
+
title: '文件地址',
|
|
55
|
+
subTitle: 'fileAddr',
|
|
56
|
+
key: 'fileAddr',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
subTitle: 'fileName',
|
|
60
|
+
title: '文件名称',
|
|
61
|
+
key: 'fileName',
|
|
62
|
+
children: [
|
|
63
|
+
{
|
|
64
|
+
title: '编号',
|
|
65
|
+
subTitle: 'fileName.code',
|
|
66
|
+
key: 'fileName.code',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: '编号',
|
|
72
|
+
subTitle: 'code',
|
|
73
|
+
key: 'code',
|
|
74
|
+
children: [
|
|
75
|
+
{
|
|
76
|
+
title: '是否有效',
|
|
77
|
+
subTitle: 'valid',
|
|
78
|
+
key: 'valid',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
]}
|
|
83
|
+
value="fileName.code"
|
|
84
|
+
readonly
|
|
85
|
+
onChange={(e) => {
|
|
86
|
+
// 不会触发
|
|
87
|
+
console.log(e);
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 渲染树状字符串
|
|
3
|
+
description: 渲染 tree 命令输出的树状字符串
|
|
4
|
+
order: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
|
|
12
|
+
el.data = `.
|
|
13
|
+
|-- components
|
|
14
|
+
| |-- index.ts
|
|
15
|
+
| \`-- wave-circle
|
|
16
|
+
| |-- examples
|
|
17
|
+
| | |-- api.md
|
|
18
|
+
| | \`-- demo.mdx
|
|
19
|
+
| |-- index.tsx
|
|
20
|
+
| \`-- README.mdx
|
|
21
|
+
|-- config
|
|
22
|
+
| |-- index.ts
|
|
23
|
+
| \`-- prod.ts
|
|
24
|
+
|-- docs
|
|
25
|
+
| |-- index.js
|
|
26
|
+
| \`-- index.html
|
|
27
|
+
|-- es
|
|
28
|
+
| |-- index.js
|
|
29
|
+
| \`-- wave-circle
|
|
30
|
+
| \`-- index.js
|
|
31
|
+
|-- .eslintrc.yaml
|
|
32
|
+
|-- .gitattributes
|
|
33
|
+
|-- .prettierrc.yaml
|
|
34
|
+
|-- .stylelintrc.yaml
|
|
35
|
+
|-- package.json
|
|
36
|
+
|-- README.md
|
|
37
|
+
\`-- tsconfig.json`;
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```jsx
|
|
42
|
+
<n-tree
|
|
43
|
+
data={`.
|
|
44
|
+
|-- components
|
|
45
|
+
| |-- index.ts
|
|
46
|
+
| \`-- wave-circle
|
|
47
|
+
| |-- examples
|
|
48
|
+
| | |-- api.md
|
|
49
|
+
| | \`-- demo.mdx
|
|
50
|
+
| |-- index.tsx
|
|
51
|
+
| \`-- README.mdx
|
|
52
|
+
|-- config
|
|
53
|
+
| |-- index.ts
|
|
54
|
+
| \`-- prod.ts
|
|
55
|
+
|-- docs
|
|
56
|
+
| |-- index.js
|
|
57
|
+
| \`-- index.html
|
|
58
|
+
|-- es
|
|
59
|
+
| |-- index.js
|
|
60
|
+
| \`-- wave-circle
|
|
61
|
+
| \`-- index.js
|
|
62
|
+
|-- .eslintrc.yaml
|
|
63
|
+
|-- .gitattributes
|
|
64
|
+
|-- .prettierrc.yaml
|
|
65
|
+
|-- .stylelintrc.yaml
|
|
66
|
+
|-- package.json
|
|
67
|
+
|-- README.md
|
|
68
|
+
\`-- tsconfig.json`}
|
|
69
|
+
/>
|
|
70
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 渲染 tree 命令输出的树状字符串
|
|
3
|
+
description: 渲染另一种格式的树状字符串
|
|
4
|
+
order: 10
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
|
|
12
|
+
el.data = `.
|
|
13
|
+
├── components
|
|
14
|
+
│ ├── @moneko
|
|
15
|
+
│ │ ├── README.mdx
|
|
16
|
+
│ │ └── 🕸sso
|
|
17
|
+
│ │ ├── README.mdx
|
|
18
|
+
│ │ └── examples
|
|
19
|
+
│ │ └── readme.md
|
|
20
|
+
│ └── index.ts
|
|
21
|
+
├── config
|
|
22
|
+
│ ├── deploy.ts
|
|
23
|
+
│ └── index.ts
|
|
24
|
+
├── jest.config.ts
|
|
25
|
+
├── package.json
|
|
26
|
+
├── tsconfig.json
|
|
27
|
+
└── typings
|
|
28
|
+
└── typings.d.ts`;
|
|
29
|
+
</script>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```jsx
|
|
33
|
+
<n-tree
|
|
34
|
+
data={`.
|
|
35
|
+
├── components
|
|
36
|
+
│ ├── @moneko
|
|
37
|
+
│ │ ├── README.mdx
|
|
38
|
+
│ │ └── 🕸sso
|
|
39
|
+
│ │ ├── README.mdx
|
|
40
|
+
│ │ └── examples
|
|
41
|
+
│ │ └── readme.md
|
|
42
|
+
│ └── index.ts
|
|
43
|
+
├── config
|
|
44
|
+
│ ├── deploy.ts
|
|
45
|
+
│ └── index.ts
|
|
46
|
+
├── jest.config.ts
|
|
47
|
+
├── package.json
|
|
48
|
+
├── tsconfig.json
|
|
49
|
+
└── typings
|
|
50
|
+
└── typings.d.ts`}
|
|
51
|
+
/>
|
|
52
|
+
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 渲染JSON Schema结构
|
|
3
|
+
description: 通过设置 `fromSchema` 属性渲染来支持 `JSONSchema` 的数据源。
|
|
4
|
+
order: 5
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree from-schema="true"></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
el.onchange = function (e) {
|
|
12
|
+
const [key, item] = e.detail;
|
|
13
|
+
|
|
14
|
+
el.value = key;
|
|
15
|
+
console.log(item);
|
|
16
|
+
};
|
|
17
|
+
el.data = {
|
|
18
|
+
$schema: 'http://json-schema.org/draft-07/schema',
|
|
19
|
+
$id: 'http://example.com/example.json',
|
|
20
|
+
type: 'object',
|
|
21
|
+
additionalProperties: true,
|
|
22
|
+
properties: {
|
|
23
|
+
user: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
title: '用户信息',
|
|
26
|
+
propertyOrder: 12,
|
|
27
|
+
required: ['name', 'email'],
|
|
28
|
+
properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
title: '姓名',
|
|
32
|
+
description: '',
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
works: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
title: '履历',
|
|
38
|
+
description: '',
|
|
39
|
+
required: ['desgin'],
|
|
40
|
+
properties: {
|
|
41
|
+
desgin: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
title: '设计',
|
|
44
|
+
description: '',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
tags: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
title: '标签',
|
|
53
|
+
description: '',
|
|
54
|
+
items: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
title: 'items',
|
|
57
|
+
description: '',
|
|
58
|
+
additionalProperties: true,
|
|
59
|
+
properties: {
|
|
60
|
+
s: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
title: 's',
|
|
63
|
+
description: '',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
</script>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```jsx
|
|
74
|
+
<n-tree
|
|
75
|
+
data={{
|
|
76
|
+
$schema: 'http://json-schema.org/draft-07/schema',
|
|
77
|
+
$id: 'http://example.com/example.json',
|
|
78
|
+
type: 'object',
|
|
79
|
+
additionalProperties: true,
|
|
80
|
+
properties: {
|
|
81
|
+
user: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
title: '用户信息',
|
|
84
|
+
propertyOrder: 12,
|
|
85
|
+
required: ['name', 'email'],
|
|
86
|
+
properties: {
|
|
87
|
+
name: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
title: '姓名',
|
|
90
|
+
description: '',
|
|
91
|
+
default: '',
|
|
92
|
+
},
|
|
93
|
+
works: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
title: '履历',
|
|
96
|
+
description: '',
|
|
97
|
+
required: ['desgin'],
|
|
98
|
+
properties: {
|
|
99
|
+
desgin: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
title: '设计',
|
|
102
|
+
description: '',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
tags: {
|
|
109
|
+
type: 'array',
|
|
110
|
+
title: '标签',
|
|
111
|
+
description: '',
|
|
112
|
+
items: {
|
|
113
|
+
type: 'object',
|
|
114
|
+
title: 'items',
|
|
115
|
+
description: '',
|
|
116
|
+
additionalProperties: true,
|
|
117
|
+
properties: {
|
|
118
|
+
s: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
title: 's',
|
|
121
|
+
description: '',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
}}
|
|
128
|
+
from-schema
|
|
129
|
+
/>
|
|
130
|
+
```
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 不同的尺寸
|
|
3
|
+
description: Tree 内置有大、中、小三种尺寸。通过 `size` 设置尺寸; 默认为 'normal'。
|
|
4
|
+
order: 7
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-segmented default-value="normal"></n-segmented>
|
|
9
|
+
<n-tree></n-tree>
|
|
10
|
+
<script>
|
|
11
|
+
const segmented = container.querySelector('n-segmented');
|
|
12
|
+
const tree = container.querySelector('n-tree');
|
|
13
|
+
|
|
14
|
+
segmented.options = [
|
|
15
|
+
{ label: '小', value: 'small' },
|
|
16
|
+
{ label: '默认:中', value: 'normal' },
|
|
17
|
+
{ label: '大', value: 'large' },
|
|
18
|
+
];
|
|
19
|
+
segmented.onchange = function (e) {
|
|
20
|
+
tree.size = e.detail;
|
|
21
|
+
};
|
|
22
|
+
tree.data = [
|
|
23
|
+
{
|
|
24
|
+
title: '文件名称',
|
|
25
|
+
subTitle: 'object',
|
|
26
|
+
key: 'a',
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
title: '备注',
|
|
30
|
+
subTitle: 'object',
|
|
31
|
+
key: 'a.b',
|
|
32
|
+
children: [
|
|
33
|
+
{
|
|
34
|
+
title: '备注',
|
|
35
|
+
subTitle: 'string',
|
|
36
|
+
key: 'a.b.x',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: '编号',
|
|
44
|
+
subTitle: 'object',
|
|
45
|
+
key: 'b',
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
title: '备注',
|
|
49
|
+
subTitle: 'string',
|
|
50
|
+
key: 'b2',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: '是否有效',
|
|
54
|
+
subTitle: 'boolean',
|
|
55
|
+
key: 'c2',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
</script>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```jsx
|
|
64
|
+
function Demo() {
|
|
65
|
+
let el;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
<n-segmented
|
|
70
|
+
default-value="normal"
|
|
71
|
+
options={[
|
|
72
|
+
{ label: '小', value: 'small' },
|
|
73
|
+
{ label: '默认:中', value: 'normal' },
|
|
74
|
+
{ label: '大', value: 'large' },
|
|
75
|
+
]}
|
|
76
|
+
onChange={(e) => {
|
|
77
|
+
el.size = e.detail;
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
80
|
+
<n-tree
|
|
81
|
+
ref={(e) => (el = e)}
|
|
82
|
+
size="normal"
|
|
83
|
+
data={[
|
|
84
|
+
{
|
|
85
|
+
title: '文件名称',
|
|
86
|
+
subTitle: 'object',
|
|
87
|
+
key: 'a',
|
|
88
|
+
children: [
|
|
89
|
+
{
|
|
90
|
+
title: '备注',
|
|
91
|
+
subTitle: 'object',
|
|
92
|
+
key: 'a.b',
|
|
93
|
+
children: [
|
|
94
|
+
{
|
|
95
|
+
title: '备注',
|
|
96
|
+
subTitle: 'string',
|
|
97
|
+
key: 'a.b.x',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: '编号',
|
|
105
|
+
subTitle: 'object',
|
|
106
|
+
key: 'b',
|
|
107
|
+
children: [
|
|
108
|
+
{
|
|
109
|
+
title: '备注',
|
|
110
|
+
subTitle: 'string',
|
|
111
|
+
key: 'b2',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: '是否有效',
|
|
115
|
+
subTitle: 'boolean',
|
|
116
|
+
key: 'c2',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
]}
|
|
121
|
+
/>
|
|
122
|
+
</>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 重复点击取消选中
|
|
3
|
+
description: 通过设置`toggle`属性来开启取消选中, 仅支持单选模式; 重复点击同一项时,如果已选中则取消选中。
|
|
4
|
+
order: 6
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-tree toggle="true"></n-tree>
|
|
9
|
+
<script>
|
|
10
|
+
const el = container.querySelector('n-tree');
|
|
11
|
+
|
|
12
|
+
el.onchange = function (e) {
|
|
13
|
+
const [key, item] = e.detail;
|
|
14
|
+
|
|
15
|
+
el.value = key;
|
|
16
|
+
console.log(item);
|
|
17
|
+
};
|
|
18
|
+
el.data = [
|
|
19
|
+
{
|
|
20
|
+
title: '文件地址',
|
|
21
|
+
subTitle: 'fileAddr',
|
|
22
|
+
key: 'fileAddr',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: '编号',
|
|
26
|
+
subTitle: 'channelCustNum',
|
|
27
|
+
key: 'channelCustNum',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '编号2',
|
|
31
|
+
subTitle: 'string',
|
|
32
|
+
key: 'string',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
</script>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
function Demo() {
|
|
40
|
+
let el;
|
|
41
|
+
return (
|
|
42
|
+
<n-tree
|
|
43
|
+
ref={(e) => (el = e)}
|
|
44
|
+
toggle
|
|
45
|
+
onChange={(e) => {
|
|
46
|
+
const [key, item] = e.detail;
|
|
47
|
+
|
|
48
|
+
el.value = key;
|
|
49
|
+
console.log(item);
|
|
50
|
+
}}
|
|
51
|
+
data={[
|
|
52
|
+
{
|
|
53
|
+
title: '文件地址',
|
|
54
|
+
subTitle: 'fileAddr',
|
|
55
|
+
key: 'fileAddr',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: '编号',
|
|
59
|
+
subTitle: 'channelCustNum',
|
|
60
|
+
key: 'channelCustNum',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: '编号2',
|
|
64
|
+
subTitle: 'string',
|
|
65
|
+
key: 'string',
|
|
66
|
+
},
|
|
67
|
+
]}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 基本使用
|
|
3
|
+
description: 文本的基本格式
|
|
4
|
+
order: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<n-typography>normal text</n-typography>
|
|
9
|
+
<n-typography type="secondary">secondary text</n-typography>
|
|
10
|
+
<n-typography type="success">success text</n-typography>
|
|
11
|
+
<n-typography type="error">danger text</n-typography>
|
|
12
|
+
<n-typography type="warning">warning text</n-typography>
|
|
13
|
+
<n-typography type="primary">primary text</n-typography>
|
|
14
|
+
<n-typography type="primary" disabled="true"> disabled text </n-typography>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
<n-typography>normal text</n-typography>
|
|
19
|
+
<n-typography type="secondary">secondary text</n-typography>
|
|
20
|
+
<n-typography type="success">success text</n-typography>
|
|
21
|
+
<n-typography type="error">danger text</n-typography>
|
|
22
|
+
<n-typography type="warning">warning text</n-typography>
|
|
23
|
+
<n-typography type="primary">primary text</n-typography>
|
|
24
|
+
<n-typography type="primary" disabled>
|
|
25
|
+
disabled text
|
|
26
|
+
</n-typography>
|
|
27
|
+
```
|