@berqnet/theme 0.0.0-stage → 2.4.292
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/README.md +111 -2
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +12 -0
- package/dist/module.d.ts +12 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +194 -0
- package/dist/runtime/assets/scss/main.css +18832 -0
- package/dist/runtime/components/development/example.alert.vue +47 -0
- package/dist/runtime/components/development/example.avatar.vue +88 -0
- package/dist/runtime/components/development/example.badge.vue +95 -0
- package/dist/runtime/components/development/example.breadcrumb.vue +58 -0
- package/dist/runtime/components/development/example.button.vue +250 -0
- package/dist/runtime/components/development/example.card.vue +68 -0
- package/dist/runtime/components/development/example.checkbox.vue +191 -0
- package/dist/runtime/components/development/example.checkbox.vue.d.ts +134 -0
- package/dist/runtime/components/development/example.collapse.vue +38 -0
- package/dist/runtime/components/development/example.datepicker.vue +196 -0
- package/dist/runtime/components/development/example.description.vue +144 -0
- package/dist/runtime/components/development/example.dialog.vue +76 -0
- package/dist/runtime/components/development/example.dropdown.vue +194 -0
- package/dist/runtime/components/development/example.form.vue +497 -0
- package/dist/runtime/components/development/example.input.vue +275 -0
- package/dist/runtime/components/development/example.link.vue +94 -0
- package/dist/runtime/components/development/example.menu.vue +237 -0
- package/dist/runtime/components/development/example.message.vue +68 -0
- package/dist/runtime/components/development/example.notification.vue +77 -0
- package/dist/runtime/components/development/example.number.vue +74 -0
- package/dist/runtime/components/development/example.pagination.vue +100 -0
- package/dist/runtime/components/development/example.popover.vue +146 -0
- package/dist/runtime/components/development/example.radio.vue +178 -0
- package/dist/runtime/components/development/example.radio.vue.d.ts +26 -0
- package/dist/runtime/components/development/example.select.vue +619 -0
- package/dist/runtime/components/development/example.select.vue.d.ts +70 -0
- package/dist/runtime/components/development/example.sidebar.vue +106 -0
- package/dist/runtime/components/development/example.static.vue +51 -0
- package/dist/runtime/components/development/example.switch.vue +102 -0
- package/dist/runtime/components/development/example.tab.vue +48 -0
- package/dist/runtime/components/development/example.table.vue +333 -0
- package/dist/runtime/components/development/example.tag.vue +268 -0
- package/dist/runtime/components/development/example.timepicker.vue +95 -0
- package/dist/runtime/components/development/example.tooltip.vue +104 -0
- package/dist/runtime/components/development/example.upload.vue +89 -0
- package/dist/runtime/components/production/html-encode.vue +99 -0
- package/dist/runtime/layouts/berqnet-modules.vue +34 -0
- package/dist/runtime/pages/colors.vue +142 -0
- package/dist/runtime/pages/theme.vue +60 -0
- package/dist/runtime/plugins/disable-warnings-plugin.d.ts +2 -0
- package/dist/runtime/plugins/disable-warnings-plugin.js +37 -0
- package/dist/runtime/plugins/disable-warnings-plugin.mjs +37 -0
- package/dist/runtime/plugins/sample-plugin.d.ts +20 -0
- package/dist/runtime/plugins/sample-plugin.js +5 -0
- package/dist/runtime/plugins/sample-plugin.mjs +5 -0
- package/dist/runtime/plugins/theme-provider-plugin.d.ts +30 -0
- package/dist/runtime/plugins/theme-provider-plugin.js +46 -0
- package/dist/runtime/plugins/theme-provider-plugin.mjs +46 -0
- package/dist/runtime/public/scss/_buttons.scss +157 -0
- package/dist/runtime/public/scss/_colors.scss +163 -0
- package/dist/runtime/public/scss/_containers.scss +7 -0
- package/dist/runtime/public/scss/_fonts.scss +84 -0
- package/dist/runtime/public/scss/_icons.scss +111 -0
- package/dist/runtime/public/scss/_inputs.scss +64 -0
- package/dist/runtime/public/scss/_layers.scss +9 -0
- package/dist/runtime/public/scss/_logo.scss +53 -0
- package/dist/runtime/public/scss/_selectbox.scss +4 -0
- package/dist/runtime/public/scss/_tag.scss +0 -0
- package/dist/runtime/public/scss/_variables.scss +16 -0
- package/dist/runtime/public/scss/element-plus/affix.css +305 -0
- package/dist/runtime/public/scss/element-plus/affix.scss +7 -0
- package/dist/runtime/public/scss/element-plus/alert.css +523 -0
- package/dist/runtime/public/scss/element-plus/alert.scss +160 -0
- package/dist/runtime/public/scss/element-plus/anchor-link.css +332 -0
- package/dist/runtime/public/scss/element-plus/anchor-link.scss +41 -0
- package/dist/runtime/public/scss/element-plus/anchor.css +376 -0
- package/dist/runtime/public/scss/element-plus/anchor.scss +93 -0
- package/dist/runtime/public/scss/element-plus/aside.css +308 -0
- package/dist/runtime/public/scss/element-plus/aside.scss +8 -0
- package/dist/runtime/public/scss/element-plus/autocomplete.css +411 -0
- package/dist/runtime/public/scss/element-plus/autocomplete.scss +85 -0
- package/dist/runtime/public/scss/element-plus/avatar.css +374 -0
- package/dist/runtime/public/scss/element-plus/avatar.scss +56 -0
- package/dist/runtime/public/scss/element-plus/backtop.css +326 -0
- package/dist/runtime/public/scss/element-plus/backtop.scss +29 -0
- package/dist/runtime/public/scss/element-plus/badge.css +376 -0
- package/dist/runtime/public/scss/element-plus/badge.scss +54 -0
- package/dist/runtime/public/scss/element-plus/base.css +559 -0
- package/dist/runtime/public/scss/element-plus/base.scss +3 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb-item.scss +0 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb.css +370 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb.scss +77 -0
- package/dist/runtime/public/scss/element-plus/button-group.css +535 -0
- package/dist/runtime/public/scss/element-plus/button-group.scss +111 -0
- package/dist/runtime/public/scss/element-plus/button.css +1103 -0
- package/dist/runtime/public/scss/element-plus/button.scss +374 -0
- package/dist/runtime/public/scss/element-plus/calendar.css +370 -0
- package/dist/runtime/public/scss/element-plus/calendar.scss +80 -0
- package/dist/runtime/public/scss/element-plus/card.css +349 -0
- package/dist/runtime/public/scss/element-plus/card.scss +56 -0
- package/dist/runtime/public/scss/element-plus/carousel-item.css +350 -0
- package/dist/runtime/public/scss/element-plus/carousel-item.scss +58 -0
- package/dist/runtime/public/scss/element-plus/carousel.css +475 -0
- package/dist/runtime/public/scss/element-plus/carousel.scss +183 -0
- package/dist/runtime/public/scss/element-plus/cascader-panel.css +438 -0
- package/dist/runtime/public/scss/element-plus/cascader-panel.scss +148 -0
- package/dist/runtime/public/scss/element-plus/cascader.css +560 -0
- package/dist/runtime/public/scss/element-plus/cascader.scss +218 -0
- package/dist/runtime/public/scss/element-plus/check-tag.css +386 -0
- package/dist/runtime/public/scss/element-plus/check-tag.scss +38 -0
- package/dist/runtime/public/scss/element-plus/checkbox-button.css +446 -0
- package/dist/runtime/public/scss/element-plus/checkbox-button.scss +141 -0
- package/dist/runtime/public/scss/element-plus/checkbox-group.css +311 -0
- package/dist/runtime/public/scss/element-plus/checkbox-group.scss +13 -0
- package/dist/runtime/public/scss/element-plus/checkbox.css +587 -0
- package/dist/runtime/public/scss/element-plus/checkbox.scss +293 -0
- package/dist/runtime/public/scss/element-plus/col.css +3270 -0
- package/dist/runtime/public/scss/element-plus/col.scss +48 -0
- package/dist/runtime/public/scss/element-plus/collapse-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse-item.scss +0 -0
- package/dist/runtime/public/scss/element-plus/collapse-transition.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse-transition.scss +0 -0
- package/dist/runtime/public/scss/element-plus/collapse.css +499 -0
- package/dist/runtime/public/scss/element-plus/collapse.scss +85 -0
- package/dist/runtime/public/scss/element-plus/color/index.css +0 -0
- package/dist/runtime/public/scss/element-plus/color/index.scss +17 -0
- package/dist/runtime/public/scss/element-plus/color-picker.css +650 -0
- package/dist/runtime/public/scss/element-plus/color-picker.scss +365 -0
- package/dist/runtime/public/scss/element-plus/common/popup.css +338 -0
- package/dist/runtime/public/scss/element-plus/common/popup.scss +47 -0
- package/dist/runtime/public/scss/element-plus/common/transition.css +420 -0
- package/dist/runtime/public/scss/element-plus/common/transition.scss +124 -0
- package/dist/runtime/public/scss/element-plus/common/var.css +302 -0
- package/dist/runtime/public/scss/element-plus/common/var.scss +1676 -0
- package/dist/runtime/public/scss/element-plus/config-provider.css +0 -0
- package/dist/runtime/public/scss/element-plus/config-provider.scss +0 -0
- package/dist/runtime/public/scss/element-plus/container.css +313 -0
- package/dist/runtime/public/scss/element-plus/container.scss +14 -0
- package/dist/runtime/public/scss/element-plus/dark/css-vars.css +353 -0
- package/dist/runtime/public/scss/element-plus/dark/css-vars.scss +39 -0
- package/dist/runtime/public/scss/element-plus/dark/var.css +302 -0
- package/dist/runtime/public/scss/element-plus/dark/var.scss +222 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-picker.css +558 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-picker.scss +109 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.css +410 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.scss +117 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-table.css +426 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-table.scss +158 -0
- package/dist/runtime/public/scss/element-plus/date-picker/month-table.css +388 -0
- package/dist/runtime/public/scss/element-plus/date-picker/month-table.scss +112 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.css +454 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.scss +168 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker.css +668 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker.scss +198 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-picker.css +384 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-picker.scss +98 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.css +338 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.scss +40 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.css +389 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.scss +110 -0
- package/dist/runtime/public/scss/element-plus/date-picker/year-table.css +384 -0
- package/dist/runtime/public/scss/element-plus/date-picker/year-table.scss +108 -0
- package/dist/runtime/public/scss/element-plus/date-picker.css +1537 -0
- package/dist/runtime/public/scss/element-plus/date-picker.scss +9 -0
- package/dist/runtime/public/scss/element-plus/descriptions-item.css +347 -0
- package/dist/runtime/public/scss/element-plus/descriptions-item.scss +69 -0
- package/dist/runtime/public/scss/element-plus/descriptions.css +438 -0
- package/dist/runtime/public/scss/element-plus/descriptions.scss +212 -0
- package/dist/runtime/public/scss/element-plus/dialog.css +546 -0
- package/dist/runtime/public/scss/element-plus/dialog.scss +196 -0
- package/dist/runtime/public/scss/element-plus/display.css +357 -0
- package/dist/runtime/public/scss/element-plus/display.scss +12 -0
- package/dist/runtime/public/scss/element-plus/divider.css +345 -0
- package/dist/runtime/public/scss/element-plus/divider.scss +48 -0
- package/dist/runtime/public/scss/element-plus/drawer.css +419 -0
- package/dist/runtime/public/scss/element-plus/drawer.scss +155 -0
- package/dist/runtime/public/scss/element-plus/dropdown-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown-item.scss +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown-menu.scss +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown.css +499 -0
- package/dist/runtime/public/scss/element-plus/dropdown.scss +216 -0
- package/dist/runtime/public/scss/element-plus/empty.css +355 -0
- package/dist/runtime/public/scss/element-plus/empty.scss +49 -0
- package/dist/runtime/public/scss/element-plus/footer.css +310 -0
- package/dist/runtime/public/scss/element-plus/footer.scss +12 -0
- package/dist/runtime/public/scss/element-plus/form-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/form-item.scss +0 -0
- package/dist/runtime/public/scss/element-plus/form.css +547 -0
- package/dist/runtime/public/scss/element-plus/form.scss +328 -0
- package/dist/runtime/public/scss/element-plus/header.css +310 -0
- package/dist/runtime/public/scss/element-plus/header.scss +12 -0
- package/dist/runtime/public/scss/element-plus/icon.css +343 -0
- package/dist/runtime/public/scss/element-plus/icon.scss +45 -0
- package/dist/runtime/public/scss/element-plus/image-viewer.css +439 -0
- package/dist/runtime/public/scss/element-plus/image-viewer.scss +139 -0
- package/dist/runtime/public/scss/element-plus/image.css +343 -0
- package/dist/runtime/public/scss/element-plus/image.scss +49 -0
- package/dist/runtime/public/scss/element-plus/index.css +17940 -0
- package/dist/runtime/public/scss/element-plus/index.scss +110 -0
- package/dist/runtime/public/scss/element-plus/infinite-scroll.css +0 -0
- package/dist/runtime/public/scss/element-plus/infinite-scroll.scss +0 -0
- package/dist/runtime/public/scss/element-plus/input-number.css +506 -0
- package/dist/runtime/public/scss/element-plus/input-number.scss +205 -0
- package/dist/runtime/public/scss/element-plus/input.css +771 -0
- package/dist/runtime/public/scss/element-plus/input.scss +534 -0
- package/dist/runtime/public/scss/element-plus/link.css +603 -0
- package/dist/runtime/public/scss/element-plus/link.scss +132 -0
- package/dist/runtime/public/scss/element-plus/loading.css +392 -0
- package/dist/runtime/public/scss/element-plus/loading.scss +103 -0
- package/dist/runtime/public/scss/element-plus/main.css +312 -0
- package/dist/runtime/public/scss/element-plus/main.scss +15 -0
- package/dist/runtime/public/scss/element-plus/mention.css +413 -0
- package/dist/runtime/public/scss/element-plus/mention.scss +84 -0
- package/dist/runtime/public/scss/element-plus/menu-item-group.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu-item-group.scss +0 -0
- package/dist/runtime/public/scss/element-plus/menu-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu-item.scss +0 -0
- package/dist/runtime/public/scss/element-plus/menu.css +765 -0
- package/dist/runtime/public/scss/element-plus/menu.scss +360 -0
- package/dist/runtime/public/scss/element-plus/message-box.css +576 -0
- package/dist/runtime/public/scss/element-plus/message-box.scss +238 -0
- package/dist/runtime/public/scss/element-plus/message.css +529 -0
- package/dist/runtime/public/scss/element-plus/message.scss +165 -0
- package/dist/runtime/public/scss/element-plus/mixins/_button.scss +241 -0
- package/dist/runtime/public/scss/element-plus/mixins/_col.scss +33 -0
- package/dist/runtime/public/scss/element-plus/mixins/_var.scss +59 -0
- package/dist/runtime/public/scss/element-plus/mixins/config.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/config.scss +5 -0
- package/dist/runtime/public/scss/element-plus/mixins/function.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/function.scss +86 -0
- package/dist/runtime/public/scss/element-plus/mixins/mixins.css +302 -0
- package/dist/runtime/public/scss/element-plus/mixins/mixins.scss +232 -0
- package/dist/runtime/public/scss/element-plus/mixins/utils.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/utils.scss +39 -0
- package/dist/runtime/public/scss/element-plus/notification.css +414 -0
- package/dist/runtime/public/scss/element-plus/notification.scss +104 -0
- package/dist/runtime/public/scss/element-plus/option-group.css +331 -0
- package/dist/runtime/public/scss/element-plus/option-group.scss +38 -0
- package/dist/runtime/public/scss/element-plus/option.css +363 -0
- package/dist/runtime/public/scss/element-plus/option.scss +84 -0
- package/dist/runtime/public/scss/element-plus/overlay.css +316 -0
- package/dist/runtime/public/scss/element-plus/overlay.scss +20 -0
- package/dist/runtime/public/scss/element-plus/page-header.css +351 -0
- package/dist/runtime/public/scss/element-plus/page-header.scss +60 -0
- package/dist/runtime/public/scss/element-plus/pagination.css +594 -0
- package/dist/runtime/public/scss/element-plus/pagination.scss +255 -0
- package/dist/runtime/public/scss/element-plus/popconfirm.css +315 -0
- package/dist/runtime/public/scss/element-plus/popconfirm.scss +16 -0
- package/dist/runtime/public/scss/element-plus/popover.css +411 -0
- package/dist/runtime/public/scss/element-plus/popover.scss +85 -0
- package/dist/runtime/public/scss/element-plus/popper.css +405 -0
- package/dist/runtime/public/scss/element-plus/popper.scss +127 -0
- package/dist/runtime/public/scss/element-plus/progress.css +449 -0
- package/dist/runtime/public/scss/element-plus/progress.scss +179 -0
- package/dist/runtime/public/scss/element-plus/radio-button.css +435 -0
- package/dist/runtime/public/scss/element-plus/radio-button.scss +138 -0
- package/dist/runtime/public/scss/element-plus/radio-group.css +311 -0
- package/dist/runtime/public/scss/element-plus/radio-group.scss +13 -0
- package/dist/runtime/public/scss/element-plus/radio.css +565 -0
- package/dist/runtime/public/scss/element-plus/radio.scss +246 -0
- package/dist/runtime/public/scss/element-plus/rate.css +384 -0
- package/dist/runtime/public/scss/element-plus/rate.scss +108 -0
- package/dist/runtime/public/scss/element-plus/reset.css +399 -0
- package/dist/runtime/public/scss/element-plus/reset.scss +97 -0
- package/dist/runtime/public/scss/element-plus/result.css +381 -0
- package/dist/runtime/public/scss/element-plus/result.scss +57 -0
- package/dist/runtime/public/scss/element-plus/row.css +339 -0
- package/dist/runtime/public/scss/element-plus/row.scss +35 -0
- package/dist/runtime/public/scss/element-plus/scrollbar.css +373 -0
- package/dist/runtime/public/scss/element-plus/scrollbar.scss +85 -0
- package/dist/runtime/public/scss/element-plus/segmented.css +460 -0
- package/dist/runtime/public/scss/element-plus/segmented.scss +160 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown-v2.css +354 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown-v2.scss +1 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown.css +354 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown.scss +60 -0
- package/dist/runtime/public/scss/element-plus/select-v2.css +852 -0
- package/dist/runtime/public/scss/element-plus/select-v2.scss +4 -0
- package/dist/runtime/public/scss/element-plus/select.css +852 -0
- package/dist/runtime/public/scss/element-plus/select.scss +354 -0
- package/dist/runtime/public/scss/element-plus/skeleton-item.css +372 -0
- package/dist/runtime/public/scss/element-plus/skeleton-item.scss +83 -0
- package/dist/runtime/public/scss/element-plus/skeleton.css +335 -0
- package/dist/runtime/public/scss/element-plus/skeleton.scss +39 -0
- package/dist/runtime/public/scss/element-plus/slider.css +480 -0
- package/dist/runtime/public/scss/element-plus/slider.scss +212 -0
- package/dist/runtime/public/scss/element-plus/space.css +317 -0
- package/dist/runtime/public/scss/element-plus/space.scss +20 -0
- package/dist/runtime/public/scss/element-plus/spinner.css +342 -0
- package/dist/runtime/public/scss/element-plus/spinner.scss +43 -0
- package/dist/runtime/public/scss/element-plus/statistic.css +336 -0
- package/dist/runtime/public/scss/element-plus/statistic.scss +35 -0
- package/dist/runtime/public/scss/element-plus/step.css +586 -0
- package/dist/runtime/public/scss/element-plus/step.scss +316 -0
- package/dist/runtime/public/scss/element-plus/steps.css +319 -0
- package/dist/runtime/public/scss/element-plus/steps.scss +21 -0
- package/dist/runtime/public/scss/element-plus/sub-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/sub-menu.scss +0 -0
- package/dist/runtime/public/scss/element-plus/switch.css +595 -0
- package/dist/runtime/public/scss/element-plus/switch.scss +327 -0
- package/dist/runtime/public/scss/element-plus/tab-pane.css +0 -0
- package/dist/runtime/public/scss/element-plus/tab-pane.scss +0 -0
- package/dist/runtime/public/scss/element-plus/table-column.css +382 -0
- package/dist/runtime/public/scss/element-plus/table-column.scss +98 -0
- package/dist/runtime/public/scss/element-plus/table-v2.css +521 -0
- package/dist/runtime/public/scss/element-plus/table-v2.scss +234 -0
- package/dist/runtime/public/scss/element-plus/table.css +980 -0
- package/dist/runtime/public/scss/element-plus/table.scss +868 -0
- package/dist/runtime/public/scss/element-plus/tabs.css +892 -0
- package/dist/runtime/public/scss/element-plus/tabs.scss +654 -0
- package/dist/runtime/public/scss/element-plus/tag.css +655 -0
- package/dist/runtime/public/scss/element-plus/tag.scss +193 -0
- package/dist/runtime/public/scss/element-plus/text.css +378 -0
- package/dist/runtime/public/scss/element-plus/text.scss +58 -0
- package/dist/runtime/public/scss/element-plus/time-picker.css +1029 -0
- package/dist/runtime/public/scss/element-plus/time-picker.scss +5 -0
- package/dist/runtime/public/scss/element-plus/time-select.css +952 -0
- package/dist/runtime/public/scss/element-plus/time-select.scss +37 -0
- package/dist/runtime/public/scss/element-plus/timeline-item.css +415 -0
- package/dist/runtime/public/scss/element-plus/timeline-item.scss +84 -0
- package/dist/runtime/public/scss/element-plus/timeline.css +334 -0
- package/dist/runtime/public/scss/element-plus/timeline.scss +46 -0
- package/dist/runtime/public/scss/element-plus/tooltip-v2.css +410 -0
- package/dist/runtime/public/scss/element-plus/tooltip-v2.scss +86 -0
- package/dist/runtime/public/scss/element-plus/tooltip.css +308 -0
- package/dist/runtime/public/scss/element-plus/tooltip.scss +15 -0
- package/dist/runtime/public/scss/element-plus/tour.css +461 -0
- package/dist/runtime/public/scss/element-plus/tour.scss +170 -0
- package/dist/runtime/public/scss/element-plus/transfer.css +497 -0
- package/dist/runtime/public/scss/element-plus/transfer.scss +204 -0
- package/dist/runtime/public/scss/element-plus/tree-select.css +325 -0
- package/dist/runtime/public/scss/element-plus/tree-select.scss +38 -0
- package/dist/runtime/public/scss/element-plus/tree.css +538 -0
- package/dist/runtime/public/scss/element-plus/tree.scss +132 -0
- package/dist/runtime/public/scss/element-plus/upload.css +862 -0
- package/dist/runtime/public/scss/element-plus/upload.scss +656 -0
- package/dist/runtime/public/scss/element-plus/var.css +398 -0
- package/dist/runtime/public/scss/element-plus/var.scss +86 -0
- package/dist/runtime/public/scss/element-plus/virtual-list.css +330 -0
- package/dist/runtime/public/scss/element-plus/virtual-list.scss +40 -0
- package/dist/runtime/public/scss/theme.css +1299 -0
- package/dist/runtime/public/scss/theme.scss +68 -0
- package/dist/runtime/server/tsconfig.json +6 -0
- package/dist/runtime/types.d.ts +61 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +73 -4
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Message</h1>
|
|
4
|
+
<p>Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Basic usage </template>
|
|
8
|
+
<div class="flex flex-col gap-3">
|
|
9
|
+
<p>
|
|
10
|
+
Displays at the top, and disappears after 3 seconds. The setup of Message is very similar to notification, so parts of the options won't be explained in detail here. You
|
|
11
|
+
can check the options table below combined with notification doc to understand it. Element Plus has registered a <el-text tag="mark">$message</el-text> method for
|
|
12
|
+
invoking. Message can take a string or a VNode as parameter, and it will be shown as the main body.
|
|
13
|
+
</p>
|
|
14
|
+
<div class="flex flex-col gap-7.5">
|
|
15
|
+
<el-radio-group v-model="isPlain" size="mini">
|
|
16
|
+
<el-radio-button :value="false">basic</el-radio-button>
|
|
17
|
+
<el-radio-button :value="true">plain</el-radio-button>
|
|
18
|
+
</el-radio-group>
|
|
19
|
+
<div class="flex gap-4">
|
|
20
|
+
<el-button type="secondary" @click="basicOpener">default</el-button>
|
|
21
|
+
<el-button v-for="color of colors" :key="color" :type="color" @click="open(color, isPlain)">{{ color }}</el-button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
26
|
+
</el-card>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import { ElMessage, type MessageOptions } from 'element-plus';
|
|
32
|
+
import { ref } from 'vue';
|
|
33
|
+
|
|
34
|
+
const colors = ref(['primary', 'success', 'warning', 'info', 'error' /* , 'danger' */]);
|
|
35
|
+
|
|
36
|
+
const snippets = ref({
|
|
37
|
+
basic: `
|
|
38
|
+
import { ElMessage, type MessageOptions } from 'element-plus';
|
|
39
|
+
|
|
40
|
+
ElMessage({
|
|
41
|
+
showClose: true,
|
|
42
|
+
grouping: true,
|
|
43
|
+
message: "Congrats, this is a message."",
|
|
44
|
+
type,
|
|
45
|
+
duration: 0,
|
|
46
|
+
plain,
|
|
47
|
+
} as MessageOptions)
|
|
48
|
+
`,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const basicOpener = () => {
|
|
52
|
+
ElMessage({ message: 'This is a message.', showClose: true, duration: 0 });
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const isPlain = ref(false);
|
|
56
|
+
|
|
57
|
+
const open = function (type: string, plain: boolean = true) {
|
|
58
|
+
ElMessage({
|
|
59
|
+
showClose: true,
|
|
60
|
+
grouping: true,
|
|
61
|
+
message: `Congrats, this is a ${type} message.`,
|
|
62
|
+
type,
|
|
63
|
+
duration: 0,
|
|
64
|
+
plain,
|
|
65
|
+
validator: () => null,
|
|
66
|
+
} as MessageOptions);
|
|
67
|
+
};
|
|
68
|
+
</script>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Notification - (Needs Acceptance)</h1>
|
|
4
|
+
<p>Displays a global notification message at a corner of the page.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Basic usage </template>
|
|
8
|
+
<div class="flex flex-col gap-3">
|
|
9
|
+
<p>
|
|
10
|
+
Element Plus has registered the <el-text tag="mark">$notify</el-text> method and it receives an object as its parameter. In the simplest case, you can set the
|
|
11
|
+
<el-text tag="mark">title</el-text> field and the <el-text tag="mark">message</el-text> field for the title and body of the notification. By default, the notification
|
|
12
|
+
automatically closes after 4500ms, but by setting <el-text tag="mark">duration</el-text> you can control its duration. Specifically, if set to 0, it will not close
|
|
13
|
+
automatically. Note that duration receives a <el-text tag="mark">Number</el-text> in milliseconds.
|
|
14
|
+
</p>
|
|
15
|
+
<section class="flex gap-7.5">
|
|
16
|
+
<el-button plain @click="open(4500)"> Closes automatically </el-button>
|
|
17
|
+
<el-button plain @click="open(0)"> Won't close automatically </el-button>
|
|
18
|
+
</section>
|
|
19
|
+
</div>
|
|
20
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
21
|
+
</el-card>
|
|
22
|
+
|
|
23
|
+
<el-card>
|
|
24
|
+
<template #header>With types</template>
|
|
25
|
+
<div class="flex flex-col gap-3">
|
|
26
|
+
<p>
|
|
27
|
+
We provide four types: <el-text tag="mark">success, warning, info</el-text> and <el-text tag="mark">error</el-text>. Element Plus provides four notification types:
|
|
28
|
+
success, warning, info and error. They are set by the <el-text tag="mark">type</el-text> field, and other values will be ignored. We also registered methods for these
|
|
29
|
+
types that can be invoked directly like open3 and open4 without passing a type field.
|
|
30
|
+
</p>
|
|
31
|
+
<section class="flex gap-7.5">
|
|
32
|
+
<el-button v-for="(type, index) of ['success', 'info', 'warning', 'error']" :key="index" plain :type="type" @click="open(0, type)">{{ type }}</el-button>
|
|
33
|
+
</section>
|
|
34
|
+
</div>
|
|
35
|
+
<template #footer> <html-encode :tag="snippets.types" /> </template>
|
|
36
|
+
</el-card>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
import { ElNotification } from 'element-plus';
|
|
42
|
+
import { ref } from 'vue';
|
|
43
|
+
|
|
44
|
+
const open = (duration = 4500, type) => {
|
|
45
|
+
ElNotification({
|
|
46
|
+
title: capitalize(type) ?? 'Title',
|
|
47
|
+
message: 'This is a reminder',
|
|
48
|
+
duration: duration ?? 5000,
|
|
49
|
+
type: type ?? 'default',
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const snippets = ref({
|
|
54
|
+
basic: `
|
|
55
|
+
ElNotification({
|
|
56
|
+
title: 'Title',
|
|
57
|
+
message: 'This is a reminder',
|
|
58
|
+
duration: 4500,
|
|
59
|
+
});`,
|
|
60
|
+
types: `
|
|
61
|
+
ElNotification({
|
|
62
|
+
title: 'Title',
|
|
63
|
+
message: 'This is a reminder',
|
|
64
|
+
duration: 0,
|
|
65
|
+
type: 'success',
|
|
66
|
+
});
|
|
67
|
+
`,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const capitalize = (value: string): string => {
|
|
71
|
+
if (!value) return null;
|
|
72
|
+
|
|
73
|
+
const text = String(value);
|
|
74
|
+
|
|
75
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Input Number</h1>
|
|
4
|
+
<p>Input numerical values with a customizable range.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Basic usage </template>
|
|
8
|
+
<div class="flex flex-col gap-7.5">
|
|
9
|
+
<p>Bind a variable to <el-text tag="mark">v-model</el-text> in <span class="comment">el-input-number</span> element and you are set.</p>
|
|
10
|
+
<el-switch v-model="controls" /> Controls
|
|
11
|
+
<section class="flex gap-7.5">
|
|
12
|
+
<el-input-number v-model="num" :controls="controls" :min="1" :max="10" @change="handleChange" />
|
|
13
|
+
<el-input-number v-model="num" :controls="controls" :disabled="true" />
|
|
14
|
+
</section>
|
|
15
|
+
</div>
|
|
16
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
17
|
+
</el-card>
|
|
18
|
+
|
|
19
|
+
<el-card>
|
|
20
|
+
<template #header>Size</template>
|
|
21
|
+
<div class="flex flex-col gap-7.5">
|
|
22
|
+
<p>Use attribute <el-text tag="mark">size</el-text> to set additional sizes with large or small.</p>
|
|
23
|
+
<section class="flex flex-col">
|
|
24
|
+
<el-form label-position="top">
|
|
25
|
+
<div class="el-form-items items-start">
|
|
26
|
+
<el-form-item v-for="size of sizes" :key="size" :label="size">
|
|
27
|
+
<el-input-number v-model="num" :controls="controls" :min="1" :max="10" controls-position="right" :size="size" @change="handleChange" />
|
|
28
|
+
</el-form-item>
|
|
29
|
+
</div>
|
|
30
|
+
</el-form>
|
|
31
|
+
<el-form label-position="top">
|
|
32
|
+
<div class="el-form-items items-start">
|
|
33
|
+
<el-form-item v-for="size of sizes" :key="size" :label="size">
|
|
34
|
+
<el-input-number v-model="num" :controls="controls" :min="1" :max="10" controls-position="right" :size="size" :disabled="true" @change="handleChange" />
|
|
35
|
+
</el-form-item>
|
|
36
|
+
</div>
|
|
37
|
+
</el-form>
|
|
38
|
+
</section>
|
|
39
|
+
</div>
|
|
40
|
+
<template #footer> <html-encode :tag="snippets.content" /> </template>
|
|
41
|
+
</el-card>
|
|
42
|
+
|
|
43
|
+
<el-card>
|
|
44
|
+
<template #header>Controls Position</template>
|
|
45
|
+
<div class="flex flex-col gap-7.5">
|
|
46
|
+
<p>Set <el-text tag="mark">controls-position</el-text> to decide the position of control buttons.</p>
|
|
47
|
+
<section class="flex gap-7.5">
|
|
48
|
+
<el-input-number v-model="num" :controls="controls" :min="1" :max="10" controls-position="right" size="large" @change="handleChange" />
|
|
49
|
+
<el-input-number v-model="num" :controls="controls" :min="1" :max="10" controls-position="right" size="large" :disabled="true" @change="handleChange" />
|
|
50
|
+
</section>
|
|
51
|
+
</div>
|
|
52
|
+
<template #footer> <html-encode :tag="snippets.content" /> </template>
|
|
53
|
+
</el-card>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script lang="ts" setup>
|
|
58
|
+
import { ref } from 'vue';
|
|
59
|
+
|
|
60
|
+
const sizes = ref(['default', 'large', 'medium', 'small', 'mini']);
|
|
61
|
+
const num = ref(1);
|
|
62
|
+
const controls = ref(true);
|
|
63
|
+
|
|
64
|
+
const handleChange = (value: number) => {
|
|
65
|
+
console.log(value);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const snippets = ref({
|
|
69
|
+
basic: `
|
|
70
|
+
<el-input-number v-model="num" :min="1" :max="10" @change="handleChange" />
|
|
71
|
+
<el-input-number v-model="num" :disabled="true" />`,
|
|
72
|
+
content: `<el-input-number v-model="num" :min="1" :max="10" controls-position="right" size="large" @change="handleChange" />`,
|
|
73
|
+
});
|
|
74
|
+
</script>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Pagination</h1>
|
|
4
|
+
<p>If you have too much data to display in one page, use pagination.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Basic usage </template>
|
|
8
|
+
<div class="flex flex-col gap-7.5">
|
|
9
|
+
<p>
|
|
10
|
+
Set <el-text tag="mark">layout</el-text> with different pagination elements you wish to display separated with a comma. Pagination elements are:
|
|
11
|
+
<el-text tag="mark">prev</el-text> (a button navigating to the previous page), <el-text tag="mark">next</el-text> (a button navigating to the next page),
|
|
12
|
+
<el-text tag="mark">pager</el-text> (page list), <el-text tag="mark">jumper</el-text> (a jump-to input), <el-text tag="mark">total</el-text> (total item count),
|
|
13
|
+
<el-text tag="mark">sizes</el-text> (a select to determine page size) and <el-text tag="mark">-></el-text> (every element after this symbol will be pulled to the right).
|
|
14
|
+
</p>
|
|
15
|
+
<section class="flex flex-col gap-7.5">
|
|
16
|
+
<el-pagination
|
|
17
|
+
v-model:current-page="current_page"
|
|
18
|
+
v-model:page-size="page_size"
|
|
19
|
+
:page-sizes="[10, 20, 50, 100]"
|
|
20
|
+
:disabled="disabled"
|
|
21
|
+
:background="background"
|
|
22
|
+
layout="total, prev, pager, next, jumper, sizes"
|
|
23
|
+
:total="40000"
|
|
24
|
+
@size-change="handleSizeChange"
|
|
25
|
+
@current-change="handleCurrentChange"
|
|
26
|
+
/>
|
|
27
|
+
</section>
|
|
28
|
+
</div>
|
|
29
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
30
|
+
</el-card>
|
|
31
|
+
|
|
32
|
+
<el-card>
|
|
33
|
+
<template #header> Disabled </template>
|
|
34
|
+
<div class="flex flex-col gap-7.5">
|
|
35
|
+
<p>For make a disable pagination component, add <el-text tag="mark">:disabled="true"</el-text></p>
|
|
36
|
+
<section class="flex flex-col gap-7.5">
|
|
37
|
+
<el-pagination
|
|
38
|
+
v-model:current-page="current_page"
|
|
39
|
+
v-model:page-size="page_size"
|
|
40
|
+
:page-sizes="[10, 20, 50, 100]"
|
|
41
|
+
:size="size"
|
|
42
|
+
:disabled="true"
|
|
43
|
+
:background="background"
|
|
44
|
+
layout="total, prev, pager, next, jumper, sizes"
|
|
45
|
+
:total="40000"
|
|
46
|
+
@size-change="handleSizeChange"
|
|
47
|
+
@current-change="handleCurrentChange"
|
|
48
|
+
/>
|
|
49
|
+
</section>
|
|
50
|
+
</div>
|
|
51
|
+
<template #footer> <html-encode :tag="snippets.disable" /> </template>
|
|
52
|
+
</el-card>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
<script lang="ts" setup>
|
|
56
|
+
import { reactive, ref, toRefs } from 'vue';
|
|
57
|
+
|
|
58
|
+
interface PaginationState {
|
|
59
|
+
current_page: number;
|
|
60
|
+
size: string;
|
|
61
|
+
page_size: number;
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
background: boolean;
|
|
64
|
+
handleSizeChange: (pageSize: number) => void;
|
|
65
|
+
handleCurrentChange: (page: number) => void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const paginationState = reactive<PaginationState>({
|
|
69
|
+
current_page: 2,
|
|
70
|
+
size: 'small',
|
|
71
|
+
page_size: 20,
|
|
72
|
+
disabled: false,
|
|
73
|
+
background: false,
|
|
74
|
+
handleSizeChange: (pageSize: number) => {
|
|
75
|
+
console.log(pageSize);
|
|
76
|
+
},
|
|
77
|
+
handleCurrentChange: (page: number) => {
|
|
78
|
+
console.log(page);
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const { current_page, size, page_size, disabled, background, handleSizeChange, handleCurrentChange } = toRefs(paginationState);
|
|
83
|
+
|
|
84
|
+
const snippets = ref({
|
|
85
|
+
basic: `
|
|
86
|
+
<el-pagination
|
|
87
|
+
v-model:current-page="current_page"
|
|
88
|
+
v-model:page-size="page_size"
|
|
89
|
+
:page-sizes="[10, 20, 50, 100]"
|
|
90
|
+
:size="size"
|
|
91
|
+
:background="background"
|
|
92
|
+
layout="total, prev, pager, next, jumper, sizes"
|
|
93
|
+
:total="40000"
|
|
94
|
+
@size-change="handleSizeChange"
|
|
95
|
+
@current-change="handleCurrentChange"
|
|
96
|
+
/>
|
|
97
|
+
`,
|
|
98
|
+
disable: `<el-pagination :disabled="true" />`,
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Popover</h1>
|
|
4
|
+
<p>The Element Plus Popover component provides a customizable tooltip that appears when the user clicks or hovers over an element.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Usage </template>
|
|
8
|
+
<div class="flex flex-col gap-4 items-start">
|
|
9
|
+
<p>
|
|
10
|
+
Popover is built with <el-text tag="mark">ElTooltip</el-text>. So for some duplicated attributes, please refer to the documentation of Tooltip. The
|
|
11
|
+
<el-text tag="mark">trigger</el-text> attribute is used to define how popover is triggered: <span class="font-medium">hover, click, focus or contextmenu</span> . If you
|
|
12
|
+
want to manually control it, you can set <el-text tag="mark">:visible</el-text>.
|
|
13
|
+
</p>
|
|
14
|
+
<div class="flex gap-7.5">
|
|
15
|
+
<el-popover placement="top-start" title="Title" :width="200" trigger="hover" content="this is content, this is content, this is content">
|
|
16
|
+
<template #reference>
|
|
17
|
+
<el-button>Hover to activate</el-button>
|
|
18
|
+
</template>
|
|
19
|
+
</el-popover>
|
|
20
|
+
|
|
21
|
+
<el-popover placement="bottom" trigger="click" popper-class="custom-popover">
|
|
22
|
+
<template #reference>
|
|
23
|
+
<el-button type="primary">popover</el-button>
|
|
24
|
+
</template>
|
|
25
|
+
<div class="table-filter-box" style="padding: 10px">
|
|
26
|
+
<el-select v-model="model" style="width: 200px" :teleported="false">
|
|
27
|
+
<el-option label="item1" value="item1" />
|
|
28
|
+
<el-option label="item2" value="item2" />
|
|
29
|
+
<el-option label="item3" value="item3" />
|
|
30
|
+
</el-select>
|
|
31
|
+
</div>
|
|
32
|
+
</el-popover>
|
|
33
|
+
|
|
34
|
+
<el-popover ref="popoverRef" placement="right" title="Title" :width="200" trigger="focus" content="this is content, this is content, this is content">
|
|
35
|
+
<template #reference>
|
|
36
|
+
<el-button>Focus to activate</el-button>
|
|
37
|
+
</template>
|
|
38
|
+
</el-popover>
|
|
39
|
+
|
|
40
|
+
<el-popover ref="popoverRef" title="Title" :width="200" trigger="contextmenu" content="this is content, this is content, this is content">
|
|
41
|
+
<template #reference>
|
|
42
|
+
<el-button>contextmenu to activate</el-button>
|
|
43
|
+
</template>
|
|
44
|
+
</el-popover>
|
|
45
|
+
|
|
46
|
+
<el-popover :visible="visible" placement="bottom" title="Title" :width="200" content="this is content, this is content, this is content">
|
|
47
|
+
<template #reference>
|
|
48
|
+
<el-button @click="visible = !visible"> Manual to activate </el-button>
|
|
49
|
+
</template>
|
|
50
|
+
</el-popover>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
54
|
+
</el-card>
|
|
55
|
+
|
|
56
|
+
<el-card>
|
|
57
|
+
<template #header> Virtual triggering </template>
|
|
58
|
+
<div class="flex flex-col gap-4 items-start">
|
|
59
|
+
<p>
|
|
60
|
+
Like Tooltip, Popover can be triggered by virtual elements, if your use case includes separate the triggering element and the content element, you should definitely use
|
|
61
|
+
the mechanism, normally we use <el-text tag="mark">#reference</el-text> to place our triggering element, with <el-text tag="mark">triggering-element</el-text> API you can
|
|
62
|
+
set your triggering element anywhere you like, but notice that the triggering element should be an element that accepts
|
|
63
|
+
<span class="font-medium">mouse and keyboard</span> event.
|
|
64
|
+
</p>
|
|
65
|
+
<div class="flex gap-2">
|
|
66
|
+
<el-button ref="buttonRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
67
|
+
<el-popover ref="popoverRef" :virtual-ref="buttonRef" trigger="click" title="With title" virtual-triggering>
|
|
68
|
+
<span> Some content </span>
|
|
69
|
+
</el-popover>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<template #footer> <html-encode :tag="snippets.reference" /> </template>
|
|
73
|
+
</el-card>
|
|
74
|
+
|
|
75
|
+
<el-card>
|
|
76
|
+
<template #header> Nested operation </template>
|
|
77
|
+
<div class="flex flex-col gap-4 items-start">
|
|
78
|
+
<p>Of course, you can nest other operations. It's more light-weight than using a dialog.</p>
|
|
79
|
+
<div class="flex gap-2">
|
|
80
|
+
<el-popover :visible="visible" placement="top" :width="360">
|
|
81
|
+
<p>Are you sure to delete this?</p>
|
|
82
|
+
<div class="popover-footer">
|
|
83
|
+
<el-button plain @click="visible = false">cancel</el-button>
|
|
84
|
+
<el-button @click="visible = false"> confirm </el-button>
|
|
85
|
+
</div>
|
|
86
|
+
<template #reference>
|
|
87
|
+
<el-button @click="visible = true">Delete</el-button>
|
|
88
|
+
</template>
|
|
89
|
+
</el-popover>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<template #footer> <html-encode :tag="snippets.nested" /> </template>
|
|
93
|
+
</el-card>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<script setup lang="ts">
|
|
98
|
+
import { ClickOutside as vClickOutside } from 'element-plus';
|
|
99
|
+
import { ref, unref } from 'vue';
|
|
100
|
+
|
|
101
|
+
const buttonRef = ref();
|
|
102
|
+
const popoverRef = ref();
|
|
103
|
+
const visible = ref(false);
|
|
104
|
+
|
|
105
|
+
const onClickOutside = () => {
|
|
106
|
+
unref(popoverRef).popperRef?.delayHide?.();
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const model = ref('');
|
|
110
|
+
|
|
111
|
+
const snippets = {
|
|
112
|
+
basic: `
|
|
113
|
+
<el-popover placement="top-start" title="Title" :width="200" trigger="hover" content="this is content, this is content, this is content">
|
|
114
|
+
<template #reference>
|
|
115
|
+
<el-button >Hover to activate</el-button>
|
|
116
|
+
</template>
|
|
117
|
+
</el-popover>
|
|
118
|
+
`,
|
|
119
|
+
reference: `
|
|
120
|
+
<el-button ref="buttonRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
121
|
+
|
|
122
|
+
<el-popover ref="popoverRef" :virtual-ref="buttonRef" trigger="click" title="With title" virtual-triggering>
|
|
123
|
+
<span> Some content </span>
|
|
124
|
+
</el-popover>
|
|
125
|
+
`,
|
|
126
|
+
nested: `
|
|
127
|
+
<el-popover :visible="visible" placement="top" :width="360">
|
|
128
|
+
<p>Are you sure to delete this?</p>
|
|
129
|
+
<div class="flex gap-2 justify-end mt-3">
|
|
130
|
+
<el-button size="small" text @click="visible = false">cancel</el-button>
|
|
131
|
+
<el-button size="small" type="primary" @click="visible = false"> confirm </el-button>
|
|
132
|
+
</div>
|
|
133
|
+
<template #reference>
|
|
134
|
+
<el-button @click="visible = true">Delete</el-button>
|
|
135
|
+
</template>
|
|
136
|
+
</el-popover>
|
|
137
|
+
`,
|
|
138
|
+
directive: `
|
|
139
|
+
<el-button v-popover="popoverRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
140
|
+
|
|
141
|
+
<el-popover ref="popoverRef" trigger="click" title="With title" virtual-triggering persistent>
|
|
142
|
+
<span> Some content </span>
|
|
143
|
+
</el-popover>
|
|
144
|
+
`,
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Radio</h1>
|
|
4
|
+
<p>Single selection among multiple options.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header> Sizes </template>
|
|
8
|
+
<div class="flex flex-col gap-3 items-start">
|
|
9
|
+
<p>
|
|
10
|
+
Radio should not have too many options. Otherwise, use the Select component instead. Creating a radio component is easy, you just need to bind a variable to Radio's
|
|
11
|
+
<el-text tag="mark">v-model</el-text>. It equals to the value of <el-text tag="mark">value</el-text> of the chosen radio. The type of value is
|
|
12
|
+
<span class="font-medium">String, Number or Boolean</span>
|
|
13
|
+
</p>
|
|
14
|
+
<div class="flex flex-col gap-4 items-start">
|
|
15
|
+
Selected: {{ value }}
|
|
16
|
+
<el-radio-group v-model="value">
|
|
17
|
+
<el-radio v-for="(size, index) of sizes" :key="index" :value="index" v-bind="size !== 'default' ? { size } : {}">Option 1</el-radio>
|
|
18
|
+
</el-radio-group>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<template #footer> <html-encode :tag="snippets.sizes" /> </template>
|
|
22
|
+
</el-card>
|
|
23
|
+
|
|
24
|
+
<el-card>
|
|
25
|
+
<template #header>Vertical Group</template>
|
|
26
|
+
<div class="flex flex-col gap-3 items-start">
|
|
27
|
+
<p>To made radio group vertical just add <el-text tag="mark">class="el-vertical-group"</el-text> to <el-text tag="mark">el-radio-group</el-text> component.</p>
|
|
28
|
+
<div class="flex flex-col gap-4 items-start">
|
|
29
|
+
Selected: {{ value }}
|
|
30
|
+
<el-radio-group v-model="value" class="el-vertical-group">
|
|
31
|
+
<el-radio v-for="(size, index) of sizes" :key="index" :value="index" v-bind="size !== 'default' ? { size } : {}">Option 1</el-radio>
|
|
32
|
+
</el-radio-group>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<template #footer> <html-encode :tag="snippets.vertical" /> </template>
|
|
36
|
+
</el-card>
|
|
37
|
+
|
|
38
|
+
<el-card>
|
|
39
|
+
<template #header> Disabled </template>
|
|
40
|
+
<div class="flex flex-col gap-3 items-start">
|
|
41
|
+
<p><el-text tag="mark">disabled</el-text> attribute is used to disable the radio. You just need to add the disabled attribute.</p>
|
|
42
|
+
<div class="flex flex-col gap-4 items-start">
|
|
43
|
+
Selected: {{ value }}
|
|
44
|
+
<el-radio-group v-model="value">
|
|
45
|
+
<el-radio disabled :value="1" label="Select above to large" />
|
|
46
|
+
<el-radio disabled :value="2" label="Select medium" />
|
|
47
|
+
</el-radio-group>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<template #footer> <html-encode :tag="snippets.disabled" /> </template>
|
|
51
|
+
</el-card>
|
|
52
|
+
|
|
53
|
+
<el-card>
|
|
54
|
+
<template #header>Radio group</template>
|
|
55
|
+
<div class="flex flex-col gap-3 items-start">
|
|
56
|
+
<p>
|
|
57
|
+
Suitable for choosing from some mutually exclusive options. Combine <el-text tag="mark">el-radio-group</el-text> with el-radio to display a radio group. Bind a variable
|
|
58
|
+
with v-model of el-radio-group element and set label value in el-radio. It also provides <el-text tag="mark">change</el-text> event with the current value as its
|
|
59
|
+
parameter.
|
|
60
|
+
</p>
|
|
61
|
+
<div class="flex flex-col gap-4 items-start">
|
|
62
|
+
Selected: {{ value }}
|
|
63
|
+
<el-radio-group v-model="value">
|
|
64
|
+
<el-radio :value="1">Option A</el-radio>
|
|
65
|
+
<el-radio :value="2">Option B</el-radio>
|
|
66
|
+
<el-radio :value="3">Option C</el-radio>
|
|
67
|
+
<el-radio :value="4">Option C</el-radio>
|
|
68
|
+
</el-radio-group>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<template #footer>
|
|
72
|
+
<html-encode :tag="snippets.group" />
|
|
73
|
+
</template>
|
|
74
|
+
</el-card>
|
|
75
|
+
|
|
76
|
+
<el-card>
|
|
77
|
+
<template #header> Button style </template>
|
|
78
|
+
<div class="flex flex-col gap-3 items-start">
|
|
79
|
+
<p>Radio with button styles. You just need to change el-radio element into <el-text tag="mark">el-radio-button</el-text> element. We also provide size attribute.</p>
|
|
80
|
+
<div class="flex flex-col gap-4 items-start">
|
|
81
|
+
Selected: {{ value }}
|
|
82
|
+
<el-select v-model="selected_size" placeholder="Select" style="width: 184px">
|
|
83
|
+
<el-option v-for="item in ['default', 'large', 'medium', 'small', 'mini']" :key="item" :label="item" :value="item" />
|
|
84
|
+
</el-select>
|
|
85
|
+
<el-radio-group v-model="value">
|
|
86
|
+
<el-radio-button
|
|
87
|
+
v-for="val of [1, 2, 3, 4]"
|
|
88
|
+
:key="val"
|
|
89
|
+
:size="selected_size"
|
|
90
|
+
label="New York"
|
|
91
|
+
:value="val"
|
|
92
|
+
:disabled="[1, 4].includes(Number(value)) && val === Number(value)"
|
|
93
|
+
/>
|
|
94
|
+
</el-radio-group>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<template #footer>
|
|
98
|
+
<html-encode :tag="snippets.button" />
|
|
99
|
+
</template>
|
|
100
|
+
</el-card>
|
|
101
|
+
|
|
102
|
+
<el-card>
|
|
103
|
+
<template #header>With borders</template>
|
|
104
|
+
<div class="flex flex-col gap-3 items-start">
|
|
105
|
+
<h2>With borders</h2>
|
|
106
|
+
<p>The <el-text tag="mark">border</el-text> attribute adds a border to Radios.</p>
|
|
107
|
+
<div class="flex flex-col gap-4 items-start">
|
|
108
|
+
Selected: {{ value }}
|
|
109
|
+
<el-radio-group v-for="size of sizes" :key="size" v-model="value">
|
|
110
|
+
<el-radio v-for="(val, index) of [1, 2]" :key="val" :value="val" :size="size" border :disabled="size === 'large' && val === 2">Option {{ index + 1 }}</el-radio>
|
|
111
|
+
</el-radio-group>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<template #footer>
|
|
115
|
+
<html-encode :tag="snippets.bordered" />
|
|
116
|
+
</template>
|
|
117
|
+
</el-card>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
|
|
121
|
+
<script>
|
|
122
|
+
import { defineComponent } from "vue";
|
|
123
|
+
export default defineComponent({
|
|
124
|
+
name: "BerqnetCheckbox",
|
|
125
|
+
data() {
|
|
126
|
+
return {
|
|
127
|
+
selected_size: "default",
|
|
128
|
+
sizes: ["default", "large", "medium", "small", "mini"],
|
|
129
|
+
colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
130
|
+
value: "",
|
|
131
|
+
disabled: "",
|
|
132
|
+
snippets: {
|
|
133
|
+
sizes: `<el-radio value="value" size="large">Label</el-radio>`,
|
|
134
|
+
disabled: `<el-radio value="value" label="Label" disabled />`,
|
|
135
|
+
group: `
|
|
136
|
+
<el-radio-group v-model="value">
|
|
137
|
+
<el-radio :value="1">Option A</el-radio>
|
|
138
|
+
<el-radio :value="2">Option B</el-radio>
|
|
139
|
+
</el-radio-group>
|
|
140
|
+
`,
|
|
141
|
+
button: `
|
|
142
|
+
<el-radio-group v-model="value">
|
|
143
|
+
<el-radio-button label="New York" value="ny" />
|
|
144
|
+
<el-radio-button label="\u0130stanbul" value="ist" />
|
|
145
|
+
</el-radio-group>
|
|
146
|
+
`,
|
|
147
|
+
bordered: `
|
|
148
|
+
<el-radio-group v-model="value">
|
|
149
|
+
<el-radio :value="1" border>Option A</el-radio>
|
|
150
|
+
<el-radio :value="2" border>Option B</el-radio>
|
|
151
|
+
</el-radio-group>
|
|
152
|
+
`,
|
|
153
|
+
vertical: ` <el-radio-group v-model="value" class="el-vertical-group" />`
|
|
154
|
+
},
|
|
155
|
+
checkAll: false,
|
|
156
|
+
checkList: ["Value selected and disabled", "Value A"],
|
|
157
|
+
isIndeterminate: true,
|
|
158
|
+
checkedCities: ["Shanghai", "Beijing"],
|
|
159
|
+
cities: ["Shanghai", "Beijing", "Guangzhou", "Shenzhen"]
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
methods: {
|
|
163
|
+
capitalize(value) {
|
|
164
|
+
const text = String(value);
|
|
165
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
166
|
+
},
|
|
167
|
+
handleCheckedCitiesChange(value) {
|
|
168
|
+
const checkedCount = value.length;
|
|
169
|
+
this.checkAll = checkedCount === this.cities.length;
|
|
170
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
171
|
+
},
|
|
172
|
+
handleCheckAllChange(val) {
|
|
173
|
+
this.checkedCities = val ? this.cities : [];
|
|
174
|
+
this.isIndeterminate = false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
</script>
|