@element-plus/nightly 0.0.20220805 → 0.0.20220806
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 +346 -353
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +346 -353
- 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/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/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/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/notification/src/notification.d.ts +2 -0
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +111 -5
- package/es/components/notification/src/notification2.mjs +84 -91
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/notification/src/notification.d.ts +2 -0
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +111 -5
- package/lib/components/notification/src/notification2.js +85 -92
- package/lib/components/notification/src/notification2.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
|
@@ -6,24 +6,29 @@ var vue = require('vue');
|
|
|
6
6
|
var core = require('@vueuse/core');
|
|
7
7
|
require('../../../utils/index.js');
|
|
8
8
|
require('../../../constants/index.js');
|
|
9
|
-
var index = require('../../icon/index.js');
|
|
9
|
+
var index$1 = require('../../icon/index.js');
|
|
10
10
|
require('../../../hooks/index.js');
|
|
11
11
|
var notification = require('./notification.js');
|
|
12
12
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
14
|
var icon = require('../../../utils/vue/icon.js');
|
|
14
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
15
15
|
var aria = require('../../../constants/aria.js');
|
|
16
16
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const _hoisted_1 = ["id"];
|
|
18
|
+
const _hoisted_2 = ["textContent"];
|
|
19
|
+
const _hoisted_3 = { key: 0 };
|
|
20
|
+
const _hoisted_4 = ["innerHTML"];
|
|
21
|
+
const __default__ = {
|
|
22
|
+
name: "ElNotification"
|
|
23
|
+
};
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
25
|
+
...__default__,
|
|
23
26
|
props: notification.notificationProps,
|
|
24
27
|
emits: notification.notificationEmits,
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
28
|
+
setup(__props, { expose }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const ns = index.useNamespace("notification");
|
|
31
|
+
const { Close } = icon.CloseComponents;
|
|
27
32
|
const visible = vue.ref(false);
|
|
28
33
|
let timer = void 0;
|
|
29
34
|
const typeClass = vue.computed(() => {
|
|
@@ -31,7 +36,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
31
36
|
return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
32
37
|
});
|
|
33
38
|
const iconComponent = vue.computed(() => {
|
|
34
|
-
|
|
39
|
+
if (!props.type)
|
|
40
|
+
return "";
|
|
41
|
+
return icon.TypeComponentsMap[props.type] || props.icon;
|
|
35
42
|
});
|
|
36
43
|
const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
37
44
|
const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
@@ -72,91 +79,77 @@ const _sfc_main = vue.defineComponent({
|
|
|
72
79
|
visible.value = true;
|
|
73
80
|
});
|
|
74
81
|
core.useEventListener(document, "keydown", onKeydown);
|
|
75
|
-
|
|
76
|
-
ns,
|
|
77
|
-
horizontalClass,
|
|
78
|
-
typeClass,
|
|
79
|
-
iconComponent,
|
|
80
|
-
positionStyle,
|
|
82
|
+
expose({
|
|
81
83
|
visible,
|
|
82
|
-
close
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
close
|
|
85
|
+
});
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
88
|
+
name: vue.unref(ns).b("fade"),
|
|
89
|
+
onBeforeLeave: _ctx.onClose,
|
|
90
|
+
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
91
|
+
persisted: ""
|
|
92
|
+
}, {
|
|
93
|
+
default: vue.withCtx(() => [
|
|
94
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
95
|
+
id: _ctx.id,
|
|
96
|
+
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
|
|
97
|
+
style: vue.normalizeStyle(vue.unref(positionStyle)),
|
|
98
|
+
role: "alert",
|
|
99
|
+
onMouseenter: clearTimer,
|
|
100
|
+
onMouseleave: startTimer,
|
|
101
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
102
|
+
}, [
|
|
103
|
+
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
106
|
+
}, {
|
|
107
|
+
default: vue.withCtx(() => [
|
|
108
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
112
|
+
vue.createElementVNode("div", {
|
|
113
|
+
class: vue.normalizeClass(vue.unref(ns).e("group"))
|
|
114
|
+
}, [
|
|
115
|
+
vue.createElementVNode("h2", {
|
|
116
|
+
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
|
117
|
+
textContent: vue.toDisplayString(_ctx.title)
|
|
118
|
+
}, null, 10, _hoisted_2),
|
|
119
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
120
|
+
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
121
|
+
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
122
|
+
}, [
|
|
123
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
124
|
+
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
125
|
+
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
126
|
+
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
127
|
+
], 2112))
|
|
128
|
+
])
|
|
129
|
+
], 6), [
|
|
130
|
+
[vue.vShow, _ctx.message]
|
|
131
|
+
]),
|
|
132
|
+
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
133
|
+
key: 0,
|
|
134
|
+
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
135
|
+
onClick: vue.withModifiers(close, ["stop"])
|
|
136
|
+
}, {
|
|
137
|
+
default: vue.withCtx(() => [
|
|
138
|
+
vue.createVNode(vue.unref(Close))
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
142
|
+
], 2)
|
|
143
|
+
], 46, _hoisted_1), [
|
|
144
|
+
[vue.vShow, visible.value]
|
|
145
|
+
])
|
|
146
|
+
]),
|
|
147
|
+
_: 3
|
|
148
|
+
}, 8, ["name", "onBeforeLeave"]);
|
|
85
149
|
};
|
|
86
150
|
}
|
|
87
151
|
});
|
|
88
|
-
|
|
89
|
-
const _hoisted_2 = ["textContent"];
|
|
90
|
-
const _hoisted_3 = { key: 0 };
|
|
91
|
-
const _hoisted_4 = ["innerHTML"];
|
|
92
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
94
|
-
const _component_close = vue.resolveComponent("close");
|
|
95
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
96
|
-
name: _ctx.ns.b("fade"),
|
|
97
|
-
onBeforeLeave: _ctx.onClose,
|
|
98
|
-
onAfterLeave: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("destroy")),
|
|
99
|
-
persisted: ""
|
|
100
|
-
}, {
|
|
101
|
-
default: vue.withCtx(() => [
|
|
102
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
103
|
-
id: _ctx.id,
|
|
104
|
-
class: vue.normalizeClass([_ctx.ns.b(), _ctx.customClass, _ctx.horizontalClass]),
|
|
105
|
-
style: vue.normalizeStyle(_ctx.positionStyle),
|
|
106
|
-
role: "alert",
|
|
107
|
-
onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.clearTimer && _ctx.clearTimer(...args)),
|
|
108
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.startTimer && _ctx.startTimer(...args)),
|
|
109
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
110
|
-
}, [
|
|
111
|
-
_ctx.iconComponent ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
112
|
-
key: 0,
|
|
113
|
-
class: vue.normalizeClass([_ctx.ns.e("icon"), _ctx.typeClass])
|
|
114
|
-
}, {
|
|
115
|
-
default: vue.withCtx(() => [
|
|
116
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
120
|
-
vue.createElementVNode("div", {
|
|
121
|
-
class: vue.normalizeClass(_ctx.ns.e("group"))
|
|
122
|
-
}, [
|
|
123
|
-
vue.createElementVNode("h2", {
|
|
124
|
-
class: vue.normalizeClass(_ctx.ns.e("title")),
|
|
125
|
-
textContent: vue.toDisplayString(_ctx.title)
|
|
126
|
-
}, null, 10, _hoisted_2),
|
|
127
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
128
|
-
class: vue.normalizeClass(_ctx.ns.e("content")),
|
|
129
|
-
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
130
|
-
}, [
|
|
131
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
132
|
-
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
133
|
-
vue.createCommentVNode(" Caution here, message could've been compromized, nerver use user's input as message "),
|
|
134
|
-
vue.createCommentVNode(" eslint-disable-next-line "),
|
|
135
|
-
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
136
|
-
], 2112))
|
|
137
|
-
])
|
|
138
|
-
], 6), [
|
|
139
|
-
[vue.vShow, _ctx.message]
|
|
140
|
-
]),
|
|
141
|
-
_ctx.showClose ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
142
|
-
key: 0,
|
|
143
|
-
class: vue.normalizeClass(_ctx.ns.e("closeBtn")),
|
|
144
|
-
onClick: vue.withModifiers(_ctx.close, ["stop"])
|
|
145
|
-
}, {
|
|
146
|
-
default: vue.withCtx(() => [
|
|
147
|
-
vue.createVNode(_component_close)
|
|
148
|
-
]),
|
|
149
|
-
_: 1
|
|
150
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
151
|
-
], 2)
|
|
152
|
-
], 46, _hoisted_1), [
|
|
153
|
-
[vue.vShow, _ctx.visible]
|
|
154
|
-
])
|
|
155
|
-
]),
|
|
156
|
-
_: 3
|
|
157
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
158
|
-
}
|
|
159
|
-
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
152
|
+
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
160
153
|
|
|
161
154
|
exports["default"] = NotificationConstructor;
|
|
162
155
|
//# sourceMappingURL=notification2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification2.js","sources":["../../../../../../packages/components/notification/src/notification.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been
|
|
1
|
+
{"version":3,"file":"notification2.js","sources":["../../../../../../packages/components/notification/src/notification.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else v-html=\"message\" />\n </slot>\n </div>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { CloseComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = defineProps(notificationProps)\ndefineEmits(notificationEmits)\n\nconst ns = useNamespace('notification')\nconst { Close } = CloseComponents\n\nconst visible = ref(false)\nlet timer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return type && TypeComponentsMap[props.type] ? ns.m(type) : ''\n})\n\nconst iconComponent = computed(() => {\n if (!props.type) return ''\n return TypeComponentsMap[props.type] || props.icon\n})\n\nconst horizontalClass = computed(() =>\n props.position.endsWith('right') ? 'right' : 'left'\n)\n\nconst verticalProperty = computed(() =>\n props.position.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst positionStyle = computed<CSSProperties>(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n zIndex: props.zIndex,\n }\n})\n\nfunction startTimer() {\n if (props.duration > 0) {\n ;({ stop: timer } = useTimeoutFn(() => {\n if (visible.value) close()\n }, props.duration))\n }\n}\n\nfunction clearTimer() {\n timer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction onKeydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer() // press delete/backspace clear timer\n } else if (code === EVENT_CODE.esc) {\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n } else {\n startTimer() // resume timer\n }\n}\n\n// lifecycle\nonMounted(() => {\n startTimer()\n visible.value = true\n})\n\nuseEventListener(document, 'keydown', onKeydown)\n\ndefineExpose({\n visible,\n /** @description close notification */\n close,\n})\n</script>\n"],"names":["useNamespace","CloseComponents","ref","computed","TypeComponentsMap","useTimeoutFn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
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20220806";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220806'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@element-plus/nightly",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20220806",
|
|
4
4
|
"description": "A Component Library for Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"element-plus",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"not ie 11",
|
|
84
84
|
"not op_mini all"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "9679cc0da0aeeb611408b28244a6ec9bb5d77c0d"
|
|
87
87
|
}
|