@element-plus/nightly 0.0.20240708 → 0.0.20240709
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/dist/index.full.js +16 -7
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +16 -8
- 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/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/cascader/src/cascader.mjs +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/config-provider/index.d.ts +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +1 -1
- package/es/components/config-provider/src/hooks/use-global-config.mjs +5 -0
- package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +339 -61
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +61 -339
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +35 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -35
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +77 -39
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +39 -77
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +73 -34
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +34 -73
- package/es/components/radio/src/radio2.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/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/slider/src/button.mjs +93 -21
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +21 -93
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +94 -29
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +29 -94
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +170 -31
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +31 -170
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select-option.mjs +6 -1
- package/es/components/tree-select/src/tree-select-option.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +2 -1
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/hooks/index.mjs +1 -1
- package/es/hooks/use-empty-values/index.d.ts +5 -2
- package/es/hooks/use-empty-values/index.mjs +4 -8
- package/es/hooks/use-empty-values/index.mjs.map +1 -1
- package/es/index.mjs +7 -7
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/config-provider/index.d.ts +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +1 -1
- package/lib/components/config-provider/src/hooks/use-global-config.js +5 -0
- package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +337 -60
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +60 -337
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +35 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -35
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +77 -40
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +40 -77
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.js +73 -36
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +36 -73
- package/lib/components/radio/src/radio2.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/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/slider/src/button.js +93 -22
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +22 -93
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +94 -30
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +30 -94
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +170 -35
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +35 -170
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tree-select/src/tree-select-option.js +5 -0
- package/lib/components/tree-select/src/tree-select-option.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +2 -1
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-empty-values/index.d.ts +5 -2
- package/lib/hooks/use-empty-values/index.js +3 -6
- package/lib/hooks/use-empty-values/index.js.map +1 -1
- package/lib/index.js +7 -6
- package/lib/index.js.map +1 -1
- 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/web-types.json +1 -1
|
@@ -2,37 +2,101 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
9
|
+
require('../../form/index.js');
|
|
10
|
+
var tag = require('./tag2.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
13
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
9
14
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
type: String,
|
|
13
|
-
values: ["primary", "success", "info", "warning", "danger"],
|
|
14
|
-
default: "primary"
|
|
15
|
-
},
|
|
16
|
-
closable: Boolean,
|
|
17
|
-
disableTransitions: Boolean,
|
|
18
|
-
hit: Boolean,
|
|
19
|
-
color: String,
|
|
20
|
-
size: {
|
|
21
|
-
type: String,
|
|
22
|
-
values: size.componentSizes
|
|
23
|
-
},
|
|
24
|
-
effect: {
|
|
25
|
-
type: String,
|
|
26
|
-
values: ["dark", "light", "plain"],
|
|
27
|
-
default: "light"
|
|
28
|
-
},
|
|
29
|
-
round: Boolean
|
|
15
|
+
const __default__ = vue.defineComponent({
|
|
16
|
+
name: "ElTag"
|
|
30
17
|
});
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: tag.tagProps,
|
|
21
|
+
emits: tag.tagEmits,
|
|
22
|
+
setup(__props, { emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const tagSize = useFormCommonProps.useFormSize();
|
|
25
|
+
const ns = index.useNamespace("tag");
|
|
26
|
+
const containerKls = vue.computed(() => {
|
|
27
|
+
const { type, hit, effect, closable, round } = props;
|
|
28
|
+
return [
|
|
29
|
+
ns.b(),
|
|
30
|
+
ns.is("closable", closable),
|
|
31
|
+
ns.m(type || "primary"),
|
|
32
|
+
ns.m(tagSize.value),
|
|
33
|
+
ns.m(effect),
|
|
34
|
+
ns.is("hit", hit),
|
|
35
|
+
ns.is("round", round)
|
|
36
|
+
];
|
|
37
|
+
});
|
|
38
|
+
const handleClose = (event) => {
|
|
39
|
+
emit("close", event);
|
|
40
|
+
};
|
|
41
|
+
const handleClick = (event) => {
|
|
42
|
+
emit("click", event);
|
|
43
|
+
};
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
48
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
49
|
+
onClick: handleClick
|
|
50
|
+
}, [
|
|
51
|
+
vue.createElementVNode("span", {
|
|
52
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
53
|
+
}, [
|
|
54
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
55
|
+
], 2),
|
|
56
|
+
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
59
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
60
|
+
}, {
|
|
61
|
+
default: vue.withCtx(() => [
|
|
62
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
66
|
+
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
67
|
+
key: 1,
|
|
68
|
+
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
|
69
|
+
appear: ""
|
|
70
|
+
}, {
|
|
71
|
+
default: vue.withCtx(() => [
|
|
72
|
+
vue.createElementVNode("span", {
|
|
73
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
74
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
75
|
+
onClick: handleClick
|
|
76
|
+
}, [
|
|
77
|
+
vue.createElementVNode("span", {
|
|
78
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
79
|
+
}, [
|
|
80
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
81
|
+
], 2),
|
|
82
|
+
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
85
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
86
|
+
}, {
|
|
87
|
+
default: vue.withCtx(() => [
|
|
88
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
92
|
+
], 6)
|
|
93
|
+
]),
|
|
94
|
+
_: 3
|
|
95
|
+
}, 8, ["name"]));
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
|
35
100
|
|
|
36
|
-
exports
|
|
37
|
-
exports.tagProps = tagProps;
|
|
101
|
+
exports["default"] = Tag;
|
|
38
102
|
//# sourceMappingURL=tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.vue"],"sourcesContent":["<template>\n <span\n v-if=\"disableTransitions\"\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <el-icon v-if=\"closable\" :class=\"ns.e('close')\" @click.stop=\"handleClose\">\n <Close />\n </el-icon>\n </span>\n <transition v-else :name=\"`${ns.namespace.value}-zoom-in-center`\" appear>\n <span\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <el-icon v-if=\"closable\" :class=\"ns.e('close')\" @click.stop=\"handleClose\">\n <Close />\n </el-icon>\n </span>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { Close } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\n\nimport { tagEmits, tagProps } from './tag'\n\ndefineOptions({\n name: 'ElTag',\n})\nconst props = defineProps(tagProps)\nconst emit = defineEmits(tagEmits)\n\nconst tagSize = useFormSize()\nconst ns = useNamespace('tag')\nconst containerKls = computed(() => {\n const { type, hit, effect, closable, round } = props\n return [\n ns.b(),\n ns.is('closable', closable),\n ns.m(type || 'primary'),\n ns.m(tagSize.value),\n ns.m(effect),\n ns.is('hit', hit),\n ns.is('round', round),\n ]\n})\n\n// methods\nconst handleClose = (event: MouseEvent) => {\n emit('close', event)\n}\n\nconst handleClick = (event: MouseEvent) => {\n emit('click', event)\n}\n</script>\n"],"names":["useFormSize","useNamespace","computed"],"mappings":";;;;;;;;;;;;;;uCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,UAAUA,8BAAY,EAAA,CAAA;AAC5B,IAAM,MAAA,EAAA,GAAKC,mBAAa,KAAK,CAAA,CAAA;AAC7B,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,EAAE,IAAA,EAAM,GAAK,EAAA,MAAA,EAAQ,UAAU,KAAU,EAAA,GAAA,KAAA,CAAA;AAC/C,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,EAAG,CAAA,UAAA,EAAY,QAAQ,CAAA;AAAA,QAC1B,EAAA,CAAG,CAAE,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,QACtB,EAAA,CAAG,CAAE,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,QAClB,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,QACX,EAAA,CAAG,EAAG,CAAA,KAAA,EAAO,GAAG,CAAA;AAAA,QAChB,EAAA,CAAG,EAAG,CAAA,OAAA,EAAS,KAAK,CAAA;AAAA,OACtB,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,101 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
require('../../../
|
|
9
|
-
require('../../form/index.js');
|
|
10
|
-
var tag = require('./tag.js');
|
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
13
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
require('../../../constants/index.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
+
var size = require('../../../constants/size.js');
|
|
14
9
|
|
|
15
|
-
const
|
|
16
|
-
|
|
10
|
+
const tagProps = runtime.buildProps({
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
|
14
|
+
default: "primary"
|
|
15
|
+
},
|
|
16
|
+
closable: Boolean,
|
|
17
|
+
disableTransitions: Boolean,
|
|
18
|
+
hit: Boolean,
|
|
19
|
+
color: String,
|
|
20
|
+
size: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: size.componentSizes
|
|
23
|
+
},
|
|
24
|
+
effect: {
|
|
25
|
+
type: String,
|
|
26
|
+
values: ["dark", "light", "plain"],
|
|
27
|
+
default: "light"
|
|
28
|
+
},
|
|
29
|
+
round: Boolean
|
|
17
30
|
});
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
setup(__props, { emit }) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const tagSize = useFormCommonProps.useFormSize();
|
|
25
|
-
const ns = index.useNamespace("tag");
|
|
26
|
-
const containerKls = vue.computed(() => {
|
|
27
|
-
const { type, hit, effect, closable, round } = props;
|
|
28
|
-
return [
|
|
29
|
-
ns.b(),
|
|
30
|
-
ns.is("closable", closable),
|
|
31
|
-
ns.m(type || "primary"),
|
|
32
|
-
ns.m(tagSize.value),
|
|
33
|
-
ns.m(effect),
|
|
34
|
-
ns.is("hit", hit),
|
|
35
|
-
ns.is("round", round)
|
|
36
|
-
];
|
|
37
|
-
});
|
|
38
|
-
const handleClose = (event) => {
|
|
39
|
-
emit("close", event);
|
|
40
|
-
};
|
|
41
|
-
const handleClick = (event) => {
|
|
42
|
-
emit("click", event);
|
|
43
|
-
};
|
|
44
|
-
return (_ctx, _cache) => {
|
|
45
|
-
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
48
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
49
|
-
onClick: handleClick
|
|
50
|
-
}, [
|
|
51
|
-
vue.createElementVNode("span", {
|
|
52
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
53
|
-
}, [
|
|
54
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
55
|
-
], 2),
|
|
56
|
-
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
57
|
-
key: 0,
|
|
58
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
59
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
60
|
-
}, {
|
|
61
|
-
default: vue.withCtx(() => [
|
|
62
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
66
|
-
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
67
|
-
key: 1,
|
|
68
|
-
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
|
69
|
-
appear: ""
|
|
70
|
-
}, {
|
|
71
|
-
default: vue.withCtx(() => [
|
|
72
|
-
vue.createElementVNode("span", {
|
|
73
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
74
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
75
|
-
onClick: handleClick
|
|
76
|
-
}, [
|
|
77
|
-
vue.createElementVNode("span", {
|
|
78
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
79
|
-
}, [
|
|
80
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
81
|
-
], 2),
|
|
82
|
-
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
85
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
86
|
-
}, {
|
|
87
|
-
default: vue.withCtx(() => [
|
|
88
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
92
|
-
], 6)
|
|
93
|
-
]),
|
|
94
|
-
_: 3
|
|
95
|
-
}, 8, ["name"]));
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
|
31
|
+
const tagEmits = {
|
|
32
|
+
close: (evt) => evt instanceof MouseEvent,
|
|
33
|
+
click: (evt) => evt instanceof MouseEvent
|
|
34
|
+
};
|
|
100
35
|
|
|
101
|
-
exports
|
|
36
|
+
exports.tagEmits = tagEmits;
|
|
37
|
+
exports.tagProps = tagProps;
|
|
102
38
|
//# sourceMappingURL=tag2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type Tag from './tag.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: String,\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\nexport type TagProps = ExtractPropTypes<typeof tagProps>\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType<typeof Tag>\n"],"names":["buildProps","componentSizes"],"mappings":";;;;;;;;;AAEY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,kBAAkB,EAAE,OAAO;AAC7B,EAAE,GAAG,EAAE,OAAO;AACd,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;AACtC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,CAAC,EAAE;AACS,MAAC,QAAQ,GAAG;AACxB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var tooltip$1 = require('./src/
|
|
7
|
-
var tooltip = require('./src/
|
|
6
|
+
var tooltip$1 = require('./src/tooltip.js');
|
|
7
|
+
var tooltip = require('./src/tooltip2.js');
|
|
8
8
|
var trigger = require('./src/trigger.js');
|
|
9
9
|
var content = require('./src/content.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
@@ -2,45 +2,180 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$3 = require('../../popper/index.js');
|
|
5
7
|
require('../../../utils/index.js');
|
|
6
8
|
require('../../../hooks/index.js');
|
|
7
|
-
require('
|
|
8
|
-
var
|
|
9
|
-
var trigger = require('./
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
9
|
+
var constants = require('./constants.js');
|
|
10
|
+
var tooltip = require('./tooltip2.js');
|
|
11
|
+
var trigger = require('./trigger2.js');
|
|
12
|
+
var content = require('./content2.js');
|
|
13
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
+
var index = require('../../../hooks/use-popper-container/index.js');
|
|
15
|
+
var index$1 = require('../../../hooks/use-id/index.js');
|
|
16
|
+
var index$2 = require('../../../hooks/use-delayed-toggle/index.js');
|
|
17
|
+
var types = require('../../../utils/types.js');
|
|
18
|
+
var arrow = require('../../popper/src/arrow2.js');
|
|
14
19
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
const
|
|
21
|
-
...
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
const _hoisted_1 = ["innerHTML"];
|
|
21
|
+
const _hoisted_2 = { key: 1 };
|
|
22
|
+
const __default__ = vue.defineComponent({
|
|
23
|
+
name: "ElTooltip"
|
|
24
|
+
});
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
26
|
+
...__default__,
|
|
27
|
+
props: tooltip.useTooltipProps,
|
|
28
|
+
emits: tooltip.tooltipEmits,
|
|
29
|
+
setup(__props, { expose, emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
index.usePopperContainer();
|
|
32
|
+
const id = index$1.useId();
|
|
33
|
+
const popperRef = vue.ref();
|
|
34
|
+
const contentRef = vue.ref();
|
|
35
|
+
const updatePopper = () => {
|
|
36
|
+
var _a;
|
|
37
|
+
const popperComponent = vue.unref(popperRef);
|
|
38
|
+
if (popperComponent) {
|
|
39
|
+
(_a = popperComponent.popperInstanceRef) == null ? void 0 : _a.update();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const open = vue.ref(false);
|
|
43
|
+
const toggleReason = vue.ref();
|
|
44
|
+
const { show, hide, hasUpdateHandler } = tooltip.useTooltipModelToggle({
|
|
45
|
+
indicator: open,
|
|
46
|
+
toggleReason
|
|
47
|
+
});
|
|
48
|
+
const { onOpen, onClose } = index$2.useDelayedToggle({
|
|
49
|
+
showAfter: vue.toRef(props, "showAfter"),
|
|
50
|
+
hideAfter: vue.toRef(props, "hideAfter"),
|
|
51
|
+
autoClose: vue.toRef(props, "autoClose"),
|
|
52
|
+
open: show,
|
|
53
|
+
close: hide
|
|
54
|
+
});
|
|
55
|
+
const controlled = vue.computed(() => types.isBoolean(props.visible) && !hasUpdateHandler.value);
|
|
56
|
+
vue.provide(constants.TOOLTIP_INJECTION_KEY, {
|
|
57
|
+
controlled,
|
|
58
|
+
id,
|
|
59
|
+
open: vue.readonly(open),
|
|
60
|
+
trigger: vue.toRef(props, "trigger"),
|
|
61
|
+
onOpen: (event) => {
|
|
62
|
+
onOpen(event);
|
|
63
|
+
},
|
|
64
|
+
onClose: (event) => {
|
|
65
|
+
onClose(event);
|
|
66
|
+
},
|
|
67
|
+
onToggle: (event) => {
|
|
68
|
+
if (vue.unref(open)) {
|
|
69
|
+
onClose(event);
|
|
70
|
+
} else {
|
|
71
|
+
onOpen(event);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
onShow: () => {
|
|
75
|
+
emit("show", toggleReason.value);
|
|
76
|
+
},
|
|
77
|
+
onHide: () => {
|
|
78
|
+
emit("hide", toggleReason.value);
|
|
79
|
+
},
|
|
80
|
+
onBeforeShow: () => {
|
|
81
|
+
emit("before-show", toggleReason.value);
|
|
82
|
+
},
|
|
83
|
+
onBeforeHide: () => {
|
|
84
|
+
emit("before-hide", toggleReason.value);
|
|
85
|
+
},
|
|
86
|
+
updatePopper
|
|
87
|
+
});
|
|
88
|
+
vue.watch(() => props.disabled, (disabled) => {
|
|
89
|
+
if (disabled && open.value) {
|
|
90
|
+
open.value = false;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const isFocusInsideContent = (event) => {
|
|
94
|
+
var _a, _b;
|
|
95
|
+
const popperContent = (_b = (_a = contentRef.value) == null ? void 0 : _a.contentRef) == null ? void 0 : _b.popperContentRef;
|
|
96
|
+
const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement;
|
|
97
|
+
return popperContent && popperContent.contains(activeElement);
|
|
98
|
+
};
|
|
99
|
+
vue.onDeactivated(() => open.value && hide());
|
|
100
|
+
expose({
|
|
101
|
+
popperRef,
|
|
102
|
+
contentRef,
|
|
103
|
+
isFocusInsideContent,
|
|
104
|
+
updatePopper,
|
|
105
|
+
onOpen,
|
|
106
|
+
onClose,
|
|
107
|
+
hide
|
|
108
|
+
});
|
|
109
|
+
return (_ctx, _cache) => {
|
|
110
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElPopper), {
|
|
111
|
+
ref_key: "popperRef",
|
|
112
|
+
ref: popperRef,
|
|
113
|
+
role: _ctx.role
|
|
114
|
+
}, {
|
|
115
|
+
default: vue.withCtx(() => [
|
|
116
|
+
vue.createVNode(trigger["default"], {
|
|
117
|
+
disabled: _ctx.disabled,
|
|
118
|
+
trigger: _ctx.trigger,
|
|
119
|
+
"trigger-keys": _ctx.triggerKeys,
|
|
120
|
+
"virtual-ref": _ctx.virtualRef,
|
|
121
|
+
"virtual-triggering": _ctx.virtualTriggering
|
|
122
|
+
}, {
|
|
123
|
+
default: vue.withCtx(() => [
|
|
124
|
+
_ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
|
125
|
+
]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
|
|
128
|
+
vue.createVNode(content["default"], {
|
|
129
|
+
ref_key: "contentRef",
|
|
130
|
+
ref: contentRef,
|
|
131
|
+
"aria-label": _ctx.ariaLabel,
|
|
132
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
133
|
+
content: _ctx.content,
|
|
134
|
+
disabled: _ctx.disabled,
|
|
135
|
+
effect: _ctx.effect,
|
|
136
|
+
enterable: _ctx.enterable,
|
|
137
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
138
|
+
"hide-after": _ctx.hideAfter,
|
|
139
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
140
|
+
offset: _ctx.offset,
|
|
141
|
+
persistent: _ctx.persistent,
|
|
142
|
+
"popper-class": _ctx.popperClass,
|
|
143
|
+
"popper-style": _ctx.popperStyle,
|
|
144
|
+
placement: _ctx.placement,
|
|
145
|
+
"popper-options": _ctx.popperOptions,
|
|
146
|
+
pure: _ctx.pure,
|
|
147
|
+
"raw-content": _ctx.rawContent,
|
|
148
|
+
"reference-el": _ctx.referenceEl,
|
|
149
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
150
|
+
"show-after": _ctx.showAfter,
|
|
151
|
+
strategy: _ctx.strategy,
|
|
152
|
+
teleported: _ctx.teleported,
|
|
153
|
+
transition: _ctx.transition,
|
|
154
|
+
"virtual-triggering": _ctx.virtualTriggering,
|
|
155
|
+
"z-index": _ctx.zIndex,
|
|
156
|
+
"append-to": _ctx.appendTo
|
|
157
|
+
}, {
|
|
158
|
+
default: vue.withCtx(() => [
|
|
159
|
+
vue.renderSlot(_ctx.$slots, "content", {}, () => [
|
|
160
|
+
_ctx.rawContent ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
161
|
+
key: 0,
|
|
162
|
+
innerHTML: _ctx.content
|
|
163
|
+
}, null, 8, _hoisted_1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(_ctx.content), 1))
|
|
164
|
+
]),
|
|
165
|
+
_ctx.showArrow ? (vue.openBlock(), vue.createBlock(vue.unref(arrow["default"]), {
|
|
166
|
+
key: 0,
|
|
167
|
+
"arrow-offset": _ctx.arrowOffset
|
|
168
|
+
}, null, 8, ["arrow-offset"])) : vue.createCommentVNode("v-if", true)
|
|
169
|
+
]),
|
|
170
|
+
_: 3
|
|
171
|
+
}, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
|
|
172
|
+
]),
|
|
173
|
+
_: 3
|
|
174
|
+
}, 8, ["role"]);
|
|
175
|
+
};
|
|
29
176
|
}
|
|
30
177
|
});
|
|
31
|
-
|
|
32
|
-
...useTooltipModelToggleEmits,
|
|
33
|
-
"before-show",
|
|
34
|
-
"before-hide",
|
|
35
|
-
"show",
|
|
36
|
-
"hide",
|
|
37
|
-
"open",
|
|
38
|
-
"close"
|
|
39
|
-
];
|
|
178
|
+
var Tooltip = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tooltip.vue"]]);
|
|
40
179
|
|
|
41
|
-
exports
|
|
42
|
-
exports.useTooltipModelToggle = useTooltipModelToggle;
|
|
43
|
-
exports.useTooltipModelToggleEmits = useTooltipModelToggleEmits;
|
|
44
|
-
exports.useTooltipModelToggleProps = useTooltipModelToggleProps;
|
|
45
|
-
exports.useTooltipProps = useTooltipProps;
|
|
180
|
+
exports["default"] = Tooltip;
|
|
46
181
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../../../../packages/components/tooltip/src/tooltip.
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../../../../packages/components/tooltip/src/tooltip.vue"],"sourcesContent":["<template>\n <el-popper ref=\"popperRef\" :role=\"role\">\n <el-tooltip-trigger\n :disabled=\"disabled\"\n :trigger=\"trigger\"\n :trigger-keys=\"triggerKeys\"\n :virtual-ref=\"virtualRef\"\n :virtual-triggering=\"virtualTriggering\"\n >\n <slot v-if=\"$slots.default\" />\n </el-tooltip-trigger>\n <el-tooltip-content\n ref=\"contentRef\"\n :aria-label=\"ariaLabel\"\n :boundaries-padding=\"boundariesPadding\"\n :content=\"content\"\n :disabled=\"disabled\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :fallback-placements=\"fallbackPlacements\"\n :hide-after=\"hideAfter\"\n :gpu-acceleration=\"gpuAcceleration\"\n :offset=\"offset\"\n :persistent=\"persistent\"\n :popper-class=\"popperClass\"\n :popper-style=\"popperStyle\"\n :placement=\"placement\"\n :popper-options=\"popperOptions\"\n :pure=\"pure\"\n :raw-content=\"rawContent\"\n :reference-el=\"referenceEl\"\n :trigger-target-el=\"triggerTargetEl\"\n :show-after=\"showAfter\"\n :strategy=\"strategy\"\n :teleported=\"teleported\"\n :transition=\"transition\"\n :virtual-triggering=\"virtualTriggering\"\n :z-index=\"zIndex\"\n :append-to=\"appendTo\"\n >\n <slot name=\"content\">\n <span v-if=\"rawContent\" v-html=\"content\" />\n <span v-else>{{ content }}</span>\n </slot>\n <el-popper-arrow v-if=\"showArrow\" :arrow-offset=\"arrowOffset\" />\n </el-tooltip-content>\n </el-popper>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onDeactivated,\n provide,\n readonly,\n ref,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport { ElPopper, ElPopperArrow } from '@element-plus/components/popper'\n\nimport { isBoolean } from '@element-plus/utils'\nimport {\n useDelayedToggle,\n useId,\n usePopperContainer,\n} from '@element-plus/hooks'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { tooltipEmits, useTooltipModelToggle, useTooltipProps } from './tooltip'\nimport ElTooltipTrigger from './trigger.vue'\nimport ElTooltipContent from './content.vue'\nimport type { PopperInstance } from '@element-plus/components/popper'\n\ndefineOptions({\n name: 'ElTooltip',\n})\n\nconst props = defineProps(useTooltipProps)\nconst emit = defineEmits(tooltipEmits)\n\nusePopperContainer()\n\nconst id = useId()\nconst popperRef = ref<PopperInstance>()\n// TODO any is temporary, replace with `TooltipContentInstance` later\nconst contentRef = ref<any>()\n\nconst updatePopper = () => {\n const popperComponent = unref(popperRef)\n if (popperComponent) {\n popperComponent.popperInstanceRef?.update()\n }\n}\nconst open = ref(false)\nconst toggleReason = ref<Event>()\n\nconst { show, hide, hasUpdateHandler } = useTooltipModelToggle({\n indicator: open,\n toggleReason,\n})\n\nconst { onOpen, onClose } = useDelayedToggle({\n showAfter: toRef(props, 'showAfter'),\n hideAfter: toRef(props, 'hideAfter'),\n autoClose: toRef(props, 'autoClose'),\n open: show,\n close: hide,\n})\n\nconst controlled = computed(\n () => isBoolean(props.visible) && !hasUpdateHandler.value\n)\n\nprovide(TOOLTIP_INJECTION_KEY, {\n controlled,\n id,\n open: readonly(open),\n trigger: toRef(props, 'trigger'),\n onOpen: (event?: Event) => {\n onOpen(event)\n },\n onClose: (event?: Event) => {\n onClose(event)\n },\n onToggle: (event?: Event) => {\n if (unref(open)) {\n onClose(event)\n } else {\n onOpen(event)\n }\n },\n onShow: () => {\n emit('show', toggleReason.value)\n },\n onHide: () => {\n emit('hide', toggleReason.value)\n },\n onBeforeShow: () => {\n emit('before-show', toggleReason.value)\n },\n onBeforeHide: () => {\n emit('before-hide', toggleReason.value)\n },\n updatePopper,\n})\n\nwatch(\n () => props.disabled,\n (disabled) => {\n if (disabled && open.value) {\n open.value = false\n }\n }\n)\n\nconst isFocusInsideContent = (event?: FocusEvent) => {\n const popperContent: HTMLElement | undefined =\n contentRef.value?.contentRef?.popperContentRef\n const activeElement = (event?.relatedTarget as Node) || document.activeElement\n\n return popperContent && popperContent.contains(activeElement)\n}\n\nonDeactivated(() => open.value && hide())\n\ndefineExpose({\n /**\n * @description el-popper component instance\n */\n popperRef,\n /**\n * @description el-tooltip-content component instance\n */\n contentRef,\n /**\n * @description validate current focus event is trigger inside el-tooltip-content\n */\n isFocusInsideContent,\n /**\n * @description update el-popper component instance\n */\n updatePopper,\n /**\n * @description expose onOpen function to mange el-tooltip open state\n */\n onOpen,\n /**\n * @description expose onOpen function to mange el-tooltip open state\n */\n onClose,\n /**\n * @description expose hide function\n */\n hide,\n})\n</script>\n"],"names":["usePopperContainer","useId","ref","unref","useTooltipModelToggle","useDelayedToggle","toRef","computed","isBoolean","provide","TOOLTIP_INJECTION_KEY","readonly","watch","onDeactivated"],"mappings":"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"}
|