@element-plus/nightly 0.0.20240601 → 0.0.20240603
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.css +1 -1
- package/dist/index.full.js +4 -4
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +4 -4
- 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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +26 -117
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +117 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/index.mjs +9 -9
- package/es/components/input/src/input2.mjs +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +60 -9
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +9 -60
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +38 -18
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +18 -38
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +29 -45
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +45 -29
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +11 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -11
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.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/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +94 -242
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +242 -94
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +70 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -70
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +36 -39
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +39 -36
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -72
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +72 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +29 -94
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +94 -29
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +38 -24
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +24 -38
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +31 -170
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +170 -31
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +1 -1
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +9 -9
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -117
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +117 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/index.js +9 -9
- package/lib/components/input/src/input2.js +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +60 -9
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +9 -60
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +38 -19
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +19 -38
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/row/index.js +2 -2
- package/lib/components/row/src/row.js +31 -45
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +45 -31
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +11 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -11
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.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/index.js +2 -2
- package/lib/components/slider/src/slider.js +95 -242
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +242 -95
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +70 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -70
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +37 -39
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +39 -37
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -72
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +72 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +30 -94
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +94 -30
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +38 -24
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +24 -38
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +35 -170
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +170 -35
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +1 -1
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +9 -9
- 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/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/table.scss +0 -1
- package/web-types.json +1 -1
|
@@ -1,33 +1,98 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot, createBlock, withModifiers, withCtx, createVNode, createCommentVNode, Transition } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import { Close } from '@element-plus/icons-vue';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import '../../form/index.mjs';
|
|
6
|
+
import { tagProps, tagEmits } from './tag.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
5
10
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
type: String,
|
|
9
|
-
values: ["primary", "success", "info", "warning", "danger"],
|
|
10
|
-
default: "primary"
|
|
11
|
-
},
|
|
12
|
-
closable: Boolean,
|
|
13
|
-
disableTransitions: Boolean,
|
|
14
|
-
hit: Boolean,
|
|
15
|
-
color: String,
|
|
16
|
-
size: {
|
|
17
|
-
type: String,
|
|
18
|
-
values: componentSizes
|
|
19
|
-
},
|
|
20
|
-
effect: {
|
|
21
|
-
type: String,
|
|
22
|
-
values: ["dark", "light", "plain"],
|
|
23
|
-
default: "light"
|
|
24
|
-
},
|
|
25
|
-
round: Boolean
|
|
11
|
+
const __default__ = defineComponent({
|
|
12
|
+
name: "ElTag"
|
|
26
13
|
});
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: tagProps,
|
|
17
|
+
emits: tagEmits,
|
|
18
|
+
setup(__props, { emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const tagSize = useFormSize();
|
|
21
|
+
const ns = useNamespace("tag");
|
|
22
|
+
const containerKls = computed(() => {
|
|
23
|
+
const { type, hit, effect, closable, round } = props;
|
|
24
|
+
return [
|
|
25
|
+
ns.b(),
|
|
26
|
+
ns.is("closable", closable),
|
|
27
|
+
ns.m(type || "primary"),
|
|
28
|
+
ns.m(tagSize.value),
|
|
29
|
+
ns.m(effect),
|
|
30
|
+
ns.is("hit", hit),
|
|
31
|
+
ns.is("round", round)
|
|
32
|
+
];
|
|
33
|
+
});
|
|
34
|
+
const handleClose = (event) => {
|
|
35
|
+
emit("close", event);
|
|
36
|
+
};
|
|
37
|
+
const handleClick = (event) => {
|
|
38
|
+
emit("click", event);
|
|
39
|
+
};
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return _ctx.disableTransitions ? (openBlock(), createElementBlock("span", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: normalizeClass(unref(containerKls)),
|
|
44
|
+
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
45
|
+
onClick: handleClick
|
|
46
|
+
}, [
|
|
47
|
+
createElementVNode("span", {
|
|
48
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
49
|
+
}, [
|
|
50
|
+
renderSlot(_ctx.$slots, "default")
|
|
51
|
+
], 2),
|
|
52
|
+
_ctx.closable ? (openBlock(), createBlock(unref(ElIcon), {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: normalizeClass(unref(ns).e("close")),
|
|
55
|
+
onClick: withModifiers(handleClose, ["stop"])
|
|
56
|
+
}, {
|
|
57
|
+
default: withCtx(() => [
|
|
58
|
+
createVNode(unref(Close))
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
62
|
+
], 6)) : (openBlock(), createBlock(Transition, {
|
|
63
|
+
key: 1,
|
|
64
|
+
name: `${unref(ns).namespace.value}-zoom-in-center`,
|
|
65
|
+
appear: ""
|
|
66
|
+
}, {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createElementVNode("span", {
|
|
69
|
+
class: normalizeClass(unref(containerKls)),
|
|
70
|
+
style: normalizeStyle({ backgroundColor: _ctx.color }),
|
|
71
|
+
onClick: handleClick
|
|
72
|
+
}, [
|
|
73
|
+
createElementVNode("span", {
|
|
74
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
75
|
+
}, [
|
|
76
|
+
renderSlot(_ctx.$slots, "default")
|
|
77
|
+
], 2),
|
|
78
|
+
_ctx.closable ? (openBlock(), createBlock(unref(ElIcon), {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: normalizeClass(unref(ns).e("close")),
|
|
81
|
+
onClick: withModifiers(handleClose, ["stop"])
|
|
82
|
+
}, {
|
|
83
|
+
default: withCtx(() => [
|
|
84
|
+
createVNode(unref(Close))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
|
|
88
|
+
], 6)
|
|
89
|
+
]),
|
|
90
|
+
_: 3
|
|
91
|
+
}, 8, ["name"]));
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
var Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tag.vue"]]);
|
|
31
96
|
|
|
32
|
-
export {
|
|
97
|
+
export { Tag as default };
|
|
33
98
|
//# sourceMappingURL=tag2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag2.mjs","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag2.mjs","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":[],"mappings":";;;;;;;;;;mCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,UAAU,WAAY,EAAA,CAAA;AAC5B,IAAM,MAAA,EAAA,GAAK,aAAa,KAAK,CAAA,CAAA;AAC7B,IAAM,MAAA,YAAA,GAAe,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Text from './src/
|
|
3
|
-
export { textProps } from './src/
|
|
2
|
+
import Text from './src/text.mjs';
|
|
3
|
+
export { textProps } from './src/text2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElText = withInstall(Text);
|
|
@@ -1,30 +1,44 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import '../../form/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
+
import { textProps } from './text2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { isUndefined } from '../../../utils/types.mjs';
|
|
5
10
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
const __default__ = defineComponent({
|
|
12
|
+
name: "ElText"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: textProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const textSize = useFormSize();
|
|
20
|
+
const ns = useNamespace("text");
|
|
21
|
+
const textKls = computed(() => [
|
|
22
|
+
ns.b(),
|
|
23
|
+
ns.m(props.type),
|
|
24
|
+
ns.m(textSize.value),
|
|
25
|
+
ns.is("truncated", props.truncated),
|
|
26
|
+
ns.is("line-clamp", !isUndefined(props.lineClamp))
|
|
27
|
+
]);
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
30
|
+
class: normalizeClass(unref(textKls)),
|
|
31
|
+
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
|
32
|
+
}, {
|
|
33
|
+
default: withCtx(() => [
|
|
34
|
+
renderSlot(_ctx.$slots, "default")
|
|
35
|
+
]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 8, ["class", "style"]);
|
|
38
|
+
};
|
|
26
39
|
}
|
|
27
40
|
});
|
|
41
|
+
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
|
28
42
|
|
|
29
|
-
export {
|
|
43
|
+
export { Text as default };
|
|
30
44
|
//# sourceMappingURL=text.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.
|
|
1
|
+
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAA,CAAG,CAAE,CAAA,QAAA,CAAS,KAAK,CAAA;AAAA,MACnB,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,GAAG,EAAG,CAAA,YAAA,EAAc,CAAC,WAAY,CAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAAA,KAClD,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,44 +1,30 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
|
-
import '../../form/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { isUndefined } from '../../../utils/types.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
|
10
5
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
|
32
|
-
}, {
|
|
33
|
-
default: withCtx(() => [
|
|
34
|
-
renderSlot(_ctx.$slots, "default")
|
|
35
|
-
]),
|
|
36
|
-
_: 3
|
|
37
|
-
}, 8, ["class", "style"]);
|
|
38
|
-
};
|
|
6
|
+
const textProps = buildProps({
|
|
7
|
+
type: {
|
|
8
|
+
type: String,
|
|
9
|
+
values: ["primary", "success", "info", "warning", "danger", ""],
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
type: String,
|
|
14
|
+
values: componentSizes,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
truncated: {
|
|
18
|
+
type: Boolean
|
|
19
|
+
},
|
|
20
|
+
lineClamp: {
|
|
21
|
+
type: [String, Number]
|
|
22
|
+
},
|
|
23
|
+
tag: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "span"
|
|
39
26
|
}
|
|
40
27
|
});
|
|
41
|
-
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
|
42
28
|
|
|
43
|
-
export {
|
|
29
|
+
export { textProps };
|
|
44
30
|
//# sourceMappingURL=text2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.
|
|
1
|
+
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: {\n type: Boolean,\n },\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Tooltip from './src/
|
|
3
|
-
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './src/
|
|
2
|
+
import Tooltip from './src/tooltip2.mjs';
|
|
3
|
+
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './src/tooltip.mjs';
|
|
4
4
|
export { useTooltipTriggerProps } from './src/trigger.mjs';
|
|
5
5
|
export { useTooltipContentProps } from './src/content.mjs';
|
|
6
6
|
export { TOOLTIP_INJECTION_KEY } from './src/constants.mjs';
|
|
@@ -1,177 +1,38 @@
|
|
|
1
|
-
import { defineComponent, ref, unref, toRef, computed, provide, readonly, watch, onDeactivated, openBlock, createBlock, withCtx, createVNode, renderSlot, createCommentVNode, createElementBlock, toDisplayString } from 'vue';
|
|
2
|
-
import { ElPopper } from '../../popper/index.mjs';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
2
|
import '../../../hooks/index.mjs';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useDelayedToggle } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
13
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
|
14
|
-
import ElPopperArrow from '../../popper/src/arrow2.mjs';
|
|
3
|
+
import '../../popper/index.mjs';
|
|
4
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
5
|
+
import { useTooltipTriggerProps } from './trigger.mjs';
|
|
6
|
+
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
|
7
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
8
|
+
import { popperProps } from '../../popper/src/popper.mjs';
|
|
9
|
+
import { popperArrowProps } from '../../popper/src/arrow.mjs';
|
|
15
10
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
const
|
|
22
|
-
...
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const contentRef = ref();
|
|
31
|
-
const updatePopper = () => {
|
|
32
|
-
var _a;
|
|
33
|
-
const popperComponent = unref(popperRef);
|
|
34
|
-
if (popperComponent) {
|
|
35
|
-
(_a = popperComponent.popperInstanceRef) == null ? void 0 : _a.update();
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const open = ref(false);
|
|
39
|
-
const toggleReason = ref();
|
|
40
|
-
const { show, hide, hasUpdateHandler } = useTooltipModelToggle({
|
|
41
|
-
indicator: open,
|
|
42
|
-
toggleReason
|
|
43
|
-
});
|
|
44
|
-
const { onOpen, onClose } = useDelayedToggle({
|
|
45
|
-
showAfter: toRef(props, "showAfter"),
|
|
46
|
-
hideAfter: toRef(props, "hideAfter"),
|
|
47
|
-
autoClose: toRef(props, "autoClose"),
|
|
48
|
-
open: show,
|
|
49
|
-
close: hide
|
|
50
|
-
});
|
|
51
|
-
const controlled = computed(() => isBoolean(props.visible) && !hasUpdateHandler.value);
|
|
52
|
-
provide(TOOLTIP_INJECTION_KEY, {
|
|
53
|
-
controlled,
|
|
54
|
-
id,
|
|
55
|
-
open: readonly(open),
|
|
56
|
-
trigger: toRef(props, "trigger"),
|
|
57
|
-
onOpen: (event) => {
|
|
58
|
-
onOpen(event);
|
|
59
|
-
},
|
|
60
|
-
onClose: (event) => {
|
|
61
|
-
onClose(event);
|
|
62
|
-
},
|
|
63
|
-
onToggle: (event) => {
|
|
64
|
-
if (unref(open)) {
|
|
65
|
-
onClose(event);
|
|
66
|
-
} else {
|
|
67
|
-
onOpen(event);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
onShow: () => {
|
|
71
|
-
emit("show", toggleReason.value);
|
|
72
|
-
},
|
|
73
|
-
onHide: () => {
|
|
74
|
-
emit("hide", toggleReason.value);
|
|
75
|
-
},
|
|
76
|
-
onBeforeShow: () => {
|
|
77
|
-
emit("before-show", toggleReason.value);
|
|
78
|
-
},
|
|
79
|
-
onBeforeHide: () => {
|
|
80
|
-
emit("before-hide", toggleReason.value);
|
|
81
|
-
},
|
|
82
|
-
updatePopper
|
|
83
|
-
});
|
|
84
|
-
watch(() => props.disabled, (disabled) => {
|
|
85
|
-
if (disabled && open.value) {
|
|
86
|
-
open.value = false;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
const isFocusInsideContent = (event) => {
|
|
90
|
-
var _a, _b;
|
|
91
|
-
const popperContent = (_b = (_a = contentRef.value) == null ? void 0 : _a.contentRef) == null ? void 0 : _b.popperContentRef;
|
|
92
|
-
const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement;
|
|
93
|
-
return popperContent && popperContent.contains(activeElement);
|
|
94
|
-
};
|
|
95
|
-
onDeactivated(() => open.value && hide());
|
|
96
|
-
expose({
|
|
97
|
-
popperRef,
|
|
98
|
-
contentRef,
|
|
99
|
-
isFocusInsideContent,
|
|
100
|
-
updatePopper,
|
|
101
|
-
onOpen,
|
|
102
|
-
onClose,
|
|
103
|
-
hide
|
|
104
|
-
});
|
|
105
|
-
return (_ctx, _cache) => {
|
|
106
|
-
return openBlock(), createBlock(unref(ElPopper), {
|
|
107
|
-
ref_key: "popperRef",
|
|
108
|
-
ref: popperRef,
|
|
109
|
-
role: _ctx.role
|
|
110
|
-
}, {
|
|
111
|
-
default: withCtx(() => [
|
|
112
|
-
createVNode(ElTooltipTrigger, {
|
|
113
|
-
disabled: _ctx.disabled,
|
|
114
|
-
trigger: _ctx.trigger,
|
|
115
|
-
"trigger-keys": _ctx.triggerKeys,
|
|
116
|
-
"virtual-ref": _ctx.virtualRef,
|
|
117
|
-
"virtual-triggering": _ctx.virtualTriggering
|
|
118
|
-
}, {
|
|
119
|
-
default: withCtx(() => [
|
|
120
|
-
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
|
|
121
|
-
]),
|
|
122
|
-
_: 3
|
|
123
|
-
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
|
|
124
|
-
createVNode(ElTooltipContent, {
|
|
125
|
-
ref_key: "contentRef",
|
|
126
|
-
ref: contentRef,
|
|
127
|
-
"aria-label": _ctx.ariaLabel,
|
|
128
|
-
"boundaries-padding": _ctx.boundariesPadding,
|
|
129
|
-
content: _ctx.content,
|
|
130
|
-
disabled: _ctx.disabled,
|
|
131
|
-
effect: _ctx.effect,
|
|
132
|
-
enterable: _ctx.enterable,
|
|
133
|
-
"fallback-placements": _ctx.fallbackPlacements,
|
|
134
|
-
"hide-after": _ctx.hideAfter,
|
|
135
|
-
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
136
|
-
offset: _ctx.offset,
|
|
137
|
-
persistent: _ctx.persistent,
|
|
138
|
-
"popper-class": _ctx.popperClass,
|
|
139
|
-
"popper-style": _ctx.popperStyle,
|
|
140
|
-
placement: _ctx.placement,
|
|
141
|
-
"popper-options": _ctx.popperOptions,
|
|
142
|
-
pure: _ctx.pure,
|
|
143
|
-
"raw-content": _ctx.rawContent,
|
|
144
|
-
"reference-el": _ctx.referenceEl,
|
|
145
|
-
"trigger-target-el": _ctx.triggerTargetEl,
|
|
146
|
-
"show-after": _ctx.showAfter,
|
|
147
|
-
strategy: _ctx.strategy,
|
|
148
|
-
teleported: _ctx.teleported,
|
|
149
|
-
transition: _ctx.transition,
|
|
150
|
-
"virtual-triggering": _ctx.virtualTriggering,
|
|
151
|
-
"z-index": _ctx.zIndex,
|
|
152
|
-
"append-to": _ctx.appendTo
|
|
153
|
-
}, {
|
|
154
|
-
default: withCtx(() => [
|
|
155
|
-
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
156
|
-
_ctx.rawContent ? (openBlock(), createElementBlock("span", {
|
|
157
|
-
key: 0,
|
|
158
|
-
innerHTML: _ctx.content
|
|
159
|
-
}, null, 8, _hoisted_1)) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.content), 1))
|
|
160
|
-
]),
|
|
161
|
-
_ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), {
|
|
162
|
-
key: 0,
|
|
163
|
-
"arrow-offset": _ctx.arrowOffset
|
|
164
|
-
}, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
|
|
165
|
-
]),
|
|
166
|
-
_: 3
|
|
167
|
-
}, 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"])
|
|
168
|
-
]),
|
|
169
|
-
_: 3
|
|
170
|
-
}, 8, ["role"]);
|
|
171
|
-
};
|
|
11
|
+
const {
|
|
12
|
+
useModelToggleProps: useTooltipModelToggleProps,
|
|
13
|
+
useModelToggleEmits: useTooltipModelToggleEmits,
|
|
14
|
+
useModelToggle: useTooltipModelToggle
|
|
15
|
+
} = createModelToggleComposable("visible");
|
|
16
|
+
const useTooltipProps = buildProps({
|
|
17
|
+
...popperProps,
|
|
18
|
+
...useTooltipModelToggleProps,
|
|
19
|
+
...useTooltipContentProps,
|
|
20
|
+
...useTooltipTriggerProps,
|
|
21
|
+
...popperArrowProps,
|
|
22
|
+
showArrow: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
172
25
|
}
|
|
173
26
|
});
|
|
174
|
-
|
|
27
|
+
const tooltipEmits = [
|
|
28
|
+
...useTooltipModelToggleEmits,
|
|
29
|
+
"before-show",
|
|
30
|
+
"before-hide",
|
|
31
|
+
"show",
|
|
32
|
+
"hide",
|
|
33
|
+
"open",
|
|
34
|
+
"close"
|
|
35
|
+
];
|
|
175
36
|
|
|
176
|
-
export {
|
|
37
|
+
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps };
|
|
177
38
|
//# sourceMappingURL=tooltip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.mjs","sources":["../../../../../../packages/components/tooltip/src/tooltip.
|
|
1
|
+
{"version":3,"file":"tooltip.mjs","sources":["../../../../../../packages/components/tooltip/src/tooltip.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\nimport type Tooltip from './tooltip.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n]\n\nexport type ElTooltipProps = ExtractPropTypes<typeof useTooltipProps>\n\nexport type TooltipInstance = InstanceType<typeof Tooltip>\n"],"names":[],"mappings":";;;;;;;;;;AAKY,MAAC;AACb,EAAE,mBAAmB,EAAE,0BAA0B;AACjD,EAAE,mBAAmB,EAAE,0BAA0B;AACjD,EAAE,cAAc,EAAE,qBAAqB;AACvC,CAAC,GAAG,2BAA2B,CAAC,SAAS,EAAE;AAC/B,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,0BAA0B;AAC/B,EAAE,GAAG,sBAAsB;AAC3B,EAAE,GAAG,sBAAsB;AAC3B,EAAE,GAAG,gBAAgB;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,GAAG,0BAA0B;AAC/B,EAAE,aAAa;AACf,EAAE,aAAa;AACf,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,OAAO;AACT;;;;"}
|