@element-plus/nightly 0.0.20241112 → 0.0.20241113
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.full.js +19 -6
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +19 -6
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +70 -8
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +8 -70
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +627 -83
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +83 -627
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -18
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +18 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +4 -0
- package/es/components/descriptions/src/description-item.mjs +4 -0
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description.d.ts +1 -0
- package/es/components/descriptions/src/description.mjs +4 -0
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +3 -0
- package/es/components/descriptions/src/descriptions-cell.mjs +2 -1
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions.type.d.ts +2 -0
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/pagination/style/css.d.ts +1 -0
- package/es/components/pagination/style/css.mjs +1 -0
- package/es/components/pagination/style/css.mjs.map +1 -1
- package/es/components/pagination/style/index.d.ts +1 -0
- package/es/components/pagination/style/index.mjs +1 -0
- package/es/components/pagination/style/index.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +171 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -171
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +169 -34
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +34 -169
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +21 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -21
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +8 -4
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +70 -8
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +8 -70
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +627 -84
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +84 -627
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -20
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +20 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +4 -0
- package/lib/components/descriptions/src/description-item.js +4 -0
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description.d.ts +1 -0
- package/lib/components/descriptions/src/description.js +4 -0
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +3 -0
- package/lib/components/descriptions/src/descriptions-cell.js +2 -1
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/descriptions.type.d.ts +2 -0
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/pagination/style/css.d.ts +1 -0
- package/lib/components/pagination/style/css.js +1 -0
- package/lib/components/pagination/style/css.js.map +1 -1
- package/lib/components/pagination/style/index.d.ts +1 -0
- package/lib/components/pagination/style/index.js +1 -0
- package/lib/components/pagination/style/index.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +171 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -171
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +168 -34
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +34 -168
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/slider/src/button.js +22 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -22
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +7 -3
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
@@ -2,638 +2,95 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
|
7
|
-
var core = require('@vueuse/core');
|
5
|
+
var core = require('@popperjs/core');
|
6
|
+
require('../../cascader-panel/index.js');
|
8
7
|
require('../../../utils/index.js');
|
9
|
-
var index$9 = require('../../cascader-panel/index.js');
|
10
|
-
var index$5 = require('../../input/index.js');
|
11
|
-
var index$4 = require('../../tooltip/index.js');
|
12
|
-
var index$a = require('../../scrollbar/index.js');
|
13
|
-
var index$7 = require('../../tag/index.js');
|
14
|
-
var index$6 = require('../../icon/index.js');
|
15
|
-
require('../../form/index.js');
|
16
|
-
require('../../../directives/index.js');
|
17
8
|
require('../../../hooks/index.js');
|
9
|
+
require('../../tooltip/index.js');
|
10
|
+
require('../../tag/index.js');
|
18
11
|
require('../../../constants/index.js');
|
19
|
-
var
|
20
|
-
var
|
21
|
-
var
|
22
|
-
var
|
23
|
-
var
|
24
|
-
var
|
25
|
-
var index$2 = require('../../../hooks/use-empty-values/index.js');
|
26
|
-
var index$3 = require('../../../hooks/use-composition/index.js');
|
27
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
12
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
13
|
+
var config = require('../../cascader-panel/src/config.js');
|
14
|
+
var index = require('../../../hooks/use-size/index.js');
|
15
|
+
var content = require('../../tooltip/src/content.js');
|
16
|
+
var tag = require('../../tag/src/tag.js');
|
17
|
+
var index$1 = require('../../../hooks/use-empty-values/index.js');
|
28
18
|
var event = require('../../../constants/event.js');
|
29
|
-
var
|
30
|
-
var aria = require('../../../constants/aria.js');
|
31
|
-
var aria$1 = require('../../../utils/dom/aria.js');
|
32
|
-
var shared = require('@vue/shared');
|
33
|
-
var index$8 = require('../../../directives/click-outside/index.js');
|
19
|
+
var types = require('../../../utils/types.js');
|
34
20
|
|
35
|
-
const
|
36
|
-
|
37
|
-
|
21
|
+
const cascaderProps = runtime.buildProps({
|
22
|
+
...config.CommonProps,
|
23
|
+
size: index.useSizeProp,
|
24
|
+
placeholder: String,
|
25
|
+
disabled: Boolean,
|
26
|
+
clearable: Boolean,
|
27
|
+
filterable: Boolean,
|
28
|
+
filterMethod: {
|
29
|
+
type: runtime.definePropType(Function),
|
30
|
+
default: (node, keyword) => node.text.includes(keyword)
|
31
|
+
},
|
32
|
+
separator: {
|
33
|
+
type: String,
|
34
|
+
default: " / "
|
35
|
+
},
|
36
|
+
showAllLevels: {
|
37
|
+
type: Boolean,
|
38
|
+
default: true
|
39
|
+
},
|
40
|
+
collapseTags: Boolean,
|
41
|
+
maxCollapseTags: {
|
42
|
+
type: Number,
|
43
|
+
default: 1
|
44
|
+
},
|
45
|
+
collapseTagsTooltip: {
|
46
|
+
type: Boolean,
|
47
|
+
default: false
|
48
|
+
},
|
49
|
+
debounce: {
|
50
|
+
type: Number,
|
51
|
+
default: 300
|
52
|
+
},
|
53
|
+
beforeFilter: {
|
54
|
+
type: runtime.definePropType(Function),
|
55
|
+
default: () => true
|
56
|
+
},
|
57
|
+
placement: {
|
58
|
+
type: runtime.definePropType(String),
|
59
|
+
values: core.placements,
|
60
|
+
default: "bottom-start"
|
61
|
+
},
|
62
|
+
fallbackPlacements: {
|
63
|
+
type: runtime.definePropType(Array),
|
64
|
+
default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
|
65
|
+
},
|
66
|
+
popperClass: {
|
67
|
+
type: String,
|
68
|
+
default: ""
|
69
|
+
},
|
70
|
+
teleported: content.useTooltipContentProps.teleported,
|
71
|
+
tagType: { ...tag.tagProps.type, default: "info" },
|
72
|
+
tagEffect: { ...tag.tagProps.effect, default: "light" },
|
73
|
+
validateEvent: {
|
74
|
+
type: Boolean,
|
75
|
+
default: true
|
76
|
+
},
|
77
|
+
persistent: {
|
78
|
+
type: Boolean,
|
79
|
+
default: true
|
80
|
+
},
|
81
|
+
...index$1.useEmptyValuesProps
|
38
82
|
});
|
39
|
-
const
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
enabled: true,
|
50
|
-
phase: "main",
|
51
|
-
fn: ({ state }) => {
|
52
|
-
const { modifiersData, placement } = state;
|
53
|
-
if (["right", "left", "bottom", "top"].includes(placement))
|
54
|
-
return;
|
55
|
-
modifiersData.arrow.x = 35;
|
56
|
-
},
|
57
|
-
requires: ["arrow"]
|
58
|
-
}
|
59
|
-
]
|
60
|
-
};
|
61
|
-
const attrs = vue.useAttrs();
|
62
|
-
let inputInitialHeight = 0;
|
63
|
-
let pressDeleteCount = 0;
|
64
|
-
const nsCascader = index.useNamespace("cascader");
|
65
|
-
const nsInput = index.useNamespace("input");
|
66
|
-
const { t } = index$1.useLocale();
|
67
|
-
const { form, formItem } = useFormItem.useFormItem();
|
68
|
-
const { valueOnClear } = index$2.useEmptyValues(props);
|
69
|
-
const { isComposing, handleComposition } = index$3.useComposition({
|
70
|
-
afterComposition(event) {
|
71
|
-
var _a;
|
72
|
-
const text = (_a = event.target) == null ? void 0 : _a.value;
|
73
|
-
handleInput(text);
|
74
|
-
}
|
75
|
-
});
|
76
|
-
const tooltipRef = vue.ref(null);
|
77
|
-
const input = vue.ref(null);
|
78
|
-
const tagWrapper = vue.ref(null);
|
79
|
-
const cascaderPanelRef = vue.ref(null);
|
80
|
-
const suggestionPanel = vue.ref(null);
|
81
|
-
const popperVisible = vue.ref(false);
|
82
|
-
const inputHover = vue.ref(false);
|
83
|
-
const filtering = vue.ref(false);
|
84
|
-
const filterFocus = vue.ref(false);
|
85
|
-
const inputValue = vue.ref("");
|
86
|
-
const searchInputValue = vue.ref("");
|
87
|
-
const presentTags = vue.ref([]);
|
88
|
-
const allPresentTags = vue.ref([]);
|
89
|
-
const suggestions = vue.ref([]);
|
90
|
-
const cascaderStyle = vue.computed(() => {
|
91
|
-
return attrs.style;
|
92
|
-
});
|
93
|
-
const isDisabled = vue.computed(() => props.disabled || (form == null ? void 0 : form.disabled));
|
94
|
-
const inputPlaceholder = vue.computed(() => props.placeholder || t("el.cascader.placeholder"));
|
95
|
-
const currentPlaceholder = vue.computed(() => searchInputValue.value || presentTags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
|
96
|
-
const realSize = useFormCommonProps.useFormSize();
|
97
|
-
const tagSize = vue.computed(() => ["small"].includes(realSize.value) ? "small" : "default");
|
98
|
-
const multiple = vue.computed(() => !!props.props.multiple);
|
99
|
-
const readonly = vue.computed(() => !props.filterable || multiple.value);
|
100
|
-
const searchKeyword = vue.computed(() => multiple.value ? searchInputValue.value : inputValue.value);
|
101
|
-
const checkedNodes = vue.computed(() => {
|
102
|
-
var _a;
|
103
|
-
return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || [];
|
104
|
-
});
|
105
|
-
const clearBtnVisible = vue.computed(() => {
|
106
|
-
if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)
|
107
|
-
return false;
|
108
|
-
return !!checkedNodes.value.length;
|
109
|
-
});
|
110
|
-
const presentText = vue.computed(() => {
|
111
|
-
const { showAllLevels, separator } = props;
|
112
|
-
const nodes = checkedNodes.value;
|
113
|
-
return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
|
114
|
-
});
|
115
|
-
const validateState = vue.computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
|
116
|
-
const checkedValue = vue.computed({
|
117
|
-
get() {
|
118
|
-
return lodashUnified.cloneDeep(props.modelValue);
|
119
|
-
},
|
120
|
-
set(val) {
|
121
|
-
const value = val != null ? val : valueOnClear.value;
|
122
|
-
emit(event.UPDATE_MODEL_EVENT, value);
|
123
|
-
emit(event.CHANGE_EVENT, value);
|
124
|
-
if (props.validateEvent) {
|
125
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
126
|
-
}
|
127
|
-
}
|
128
|
-
});
|
129
|
-
const cascaderKls = vue.computed(() => {
|
130
|
-
return [
|
131
|
-
nsCascader.b(),
|
132
|
-
nsCascader.m(realSize.value),
|
133
|
-
nsCascader.is("disabled", isDisabled.value),
|
134
|
-
attrs.class
|
135
|
-
];
|
136
|
-
});
|
137
|
-
const cascaderIconKls = vue.computed(() => {
|
138
|
-
return [
|
139
|
-
nsInput.e("icon"),
|
140
|
-
"icon-arrow-down",
|
141
|
-
nsCascader.is("reverse", popperVisible.value)
|
142
|
-
];
|
143
|
-
});
|
144
|
-
const inputClass = vue.computed(() => {
|
145
|
-
return nsCascader.is("focus", popperVisible.value || filterFocus.value);
|
146
|
-
});
|
147
|
-
const contentRef = vue.computed(() => {
|
148
|
-
var _a, _b;
|
149
|
-
return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
|
150
|
-
});
|
151
|
-
const togglePopperVisible = (visible) => {
|
152
|
-
var _a, _b, _c;
|
153
|
-
if (isDisabled.value)
|
154
|
-
return;
|
155
|
-
visible = visible != null ? visible : !popperVisible.value;
|
156
|
-
if (visible !== popperVisible.value) {
|
157
|
-
popperVisible.value = visible;
|
158
|
-
(_b = (_a = input.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
|
159
|
-
if (visible) {
|
160
|
-
updatePopperPosition();
|
161
|
-
vue.nextTick((_c = cascaderPanelRef.value) == null ? void 0 : _c.scrollToExpandingNode);
|
162
|
-
} else if (props.filterable) {
|
163
|
-
syncPresentTextValue();
|
164
|
-
}
|
165
|
-
emit("visibleChange", visible);
|
166
|
-
}
|
167
|
-
};
|
168
|
-
const updatePopperPosition = () => {
|
169
|
-
vue.nextTick(() => {
|
170
|
-
var _a;
|
171
|
-
(_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
|
172
|
-
});
|
173
|
-
};
|
174
|
-
const hideSuggestionPanel = () => {
|
175
|
-
filtering.value = false;
|
176
|
-
};
|
177
|
-
const genTag = (node) => {
|
178
|
-
const { showAllLevels, separator } = props;
|
179
|
-
return {
|
180
|
-
node,
|
181
|
-
key: node.uid,
|
182
|
-
text: node.calcText(showAllLevels, separator),
|
183
|
-
hitState: false,
|
184
|
-
closable: !isDisabled.value && !node.isDisabled,
|
185
|
-
isCollapseTag: false
|
186
|
-
};
|
187
|
-
};
|
188
|
-
const deleteTag = (tag) => {
|
189
|
-
var _a;
|
190
|
-
const node = tag.node;
|
191
|
-
node.doCheck(false);
|
192
|
-
(_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue();
|
193
|
-
emit("removeTag", node.valueByOption);
|
194
|
-
};
|
195
|
-
const calculatePresentTags = () => {
|
196
|
-
if (!multiple.value)
|
197
|
-
return;
|
198
|
-
const nodes = checkedNodes.value;
|
199
|
-
const tags = [];
|
200
|
-
const allTags = [];
|
201
|
-
nodes.forEach((node) => allTags.push(genTag(node)));
|
202
|
-
allPresentTags.value = allTags;
|
203
|
-
if (nodes.length) {
|
204
|
-
nodes.slice(0, props.maxCollapseTags).forEach((node) => tags.push(genTag(node)));
|
205
|
-
const rest = nodes.slice(props.maxCollapseTags);
|
206
|
-
const restCount = rest.length;
|
207
|
-
if (restCount) {
|
208
|
-
if (props.collapseTags) {
|
209
|
-
tags.push({
|
210
|
-
key: -1,
|
211
|
-
text: `+ ${restCount}`,
|
212
|
-
closable: false,
|
213
|
-
isCollapseTag: true
|
214
|
-
});
|
215
|
-
} else {
|
216
|
-
rest.forEach((node) => tags.push(genTag(node)));
|
217
|
-
}
|
218
|
-
}
|
219
|
-
}
|
220
|
-
presentTags.value = tags;
|
221
|
-
};
|
222
|
-
const calculateSuggestions = () => {
|
223
|
-
var _a, _b;
|
224
|
-
const { filterMethod, showAllLevels, separator } = props;
|
225
|
-
const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
|
226
|
-
if (node.isDisabled)
|
227
|
-
return false;
|
228
|
-
node.calcText(showAllLevels, separator);
|
229
|
-
return filterMethod(node, searchKeyword.value);
|
230
|
-
});
|
231
|
-
if (multiple.value) {
|
232
|
-
presentTags.value.forEach((tag) => {
|
233
|
-
tag.hitState = false;
|
234
|
-
});
|
235
|
-
allPresentTags.value.forEach((tag) => {
|
236
|
-
tag.hitState = false;
|
237
|
-
});
|
238
|
-
}
|
239
|
-
filtering.value = true;
|
240
|
-
suggestions.value = res;
|
241
|
-
updatePopperPosition();
|
242
|
-
};
|
243
|
-
const focusFirstNode = () => {
|
244
|
-
var _a;
|
245
|
-
let firstNode;
|
246
|
-
if (filtering.value && suggestionPanel.value) {
|
247
|
-
firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
|
248
|
-
} else {
|
249
|
-
firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
|
250
|
-
}
|
251
|
-
if (firstNode) {
|
252
|
-
firstNode.focus();
|
253
|
-
!filtering.value && firstNode.click();
|
254
|
-
}
|
255
|
-
};
|
256
|
-
const updateStyle = () => {
|
257
|
-
var _a, _b;
|
258
|
-
const inputInner = (_a = input.value) == null ? void 0 : _a.input;
|
259
|
-
const tagWrapperEl = tagWrapper.value;
|
260
|
-
const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
|
261
|
-
if (!core.isClient || !inputInner)
|
262
|
-
return;
|
263
|
-
if (suggestionPanelEl) {
|
264
|
-
const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
|
265
|
-
suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
|
266
|
-
}
|
267
|
-
if (tagWrapperEl) {
|
268
|
-
const { offsetHeight } = tagWrapperEl;
|
269
|
-
const height = presentTags.value.length > 0 ? `${Math.max(offsetHeight + 6, inputInitialHeight)}px` : `${inputInitialHeight}px`;
|
270
|
-
inputInner.style.height = height;
|
271
|
-
updatePopperPosition();
|
272
|
-
}
|
273
|
-
};
|
274
|
-
const getCheckedNodes = (leafOnly) => {
|
275
|
-
var _a;
|
276
|
-
return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
|
277
|
-
};
|
278
|
-
const handleExpandChange = (value) => {
|
279
|
-
updatePopperPosition();
|
280
|
-
emit("expandChange", value);
|
281
|
-
};
|
282
|
-
const handleKeyDown = (e) => {
|
283
|
-
if (isComposing.value)
|
284
|
-
return;
|
285
|
-
switch (e.code) {
|
286
|
-
case aria.EVENT_CODE.enter:
|
287
|
-
togglePopperVisible();
|
288
|
-
break;
|
289
|
-
case aria.EVENT_CODE.down:
|
290
|
-
togglePopperVisible(true);
|
291
|
-
vue.nextTick(focusFirstNode);
|
292
|
-
e.preventDefault();
|
293
|
-
break;
|
294
|
-
case aria.EVENT_CODE.esc:
|
295
|
-
if (popperVisible.value === true) {
|
296
|
-
e.preventDefault();
|
297
|
-
e.stopPropagation();
|
298
|
-
togglePopperVisible(false);
|
299
|
-
}
|
300
|
-
break;
|
301
|
-
case aria.EVENT_CODE.tab:
|
302
|
-
togglePopperVisible(false);
|
303
|
-
break;
|
304
|
-
}
|
305
|
-
};
|
306
|
-
const handleClear = () => {
|
307
|
-
var _a;
|
308
|
-
(_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes();
|
309
|
-
if (!popperVisible.value && props.filterable) {
|
310
|
-
syncPresentTextValue();
|
311
|
-
}
|
312
|
-
togglePopperVisible(false);
|
313
|
-
emit("clear");
|
314
|
-
};
|
315
|
-
const syncPresentTextValue = () => {
|
316
|
-
const { value } = presentText;
|
317
|
-
inputValue.value = value;
|
318
|
-
searchInputValue.value = value;
|
319
|
-
};
|
320
|
-
const handleSuggestionClick = (node) => {
|
321
|
-
var _a, _b;
|
322
|
-
const { checked } = node;
|
323
|
-
if (multiple.value) {
|
324
|
-
(_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
|
325
|
-
} else {
|
326
|
-
!checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
|
327
|
-
togglePopperVisible(false);
|
328
|
-
}
|
329
|
-
};
|
330
|
-
const handleSuggestionKeyDown = (e) => {
|
331
|
-
const target = e.target;
|
332
|
-
const { code } = e;
|
333
|
-
switch (code) {
|
334
|
-
case aria.EVENT_CODE.up:
|
335
|
-
case aria.EVENT_CODE.down: {
|
336
|
-
const distance = code === aria.EVENT_CODE.up ? -1 : 1;
|
337
|
-
aria$1.focusNode(aria$1.getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
|
338
|
-
break;
|
339
|
-
}
|
340
|
-
case aria.EVENT_CODE.enter:
|
341
|
-
target.click();
|
342
|
-
break;
|
343
|
-
}
|
344
|
-
};
|
345
|
-
const handleDelete = () => {
|
346
|
-
const tags = presentTags.value;
|
347
|
-
const lastTag = tags[tags.length - 1];
|
348
|
-
pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
|
349
|
-
if (!lastTag || !pressDeleteCount || props.collapseTags && tags.length > 1)
|
350
|
-
return;
|
351
|
-
if (lastTag.hitState) {
|
352
|
-
deleteTag(lastTag);
|
353
|
-
} else {
|
354
|
-
lastTag.hitState = true;
|
355
|
-
}
|
356
|
-
};
|
357
|
-
const handleFocus = (e) => {
|
358
|
-
const el = e.target;
|
359
|
-
const name = nsCascader.e("search-input");
|
360
|
-
if (el.className === name) {
|
361
|
-
filterFocus.value = true;
|
362
|
-
}
|
363
|
-
emit("focus", e);
|
364
|
-
};
|
365
|
-
const handleBlur = (e) => {
|
366
|
-
filterFocus.value = false;
|
367
|
-
emit("blur", e);
|
368
|
-
};
|
369
|
-
const handleFilter = lodashUnified.debounce(() => {
|
370
|
-
const { value } = searchKeyword;
|
371
|
-
if (!value)
|
372
|
-
return;
|
373
|
-
const passed = props.beforeFilter(value);
|
374
|
-
if (shared.isPromise(passed)) {
|
375
|
-
passed.then(calculateSuggestions).catch(() => {
|
376
|
-
});
|
377
|
-
} else if (passed !== false) {
|
378
|
-
calculateSuggestions();
|
379
|
-
} else {
|
380
|
-
hideSuggestionPanel();
|
381
|
-
}
|
382
|
-
}, props.debounce);
|
383
|
-
const handleInput = (val, e) => {
|
384
|
-
!popperVisible.value && togglePopperVisible(true);
|
385
|
-
if (e == null ? void 0 : e.isComposing)
|
386
|
-
return;
|
387
|
-
val ? handleFilter() : hideSuggestionPanel();
|
388
|
-
};
|
389
|
-
const getInputInnerHeight = (inputInner) => Number.parseFloat(core.useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
|
390
|
-
vue.watch(filtering, updatePopperPosition);
|
391
|
-
vue.watch([checkedNodes, isDisabled, () => props.collapseTags], calculatePresentTags);
|
392
|
-
vue.watch(presentTags, () => {
|
393
|
-
vue.nextTick(() => updateStyle());
|
394
|
-
});
|
395
|
-
vue.watch(realSize, async () => {
|
396
|
-
await vue.nextTick();
|
397
|
-
const inputInner = input.value.input;
|
398
|
-
inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
|
399
|
-
updateStyle();
|
400
|
-
});
|
401
|
-
vue.watch(presentText, syncPresentTextValue, { immediate: true });
|
402
|
-
vue.onMounted(() => {
|
403
|
-
const inputInner = input.value.input;
|
404
|
-
const inputInnerHeight = getInputInnerHeight(inputInner);
|
405
|
-
inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
|
406
|
-
core.useResizeObserver(inputInner, updateStyle);
|
407
|
-
});
|
408
|
-
expose({
|
409
|
-
getCheckedNodes,
|
410
|
-
cascaderPanelRef,
|
411
|
-
togglePopperVisible,
|
412
|
-
contentRef,
|
413
|
-
presentText
|
414
|
-
});
|
415
|
-
return (_ctx, _cache) => {
|
416
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$4.ElTooltip), {
|
417
|
-
ref_key: "tooltipRef",
|
418
|
-
ref: tooltipRef,
|
419
|
-
visible: popperVisible.value,
|
420
|
-
teleported: _ctx.teleported,
|
421
|
-
"popper-class": [vue.unref(nsCascader).e("dropdown"), _ctx.popperClass],
|
422
|
-
"popper-options": popperOptions,
|
423
|
-
"fallback-placements": _ctx.fallbackPlacements,
|
424
|
-
"stop-popper-mouse-event": false,
|
425
|
-
"gpu-acceleration": false,
|
426
|
-
placement: _ctx.placement,
|
427
|
-
transition: `${vue.unref(nsCascader).namespace.value}-zoom-in-top`,
|
428
|
-
effect: "light",
|
429
|
-
pure: "",
|
430
|
-
persistent: _ctx.persistent,
|
431
|
-
onHide: hideSuggestionPanel
|
432
|
-
}, {
|
433
|
-
default: vue.withCtx(() => [
|
434
|
-
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
435
|
-
class: vue.normalizeClass(vue.unref(cascaderKls)),
|
436
|
-
style: vue.normalizeStyle(vue.unref(cascaderStyle)),
|
437
|
-
onClick: () => togglePopperVisible(vue.unref(readonly) ? void 0 : true),
|
438
|
-
onKeydown: handleKeyDown,
|
439
|
-
onMouseenter: ($event) => inputHover.value = true,
|
440
|
-
onMouseleave: ($event) => inputHover.value = false
|
441
|
-
}, [
|
442
|
-
vue.createVNode(vue.unref(index$5.ElInput), {
|
443
|
-
ref_key: "input",
|
444
|
-
ref: input,
|
445
|
-
modelValue: inputValue.value,
|
446
|
-
"onUpdate:modelValue": ($event) => inputValue.value = $event,
|
447
|
-
placeholder: vue.unref(currentPlaceholder),
|
448
|
-
readonly: vue.unref(readonly),
|
449
|
-
disabled: vue.unref(isDisabled),
|
450
|
-
"validate-event": false,
|
451
|
-
size: vue.unref(realSize),
|
452
|
-
class: vue.normalizeClass(vue.unref(inputClass)),
|
453
|
-
tabindex: vue.unref(multiple) && _ctx.filterable && !vue.unref(isDisabled) ? -1 : void 0,
|
454
|
-
onCompositionstart: vue.unref(handleComposition),
|
455
|
-
onCompositionupdate: vue.unref(handleComposition),
|
456
|
-
onCompositionend: vue.unref(handleComposition),
|
457
|
-
onFocus: handleFocus,
|
458
|
-
onBlur: handleBlur,
|
459
|
-
onInput: handleInput
|
460
|
-
}, {
|
461
|
-
suffix: vue.withCtx(() => [
|
462
|
-
vue.unref(clearBtnVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.ElIcon), {
|
463
|
-
key: "clear",
|
464
|
-
class: vue.normalizeClass([vue.unref(nsInput).e("icon"), "icon-circle-close"]),
|
465
|
-
onClick: vue.withModifiers(handleClear, ["stop"])
|
466
|
-
}, {
|
467
|
-
default: vue.withCtx(() => [
|
468
|
-
vue.createVNode(vue.unref(iconsVue.CircleClose))
|
469
|
-
]),
|
470
|
-
_: 1
|
471
|
-
}, 8, ["class", "onClick"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$6.ElIcon), {
|
472
|
-
key: "arrow-down",
|
473
|
-
class: vue.normalizeClass(vue.unref(cascaderIconKls)),
|
474
|
-
onClick: vue.withModifiers(($event) => togglePopperVisible(), ["stop"])
|
475
|
-
}, {
|
476
|
-
default: vue.withCtx(() => [
|
477
|
-
vue.createVNode(vue.unref(iconsVue.ArrowDown))
|
478
|
-
]),
|
479
|
-
_: 1
|
480
|
-
}, 8, ["class", "onClick"]))
|
481
|
-
]),
|
482
|
-
_: 1
|
483
|
-
}, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
484
|
-
vue.unref(multiple) ? (vue.openBlock(), vue.createElementBlock("div", {
|
485
|
-
key: 0,
|
486
|
-
ref_key: "tagWrapper",
|
487
|
-
ref: tagWrapper,
|
488
|
-
class: vue.normalizeClass([
|
489
|
-
vue.unref(nsCascader).e("tags"),
|
490
|
-
vue.unref(nsCascader).is("validate", Boolean(vue.unref(validateState)))
|
491
|
-
])
|
492
|
-
}, [
|
493
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(presentTags.value, (tag) => {
|
494
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$7.ElTag), {
|
495
|
-
key: tag.key,
|
496
|
-
type: _ctx.tagType,
|
497
|
-
size: vue.unref(tagSize),
|
498
|
-
effect: _ctx.tagEffect,
|
499
|
-
hit: tag.hitState,
|
500
|
-
closable: tag.closable,
|
501
|
-
"disable-transitions": "",
|
502
|
-
onClose: ($event) => deleteTag(tag)
|
503
|
-
}, {
|
504
|
-
default: vue.withCtx(() => [
|
505
|
-
tag.isCollapseTag === false ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, vue.toDisplayString(tag.text), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElTooltip), {
|
506
|
-
key: 1,
|
507
|
-
disabled: popperVisible.value || !_ctx.collapseTagsTooltip,
|
508
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
509
|
-
placement: "bottom",
|
510
|
-
effect: "light"
|
511
|
-
}, {
|
512
|
-
default: vue.withCtx(() => [
|
513
|
-
vue.createElementVNode("span", null, vue.toDisplayString(tag.text), 1)
|
514
|
-
]),
|
515
|
-
content: vue.withCtx(() => [
|
516
|
-
vue.createElementVNode("div", {
|
517
|
-
class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tags"))
|
518
|
-
}, [
|
519
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(allPresentTags.value.slice(_ctx.maxCollapseTags), (tag2, idx) => {
|
520
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
521
|
-
key: idx,
|
522
|
-
class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tag"))
|
523
|
-
}, [
|
524
|
-
(vue.openBlock(), vue.createBlock(vue.unref(index$7.ElTag), {
|
525
|
-
key: tag2.key,
|
526
|
-
class: "in-tooltip",
|
527
|
-
type: _ctx.tagType,
|
528
|
-
size: vue.unref(tagSize),
|
529
|
-
effect: _ctx.tagEffect,
|
530
|
-
hit: tag2.hitState,
|
531
|
-
closable: tag2.closable,
|
532
|
-
"disable-transitions": "",
|
533
|
-
onClose: ($event) => deleteTag(tag2)
|
534
|
-
}, {
|
535
|
-
default: vue.withCtx(() => [
|
536
|
-
vue.createElementVNode("span", null, vue.toDisplayString(tag2.text), 1)
|
537
|
-
]),
|
538
|
-
_: 2
|
539
|
-
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
|
540
|
-
], 2);
|
541
|
-
}), 128))
|
542
|
-
], 2)
|
543
|
-
]),
|
544
|
-
_: 2
|
545
|
-
}, 1032, ["disabled"]))
|
546
|
-
]),
|
547
|
-
_: 2
|
548
|
-
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]);
|
549
|
-
}), 128)),
|
550
|
-
_ctx.filterable && !vue.unref(isDisabled) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
551
|
-
key: 0,
|
552
|
-
"onUpdate:modelValue": ($event) => searchInputValue.value = $event,
|
553
|
-
type: "text",
|
554
|
-
class: vue.normalizeClass(vue.unref(nsCascader).e("search-input")),
|
555
|
-
placeholder: vue.unref(presentText) ? "" : vue.unref(inputPlaceholder),
|
556
|
-
onInput: (e) => handleInput(searchInputValue.value, e),
|
557
|
-
onClick: vue.withModifiers(($event) => togglePopperVisible(true), ["stop"]),
|
558
|
-
onKeydown: vue.withKeys(handleDelete, ["delete"]),
|
559
|
-
onCompositionstart: vue.unref(handleComposition),
|
560
|
-
onCompositionupdate: vue.unref(handleComposition),
|
561
|
-
onCompositionend: vue.unref(handleComposition),
|
562
|
-
onFocus: handleFocus,
|
563
|
-
onBlur: handleBlur
|
564
|
-
}, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [
|
565
|
-
[vue.vModelText, searchInputValue.value]
|
566
|
-
]) : vue.createCommentVNode("v-if", true)
|
567
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
568
|
-
], 46, ["onClick", "onMouseenter", "onMouseleave"])), [
|
569
|
-
[vue.unref(index$8["default"]), () => togglePopperVisible(false), vue.unref(contentRef)]
|
570
|
-
])
|
571
|
-
]),
|
572
|
-
content: vue.withCtx(() => [
|
573
|
-
vue.withDirectives(vue.createVNode(vue.unref(index$9.ElCascaderPanel), {
|
574
|
-
ref_key: "cascaderPanelRef",
|
575
|
-
ref: cascaderPanelRef,
|
576
|
-
modelValue: vue.unref(checkedValue),
|
577
|
-
"onUpdate:modelValue": ($event) => vue.isRef(checkedValue) ? checkedValue.value = $event : null,
|
578
|
-
options: _ctx.options,
|
579
|
-
props: props.props,
|
580
|
-
border: false,
|
581
|
-
"render-label": _ctx.$slots.default,
|
582
|
-
onExpandChange: handleExpandChange,
|
583
|
-
onClose: ($event) => _ctx.$nextTick(() => togglePopperVisible(false))
|
584
|
-
}, {
|
585
|
-
empty: vue.withCtx(() => [
|
586
|
-
vue.renderSlot(_ctx.$slots, "empty")
|
587
|
-
]),
|
588
|
-
_: 3
|
589
|
-
}, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [
|
590
|
-
[vue.vShow, !filtering.value]
|
591
|
-
]),
|
592
|
-
_ctx.filterable ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$a.ElScrollbar), {
|
593
|
-
key: 0,
|
594
|
-
ref_key: "suggestionPanel",
|
595
|
-
ref: suggestionPanel,
|
596
|
-
tag: "ul",
|
597
|
-
class: vue.normalizeClass(vue.unref(nsCascader).e("suggestion-panel")),
|
598
|
-
"view-class": vue.unref(nsCascader).e("suggestion-list"),
|
599
|
-
onKeydown: handleSuggestionKeyDown
|
600
|
-
}, {
|
601
|
-
default: vue.withCtx(() => [
|
602
|
-
suggestions.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(suggestions.value, (item) => {
|
603
|
-
return vue.openBlock(), vue.createElementBlock("li", {
|
604
|
-
key: item.uid,
|
605
|
-
class: vue.normalizeClass([
|
606
|
-
vue.unref(nsCascader).e("suggestion-item"),
|
607
|
-
vue.unref(nsCascader).is("checked", item.checked)
|
608
|
-
]),
|
609
|
-
tabindex: -1,
|
610
|
-
onClick: ($event) => handleSuggestionClick(item)
|
611
|
-
}, [
|
612
|
-
vue.createElementVNode("span", null, vue.toDisplayString(item.text), 1),
|
613
|
-
item.checked ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.ElIcon), { key: 0 }, {
|
614
|
-
default: vue.withCtx(() => [
|
615
|
-
vue.createVNode(vue.unref(iconsVue.Check))
|
616
|
-
]),
|
617
|
-
_: 1
|
618
|
-
})) : vue.createCommentVNode("v-if", true)
|
619
|
-
], 10, ["onClick"]);
|
620
|
-
}), 128)) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
621
|
-
vue.createElementVNode("li", {
|
622
|
-
class: vue.normalizeClass(vue.unref(nsCascader).e("empty-text"))
|
623
|
-
}, vue.toDisplayString(vue.unref(t)("el.cascader.noMatch")), 3)
|
624
|
-
])
|
625
|
-
]),
|
626
|
-
_: 3
|
627
|
-
}, 8, ["class", "view-class"])), [
|
628
|
-
[vue.vShow, filtering.value]
|
629
|
-
]) : vue.createCommentVNode("v-if", true)
|
630
|
-
]),
|
631
|
-
_: 3
|
632
|
-
}, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"]);
|
633
|
-
};
|
634
|
-
}
|
635
|
-
});
|
636
|
-
var Cascader = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "cascader.vue"]]);
|
83
|
+
const cascaderEmits = {
|
84
|
+
[event.UPDATE_MODEL_EVENT]: (_) => true,
|
85
|
+
[event.CHANGE_EVENT]: (_) => true,
|
86
|
+
focus: (evt) => evt instanceof FocusEvent,
|
87
|
+
blur: (evt) => evt instanceof FocusEvent,
|
88
|
+
clear: () => true,
|
89
|
+
visibleChange: (val) => types.isBoolean(val),
|
90
|
+
expandChange: (val) => !!val,
|
91
|
+
removeTag: (val) => !!val
|
92
|
+
};
|
637
93
|
|
638
|
-
exports
|
94
|
+
exports.cascaderEmits = cascaderEmits;
|
95
|
+
exports.cascaderProps = cascaderProps;
|
639
96
|
//# sourceMappingURL=cascader2.js.map
|