misp-ui-library-test 0.0.1
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 +113 -0
- package/dist/theme-chalk/alert/index.scss +152 -0
- package/dist/theme-chalk/avatar/index.scss +51 -0
- package/dist/theme-chalk/backtop/index.scss +38 -0
- package/dist/theme-chalk/badge/index.scss +63 -0
- package/dist/theme-chalk/breadcrumb/index.scss +36 -0
- package/dist/theme-chalk/breadcrumb-item/index.scss +36 -0
- package/dist/theme-chalk/button/index.scss +157 -0
- package/dist/theme-chalk/card/index.scss +38 -0
- package/dist/theme-chalk/chart/index.scss +21 -0
- package/dist/theme-chalk/checkbox/index.scss +358 -0
- package/dist/theme-chalk/col/index.scss +131 -0
- package/dist/theme-chalk/container/index.scss +40 -0
- package/dist/theme-chalk/css/alert.css +484 -0
- package/dist/theme-chalk/css/avatar.css +409 -0
- package/dist/theme-chalk/css/backtop.css +401 -0
- package/dist/theme-chalk/css/badge.css +419 -0
- package/dist/theme-chalk/css/breadcrumb-item.css +395 -0
- package/dist/theme-chalk/css/breadcrumb.css +395 -0
- package/dist/theme-chalk/css/button.css +587 -0
- package/dist/theme-chalk/css/card.css +397 -0
- package/dist/theme-chalk/css/chart.css +386 -0
- package/dist/theme-chalk/css/checkbox.css +648 -0
- package/dist/theme-chalk/css/col.css +2111 -0
- package/dist/theme-chalk/css/container.css +404 -0
- package/dist/theme-chalk/css/dialog.css +505 -0
- package/dist/theme-chalk/css/divider.css +405 -0
- package/dist/theme-chalk/css/drawer.css +546 -0
- package/dist/theme-chalk/css/empty.css +394 -0
- package/dist/theme-chalk/css/form.css +561 -0
- package/dist/theme-chalk/css/icon.css +1534 -0
- package/dist/theme-chalk/css/image.css +400 -0
- package/dist/theme-chalk/css/input-number.css +424 -0
- package/dist/theme-chalk/css/input.css +721 -0
- package/dist/theme-chalk/css/link.css +424 -0
- package/dist/theme-chalk/css/loading.css +483 -0
- package/dist/theme-chalk/css/message-box.css +479 -0
- package/dist/theme-chalk/css/message.css +456 -0
- package/dist/theme-chalk/css/no-data.css +397 -0
- package/dist/theme-chalk/css/notification.css +431 -0
- package/dist/theme-chalk/css/page-header.css +396 -0
- package/dist/theme-chalk/css/pagination.css +565 -0
- package/dist/theme-chalk/css/popover.css +421 -0
- package/dist/theme-chalk/css/popper.css +454 -0
- package/dist/theme-chalk/css/progress.css +451 -0
- package/dist/theme-chalk/css/radio.css +626 -0
- package/dist/theme-chalk/css/rate.css +414 -0
- package/dist/theme-chalk/css/result.css +403 -0
- package/dist/theme-chalk/css/row.css +433 -0
- package/dist/theme-chalk/css/scrollbar.css +422 -0
- package/dist/theme-chalk/css/select.css +1897 -0
- package/dist/theme-chalk/css/skeleton-item.css +407 -0
- package/dist/theme-chalk/css/skeleton.css +390 -0
- package/dist/theme-chalk/css/slider.css +460 -0
- package/dist/theme-chalk/css/spinner.css +403 -0
- package/dist/theme-chalk/css/statistic.css +396 -0
- package/dist/theme-chalk/css/status-timeline-chart.css +388 -0
- package/dist/theme-chalk/css/step.css +496 -0
- package/dist/theme-chalk/css/steps.css +496 -0
- package/dist/theme-chalk/css/switch.css +507 -0
- package/dist/theme-chalk/css/tab-pane.css +457 -0
- package/dist/theme-chalk/css/table.css +461 -0
- package/dist/theme-chalk/css/tabs-navigation.css +925 -0
- package/dist/theme-chalk/css/tabs.css +457 -0
- package/dist/theme-chalk/css/tag.css +599 -0
- package/dist/theme-chalk/css/time-picker.css +683 -0
- package/dist/theme-chalk/css/timeline-item.css +459 -0
- package/dist/theme-chalk/css/timeline.css +459 -0
- package/dist/theme-chalk/css/tooltip.css +485 -0
- package/dist/theme-chalk/css/tree.css +473 -0
- package/dist/theme-chalk/css/upload.css +665 -0
- package/dist/theme-chalk/dialog/index.scss +168 -0
- package/dist/theme-chalk/divider/index.scss +46 -0
- package/dist/theme-chalk/drawer/index.scss +172 -0
- package/dist/theme-chalk/empty/index.scss +36 -0
- package/dist/theme-chalk/fonts/element-icons.ttf +0 -0
- package/dist/theme-chalk/fonts/element-icons.woff +0 -0
- package/dist/theme-chalk/form/index.scss +220 -0
- package/dist/theme-chalk/icon/index.scss +1171 -0
- package/dist/theme-chalk/image/index.scss +39 -0
- package/dist/theme-chalk/index.scss +127 -0
- package/dist/theme-chalk/input/index.scss +363 -0
- package/dist/theme-chalk/input-number/index.scss +71 -0
- package/dist/theme-chalk/link/index.scss +75 -0
- package/dist/theme-chalk/loading/index.scss +131 -0
- package/dist/theme-chalk/message/index.scss +100 -0
- package/dist/theme-chalk/message-box/index.scss +131 -0
- package/dist/theme-chalk/mixins.scss +203 -0
- package/dist/theme-chalk/no-data/index.scss +36 -0
- package/dist/theme-chalk/notification/index.scss +76 -0
- package/dist/theme-chalk/page-header/index.scss +36 -0
- package/dist/theme-chalk/pagination/index.scss +225 -0
- package/dist/theme-chalk/popover/index.scss +56 -0
- package/dist/theme-chalk/popper/index.scss +89 -0
- package/dist/theme-chalk/progress/index.scss +105 -0
- package/dist/theme-chalk/radio/index.scss +328 -0
- package/dist/theme-chalk/rate/index.scss +56 -0
- package/dist/theme-chalk/reset.scss +262 -0
- package/dist/theme-chalk/result/index.scss +46 -0
- package/dist/theme-chalk/row/index.scss +88 -0
- package/dist/theme-chalk/scrollbar/index.scss +67 -0
- package/dist/theme-chalk/select/index.scss +223 -0
- package/dist/theme-chalk/skeleton/index.scss +30 -0
- package/dist/theme-chalk/skeleton-item/index.scss +49 -0
- package/dist/theme-chalk/slider/index.scss +113 -0
- package/dist/theme-chalk/spinner/index.scss +40 -0
- package/dist/theme-chalk/statistic/index.scss +38 -0
- package/dist/theme-chalk/status-timeline-chart/index.scss +23 -0
- package/dist/theme-chalk/step/index.scss +160 -0
- package/dist/theme-chalk/steps/index.scss +160 -0
- package/dist/theme-chalk/switch/index.scss +153 -0
- package/dist/theme-chalk/tab-pane/index.scss +112 -0
- package/dist/theme-chalk/table/index.scss +110 -0
- package/dist/theme-chalk/tabs/index.scss +112 -0
- package/dist/theme-chalk/tabs-navigation/index.scss +631 -0
- package/dist/theme-chalk/tag/index.scss +138 -0
- package/dist/theme-chalk/themes/blue.scss +76 -0
- package/dist/theme-chalk/themes/dark.scss +99 -0
- package/dist/theme-chalk/themes/index.scss +260 -0
- package/dist/theme-chalk/themes/light.scss +99 -0
- package/dist/theme-chalk/time-picker/index.scss +332 -0
- package/dist/theme-chalk/timeline/index.scss +119 -0
- package/dist/theme-chalk/timeline-item/index.scss +119 -0
- package/dist/theme-chalk/tooltip/index.scss +122 -0
- package/dist/theme-chalk/tree/index.scss +125 -0
- package/dist/theme-chalk/upload/index.scss +348 -0
- package/dist/theme-chalk/variables.scss +93 -0
- package/dist/vue2-ui-library.cjs.temp.js.map +1 -0
- package/dist/vue2-ui-library.common.js +28 -0
- package/dist/vue2-ui-library.common.js.map +1 -0
- package/dist/vue2-ui-library.esm.js +29 -0
- package/dist/vue2-ui-library.umd.js +27 -0
- package/package.json +161 -0
- package/src/directives/clickoutside/index.js +111 -0
- package/src/directives/init/index.js +50 -0
- package/src/directives/resize/index.js +69 -0
- package/src/index.js +174 -0
- package/src/mixins/emitter.js +47 -0
- package/src/mixins/focus.js +42 -0
- package/src/mixins/locale.js +24 -0
- package/src/mixins/migrating.js +46 -0
- package/src/packages/alert/index.js +12 -0
- package/src/packages/alert/src/main.vue +98 -0
- package/src/packages/aside/index.js +12 -0
- package/src/packages/aside/src/main.vue +20 -0
- package/src/packages/auto-grid-layout/index.js +18 -0
- package/src/packages/auto-grid-layout/prop.js +92 -0
- package/src/packages/auto-grid-layout/src/components/GridItem.vue +759 -0
- package/src/packages/auto-grid-layout/src/components/GridLayout.vue +367 -0
- package/src/packages/auto-grid-layout/src/main.vue +287 -0
- package/src/packages/auto-grid-layout/src/utils/DOM.js +46 -0
- package/src/packages/auto-grid-layout/src/utils/interact.js +333 -0
- package/src/packages/auto-grid-layout/src/utils/responsiveUtils.js +75 -0
- package/src/packages/auto-grid-layout/src/utils/utils.js +339 -0
- package/src/packages/autocomplete/index.js +12 -0
- package/src/packages/autocomplete/src/main.vue +170 -0
- package/src/packages/avatar/index.js +12 -0
- package/src/packages/avatar/src/main.vue +87 -0
- package/src/packages/backtop/index.js +12 -0
- package/src/packages/backtop/src/main.vue +120 -0
- package/src/packages/badge/index.js +12 -0
- package/src/packages/badge/src/main.vue +53 -0
- package/src/packages/breadcrumb/index.js +12 -0
- package/src/packages/breadcrumb/src/main.vue +34 -0
- package/src/packages/breadcrumb-item/index.js +12 -0
- package/src/packages/breadcrumb-item/src/main.vue +41 -0
- package/src/packages/button/index.js +13 -0
- package/src/packages/button/src/main.vue +106 -0
- package/src/packages/calendar/index.js +12 -0
- package/src/packages/calendar/src/main.vue +173 -0
- package/src/packages/card/index.js +12 -0
- package/src/packages/card/src/main.vue +26 -0
- package/src/packages/carousel/index.js +12 -0
- package/src/packages/carousel/src/main.vue +186 -0
- package/src/packages/carousel-item/index.js +12 -0
- package/src/packages/carousel-item/src/main.vue +34 -0
- package/src/packages/cascader/index.js +12 -0
- package/src/packages/cascader/src/main.vue +232 -0
- package/src/packages/chart/index.js +7 -0
- package/src/packages/chart/src/axis-chart.js +700 -0
- package/src/packages/chart/src/main.vue +828 -0
- package/src/packages/chart/src/utils.js +21 -0
- package/src/packages/checkbox/index.js +44 -0
- package/src/packages/checkbox/src/main.vue +312 -0
- package/src/packages/col/index.js +12 -0
- package/src/packages/col/src/main.vue +85 -0
- package/src/packages/collapse/index.js +12 -0
- package/src/packages/collapse/src/main.vue +69 -0
- package/src/packages/collapse-item/index.js +12 -0
- package/src/packages/collapse-item/src/main.vue +75 -0
- package/src/packages/color-picker/index.js +12 -0
- package/src/packages/color-picker/src/main.vue +206 -0
- package/src/packages/container/index.js +12 -0
- package/src/packages/container/src/main.vue +33 -0
- package/src/packages/date-picker/index.js +12 -0
- package/src/packages/date-picker/src/main.vue +246 -0
- package/src/packages/descriptions/index.js +12 -0
- package/src/packages/descriptions/src/main.vue +89 -0
- package/src/packages/descriptions-item/index.js +12 -0
- package/src/packages/descriptions-item/src/main.vue +26 -0
- package/src/packages/dialog/index.js +12 -0
- package/src/packages/dialog/src/main.vue +336 -0
- package/src/packages/divider/index.js +12 -0
- package/src/packages/divider/src/main.vue +37 -0
- package/src/packages/drawer/index.js +7 -0
- package/src/packages/drawer/src/main.vue +310 -0
- package/src/packages/dropdown/index.js +12 -0
- package/src/packages/dropdown/src/main.vue +82 -0
- package/src/packages/dropdown-menu-item/index.js +12 -0
- package/src/packages/dropdown-menu-item/src/main.vue +29 -0
- package/src/packages/empty/index.js +12 -0
- package/src/packages/empty/src/img-empty.vue +12 -0
- package/src/packages/empty/src/main.vue +49 -0
- package/src/packages/footer/index.js +12 -0
- package/src/packages/footer/src/main.vue +20 -0
- package/src/packages/form/index.js +13 -0
- package/src/packages/form/src/form-field.vue +790 -0
- package/src/packages/form/src/form-item.vue +464 -0
- package/src/packages/form/src/label-wrap.vue +127 -0
- package/src/packages/form/src/main.vue +442 -0
- package/src/packages/form-item/index.js +11 -0
- package/src/packages/header/index.js +12 -0
- package/src/packages/header/src/main.vue +20 -0
- package/src/packages/icon/index.js +12 -0
- package/src/packages/icon/src/main.vue +48 -0
- package/src/packages/image/index.js +12 -0
- package/src/packages/image/src/main.vue +224 -0
- package/src/packages/input/index.js +13 -0
- package/src/packages/input/src/calcTextareaHeight.js +123 -0
- package/src/packages/input/src/main.vue +510 -0
- package/src/packages/input-number/index.js +12 -0
- package/src/packages/input-number/src/main.vue +121 -0
- package/src/packages/link/index.js +12 -0
- package/src/packages/link/src/main.vue +53 -0
- package/src/packages/loading/index.js +17 -0
- package/src/packages/loading/src/directive.js +54 -0
- package/src/packages/loading/src/main.vue +38 -0
- package/src/packages/loading/src/service.js +63 -0
- package/src/packages/main/index.js +12 -0
- package/src/packages/main/src/main.vue +12 -0
- package/src/packages/menu/index.js +12 -0
- package/src/packages/menu/src/main.vue +117 -0
- package/src/packages/menu-item/index.js +12 -0
- package/src/packages/menu-item/src/main.vue +61 -0
- package/src/packages/message/index.js +95 -0
- package/src/packages/message/src/main.vue +131 -0
- package/src/packages/message-box/index.js +75 -0
- package/src/packages/message-box/src/main.vue +207 -0
- package/src/packages/no-data/index.js +8 -0
- package/src/packages/no-data/src/main.vue +23 -0
- package/src/packages/notification/index.js +72 -0
- package/src/packages/notification/src/main.vue +139 -0
- package/src/packages/option/index.js +13 -0
- package/src/packages/page-header/index.js +12 -0
- package/src/packages/page-header/src/main.vue +27 -0
- package/src/packages/pagination/index.js +12 -0
- package/src/packages/pagination/src/main.vue +255 -0
- package/src/packages/popconfirm/index.js +12 -0
- package/src/packages/popconfirm/src/main.vue +89 -0
- package/src/packages/popover/index.js +12 -0
- package/src/packages/popover/src/main.vue +452 -0
- package/src/packages/progress/index.js +12 -0
- package/src/packages/progress/src/main.vue +236 -0
- package/src/packages/radio/index.js +44 -0
- package/src/packages/radio/src/main.vue +291 -0
- package/src/packages/rate/index.js +12 -0
- package/src/packages/rate/src/main.vue +129 -0
- package/src/packages/result/index.js +12 -0
- package/src/packages/result/src/main.vue +52 -0
- package/src/packages/row/index.js +12 -0
- package/src/packages/row/src/main.vue +57 -0
- package/src/packages/scrollbar/index.js +12 -0
- package/src/packages/scrollbar/src/bar.vue +116 -0
- package/src/packages/scrollbar/src/main.vue +124 -0
- package/src/packages/select/index.js +15 -0
- package/src/packages/select/src/clickoutside.js +20 -0
- package/src/packages/select/src/main.vue +1055 -0
- package/src/packages/select/src/navigation-mixin.js +49 -0
- package/src/packages/select/src/option.vue +249 -0
- package/src/packages/select/src/select-dropdown.vue +95 -0
- package/src/packages/select/src/utils.js +5 -0
- package/src/packages/skeleton/index.js +12 -0
- package/src/packages/skeleton/src/main.vue +76 -0
- package/src/packages/skeleton-item/index.js +12 -0
- package/src/packages/skeleton-item/src/img-placeholder.vue +13 -0
- package/src/packages/skeleton-item/src/main.vue +22 -0
- package/src/packages/slider/index.js +12 -0
- package/src/packages/slider/src/main.vue +176 -0
- package/src/packages/spinner/index.js +12 -0
- package/src/packages/spinner/src/main.vue +27 -0
- package/src/packages/statistic/index.js +12 -0
- package/src/packages/statistic/src/main.vue +100 -0
- package/src/packages/status-timeline-chart/index.js +7 -0
- package/src/packages/status-timeline-chart/src/constants.js +20 -0
- package/src/packages/status-timeline-chart/src/main.vue +499 -0
- package/src/packages/status-timeline-chart/src/option-builder.js +475 -0
- package/src/packages/step/index.js +12 -0
- package/src/packages/step/src/main.vue +183 -0
- package/src/packages/steps/index.js +12 -0
- package/src/packages/steps/src/main.vue +57 -0
- package/src/packages/submenu/index.js +12 -0
- package/src/packages/submenu/src/main.vue +68 -0
- package/src/packages/switch/index.js +12 -0
- package/src/packages/switch/src/main.vue +166 -0
- package/src/packages/tab-pane/index.js +12 -0
- package/src/packages/tab-pane/src/main.vue +74 -0
- package/src/packages/table/index.js +8 -0
- package/src/packages/table/src/components/PagePagination.vue +82 -0
- package/src/packages/table/src/main.vue +153 -0
- package/src/packages/tabs/index.js +12 -0
- package/src/packages/tabs/src/main.vue +167 -0
- package/src/packages/tabs-navigation/index.js +7 -0
- package/src/packages/tabs-navigation/src/main.vue +462 -0
- package/src/packages/tag/index.js +12 -0
- package/src/packages/tag/src/main.vue +194 -0
- package/src/packages/time-picker/index.js +17 -0
- package/src/packages/time-picker/src/date-utils.js +455 -0
- package/src/packages/time-picker/src/main.vue +321 -0
- package/src/packages/time-picker/src/pane/date-range.vue +193 -0
- package/src/packages/time-picker/src/pane/date-time-range.vue +362 -0
- package/src/packages/time-picker/src/pane/date-time.vue +362 -0
- package/src/packages/time-picker/src/pane/date.vue +441 -0
- package/src/packages/time-picker/src/pane/time.vue +260 -0
- package/src/packages/time-picker/src/time-input.vue +203 -0
- package/src/packages/time-picker/src/time-range-input.vue +170 -0
- package/src/packages/timeline/index.js +12 -0
- package/src/packages/timeline/src/main.vue +24 -0
- package/src/packages/timeline-item/index.js +12 -0
- package/src/packages/timeline-item/src/main.vue +78 -0
- package/src/packages/tooltip/index.js +12 -0
- package/src/packages/tooltip/src/main.js +367 -0
- package/src/packages/transfer/index.js +8 -0
- package/src/packages/transfer/src/main.vue +229 -0
- package/src/packages/transfer/src/transfer-panel.vue +245 -0
- package/src/packages/transitions/collapse-transition.js +75 -0
- package/src/packages/tree/index.js +12 -0
- package/src/packages/tree/src/main.vue +322 -0
- package/src/packages/tree/src/model/node.js +348 -0
- package/src/packages/tree/src/model/tree-store.js +354 -0
- package/src/packages/tree/src/model/util.js +10 -0
- package/src/packages/tree/src/tree-node.vue +262 -0
- package/src/packages/upload/index.js +9 -0
- package/src/packages/upload/src/main.vue +415 -0
- package/src/playground/mixins/element.js +98 -0
- package/src/playground/types/element.js +197 -0
- package/src/playground/types/layout.js +80 -0
- package/src/plugins/i18n.js +125 -0
- package/src/styles/fonts/element-icons.ttf +0 -0
- package/src/styles/fonts/element-icons.woff +0 -0
- package/src/styles/index.scss +138 -0
- package/src/styles/reset.scss +257 -0
- package/src/styles/themes/blue.scss +75 -0
- package/src/styles/themes/dark.scss +98 -0
- package/src/styles/themes/index.scss +34 -0
- package/src/styles/themes/light.scss +98 -0
- package/src/styles/themes/variables.scss +233 -0
- package/src/styles/variables.scss +146 -0
- package/src/utils/async-validator/index.js +659 -0
- package/src/utils/browser/index.js +39 -0
- package/src/utils/color.js +76 -0
- package/src/utils/dom/index.js +421 -0
- package/src/utils/dom/scrollbar-width.js +49 -0
- package/src/utils/draggable/core.js +379 -0
- package/src/utils/draggable/draggable.js +478 -0
- package/src/utils/draggable/index.js +61 -0
- package/src/utils/draggable/sortable.js +751 -0
- package/src/utils/lodash/index.js +2395 -0
- package/src/utils/moment/index.js +909 -0
- package/src/utils/playground/index.js +37 -0
- package/src/utils/popper/index.js +308 -0
- package/src/utils/popper/popper.js +1132 -0
- package/src/utils/popper/popup-manager.js +288 -0
- package/src/utils/popper/popup.js +344 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-color-picker" :class="{ 'is-focus': isFocus }">
|
|
3
|
+
<div class="ui-color-picker__trigger" @click="handleTriggerClick">
|
|
4
|
+
<div class="ui-color-picker__color" :style="{ backgroundColor: currentValue }"></div>
|
|
5
|
+
<i class="ui-color-picker__icon icon-arrow-down"></i>
|
|
6
|
+
</div>
|
|
7
|
+
<transition name="ui-zoom-in-top">
|
|
8
|
+
<div v-show="pickerVisible" class="ui-color-picker__panel" ref="colorPanel">
|
|
9
|
+
<div class="ui-color-picker__body">
|
|
10
|
+
<div class="ui-color-picker__saturation" ref="saturation">
|
|
11
|
+
<div class="ui-color-picker__saturation--white"></div>
|
|
12
|
+
<div class="ui-color-picker__saturation--black"></div>
|
|
13
|
+
<div
|
|
14
|
+
class="ui-color-picker__cursor"
|
|
15
|
+
:style="{ left: cursorLeft + 'px', top: cursorTop + 'px' }"
|
|
16
|
+
></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="ui-color-picker__hue" ref="hue">
|
|
19
|
+
<div class="ui-color-picker__hue--thumb" :style="{ top: hueThumbTop + 'px' }"></div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="ui-color-picker__options">
|
|
23
|
+
<div class="ui-color-picker__preset-colors">
|
|
24
|
+
<span
|
|
25
|
+
v-for="(color, index) in presetColors"
|
|
26
|
+
:key="index"
|
|
27
|
+
class="ui-color-picker__color-box"
|
|
28
|
+
:style="{ backgroundColor: color }"
|
|
29
|
+
@click="selectColor(color)"
|
|
30
|
+
></span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="ui-color-picker__input-wrapper">
|
|
33
|
+
<input
|
|
34
|
+
type="text"
|
|
35
|
+
v-model="colorInput"
|
|
36
|
+
class="ui-color-picker__input"
|
|
37
|
+
@change="handleColorInputChange"
|
|
38
|
+
>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="ui-color-picker__footer">
|
|
42
|
+
<ui-button size="small" @click="cancel">取消</ui-button>
|
|
43
|
+
<ui-button size="small" type="primary" @click="confirm">确定</ui-button>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</transition>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
export default {
|
|
52
|
+
name: 'UiColorPicker',
|
|
53
|
+
|
|
54
|
+
props: {
|
|
55
|
+
value: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: '#000000'
|
|
58
|
+
},
|
|
59
|
+
presetColors: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: () => [
|
|
62
|
+
'#FF0000', '#FF7F00', '#FFFF00', '#00FF00',
|
|
63
|
+
'#0000FF', '#4B0082', '#9400D3', '#000000',
|
|
64
|
+
'#FFFFFF', '#808080', '#800000', '#008000'
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
pickerVisible: false,
|
|
72
|
+
isFocus: false,
|
|
73
|
+
currentValue: this.value,
|
|
74
|
+
colorInput: this.value,
|
|
75
|
+
hue: 0,
|
|
76
|
+
saturation: 100,
|
|
77
|
+
lightness: 50,
|
|
78
|
+
cursorLeft: 100,
|
|
79
|
+
cursorTop: 0,
|
|
80
|
+
hueThumbTop: 0
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
watch: {
|
|
85
|
+
value(val) {
|
|
86
|
+
this.currentValue = val;
|
|
87
|
+
this.colorInput = val;
|
|
88
|
+
},
|
|
89
|
+
pickerVisible(val) {
|
|
90
|
+
if (val) {
|
|
91
|
+
document.addEventListener('click', this.handleDocumentClick);
|
|
92
|
+
this.initColor();
|
|
93
|
+
} else {
|
|
94
|
+
document.removeEventListener('click', this.handleDocumentClick);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
methods: {
|
|
100
|
+
hexToRgb(hex) {
|
|
101
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
102
|
+
return result ? {
|
|
103
|
+
r: parseInt(result[1], 16),
|
|
104
|
+
g: parseInt(result[2], 16),
|
|
105
|
+
b: parseInt(result[3], 16)
|
|
106
|
+
} : null;
|
|
107
|
+
},
|
|
108
|
+
rgbToHex(r, g, b) {
|
|
109
|
+
return '#' + [r, g, b].map(x => {
|
|
110
|
+
const hex = x.toString(16);
|
|
111
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
112
|
+
}).join('');
|
|
113
|
+
},
|
|
114
|
+
rgbToHsl(r, g, b) {
|
|
115
|
+
r /= 255;
|
|
116
|
+
g /= 255;
|
|
117
|
+
b /= 255;
|
|
118
|
+
const max = Math.max(r, g, b);
|
|
119
|
+
const min = Math.min(r, g, b);
|
|
120
|
+
let h, s, l = (max + min) / 2;
|
|
121
|
+
|
|
122
|
+
if (max === min) {
|
|
123
|
+
h = s = 0;
|
|
124
|
+
} else {
|
|
125
|
+
const d = max - min;
|
|
126
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
127
|
+
switch (max) {
|
|
128
|
+
case r: h = ((g - b) / d + (g < b ? 6 : 0)) / 6; break;
|
|
129
|
+
case g: h = ((b - r) / d + 2) / 6; break;
|
|
130
|
+
case b: h = ((r - g) / d + 4) / 6; break;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return { h: h * 360, s: s * 100, l: l * 100 };
|
|
134
|
+
},
|
|
135
|
+
hslToRgb(h, s, l) {
|
|
136
|
+
h /= 360;
|
|
137
|
+
s /= 100;
|
|
138
|
+
l /= 100;
|
|
139
|
+
let r, g, b;
|
|
140
|
+
|
|
141
|
+
if (s === 0) {
|
|
142
|
+
r = g = b = l;
|
|
143
|
+
} else {
|
|
144
|
+
const hue2rgb = (p, q, t) => {
|
|
145
|
+
if (t < 0) t += 1;
|
|
146
|
+
if (t > 1) t -= 1;
|
|
147
|
+
if (t < 1/6) return p + (q - p) * 6 * t;
|
|
148
|
+
if (t < 1/2) return q;
|
|
149
|
+
if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;
|
|
150
|
+
return p;
|
|
151
|
+
};
|
|
152
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
153
|
+
const p = 2 * l - q;
|
|
154
|
+
r = hue2rgb(p, q, h + 1/3);
|
|
155
|
+
g = hue2rgb(p, q, h);
|
|
156
|
+
b = hue2rgb(p, q, h - 1/3);
|
|
157
|
+
}
|
|
158
|
+
return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255) };
|
|
159
|
+
},
|
|
160
|
+
initColor() {
|
|
161
|
+
const rgb = this.hexToRgb(this.currentValue);
|
|
162
|
+
if (rgb) {
|
|
163
|
+
const hsl = this.rgbToHsl(rgb.r, rgb.g, rgb.b);
|
|
164
|
+
this.hue = hsl.h;
|
|
165
|
+
this.saturation = hsl.s;
|
|
166
|
+
this.lightness = hsl.l;
|
|
167
|
+
this.updateCursor();
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
updateCursor() {
|
|
171
|
+
this.cursorLeft = (this.saturation / 100) * 100;
|
|
172
|
+
this.cursorTop = (1 - this.lightness / 100) * 100;
|
|
173
|
+
this.hueThumbTop = (this.hue / 360) * 100;
|
|
174
|
+
},
|
|
175
|
+
handleTriggerClick() {
|
|
176
|
+
this.pickerVisible = !this.pickerVisible;
|
|
177
|
+
},
|
|
178
|
+
selectColor(color) {
|
|
179
|
+
this.currentValue = color;
|
|
180
|
+
this.colorInput = color;
|
|
181
|
+
this.initColor();
|
|
182
|
+
},
|
|
183
|
+
handleColorInputChange() {
|
|
184
|
+
if (/^#[0-9A-Fa-f]{6}$/.test(this.colorInput)) {
|
|
185
|
+
this.currentValue = this.colorInput;
|
|
186
|
+
this.initColor();
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
cancel() {
|
|
190
|
+
this.currentValue = this.value;
|
|
191
|
+
this.colorInput = this.value;
|
|
192
|
+
this.pickerVisible = false;
|
|
193
|
+
},
|
|
194
|
+
confirm() {
|
|
195
|
+
this.$emit('input', this.currentValue);
|
|
196
|
+
this.$emit('change', this.currentValue);
|
|
197
|
+
this.pickerVisible = false;
|
|
198
|
+
},
|
|
199
|
+
handleDocumentClick(event) {
|
|
200
|
+
if (this.$el && !this.$el.contains(event.target)) {
|
|
201
|
+
this.pickerVisible = false;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="ui-container" :class="{ 'is-vertical': isVertical }">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</section>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'UiContainer',
|
|
10
|
+
|
|
11
|
+
componentName: 'UiContainer',
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
direction: String
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
computed: {
|
|
18
|
+
isVertical() {
|
|
19
|
+
if (this.direction === 'vertical') {
|
|
20
|
+
return true;
|
|
21
|
+
} else if (this.direction === 'horizontal') {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
return this.$slots && this.$slots.default
|
|
25
|
+
? this.$slots.default.some(vnode => {
|
|
26
|
+
const tag = vnode.componentOptions && vnode.componentOptions.tag;
|
|
27
|
+
return tag === 'ui-header' || tag === 'ui-footer';
|
|
28
|
+
})
|
|
29
|
+
: false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-date-picker" :class="[showClose ? 'is-focus' : '']">
|
|
3
|
+
<ui-input
|
|
4
|
+
v-model="inputValue"
|
|
5
|
+
:placeholder="placeholder"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:readonly="!editable"
|
|
8
|
+
:name="name"
|
|
9
|
+
@focus="handleFocus"
|
|
10
|
+
@blur="handleBlur"
|
|
11
|
+
@clear="handleClear"
|
|
12
|
+
>
|
|
13
|
+
<i slot="prefix" class="ui-input__icon icon-calendar"></i>
|
|
14
|
+
</ui-input>
|
|
15
|
+
<transition name="ui-zoom-in-top">
|
|
16
|
+
<div
|
|
17
|
+
v-show="pickerVisible"
|
|
18
|
+
class="ui-date-picker__panel"
|
|
19
|
+
:class="popperClass"
|
|
20
|
+
ref="picker"
|
|
21
|
+
>
|
|
22
|
+
<div class="ui-date-picker__header">
|
|
23
|
+
<button class="ui-date-picker__button" @click="prevYear">
|
|
24
|
+
<i class="icon-arrow-left"></i>
|
|
25
|
+
</button>
|
|
26
|
+
<span class="ui-date-picker__year" @click="showYearPicker = !showYearPicker">
|
|
27
|
+
{{ currentYear }}年
|
|
28
|
+
</span>
|
|
29
|
+
<span class="ui-date-picker__month" @click="showMonthPicker = !showMonthPicker">
|
|
30
|
+
{{ currentMonth + 1 }}月
|
|
31
|
+
</span>
|
|
32
|
+
<button class="ui-date-picker__button" @click="nextYear">
|
|
33
|
+
<i class="icon-arrow-right"></i>
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="ui-date-picker__body">
|
|
37
|
+
<div class="ui-date-picker__week-header">
|
|
38
|
+
<span v-for="day in weekDays" :key="day">{{ day }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="ui-date-picker__content">
|
|
41
|
+
<div
|
|
42
|
+
v-for="(date, index) in calendarDates"
|
|
43
|
+
:key="index"
|
|
44
|
+
class="ui-date-picker__cell"
|
|
45
|
+
:class="{
|
|
46
|
+
'is-current-month': date.isCurrentMonth,
|
|
47
|
+
'is-today': date.isToday,
|
|
48
|
+
'is-selected': date.isSelected,
|
|
49
|
+
'is-disabled': date.isDisabled
|
|
50
|
+
}"
|
|
51
|
+
@click="handleDateClick(date)"
|
|
52
|
+
>
|
|
53
|
+
<span>{{ date.date }}</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="ui-date-picker__footer" v-if="showTime">
|
|
58
|
+
<ui-time-picker v-model="selectedTime" @change="handleTimeChange"></ui-time-picker>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</transition>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
const WEEK_DAYS = ['日', '一', '二', '三', '四', '五', '六'];
|
|
67
|
+
const formatDate = (date) => {
|
|
68
|
+
const year = date.getFullYear();
|
|
69
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
70
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
71
|
+
return `${year}-${month}-${day}`;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
name: 'UiDatePicker',
|
|
76
|
+
|
|
77
|
+
props: {
|
|
78
|
+
value: {},
|
|
79
|
+
placeholder: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: '选择日期'
|
|
82
|
+
},
|
|
83
|
+
disabled: Boolean,
|
|
84
|
+
editable: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: true
|
|
87
|
+
},
|
|
88
|
+
name: String,
|
|
89
|
+
format: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: 'YYYY-MM-DD'
|
|
92
|
+
},
|
|
93
|
+
showTime: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: false
|
|
96
|
+
},
|
|
97
|
+
popperClass: String,
|
|
98
|
+
disabledDate: Function,
|
|
99
|
+
minDate: Date,
|
|
100
|
+
maxDate: Date
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
data() {
|
|
104
|
+
return {
|
|
105
|
+
pickerVisible: false,
|
|
106
|
+
inputValue: '',
|
|
107
|
+
currentDate: new Date(),
|
|
108
|
+
selectedDate: null,
|
|
109
|
+
selectedTime: '',
|
|
110
|
+
showYearPicker: false,
|
|
111
|
+
showMonthPicker: false,
|
|
112
|
+
showClose: false
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
computed: {
|
|
117
|
+
weekDays() {
|
|
118
|
+
return WEEK_DAYS;
|
|
119
|
+
},
|
|
120
|
+
currentYear() {
|
|
121
|
+
return this.currentDate.getFullYear();
|
|
122
|
+
},
|
|
123
|
+
currentMonth() {
|
|
124
|
+
return this.currentDate.getMonth();
|
|
125
|
+
},
|
|
126
|
+
calendarDates() {
|
|
127
|
+
const year = this.currentYear;
|
|
128
|
+
const month = this.currentMonth;
|
|
129
|
+
const firstDay = new Date(year, month, 1);
|
|
130
|
+
const lastDay = new Date(year, month + 1, 0);
|
|
131
|
+
const startDate = new Date(firstDay);
|
|
132
|
+
startDate.setDate(startDate.getDate() - startDate.getDay());
|
|
133
|
+
|
|
134
|
+
const dates = [];
|
|
135
|
+
const today = new Date();
|
|
136
|
+
|
|
137
|
+
for (let i = 0; i < 42; i++) {
|
|
138
|
+
const date = new Date(startDate);
|
|
139
|
+
date.setDate(startDate.getDate() + i);
|
|
140
|
+
|
|
141
|
+
const isSelected = this.selectedDate &&
|
|
142
|
+
date.toDateString() === this.selectedDate.toDateString();
|
|
143
|
+
|
|
144
|
+
const isToday = date.toDateString() === today.toDateString();
|
|
145
|
+
const isDisabled = this.disabledDate && this.disabledDate(date);
|
|
146
|
+
|
|
147
|
+
dates.push({
|
|
148
|
+
date: date.getDate(),
|
|
149
|
+
fullDate: date,
|
|
150
|
+
isCurrentMonth: date.getMonth() === month,
|
|
151
|
+
isToday,
|
|
152
|
+
isSelected,
|
|
153
|
+
isDisabled
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return dates;
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
watch: {
|
|
162
|
+
value(val) {
|
|
163
|
+
if (val) {
|
|
164
|
+
this.inputValue = val instanceof Date ? formatDate(val) : val;
|
|
165
|
+
this.selectedDate = val instanceof Date ? val : new Date(val);
|
|
166
|
+
this.currentDate = new Date(this.selectedDate);
|
|
167
|
+
} else {
|
|
168
|
+
this.inputValue = '';
|
|
169
|
+
this.selectedDate = null;
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
pickerVisible(val) {
|
|
173
|
+
if (val) {
|
|
174
|
+
document.addEventListener('click', this.handleDocumentClick);
|
|
175
|
+
} else {
|
|
176
|
+
document.removeEventListener('click', this.handleDocumentClick);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
methods: {
|
|
182
|
+
prevYear() {
|
|
183
|
+
this.currentDate = new Date(this.currentYear - 1, this.currentMonth, 1);
|
|
184
|
+
},
|
|
185
|
+
nextYear() {
|
|
186
|
+
this.currentDate = new Date(this.currentYear + 1, this.currentMonth, 1);
|
|
187
|
+
},
|
|
188
|
+
prevMonth() {
|
|
189
|
+
this.currentDate = new Date(this.currentYear, this.currentMonth - 1, 1);
|
|
190
|
+
},
|
|
191
|
+
nextMonth() {
|
|
192
|
+
this.currentDate = new Date(this.currentYear, this.currentMonth + 1, 1);
|
|
193
|
+
},
|
|
194
|
+
handleDateClick(date) {
|
|
195
|
+
if (date.isDisabled) return;
|
|
196
|
+
this.selectedDate = date.fullDate;
|
|
197
|
+
this.inputValue = formatDate(date.fullDate);
|
|
198
|
+
this.$emit('input', this.selectedDate);
|
|
199
|
+
this.$emit('change', this.selectedDate);
|
|
200
|
+
this.pickerVisible = false;
|
|
201
|
+
},
|
|
202
|
+
handleFocus() {
|
|
203
|
+
if (this.disabled) return;
|
|
204
|
+
this.pickerVisible = true;
|
|
205
|
+
this.showClose = true;
|
|
206
|
+
},
|
|
207
|
+
handleBlur() {
|
|
208
|
+
this.showClose = false;
|
|
209
|
+
},
|
|
210
|
+
handleClear() {
|
|
211
|
+
this.inputValue = '';
|
|
212
|
+
this.selectedDate = null;
|
|
213
|
+
this.$emit('input', null);
|
|
214
|
+
this.$emit('change', null);
|
|
215
|
+
},
|
|
216
|
+
handleDocumentClick(event) {
|
|
217
|
+
if (this.$el && !this.$el.contains(event.target)) {
|
|
218
|
+
this.pickerVisible = false;
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
handleTimeChange(time) {
|
|
222
|
+
if (this.selectedDate) {
|
|
223
|
+
const [hours, minutes] = time.split(':');
|
|
224
|
+
this.selectedDate.setHours(parseInt(hours), parseInt(minutes));
|
|
225
|
+
this.$emit('input', this.selectedDate);
|
|
226
|
+
this.$emit('change', this.selectedDate);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
mounted() {
|
|
232
|
+
if (this.value) {
|
|
233
|
+
this.inputValue = this.value instanceof Date
|
|
234
|
+
? formatDate(this.value)
|
|
235
|
+
: this.value;
|
|
236
|
+
this.selectedDate = this.value instanceof Date
|
|
237
|
+
? this.value
|
|
238
|
+
: new Date(this.value);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
beforeDestroy() {
|
|
243
|
+
document.removeEventListener('click', this.handleDocumentClick);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
</script>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-descriptions" :class="[border ? 'is-bordered' : '', size ? 'ui-descriptions--' + size : '']">
|
|
3
|
+
<div v-if="title || $slots.title" class="ui-descriptions__header">
|
|
4
|
+
<slot name="title">{{ title }}</slot>
|
|
5
|
+
</div>
|
|
6
|
+
<table class="ui-descriptions__body">
|
|
7
|
+
<tbody>
|
|
8
|
+
<tr v-for="(row, rowIndex) in rows" :key="rowIndex">
|
|
9
|
+
<template v-for="(item, colIndex) in row">
|
|
10
|
+
<td
|
|
11
|
+
v-if="item"
|
|
12
|
+
:key="colIndex"
|
|
13
|
+
:class="['ui-descriptions__cell', labelClassName, item.className]"
|
|
14
|
+
:style="{ width: item.width }"
|
|
15
|
+
>
|
|
16
|
+
<div class="ui-descriptions__cell-content">
|
|
17
|
+
<span class="ui-descriptions__label">{{ item.label }}</span>
|
|
18
|
+
<span class="ui-descriptions__content">
|
|
19
|
+
<slot :name="item.prop" :row="data">{{ item.content }}</slot>
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
22
|
+
</td>
|
|
23
|
+
</template>
|
|
24
|
+
</tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
export default {
|
|
32
|
+
name: 'UiDescriptions',
|
|
33
|
+
|
|
34
|
+
props: {
|
|
35
|
+
data: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => ({})
|
|
38
|
+
},
|
|
39
|
+
columns: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 3
|
|
42
|
+
},
|
|
43
|
+
title: String,
|
|
44
|
+
border: Boolean,
|
|
45
|
+
size: {
|
|
46
|
+
type: String,
|
|
47
|
+
validator: val => ['large', 'medium', 'small', 'mini', ''].includes(val)
|
|
48
|
+
},
|
|
49
|
+
direction: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'horizontal',
|
|
52
|
+
validator: val => ['horizontal', 'vertical'].includes(val)
|
|
53
|
+
},
|
|
54
|
+
labelClassName: String
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
computed: {
|
|
58
|
+
rows() {
|
|
59
|
+
const { columns, items } = this;
|
|
60
|
+
const rows = [];
|
|
61
|
+
let row = [];
|
|
62
|
+
|
|
63
|
+
items.forEach((item, index) => {
|
|
64
|
+
row.push(item);
|
|
65
|
+
if (row.length === columns) {
|
|
66
|
+
rows.push(row);
|
|
67
|
+
row = [];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (row.length) {
|
|
72
|
+
rows.push(row);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return rows;
|
|
76
|
+
},
|
|
77
|
+
items() {
|
|
78
|
+
return this.$children.map(child => ({
|
|
79
|
+
label: child.label,
|
|
80
|
+
prop: child.prop,
|
|
81
|
+
content: child.content || this.data[child.prop],
|
|
82
|
+
width: child.width,
|
|
83
|
+
className: child.className,
|
|
84
|
+
labelClassName: child.labelClassName
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-descriptions-item">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'UiDescriptionsItem',
|
|
10
|
+
|
|
11
|
+
props: {
|
|
12
|
+
label: String,
|
|
13
|
+
span: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 1
|
|
16
|
+
},
|
|
17
|
+
width: String,
|
|
18
|
+
labelWidth: String,
|
|
19
|
+
content: String,
|
|
20
|
+
className: String,
|
|
21
|
+
labelClassName: String
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
inject: ['descriptions']
|
|
25
|
+
};
|
|
26
|
+
</script>
|