@element-plus/nightly 0.0.20220213 → 0.0.20220217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +413 -424
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +6 -6
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +414 -425
- 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.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/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/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 +134 -0
- package/dist/locale/mg.min.js +2 -0
- package/dist/locale/mg.min.js.map +1 -0
- package/dist/locale/mg.min.mjs +2 -0
- package/dist/locale/mg.min.mjs.map +1 -0
- package/dist/locale/mg.mjs +126 -0
- 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/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.d.ts +19 -0
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/index.mjs.map +1 -1
- package/es/components/affix/src/affix.vue.d.ts +19 -0
- package/es/components/affix/src/affix2.mjs +23 -28
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.d.ts +55 -2
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/index.mjs.map +1 -1
- package/es/components/alert/src/alert.vue.d.ts +55 -2
- package/es/components/alert/src/alert2.mjs +70 -80
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/backtop/index.d.ts +64 -4
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/index.mjs.map +1 -1
- package/es/components/backtop/src/backtop.vue.d.ts +64 -4
- package/es/components/backtop/src/backtop2.mjs +39 -49
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.d.ts +9 -0
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/index.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +17 -8
- package/es/components/badge/src/badge2.mjs +37 -37
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +10 -10
- package/es/components/cascader/src/index.vue.d.ts +5 -5
- package/es/components/dropdown/index.d.ts +5 -5
- package/es/components/dropdown/src/dropdown.vue.d.ts +5 -5
- package/es/components/input/src/input2.mjs +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/menu/index.d.ts +7 -1
- package/es/components/menu/src/menu.d.ts +1 -1
- package/es/components/menu/src/sub-menu.d.ts +4 -0
- package/es/components/menu/src/sub-menu.mjs +5 -1
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/popover/index.d.ts +12 -12
- package/es/components/popover/src/index.vue.d.ts +6 -6
- package/es/components/popper/src/content.vue.d.ts +1 -1
- package/es/components/rate/src/rate2.mjs +2 -2
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/select/index.d.ts +5 -5
- package/es/components/select/src/select.mjs +11 -7
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +5 -5
- package/es/components/select/src/useSelect.d.ts +5 -5
- package/es/components/select-v2/index.d.ts +10 -10
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/select-v2/src/useSelect.d.ts +5 -5
- package/es/components/table/src/filter-panel.vue.d.ts +5 -5
- package/es/components/table/style/css.d.ts +1 -0
- package/es/components/table/style/css.mjs +1 -0
- package/es/components/table/style/css.mjs.map +1 -1
- package/es/components/table/style/index.d.ts +1 -0
- package/es/components/table/style/index.mjs +1 -0
- package/es/components/table/style/index.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +5 -5
- package/es/components/tooltip/index.d.ts +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +5 -5
- package/es/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/es/locale/lang/mg.d.ts +123 -0
- package/es/locale/lang/mg.mjs +125 -0
- package/es/locale/lang/mg.mjs.map +1 -0
- 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.d.ts +19 -0
- package/lib/components/affix/src/affix.vue.d.ts +19 -0
- package/lib/components/affix/src/affix2.js +22 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.d.ts +55 -2
- package/lib/components/alert/src/alert.vue.d.ts +55 -2
- package/lib/components/alert/src/alert2.js +72 -82
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/backtop/index.d.ts +64 -4
- package/lib/components/backtop/src/backtop.vue.d.ts +64 -4
- package/lib/components/backtop/src/backtop2.js +41 -51
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.d.ts +9 -0
- package/lib/components/badge/src/badge.vue.d.ts +17 -8
- package/lib/components/badge/src/badge2.js +36 -36
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +10 -10
- package/lib/components/cascader/src/index.vue.d.ts +5 -5
- package/lib/components/dropdown/index.d.ts +5 -5
- package/lib/components/dropdown/src/dropdown.vue.d.ts +5 -5
- package/lib/components/input/src/input2.js +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/menu/index.d.ts +7 -1
- package/lib/components/menu/src/menu.d.ts +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +4 -0
- package/lib/components/menu/src/sub-menu.js +5 -1
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/popover/index.d.ts +12 -12
- package/lib/components/popover/src/index.vue.d.ts +6 -6
- package/lib/components/popper/src/content.vue.d.ts +1 -1
- package/lib/components/rate/src/rate2.js +2 -2
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/select/index.d.ts +5 -5
- package/lib/components/select/src/select.js +11 -7
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +5 -5
- package/lib/components/select/src/useSelect.d.ts +5 -5
- package/lib/components/select-v2/index.d.ts +10 -10
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/select-v2/src/useSelect.d.ts +5 -5
- package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
- package/lib/components/table/style/css.d.ts +1 -0
- package/lib/components/table/style/css.js +1 -0
- package/lib/components/table/style/css.js.map +1 -1
- package/lib/components/table/style/index.d.ts +1 -0
- package/lib/components/table/style/index.js +1 -0
- package/lib/components/table/style/index.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -5
- package/lib/components/tooltip/index.d.ts +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +5 -5
- package/lib/components/tooltip/src/tooltip.vue.d.ts +2 -2
- package/lib/locale/lang/mg.d.ts +123 -0
- package/lib/locale/lang/mg.js +129 -0
- package/lib/locale/lang/mg.js.map +1 -0
- 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/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +1 -0
- package/theme-chalk/src/input.scss +5 -4
- package/theme-chalk/src/pagination.scss +1 -1
- package/web-types.json +1 -1
|
@@ -3,106 +3,96 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var index = require('../../icon/index.js');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
7
|
require('../../../utils/index.js');
|
|
8
8
|
require('../../../hooks/index.js');
|
|
9
9
|
var alert = require('./alert.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
10
|
var icon = require('../../../utils/vue/icon.js');
|
|
12
|
-
var index
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
12
|
|
|
14
|
-
const
|
|
15
|
-
name: "ElAlert"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
13
|
+
const __default__ = {
|
|
14
|
+
name: "ElAlert"
|
|
15
|
+
};
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
20
18
|
props: alert.alertProps,
|
|
21
19
|
emits: alert.alertEmits,
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
20
|
+
setup(__props, { emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const { Close } = icon.TypeComponents;
|
|
23
|
+
const slots = vue.useSlots();
|
|
24
|
+
const ns = index.useNamespace("alert");
|
|
24
25
|
const visible = vue.ref(true);
|
|
25
26
|
const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type] || icon.TypeComponentsMap["info"]);
|
|
26
|
-
const isBigIcon = vue.computed(() => props.description ||
|
|
27
|
-
const isBoldTitle = vue.computed(() => props.description ||
|
|
27
|
+
const isBigIcon = vue.computed(() => props.description || { [ns.is("big")]: slots.default });
|
|
28
|
+
const isBoldTitle = vue.computed(() => props.description || { [ns.is("bold")]: slots.default });
|
|
28
29
|
const close = (evt) => {
|
|
29
30
|
visible.value = false;
|
|
30
31
|
emit("close", evt);
|
|
31
32
|
};
|
|
32
|
-
return {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
43
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
44
|
-
const _component_close = vue.resolveComponent("close");
|
|
45
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
46
|
-
name: _ctx.ns.b("fade")
|
|
47
|
-
}, {
|
|
48
|
-
default: vue.withCtx(() => [
|
|
49
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
50
|
-
class: vue.normalizeClass([_ctx.ns.b(), _ctx.ns.m(_ctx.type), _ctx.ns.is("center", _ctx.center), _ctx.ns.is(_ctx.effect)]),
|
|
51
|
-
role: "alert"
|
|
52
|
-
}, [
|
|
53
|
-
_ctx.showIcon && _ctx.iconComponent ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
54
|
-
key: 0,
|
|
55
|
-
class: vue.normalizeClass([_ctx.ns.e("icon"), _ctx.isBigIcon])
|
|
56
|
-
}, {
|
|
57
|
-
default: vue.withCtx(() => [
|
|
58
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
62
|
-
vue.createElementVNode("div", {
|
|
63
|
-
class: vue.normalizeClass(_ctx.ns.e("content"))
|
|
64
|
-
}, [
|
|
65
|
-
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
66
|
-
key: 0,
|
|
67
|
-
class: vue.normalizeClass([_ctx.ns.e("title"), _ctx.isBoldTitle])
|
|
68
|
-
}, [
|
|
69
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
70
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
71
|
-
])
|
|
72
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
73
|
-
_ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: vue.normalizeClass(_ctx.ns.e("description"))
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
35
|
+
name: vue.unref(ns).b("fade")
|
|
36
|
+
}, {
|
|
37
|
+
default: vue.withCtx(() => [
|
|
38
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
39
|
+
class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is("center", _ctx.center), vue.unref(ns).is(_ctx.effect)]),
|
|
40
|
+
role: "alert"
|
|
76
41
|
}, [
|
|
77
|
-
vue.
|
|
78
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
79
|
-
])
|
|
80
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
81
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
82
|
-
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
42
|
+
_ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
83
43
|
key: 0,
|
|
84
|
-
class: vue.normalizeClass([
|
|
85
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
86
|
-
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
87
|
-
key: 1,
|
|
88
|
-
class: vue.normalizeClass(_ctx.ns.e("close-btn")),
|
|
89
|
-
onClick: _ctx.close
|
|
44
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(isBigIcon)])
|
|
90
45
|
}, {
|
|
91
46
|
default: vue.withCtx(() => [
|
|
92
|
-
vue.
|
|
47
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
93
48
|
]),
|
|
94
49
|
_: 1
|
|
95
|
-
}, 8, ["class"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
50
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
51
|
+
vue.createElementVNode("div", {
|
|
52
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
53
|
+
}, [
|
|
54
|
+
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(isBoldTitle)])
|
|
57
|
+
}, [
|
|
58
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
59
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
60
|
+
])
|
|
61
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
62
|
+
_ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
63
|
+
key: 1,
|
|
64
|
+
class: vue.normalizeClass(vue.unref(ns).e("description"))
|
|
65
|
+
}, [
|
|
66
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
67
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
68
|
+
])
|
|
69
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
70
|
+
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
71
|
+
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
|
|
74
|
+
onClick: close
|
|
75
|
+
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
76
|
+
key: 1,
|
|
77
|
+
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
|
78
|
+
onClick: close
|
|
79
|
+
}, {
|
|
80
|
+
default: vue.withCtx(() => [
|
|
81
|
+
vue.createVNode(vue.unref(Close))
|
|
82
|
+
]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["class"]))
|
|
85
|
+
], 2112)) : vue.createCommentVNode("v-if", true)
|
|
86
|
+
], 2)
|
|
87
|
+
], 2), [
|
|
88
|
+
[vue.vShow, visible.value]
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
_: 3
|
|
92
|
+
}, 8, ["name"]);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
106
96
|
|
|
107
|
-
exports["default"] =
|
|
97
|
+
exports["default"] = _sfc_main;
|
|
108
98
|
//# sourceMappingURL=alert2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon\n v-if=\"showIcon && iconComponent\"\n :class=\"[ns.e('icon'), isBigIcon]\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), isBoldTitle]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <
|
|
1
|
+
{"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon\n v-if=\"showIcon && iconComponent\"\n :class=\"[ns.e('icon'), isBigIcon]\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), isBoldTitle]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <Close />\n </el-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { alertProps, alertEmits } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElAlert',\n})\n\nconst props = defineProps(alertProps)\nconst emit = defineEmits(alertEmits)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\n// state\nconst visible = ref(true)\n\n// computed\nconst iconComponent = computed(\n () => TypeComponentsMap[props.type] || TypeComponentsMap['info']\n)\nconst isBigIcon = computed(\n () => props.description || { [ns.is('big')]: slots.default }\n)\nconst isBoldTitle = computed(\n () => props.description || { [ns.is('bold')]: slots.default }\n)\n\n// methods\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA;AAQA;AAEA;AAGA;AAGA;AAGA;AAGA;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -16,10 +16,28 @@ export declare const ElBacktop: import("element-plus/es/utils").SFCWithInstall<i
|
|
|
16
16
|
readonly default: 40;
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
COMPONENT_NAME: string;
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
readonly visibilityHeight: {
|
|
22
|
+
readonly type: NumberConstructor;
|
|
23
|
+
readonly default: 200;
|
|
24
|
+
};
|
|
25
|
+
readonly target: {
|
|
26
|
+
readonly type: StringConstructor;
|
|
27
|
+
readonly default: "";
|
|
28
|
+
};
|
|
29
|
+
readonly right: {
|
|
30
|
+
readonly type: NumberConstructor;
|
|
31
|
+
readonly default: 40;
|
|
32
|
+
};
|
|
33
|
+
readonly bottom: {
|
|
34
|
+
readonly type: NumberConstructor;
|
|
35
|
+
readonly default: 40;
|
|
36
|
+
};
|
|
37
|
+
}>> & {
|
|
38
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
39
|
+
}>>;
|
|
40
|
+
emit: (event: "click", evt: MouseEvent) => void;
|
|
23
41
|
ns: {
|
|
24
42
|
namespace: import("vue").ComputedRef<string>;
|
|
25
43
|
b: (blockSuffix?: string) => string;
|
|
@@ -34,6 +52,48 @@ export declare const ElBacktop: import("element-plus/es/utils").SFCWithInstall<i
|
|
|
34
52
|
(name: string): string;
|
|
35
53
|
};
|
|
36
54
|
};
|
|
55
|
+
el: import("vue").ShallowRef<HTMLElement | undefined>;
|
|
56
|
+
container: import("vue").ShallowRef<HTMLElement> | import("vue").ShallowRef<Document>;
|
|
57
|
+
visible: import("vue").Ref<boolean>;
|
|
58
|
+
styleBottom: import("vue").ComputedRef<string>;
|
|
59
|
+
styleRight: import("vue").ComputedRef<string>;
|
|
60
|
+
scrollToTop: () => void;
|
|
61
|
+
handleScroll: () => void;
|
|
62
|
+
handleClick: (event: MouseEvent) => void;
|
|
63
|
+
handleScrollThrottled: () => void;
|
|
64
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
65
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
66
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
67
|
+
}, {
|
|
68
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
70
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
71
|
+
}>> & {
|
|
72
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
73
|
+
}>>;
|
|
74
|
+
ns: {
|
|
75
|
+
namespace: import("vue").ComputedRef<string>;
|
|
76
|
+
b: (blockSuffix?: string) => string;
|
|
77
|
+
e: (element?: string | undefined) => string;
|
|
78
|
+
m: (modifier?: string | undefined) => string;
|
|
79
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
80
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
81
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
82
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
83
|
+
is: {
|
|
84
|
+
(name: string, state: boolean | undefined): string;
|
|
85
|
+
(name: string): string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
89
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
91
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
92
|
+
}>>, {
|
|
93
|
+
size: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown>;
|
|
94
|
+
color: string;
|
|
95
|
+
}>> & Record<string, any>;
|
|
96
|
+
CaretTop: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
37
97
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
98
|
click: (evt: MouseEvent) => boolean;
|
|
39
99
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -16,10 +16,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
readonly default: 40;
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
COMPONENT_NAME: string;
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
readonly visibilityHeight: {
|
|
22
|
+
readonly type: NumberConstructor;
|
|
23
|
+
readonly default: 200;
|
|
24
|
+
};
|
|
25
|
+
readonly target: {
|
|
26
|
+
readonly type: StringConstructor;
|
|
27
|
+
readonly default: "";
|
|
28
|
+
};
|
|
29
|
+
readonly right: {
|
|
30
|
+
readonly type: NumberConstructor;
|
|
31
|
+
readonly default: 40;
|
|
32
|
+
};
|
|
33
|
+
readonly bottom: {
|
|
34
|
+
readonly type: NumberConstructor;
|
|
35
|
+
readonly default: 40;
|
|
36
|
+
};
|
|
37
|
+
}>> & {
|
|
38
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
39
|
+
}>>;
|
|
40
|
+
emit: (event: "click", evt: MouseEvent) => void;
|
|
23
41
|
ns: {
|
|
24
42
|
namespace: import("vue").ComputedRef<string>;
|
|
25
43
|
b: (blockSuffix?: string) => string;
|
|
@@ -34,6 +52,48 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
52
|
(name: string): string;
|
|
35
53
|
};
|
|
36
54
|
};
|
|
55
|
+
el: import("vue").ShallowRef<HTMLElement | undefined>;
|
|
56
|
+
container: import("vue").ShallowRef<HTMLElement> | import("vue").ShallowRef<Document>;
|
|
57
|
+
visible: import("vue").Ref<boolean>;
|
|
58
|
+
styleBottom: import("vue").ComputedRef<string>;
|
|
59
|
+
styleRight: import("vue").ComputedRef<string>;
|
|
60
|
+
scrollToTop: () => void;
|
|
61
|
+
handleScroll: () => void;
|
|
62
|
+
handleClick: (event: MouseEvent) => void;
|
|
63
|
+
handleScrollThrottled: () => void;
|
|
64
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
65
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
66
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
67
|
+
}, {
|
|
68
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
70
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
71
|
+
}>> & {
|
|
72
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
73
|
+
}>>;
|
|
74
|
+
ns: {
|
|
75
|
+
namespace: import("vue").ComputedRef<string>;
|
|
76
|
+
b: (blockSuffix?: string) => string;
|
|
77
|
+
e: (element?: string | undefined) => string;
|
|
78
|
+
m: (modifier?: string | undefined) => string;
|
|
79
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
80
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
81
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
82
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
83
|
+
is: {
|
|
84
|
+
(name: string, state: boolean | undefined): string;
|
|
85
|
+
(name: string): string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
89
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
|
+
readonly size: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown, unknown, unknown>;
|
|
91
|
+
readonly color: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
92
|
+
}>>, {
|
|
93
|
+
size: import("element-plus/es/utils").BuildPropType<import("element-plus/es/utils").PropWrapper<string | number>, unknown, unknown>;
|
|
94
|
+
color: string;
|
|
95
|
+
}>> & Record<string, any>;
|
|
96
|
+
CaretTop: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
37
97
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
98
|
click: (evt: MouseEvent) => boolean;
|
|
39
99
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -4,27 +4,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var core = require('@vueuse/core');
|
|
7
|
-
var index = require('../../icon/index.js');
|
|
7
|
+
var index$1 = require('../../icon/index.js');
|
|
8
8
|
require('../../../utils/index.js');
|
|
9
9
|
var iconsVue = require('@element-plus/icons-vue');
|
|
10
10
|
require('../../../hooks/index.js');
|
|
11
11
|
var backtop = require('./backtop.js');
|
|
12
|
-
var
|
|
13
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
14
13
|
var animation = require('../../../utils/animation.js');
|
|
15
14
|
var error = require('../../../utils/error.js');
|
|
16
15
|
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
name:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
16
|
+
const _hoisted_1 = ["onClick"];
|
|
17
|
+
const __default__ = {
|
|
18
|
+
name: "ElBacktop"
|
|
19
|
+
};
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
24
22
|
props: backtop.backtopProps,
|
|
25
23
|
emits: backtop.backtopEmits,
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
24
|
+
setup(__props, { emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const COMPONENT_NAME = "ElBacktop";
|
|
27
|
+
const ns = index.useNamespace("backtop");
|
|
28
28
|
const el = vue.shallowRef(document.documentElement);
|
|
29
29
|
const container = vue.shallowRef(document);
|
|
30
30
|
const visible = vue.ref(false);
|
|
@@ -68,47 +68,37 @@ const _sfc_main = vue.defineComponent({
|
|
|
68
68
|
}
|
|
69
69
|
core.useEventListener(container, "scroll", handleScrollThrottled);
|
|
70
70
|
});
|
|
71
|
-
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
return (_ctx, _cache) => {
|
|
72
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
73
|
+
name: `${vue.unref(ns).namespace.value}-fade-in`
|
|
74
|
+
}, {
|
|
75
|
+
default: vue.withCtx(() => [
|
|
76
|
+
visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
style: vue.normalizeStyle({
|
|
79
|
+
right: vue.unref(styleRight),
|
|
80
|
+
bottom: vue.unref(styleBottom)
|
|
81
|
+
}),
|
|
82
|
+
class: vue.normalizeClass(vue.unref(ns).b()),
|
|
83
|
+
onClick: vue.withModifiers(handleClick, ["stop"])
|
|
84
|
+
}, [
|
|
85
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
86
|
+
vue.createVNode(vue.unref(index$1.ElIcon), {
|
|
87
|
+
class: vue.normalizeClass(vue.unref(ns).e("icon"))
|
|
88
|
+
}, {
|
|
89
|
+
default: vue.withCtx(() => [
|
|
90
|
+
vue.createVNode(vue.unref(iconsVue.CaretTop))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 8, ["class"])
|
|
94
|
+
])
|
|
95
|
+
], 14, _hoisted_1)) : vue.createCommentVNode("v-if", true)
|
|
96
|
+
]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 8, ["name"]);
|
|
77
99
|
};
|
|
78
100
|
}
|
|
79
101
|
});
|
|
80
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
81
|
-
const _component_caret_top = vue.resolveComponent("caret-top");
|
|
82
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
83
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
84
|
-
name: `${_ctx.ns.namespace.value}-fade-in`
|
|
85
|
-
}, {
|
|
86
|
-
default: vue.withCtx(() => [
|
|
87
|
-
_ctx.visible ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
88
|
-
key: 0,
|
|
89
|
-
style: vue.normalizeStyle({
|
|
90
|
-
right: _ctx.styleRight,
|
|
91
|
-
bottom: _ctx.styleBottom
|
|
92
|
-
}),
|
|
93
|
-
class: vue.normalizeClass(_ctx.ns.b()),
|
|
94
|
-
onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"]))
|
|
95
|
-
}, [
|
|
96
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
97
|
-
vue.createVNode(_component_el_icon, {
|
|
98
|
-
class: vue.normalizeClass(_ctx.ns.e("icon"))
|
|
99
|
-
}, {
|
|
100
|
-
default: vue.withCtx(() => [
|
|
101
|
-
vue.createVNode(_component_caret_top)
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
}, 8, ["class"])
|
|
105
|
-
])
|
|
106
|
-
], 6)) : vue.createCommentVNode("v-if", true)
|
|
107
|
-
]),
|
|
108
|
-
_: 3
|
|
109
|
-
}, 8, ["name"]);
|
|
110
|
-
}
|
|
111
|
-
var Backtop = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
112
102
|
|
|
113
|
-
exports["default"] =
|
|
103
|
+
exports["default"] = _sfc_main;
|
|
114
104
|
//# sourceMappingURL=backtop2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.vue"],"sourcesContent":["<template>\n <transition :name=\"`${ns.namespace.value}-fade-in`\">\n <div\n v-if=\"visible\"\n :style=\"{\n right: styleRight,\n bottom: styleBottom,\n }\"\n :class=\"ns.b()\"\n @click.stop=\"handleClick\"\n >\n <slot>\n <el-icon :class=\"ns.e('icon')\"><caret-top /></el-icon>\n </slot>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\">\nimport {
|
|
1
|
+
{"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.vue"],"sourcesContent":["<template>\n <transition :name=\"`${ns.namespace.value}-fade-in`\">\n <div\n v-if=\"visible\"\n :style=\"{\n right: styleRight,\n bottom: styleBottom,\n }\"\n :class=\"ns.b()\"\n @click.stop=\"handleClick\"\n >\n <slot>\n <el-icon :class=\"ns.e('icon')\"><caret-top /></el-icon>\n </slot>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, computed, onMounted, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { easeInOutCubic, throwError } from '@element-plus/utils'\nimport { CaretTop } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport { backtopEmits, backtopProps } from './backtop'\n\nconst COMPONENT_NAME = 'ElBacktop'\n\ndefineOptions({\n name: 'ElBacktop',\n})\n\nconst props = defineProps(backtopProps)\nconst emit = defineEmits(backtopEmits)\n\nconst ns = useNamespace('backtop')\nconst el = shallowRef<HTMLElement | undefined>(document.documentElement)\nconst container = shallowRef<Document | HTMLElement>(document)\nconst visible = ref(false)\nconst styleBottom = computed(() => `${props.bottom}px`)\nconst styleRight = computed(() => `${props.right}px`)\n\nconst scrollToTop = () => {\n if (!el.value) return\n const beginTime = Date.now()\n const beginValue = el.value.scrollTop\n const frameFunc = () => {\n if (!el.value) return\n const progress = (Date.now() - beginTime) / 500\n if (progress < 1) {\n el.value.scrollTop = beginValue * (1 - easeInOutCubic(progress))\n requestAnimationFrame(frameFunc)\n } else {\n el.value.scrollTop = 0\n }\n }\n requestAnimationFrame(frameFunc)\n}\nconst handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n}\nconst handleClick = (event: MouseEvent) => {\n scrollToTop()\n emit('click', event)\n}\n\nconst handleScrollThrottled = useThrottleFn(handleScroll, 300)\n\nonMounted(() => {\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(COMPONENT_NAME, `target is not existed: ${props.target}`)\n }\n container.value = el.value\n }\n\n useEventListener(container, 'scroll', handleScrollThrottled)\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AASA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;AAgBA;;;;AAGA;;;;AAKA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,6 +5,15 @@ export declare const ElBadge: import("element-plus/es/utils").SFCWithInstall<imp
|
|
|
5
5
|
readonly hidden: BooleanConstructor;
|
|
6
6
|
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "danger", unknown, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
7
7
|
}, {
|
|
8
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
readonly value: import("element-plus/es/utils").BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
10
|
+
readonly max: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
11
|
+
readonly isDot: BooleanConstructor;
|
|
12
|
+
readonly hidden: BooleanConstructor;
|
|
13
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "danger", unknown, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
14
|
+
}>> & {
|
|
15
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
16
|
+
}>>;
|
|
8
17
|
ns: {
|
|
9
18
|
namespace: import("vue").ComputedRef<string>;
|
|
10
19
|
b: (blockSuffix?: string) => string;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
readonly value: import("
|
|
3
|
-
readonly max: import("
|
|
2
|
+
readonly value: import("element-plus/es/utils").BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
3
|
+
readonly max: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
4
4
|
readonly isDot: BooleanConstructor;
|
|
5
5
|
readonly hidden: BooleanConstructor;
|
|
6
|
-
readonly type: import("
|
|
6
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "danger", unknown, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
7
7
|
}, {
|
|
8
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
readonly value: import("element-plus/es/utils").BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
10
|
+
readonly max: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
11
|
+
readonly isDot: BooleanConstructor;
|
|
12
|
+
readonly hidden: BooleanConstructor;
|
|
13
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "danger", unknown, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
14
|
+
}>> & {
|
|
15
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
16
|
+
}>>;
|
|
8
17
|
ns: {
|
|
9
18
|
namespace: import("vue").ComputedRef<string>;
|
|
10
19
|
b: (blockSuffix?: string) => string;
|
|
@@ -21,15 +30,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
30
|
};
|
|
22
31
|
content: import("vue").ComputedRef<string>;
|
|
23
32
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
-
readonly value: import("
|
|
25
|
-
readonly max: import("
|
|
33
|
+
readonly value: import("element-plus/es/utils").BuildPropReturn<readonly [StringConstructor, NumberConstructor], "", unknown, unknown, unknown>;
|
|
34
|
+
readonly max: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
26
35
|
readonly isDot: BooleanConstructor;
|
|
27
36
|
readonly hidden: BooleanConstructor;
|
|
28
|
-
readonly type: import("
|
|
37
|
+
readonly type: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "danger", unknown, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
29
38
|
}>>, {
|
|
30
|
-
type: import("
|
|
39
|
+
type: import("element-plus/es/utils").BuildPropType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
31
40
|
hidden: boolean;
|
|
32
|
-
value: import("
|
|
41
|
+
value: import("element-plus/es/utils").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
33
42
|
max: number;
|
|
34
43
|
isDot: boolean;
|
|
35
44
|
}>;
|