cy-element-ui 1.0.4 → 1.0.6
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 +22 -13
- package/lib/alert.js +211 -203
- package/lib/aside.js +29 -29
- package/lib/autocomplete.js +4615 -483
- package/lib/avatar.js +152 -126
- package/lib/backtop.js +117 -125
- package/lib/badge.js +128 -134
- package/lib/breadcrumb-item.js +146 -122
- package/lib/breadcrumb.js +97 -96
- package/lib/button-group.js +68 -65
- package/lib/button.js +67 -87
- package/lib/calendar.js +2475 -603
- package/lib/card.js +101 -100
- package/lib/carousel-item.js +854 -210
- package/lib/carousel.js +575 -408
- package/lib/cascader-panel.js +3546 -1153
- package/lib/cascader.js +7376 -970
- package/lib/checkbox-button.js +337 -290
- package/lib/checkbox-group.js +176 -105
- package/lib/checkbox.js +240 -220
- package/lib/col.js +113 -68
- package/lib/collapse-item.js +1228 -225
- package/lib/collapse.js +163 -123
- package/lib/color-picker.js +5223 -1251
- package/lib/container.js +98 -88
- package/lib/date-picker.js +8396 -3945
- package/lib/descriptions-item.js +53 -32
- package/lib/descriptions.js +697 -334
- package/lib/dialog.js +1725 -247
- package/lib/directives/mousewheel.js +14 -20
- package/lib/directives/repeat-click.js +27 -30
- package/lib/divider.js +38 -45
- package/lib/drawer.js +1032 -238
- package/lib/dropdown-item.js +159 -111
- package/lib/dropdown-menu.js +2445 -117
- package/lib/dropdown.js +1675 -366
- package/lib/element-ui.common.js +49110 -39985
- package/lib/empty.js +1084 -203
- package/lib/fileUpload.js +3900 -0
- package/lib/footer.js +29 -29
- package/lib/form-item.js +1236 -467
- package/lib/form.js +326 -258
- package/lib/header.js +80 -80
- package/lib/icon.js +71 -68
- package/lib/image.js +2389 -743
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +814 -150
- package/lib/input-number.js +2181 -444
- package/lib/input.js +1197 -517
- package/lib/link.js +117 -135
- package/lib/loading.js +1130 -363
- package/lib/locale/format.js +38 -49
- package/lib/locale/index.js +38 -52
- package/lib/locale/lang/af-ZA.js +130 -123
- package/lib/locale/lang/ar.js +123 -122
- package/lib/locale/lang/az.js +122 -121
- package/lib/locale/lang/bg.js +133 -123
- package/lib/locale/lang/bn.js +121 -121
- package/lib/locale/lang/ca.js +123 -122
- package/lib/locale/lang/cs-CZ.js +127 -125
- package/lib/locale/lang/da.js +124 -122
- package/lib/locale/lang/de.js +126 -124
- package/lib/locale/lang/ee.js +125 -123
- package/lib/locale/lang/el.js +125 -123
- package/lib/locale/lang/en.js +127 -123
- package/lib/locale/lang/eo.js +125 -123
- package/lib/locale/lang/es.js +123 -122
- package/lib/locale/lang/eu.js +128 -123
- package/lib/locale/lang/fa.js +125 -123
- package/lib/locale/lang/fi.js +125 -123
- package/lib/locale/lang/fr.js +125 -122
- package/lib/locale/lang/he.js +130 -123
- package/lib/locale/lang/hr.js +128 -123
- package/lib/locale/lang/hu.js +124 -122
- package/lib/locale/lang/hy-AM.js +125 -123
- package/lib/locale/lang/id.js +124 -123
- package/lib/locale/lang/is.js +124 -123
- package/lib/locale/lang/it.js +123 -122
- package/lib/locale/lang/ja.js +125 -123
- package/lib/locale/lang/kg.js +125 -123
- package/lib/locale/lang/km.js +124 -123
- package/lib/locale/lang/ko.js +125 -123
- package/lib/locale/lang/ku.js +125 -123
- package/lib/locale/lang/kz.js +125 -123
- package/lib/locale/lang/lo-LA.js +121 -121
- package/lib/locale/lang/lt.js +125 -123
- package/lib/locale/lang/lv.js +125 -123
- package/lib/locale/lang/mn.js +125 -123
- package/lib/locale/lang/ms.js +123 -122
- package/lib/locale/lang/nb-NO.js +123 -122
- package/lib/locale/lang/nl.js +125 -123
- package/lib/locale/lang/pl.js +125 -123
- package/lib/locale/lang/pt-br.js +124 -123
- package/lib/locale/lang/pt.js +133 -123
- package/lib/locale/lang/ro.js +125 -123
- package/lib/locale/lang/ru-RU.js +124 -123
- package/lib/locale/lang/si.js +127 -123
- package/lib/locale/lang/sk.js +126 -125
- package/lib/locale/lang/sl.js +125 -123
- package/lib/locale/lang/sr-Latn.js +124 -123
- package/lib/locale/lang/sr.js +128 -123
- package/lib/locale/lang/sv-SE.js +128 -123
- package/lib/locale/lang/sw.js +127 -123
- package/lib/locale/lang/ta.js +130 -122
- package/lib/locale/lang/th.js +127 -123
- package/lib/locale/lang/tk.js +129 -123
- package/lib/locale/lang/tr-TR.js +125 -123
- package/lib/locale/lang/ua.js +124 -123
- package/lib/locale/lang/ug-CN.js +124 -123
- package/lib/locale/lang/uz-UZ.js +124 -123
- package/lib/locale/lang/vi.js +124 -123
- package/lib/locale/lang/zh-CN.js +124 -123
- package/lib/locale/lang/zh-TW.js +128 -123
- package/lib/main.js +23 -21
- package/lib/menu-item-group.js +105 -111
- package/lib/menu-item.js +3558 -253
- package/lib/menu.js +1680 -528
- package/lib/message-box.js +3427 -684
- package/lib/message.js +1677 -229
- package/lib/mixins/emitter.js +28 -30
- package/lib/mixins/focus.js +10 -11
- package/lib/mixins/locale.js +12 -14
- package/lib/mixins/migrating.js +38 -45
- package/lib/notification.js +1707 -269
- package/lib/option-group.js +190 -139
- package/lib/option.js +949 -196
- package/lib/page-header.js +964 -42
- package/lib/pagination.js +6947 -641
- package/lib/popconfirm.js +3951 -223
- package/lib/popover.js +3247 -369
- package/lib/progress.js +254 -244
- package/lib/radio-button.js +259 -226
- package/lib/radio-group.js +249 -186
- package/lib/radio.js +263 -253
- package/lib/rate.js +1399 -420
- package/lib/result.js +183 -227
- package/lib/row.js +58 -41
- package/lib/scrollbar.js +1331 -278
- package/lib/select.js +5816 -1428
- package/lib/skeleton-item.js +133 -145
- package/lib/skeleton.js +82 -91
- package/lib/slider.js +5157 -702
- package/lib/spinner.js +113 -101
- package/lib/statistic.js +10205 -254
- package/lib/step.js +274 -311
- package/lib/steps.js +854 -117
- package/lib/subTitle.js +292 -0
- package/lib/submenu.js +2867 -429
- package/lib/switch.js +1051 -291
- package/lib/tab-pane.js +125 -135
- package/lib/tabDialog.js +2658 -0
- package/lib/table-column.js +1975 -751
- package/lib/table.js +8019 -3979
- package/lib/tabs.js +1455 -605
- package/lib/tag.js +73 -68
- package/lib/theme-chalk/src/index.scss +3 -0
- package/lib/time-picker.js +6821 -1944
- package/lib/time-select.js +6297 -1186
- package/lib/timeline-item.js +43 -84
- package/lib/timeline.js +43 -39
- package/lib/tooltip.js +3185 -287
- package/lib/transfer.js +2943 -625
- package/lib/transitions/collapse-transition.js +69 -87
- package/lib/tree.js +3312 -1791
- package/lib/treeSelect.js +4436 -0
- package/lib/umd/locale/af-ZA.js +145 -138
- package/lib/umd/locale/ar.js +138 -137
- package/lib/umd/locale/az.js +139 -137
- package/lib/umd/locale/bg.js +148 -138
- package/lib/umd/locale/bn.js +138 -137
- package/lib/umd/locale/ca.js +138 -137
- package/lib/umd/locale/cs-CZ.js +142 -140
- package/lib/umd/locale/da.js +139 -137
- package/lib/umd/locale/de.js +141 -139
- package/lib/umd/locale/ee.js +140 -138
- package/lib/umd/locale/el.js +140 -138
- package/lib/umd/locale/en.js +142 -138
- package/lib/umd/locale/eo.js +140 -138
- package/lib/umd/locale/es.js +138 -137
- package/lib/umd/locale/eu.js +143 -138
- package/lib/umd/locale/fa.js +140 -138
- package/lib/umd/locale/fi.js +140 -138
- package/lib/umd/locale/fr.js +140 -137
- package/lib/umd/locale/he.js +145 -138
- package/lib/umd/locale/hr.js +143 -138
- package/lib/umd/locale/hu.js +139 -137
- package/lib/umd/locale/hy-AM.js +140 -138
- package/lib/umd/locale/id.js +139 -138
- package/lib/umd/locale/is.js +139 -138
- package/lib/umd/locale/it.js +138 -137
- package/lib/umd/locale/ja.js +140 -138
- package/lib/umd/locale/kg.js +140 -138
- package/lib/umd/locale/km.js +139 -138
- package/lib/umd/locale/ko.js +140 -138
- package/lib/umd/locale/ku.js +140 -138
- package/lib/umd/locale/kz.js +140 -138
- package/lib/umd/locale/lo-LA.js +138 -137
- package/lib/umd/locale/lt.js +140 -138
- package/lib/umd/locale/lv.js +140 -138
- package/lib/umd/locale/mn.js +140 -138
- package/lib/umd/locale/ms.js +138 -137
- package/lib/umd/locale/nb-NO.js +138 -137
- package/lib/umd/locale/nl.js +140 -138
- package/lib/umd/locale/pl.js +140 -138
- package/lib/umd/locale/pt-br.js +139 -138
- package/lib/umd/locale/pt.js +148 -138
- package/lib/umd/locale/ro.js +140 -138
- package/lib/umd/locale/ru-RU.js +139 -138
- package/lib/umd/locale/si.js +142 -138
- package/lib/umd/locale/sk.js +141 -140
- package/lib/umd/locale/sl.js +140 -138
- package/lib/umd/locale/sr-Latn.js +139 -138
- package/lib/umd/locale/sr.js +143 -138
- package/lib/umd/locale/sv-SE.js +143 -138
- package/lib/umd/locale/sw.js +142 -138
- package/lib/umd/locale/ta.js +145 -137
- package/lib/umd/locale/th.js +142 -138
- package/lib/umd/locale/tk.js +144 -138
- package/lib/umd/locale/tr-TR.js +140 -138
- package/lib/umd/locale/ua.js +139 -138
- package/lib/umd/locale/ug-CN.js +139 -138
- package/lib/umd/locale/uz-UZ.js +139 -138
- package/lib/umd/locale/vi.js +139 -138
- package/lib/umd/locale/zh-CN.js +139 -138
- package/lib/umd/locale/zh-TW.js +143 -138
- package/lib/upload.js +2377 -987
- package/lib/utils/after-leave.js +36 -33
- package/lib/utils/aria-dialog.js +55 -73
- package/lib/utils/aria-utils.js +67 -76
- package/lib/utils/clickoutside.js +52 -60
- package/lib/utils/date-util.js +198 -241
- package/lib/utils/date.js +6 -368
- package/lib/utils/date_source.js +349 -0
- package/lib/utils/dom.js +167 -183
- package/lib/utils/lodash.js +13 -9421
- package/lib/utils/lodash_source.js +9421 -0
- package/lib/utils/menu/aria-menubar.js +13 -18
- package/lib/utils/menu/aria-menuitem.js +43 -54
- package/lib/utils/menu/aria-submenu.js +50 -59
- package/lib/utils/merge.js +15 -17
- package/lib/utils/popper.js +1141 -1170
- package/lib/utils/popup/index.js +186 -230
- package/lib/utils/popup/popup-manager.js +159 -191
- package/lib/utils/resize-event.js +29 -44
- package/lib/utils/scroll-into-view.js +25 -33
- package/lib/utils/scrollbar-width.js +25 -36
- package/lib/utils/shared.js +3 -3
- package/lib/utils/types.js +19 -32
- package/lib/utils/util.js +187 -221
- package/lib/utils/vdom.js +5 -9
- package/lib/utils/vue-popper.js +166 -188
- package/package.json +22 -19
- package/packages/alert/src/main.vue +63 -63
- package/packages/aside/src/main.vue +9 -9
- package/packages/autocomplete/src/autocomplete-suggestions.vue +46 -46
- package/packages/autocomplete/src/autocomplete.vue +198 -198
- package/packages/avatar/src/main.vue +5 -5
- package/packages/backtop/src/main.vue +3 -3
- package/packages/badge/src/main.vue +1 -1
- package/packages/breadcrumb/src/breadcrumb-item.vue +26 -26
- package/packages/breadcrumb/src/breadcrumb.vue +22 -22
- package/packages/button/src/button-group.vue +3 -3
- package/packages/button/src/button.vue +44 -44
- package/packages/calendar/src/date-table.vue +3 -3
- package/packages/calendar/src/main.vue +7 -7
- package/packages/card/src/main.vue +9 -9
- package/packages/carousel/src/item.vue +98 -98
- package/packages/carousel/src/main.vue +2 -2
- package/packages/cascader/src/cascader.vue +4 -4
- package/packages/cascader-panel/src/cascader-menu.vue +4 -4
- package/packages/cascader-panel/src/cascader-node.vue +232 -232
- package/packages/cascader-panel/src/cascader-panel.vue +3 -3
- package/packages/cascader-panel/src/node.js +2 -3
- package/packages/cascader-panel/src/store.js +0 -1
- package/packages/checkbox/src/checkbox-button.vue +139 -139
- package/packages/checkbox/src/checkbox-group.vue +33 -33
- package/packages/checkbox/src/checkbox.vue +140 -140
- package/packages/col/src/col.js +5 -5
- package/packages/collapse/src/collapse-item.vue +55 -55
- package/packages/collapse/src/collapse.vue +54 -54
- package/packages/color-picker/src/color.js +4 -4
- package/packages/color-picker/src/components/alpha-slider.vue +100 -100
- package/packages/color-picker/src/components/hue-slider.vue +91 -91
- package/packages/color-picker/src/components/picker-dropdown.vue +64 -64
- package/packages/color-picker/src/components/predefine.vue +43 -43
- package/packages/color-picker/src/components/sv-panel.vue +70 -70
- package/packages/color-picker/src/main.vue +141 -141
- package/packages/container/src/main.vue +20 -20
- package/packages/date-picker/src/basic/date-table.vue +360 -360
- package/packages/date-picker/src/basic/month-table.vue +222 -223
- package/packages/date-picker/src/basic/time-spinner.vue +174 -174
- package/packages/date-picker/src/basic/year-table.vue +91 -91
- package/packages/date-picker/src/panel/date-range.vue +415 -415
- package/packages/date-picker/src/panel/date.vue +423 -423
- package/packages/date-picker/src/panel/month-range.vue +177 -177
- package/packages/date-picker/src/panel/time-range.vue +173 -173
- package/packages/date-picker/src/panel/time-select.vue +131 -131
- package/packages/date-picker/src/panel/time.vue +131 -131
- package/packages/date-picker/src/picker.vue +7 -7
- package/packages/descriptions/src/descriptions-row.js +3 -3
- package/packages/descriptions/src/index.js +1 -1
- package/packages/dialog/src/component.vue +155 -155
- package/packages/divider/src/main.vue +1 -1
- package/packages/drawer/src/main.vue +2 -2
- package/packages/dropdown/src/dropdown-item.vue +15 -15
- package/packages/dropdown/src/dropdown-menu.vue +47 -47
- package/packages/dropdown/src/dropdown.vue +260 -260
- package/packages/empty/src/index.vue +1 -1
- package/packages/fileUpload/index.js +8 -0
- package/packages/fileUpload/src/main.vue +430 -0
- package/packages/footer/src/main.vue +9 -9
- package/packages/form/src/form-item.vue +245 -245
- package/packages/form/src/form.vue +154 -154
- package/packages/header/src/main.vue +9 -9
- package/packages/icon/src/icon.vue +6 -6
- package/packages/image/src/image-viewer.vue +9 -9
- package/packages/image/src/main.vue +206 -206
- package/packages/infinite-scroll/src/main.js +1 -2
- package/packages/input/src/calcTextareaHeight.js +2 -2
- package/packages/input/src/input.vue +311 -311
- package/packages/input-number/src/input-number.vue +205 -205
- package/packages/loading/src/loading.vue +19 -19
- package/packages/main/src/main.vue +4 -4
- package/packages/menu/src/menu-item-group.vue +27 -27
- package/packages/menu/src/menu-item.vue +69 -69
- package/packages/menu/src/menu.vue +284 -284
- package/packages/menu/src/submenu.vue +308 -309
- package/packages/message/src/main.js +1 -1
- package/packages/message/src/main.vue +72 -72
- package/packages/message-box/src/main.vue +216 -216
- package/packages/notification/src/main.js +1 -1
- package/packages/notification/src/main.vue +93 -93
- package/packages/pagination/src/pager.vue +99 -99
- package/packages/popconfirm/src/main.vue +28 -28
- package/packages/popover/src/main.vue +6 -6
- package/packages/progress/src/progress.vue +174 -174
- package/packages/radio/src/radio-button.vue +64 -64
- package/packages/radio/src/radio-group.vue +88 -88
- package/packages/radio/src/radio.vue +74 -74
- package/packages/rate/src/main.vue +270 -270
- package/packages/row/src/row.js +3 -3
- package/packages/scrollbar/src/main.js +2 -2
- package/packages/scrollbar/src/util.js +1 -1
- package/packages/select/src/option-group.vue +46 -46
- package/packages/select/src/option.vue +122 -122
- package/packages/select/src/select-dropdown.vue +49 -49
- package/packages/select/src/select.vue +676 -676
- package/packages/skeleton/src/item.vue +12 -12
- package/packages/slider/src/button.vue +191 -191
- package/packages/slider/src/main.vue +314 -314
- package/packages/spinner/src/spinner.vue +16 -16
- package/packages/statistic/src/main.vue +5 -6
- package/packages/steps/src/step.vue +2 -2
- package/packages/steps/src/steps.vue +4 -4
- package/packages/subTitle/index.js +8 -0
- package/packages/subTitle/src/main.vue +33 -0
- package/packages/switch/src/component.vue +123 -123
- package/packages/tabDialog/index.js +23 -0
- package/packages/tabDialog/src/dialog/drag.js +63 -0
- package/packages/tabDialog/src/dialog/dragHeight.js +34 -0
- package/packages/tabDialog/src/dialog/dragWidth.js +30 -0
- package/packages/tabDialog/src/main.vue +277 -0
- package/packages/table/src/filter-panel.vue +128 -128
- package/packages/table/src/store/index.js +1 -1
- package/packages/table/src/table-body.js +2 -2
- package/packages/table/src/table-column.js +1 -1
- package/packages/table/src/table-header.js +1 -1
- package/packages/table/src/table-layout.js +1 -1
- package/packages/table/src/table.vue +416 -416
- package/packages/tabs/src/tab-bar.vue +43 -43
- package/packages/tabs/src/tab-nav.vue +250 -250
- package/packages/tabs/src/tab-pane.vue +34 -34
- package/packages/tabs/src/tabs.vue +165 -165
- package/packages/tag/src/tag.vue +52 -52
- package/packages/theme-cy/lib/element.css +1 -0
- package/packages/theme-cy/lib/fileUpload.css +1 -0
- package/packages/theme-cy/lib/index.css +1 -1
- package/packages/theme-cy/lib/subTitle.css +1 -0
- package/packages/theme-cy/lib/tabDialog.css +1 -0
- package/packages/theme-cy/lib/treeselect.css +1 -1
- package/packages/theme-cy/src/element.scss +45 -0
- package/packages/theme-cy/src/fileUpload.scss +30 -0
- package/packages/theme-cy/src/index.scss +4 -0
- package/packages/theme-cy/src/subTitle.scss +26 -0
- package/packages/theme-cy/src/tabDialog.scss +43 -0
- package/packages/theme-cy/src/treeselect.scss +20 -14
- package/packages/timeline/src/item.vue +24 -24
- package/packages/timeline/src/main.vue +27 -27
- package/packages/tooltip/src/main.js +1 -1
- package/packages/transfer/src/main.vue +169 -169
- package/packages/transfer/src/transfer-panel.vue +164 -164
- package/packages/tree/src/tree-node.vue +169 -169
- package/packages/tree/src/tree.vue +408 -408
- package/packages/treeSelect/index.js +8 -0
- package/packages/{treeselect → treeSelect}/src/main.vue +19 -19
- package/packages/upload/src/ajax.js +3 -3
- package/packages/upload/src/upload-dragger.vue +50 -50
- package/packages/upload/src/upload-list.vue +33 -33
- package/packages/upload/src/upload.vue +1 -1
- package/src/index.js +13 -5
- package/src/locale/format.js +0 -1
- package/src/mixins/migrating.js +2 -2
- package/src/utils/date.js +2 -368
- package/src/utils/date_source.js +368 -0
- package/src/utils/lodash.js +9 -18075
- package/src/utils/lodash_source.js +18075 -0
- package/src/utils/types.js +1 -1
- package/types/element-ui.d.ts +16 -3
- package/types/fileUpload.d.ts +5 -0
- package/types/subTitle.d.ts +5 -0
- package/types/tabDialog.d.ts +5 -0
- package/types/treeSelect.d.ts +5 -0
- package/lib/treeselect.js +0 -682
- package/packages/treeselect/index.js +0 -8
- package/types/treeselect.d.ts +0 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="cy-
|
|
2
|
+
<div class="cy-tree-select">
|
|
3
3
|
<el-popover v-model="popoverOpen" placement="bottom-start" width="300" trigger="click" :popper-class="popperClass" @show="popoverOpen = true" @hide="popoverOpen = false">
|
|
4
|
-
<div class="cy-
|
|
5
|
-
<div v-if="showCheckStrictly" class="cy-
|
|
4
|
+
<div class="cy-tree-select-select-con">
|
|
5
|
+
<div v-if="showCheckStrictly" class="cy-tree-select-select-con-t">
|
|
6
6
|
<el-checkbox v-model="isCheckStrictly">父子节点联动</el-checkbox>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
<div class="cy-
|
|
9
|
+
<div class="cy-tree-select-select-con-c">
|
|
10
10
|
<el-tree
|
|
11
11
|
ref="tree"
|
|
12
12
|
:data="treeOptions"
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div slot="reference" class="cy-
|
|
26
|
-
<div class="cy-
|
|
27
|
-
<span v-if="checkedArr.length < 1" class="cy-
|
|
25
|
+
<div slot="reference" class="cy-tree-select-select" :class="size" :style="vStyle">
|
|
26
|
+
<div class="cy-tree-select-select-v">
|
|
27
|
+
<span v-if="checkedArr.length < 1" class="cy-tree-select-select-v-placeholder">{{ placeholder }}</span>
|
|
28
28
|
<span v-else>{{ checkedArr.map(item => item[defaultOptions.label]).join() }}</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
<div class="cy-
|
|
31
|
+
<div class="cy-tree-select-select-v-icon" @mouseenter="isClearIcon = true" @mouseleave="isClearIcon = false">
|
|
32
32
|
<i v-if="isClearIcon && clearable" class="el-icon-circle-close" @click.stop="handleClear"></i>
|
|
33
|
-
<i v-else class="el-icon-arrow-down cy-
|
|
33
|
+
<i v-else class="el-icon-arrow-down cy-tree-select-select-v-arrow" :class="{ 'cy-tree-select-select-v-arrow-show': popoverOpen }"></i>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</el-popover>
|
|
@@ -42,7 +42,7 @@ import ElCheckbox from 'element-ui/packages/checkbox';
|
|
|
42
42
|
import ElPopover from 'element-ui/packages/popover';
|
|
43
43
|
|
|
44
44
|
export default {
|
|
45
|
-
name: '
|
|
45
|
+
name: 'CyTreeSelect',
|
|
46
46
|
mixins: [ElCheckbox, ElPopover],
|
|
47
47
|
model: {
|
|
48
48
|
prop: 'value',
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
|
|
108
|
-
//
|
|
108
|
+
// 显示的文本框样式
|
|
109
109
|
vStyle: {
|
|
110
110
|
type: [Array, String, Object],
|
|
111
111
|
default: ''
|
|
@@ -194,8 +194,8 @@ export default {
|
|
|
194
194
|
},
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
* 树复选框点击
|
|
198
|
+
*/
|
|
199
199
|
treeCheck(value, { checkedKeys, checkedNodes }) {
|
|
200
200
|
let arr = [];
|
|
201
201
|
arr = checkedNodes;
|
|
@@ -205,8 +205,8 @@ export default {
|
|
|
205
205
|
},
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
* 树节点点击
|
|
209
|
+
*/
|
|
210
210
|
treeClick(value, node, event) {
|
|
211
211
|
if (this.multiple) return;
|
|
212
212
|
|
|
@@ -215,16 +215,16 @@ export default {
|
|
|
215
215
|
},
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
* 清空
|
|
219
|
+
*/
|
|
220
220
|
handleClear() {
|
|
221
221
|
this.$emit('change', this.multiple ? [] : '', this.multiple ? [] : null);
|
|
222
222
|
this.$refs.tree.setCheckedKeys([]);
|
|
223
223
|
},
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
* 部门树 格式化为 单例数组
|
|
227
|
+
*/
|
|
228
228
|
turnFormatTreeData(arr, data, pId) {
|
|
229
229
|
data.forEach(item => {
|
|
230
230
|
let cItem = JSON.parse(JSON.stringify(item));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function getError(action, option, xhr) {
|
|
2
2
|
let msg;
|
|
3
3
|
if (xhr.response) {
|
|
4
|
-
msg = `${xhr.response.error || xhr.response}`;
|
|
4
|
+
msg = `${ xhr.response.error || xhr.response }`;
|
|
5
5
|
} else if (xhr.responseText) {
|
|
6
|
-
msg = `${xhr.responseText}`;
|
|
6
|
+
msg = `${ xhr.responseText }`;
|
|
7
7
|
} else {
|
|
8
|
-
msg = `fail to post ${action} ${xhr.status}`;
|
|
8
|
+
msg = `fail to post ${ action } ${ xhr.status }`;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const err = new Error(msg);
|
|
@@ -12,59 +12,59 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
<script>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
export default {
|
|
16
|
+
name: 'ElUploadDrag',
|
|
17
|
+
props: {
|
|
18
|
+
disabled: Boolean
|
|
19
|
+
},
|
|
20
|
+
inject: {
|
|
21
|
+
uploader: {
|
|
22
|
+
default: ''
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
data() {
|
|
26
|
+
return {
|
|
27
|
+
dragover: false
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
onDragover() {
|
|
32
|
+
if (!this.disabled) {
|
|
33
|
+
this.dragover = true;
|
|
23
34
|
}
|
|
24
35
|
},
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (!this.disabled) {
|
|
33
|
-
this.dragover = true;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
onDrop(e) {
|
|
37
|
-
if (this.disabled || !this.uploader) return;
|
|
38
|
-
const accept = this.uploader.accept;
|
|
39
|
-
this.dragover = false;
|
|
40
|
-
if (!accept) {
|
|
41
|
-
this.$emit('file', e.dataTransfer.files);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.$emit('file', [].slice.call(e.dataTransfer.files).filter(file => {
|
|
45
|
-
const { type, name } = file;
|
|
46
|
-
const extension = name.indexOf('.') > -1
|
|
47
|
-
? `.${ name.split('.').pop() }`
|
|
48
|
-
: '';
|
|
49
|
-
const baseType = type.replace(/\/.*$/, '');
|
|
50
|
-
return accept.split(',')
|
|
51
|
-
.map(type => type.trim())
|
|
52
|
-
.filter(type => type)
|
|
53
|
-
.some(acceptedType => {
|
|
54
|
-
if (/\..+$/.test(acceptedType)) {
|
|
55
|
-
return extension === acceptedType;
|
|
56
|
-
}
|
|
57
|
-
if (/\/\*$/.test(acceptedType)) {
|
|
58
|
-
return baseType === acceptedType.replace(/\/\*$/, '');
|
|
59
|
-
}
|
|
60
|
-
if (/^[^\/]+\/[^\/]+$/.test(acceptedType)) {
|
|
61
|
-
return type === acceptedType;
|
|
62
|
-
}
|
|
63
|
-
return false;
|
|
64
|
-
});
|
|
65
|
-
}));
|
|
36
|
+
onDrop(e) {
|
|
37
|
+
if (this.disabled || !this.uploader) return;
|
|
38
|
+
const accept = this.uploader.accept;
|
|
39
|
+
this.dragover = false;
|
|
40
|
+
if (!accept) {
|
|
41
|
+
this.$emit('file', e.dataTransfer.files);
|
|
42
|
+
return;
|
|
66
43
|
}
|
|
44
|
+
this.$emit('file', [].slice.call(e.dataTransfer.files).filter(file => {
|
|
45
|
+
const { type, name } = file;
|
|
46
|
+
const extension = name.indexOf('.') > -1
|
|
47
|
+
? `.${ name.split('.').pop() }`
|
|
48
|
+
: '';
|
|
49
|
+
const baseType = type.replace(/\/.*$/, '');
|
|
50
|
+
return accept.split(',')
|
|
51
|
+
.map(type => type.trim())
|
|
52
|
+
.filter(type => type)
|
|
53
|
+
.some(acceptedType => {
|
|
54
|
+
if (/\..+$/.test(acceptedType)) {
|
|
55
|
+
return extension === acceptedType;
|
|
56
|
+
}
|
|
57
|
+
if (/\/\*$/.test(acceptedType)) {
|
|
58
|
+
return baseType === acceptedType.replace(/\/\*$/, '');
|
|
59
|
+
}
|
|
60
|
+
if (/^[^\/]+\/[^\/]+$/.test(acceptedType)) {
|
|
61
|
+
return type === acceptedType;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
});
|
|
65
|
+
}));
|
|
67
66
|
}
|
|
68
|
-
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
69
|
</script>
|
|
70
70
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:src="file.url" alt=""
|
|
26
26
|
>
|
|
27
27
|
<a class="el-upload-list__item-name" @click="handleClick(file)">
|
|
28
|
-
<i class="el-icon-document"></i>{{file.name}}
|
|
28
|
+
<i class="el-icon-document"></i>{{ file.name }}
|
|
29
29
|
</a>
|
|
30
30
|
<label class="el-upload-list__item-status-label">
|
|
31
31
|
<i :class="{
|
|
@@ -63,43 +63,43 @@
|
|
|
63
63
|
</transition-group>
|
|
64
64
|
</template>
|
|
65
65
|
<script>
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
import Locale from 'element-ui/src/mixins/locale';
|
|
67
|
+
import ElProgress from 'element-ui/packages/progress';
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
export default {
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
name: 'ElUploadList',
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
mixins: [Locale],
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
focusing: false
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
components: { ElProgress },
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
disabled: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: false
|
|
92
|
-
},
|
|
93
|
-
handlePreview: Function,
|
|
94
|
-
listType: String
|
|
95
|
-
},
|
|
96
|
-
methods: {
|
|
97
|
-
parsePercentage(val) {
|
|
98
|
-
return parseInt(val, 10);
|
|
99
|
-
},
|
|
100
|
-
handleClick(file) {
|
|
101
|
-
this.handlePreview && this.handlePreview(file);
|
|
82
|
+
props: {
|
|
83
|
+
files: {
|
|
84
|
+
type: Array,
|
|
85
|
+
default() {
|
|
86
|
+
return [];
|
|
102
87
|
}
|
|
88
|
+
},
|
|
89
|
+
disabled: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
},
|
|
93
|
+
handlePreview: Function,
|
|
94
|
+
listType: String
|
|
95
|
+
},
|
|
96
|
+
methods: {
|
|
97
|
+
parsePercentage(val) {
|
|
98
|
+
return parseInt(val, 10);
|
|
99
|
+
},
|
|
100
|
+
handleClick(file) {
|
|
101
|
+
this.handlePreview && this.handlePreview(file);
|
|
103
102
|
}
|
|
104
|
-
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
105
|
</script>
|
package/src/index.js
CHANGED
|
@@ -89,7 +89,10 @@ import Empty from '../packages/empty/index.js';
|
|
|
89
89
|
import Descriptions from '../packages/descriptions/index.js';
|
|
90
90
|
import DescriptionsItem from '../packages/descriptions-item/index.js';
|
|
91
91
|
import Result from '../packages/result/index.js';
|
|
92
|
-
import
|
|
92
|
+
import TreeSelect from '../packages/treeSelect/index.js';
|
|
93
|
+
import SubTitle from '../packages/subTitle/index.js';
|
|
94
|
+
import TabDialog from '../packages/tabDialog/index.js';
|
|
95
|
+
import FileUpload from '../packages/fileUpload/index.js';
|
|
93
96
|
import locale from 'element-ui/src/locale';
|
|
94
97
|
import CollapseTransition from 'element-ui/src/transitions/collapse-transition';
|
|
95
98
|
|
|
@@ -178,7 +181,9 @@ const components = [
|
|
|
178
181
|
Descriptions,
|
|
179
182
|
DescriptionsItem,
|
|
180
183
|
Result,
|
|
181
|
-
|
|
184
|
+
TreeSelect,
|
|
185
|
+
SubTitle,
|
|
186
|
+
FileUpload,
|
|
182
187
|
CollapseTransition
|
|
183
188
|
];
|
|
184
189
|
|
|
@@ -192,6 +197,7 @@ const install = function(Vue, opts = {}) {
|
|
|
192
197
|
|
|
193
198
|
Vue.use(InfiniteScroll);
|
|
194
199
|
Vue.use(Loading.directive);
|
|
200
|
+
Vue.use(TabDialog);
|
|
195
201
|
|
|
196
202
|
Vue.prototype.$ELEMENT = {
|
|
197
203
|
size: opts.size || '',
|
|
@@ -205,7 +211,6 @@ const install = function(Vue, opts = {}) {
|
|
|
205
211
|
Vue.prototype.$prompt = MessageBox.prompt;
|
|
206
212
|
Vue.prototype.$notify = Notification;
|
|
207
213
|
Vue.prototype.$message = Message;
|
|
208
|
-
|
|
209
214
|
};
|
|
210
215
|
|
|
211
216
|
/* istanbul ignore if */
|
|
@@ -214,7 +219,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
214
219
|
}
|
|
215
220
|
|
|
216
221
|
export default {
|
|
217
|
-
version: '1.0.
|
|
222
|
+
version: '1.0.4',
|
|
218
223
|
locale: locale.use,
|
|
219
224
|
i18n: locale.i18n,
|
|
220
225
|
install,
|
|
@@ -308,5 +313,8 @@ export default {
|
|
|
308
313
|
Descriptions,
|
|
309
314
|
DescriptionsItem,
|
|
310
315
|
Result,
|
|
311
|
-
|
|
316
|
+
TreeSelect,
|
|
317
|
+
SubTitle,
|
|
318
|
+
TabDialog,
|
|
319
|
+
FileUpload
|
|
312
320
|
};
|
package/src/locale/format.js
CHANGED
package/src/mixins/migrating.js
CHANGED
|
@@ -32,14 +32,14 @@ export default {
|
|
|
32
32
|
for (let propName in definedProps) {
|
|
33
33
|
propName = kebabCase(propName); // compatible with camel case
|
|
34
34
|
if (props[propName]) {
|
|
35
|
-
console.warn(`[Element Migrating][${this.$options.name}][Attribute]: ${props[propName]}`);
|
|
35
|
+
console.warn(`[Element Migrating][${ this.$options.name }][Attribute]: ${ props[propName] }`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
for (let eventName in definedEvents) {
|
|
40
40
|
eventName = kebabCase(eventName); // compatible with camel case
|
|
41
41
|
if (events[eventName]) {
|
|
42
|
-
console.warn(`[Element Migrating][${this.$options.name}][Event]: ${events[eventName]}`);
|
|
42
|
+
console.warn(`[Element Migrating][${ this.$options.name }][Event]: ${ events[eventName] }`);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
},
|