@element-plus/nightly 0.0.20240401 → 0.0.20240402
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 +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +96 -36
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +36 -96
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/index.mjs +3 -3
- package/es/components/input-number/style/css.d.ts +1 -1
- package/es/components/input-number/style/css.mjs +1 -1
- package/es/components/input-number/style/index.d.ts +1 -1
- package/es/components/input-number/style/index.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +67 -6
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +6 -67
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -152
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +152 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/index.mjs +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +95 -37
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +37 -95
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/input-number/style/css.d.ts +1 -1
- package/lib/components/input-number/style/css.js +1 -1
- package/lib/components/input-number/style/index.d.ts +1 -1
- package/lib/components/input-number/style/index.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +67 -6
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +6 -67
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -151
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +151 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/index.js +3 -3
- 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-input-number.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/index.scss +1 -1
- package/theme-chalk/src/input-number.scss +5 -3
- package/web-types.json +1 -1
|
@@ -2,47 +2,105 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
5
7
|
require('../../../utils/index.js');
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
+
require('../../../hooks/index.js');
|
|
9
|
+
var alert = require('./alert2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
11
|
var icon = require('../../../utils/vue/icon.js');
|
|
12
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
9
13
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
14
|
+
const __default__ = vue.defineComponent({
|
|
15
|
+
name: "ElAlert"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: alert.alertProps,
|
|
20
|
+
emits: alert.alertEmits,
|
|
21
|
+
setup(__props, { emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { Close } = icon.TypeComponents;
|
|
24
|
+
const slots = vue.useSlots();
|
|
25
|
+
const ns = index.useNamespace("alert");
|
|
26
|
+
const visible = vue.ref(true);
|
|
27
|
+
const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type]);
|
|
28
|
+
const iconClass = vue.computed(() => [
|
|
29
|
+
ns.e("icon"),
|
|
30
|
+
{ [ns.is("big")]: !!props.description || !!slots.default }
|
|
31
|
+
]);
|
|
32
|
+
const withDescription = vue.computed(() => {
|
|
33
|
+
return { "with-description": props.description || slots.default };
|
|
34
|
+
});
|
|
35
|
+
const close = (evt) => {
|
|
36
|
+
visible.value = false;
|
|
37
|
+
emit("close", evt);
|
|
38
|
+
};
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
41
|
+
name: vue.unref(ns).b("fade"),
|
|
42
|
+
persisted: ""
|
|
43
|
+
}, {
|
|
44
|
+
default: vue.withCtx(() => [
|
|
45
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
46
|
+
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)]),
|
|
47
|
+
role: "alert"
|
|
48
|
+
}, [
|
|
49
|
+
_ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: vue.normalizeClass(vue.unref(iconClass))
|
|
52
|
+
}, {
|
|
53
|
+
default: vue.withCtx(() => [
|
|
54
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
58
|
+
vue.createElementVNode("div", {
|
|
59
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
60
|
+
}, [
|
|
61
|
+
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(withDescription)])
|
|
64
|
+
}, [
|
|
65
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
66
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
67
|
+
])
|
|
68
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
69
|
+
_ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
70
|
+
key: 1,
|
|
71
|
+
class: vue.normalizeClass(vue.unref(ns).e("description"))
|
|
72
|
+
}, [
|
|
73
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
74
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
75
|
+
])
|
|
76
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
77
|
+
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
78
|
+
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
|
|
81
|
+
onClick: close
|
|
82
|
+
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
|
85
|
+
onClick: close
|
|
86
|
+
}, {
|
|
87
|
+
default: vue.withCtx(() => [
|
|
88
|
+
vue.createVNode(vue.unref(Close))
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["class"]))
|
|
92
|
+
], 64)) : vue.createCommentVNode("v-if", true)
|
|
93
|
+
], 2)
|
|
94
|
+
], 2), [
|
|
95
|
+
[vue.vShow, visible.value]
|
|
96
|
+
])
|
|
97
|
+
]),
|
|
98
|
+
_: 3
|
|
99
|
+
}, 8, ["name"]);
|
|
100
|
+
};
|
|
39
101
|
}
|
|
40
102
|
});
|
|
41
|
-
|
|
42
|
-
close: (evt) => evt instanceof MouseEvent
|
|
43
|
-
};
|
|
103
|
+
var Alert = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "alert.vue"]]);
|
|
44
104
|
|
|
45
|
-
exports
|
|
46
|
-
exports.alertEmits = alertEmits;
|
|
47
|
-
exports.alertProps = alertProps;
|
|
105
|
+
exports["default"] = Alert;
|
|
48
106
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.
|
|
1
|
+
{"version":3,"file":"alert.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 v-if=\"showIcon && iconComponent\" :class=\"iconClass\">\n <component :is=\"iconComponent\" />\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), withDescription]\"\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 { alertEmits, alertProps } 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\nconst visible = ref(true)\n\nconst iconComponent = computed(() => TypeComponentsMap[props.type])\n\nconst iconClass = computed(() => [\n ns.e('icon'),\n { [ns.is('big')]: !!props.description || !!slots.default },\n])\n\nconst withDescription = computed(() => {\n return { 'with-description': props.description || slots.default }\n})\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n</script>\n"],"names":["TypeComponents","useSlots","useNamespace","ref","computed","TypeComponentsMap"],"mappings":";;;;;;;;;;;;;uCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAA,MAAM,EAAE,KAAU,EAAA,GAAAA,mBAAA,CAAA;AAQlB,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAA,GAAKC,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,aAAgB,GAAAC,YAAA,CAAS,MAAMC,sBAAA,CAAkB,MAAM,IAAK,CAAA,CAAA,CAAA;AAElE,IAAM,MAAA,SAAA,GAAYD,aAAS,MAAM;AAAA,MAC/B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAE,CAAC,EAAG,CAAA,EAAA,CAAG,KAAK,CAAA,GAAI,CAAC,CAAC,KAAM,CAAA,WAAA,IAAe,CAAC,CAAC,MAAM,OAAQ,EAAA;AAAA,KAC1D,CAAA,CAAA;AAED,IAAM,MAAA,eAAA,GAAkBA,aAAS,MAAM;AACrC,MAAA,OAAO,EAAE,kBAAA,EAAoB,KAAM,CAAA,WAAA,IAAe,MAAM,OAAQ,EAAA,CAAA;AAAA,KACjE,CAAA,CAAA;AAED,IAAM,MAAA,KAAA,GAAQ,CAAC,GAAoB,KAAA;AACjC,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,KACnB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,105 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var index$1 = require('../../icon/index.js');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
var objects = require('../../../utils/objects.js');
|
|
11
8
|
var icon = require('../../../utils/vue/icon.js');
|
|
12
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
9
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, {
|
|
44
|
-
default: vue.withCtx(() => [
|
|
45
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
46
|
-
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)]),
|
|
47
|
-
role: "alert"
|
|
48
|
-
}, [
|
|
49
|
-
_ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
50
|
-
key: 0,
|
|
51
|
-
class: vue.normalizeClass(vue.unref(iconClass))
|
|
52
|
-
}, {
|
|
53
|
-
default: vue.withCtx(() => [
|
|
54
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
58
|
-
vue.createElementVNode("div", {
|
|
59
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
60
|
-
}, [
|
|
61
|
-
_ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
62
|
-
key: 0,
|
|
63
|
-
class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(withDescription)])
|
|
64
|
-
}, [
|
|
65
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
66
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
67
|
-
])
|
|
68
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
69
|
-
_ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: vue.normalizeClass(vue.unref(ns).e("description"))
|
|
72
|
-
}, [
|
|
73
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
74
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
75
|
-
])
|
|
76
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
77
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
78
|
-
_ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
79
|
-
key: 0,
|
|
80
|
-
class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
|
|
81
|
-
onClick: close
|
|
82
|
-
}, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
|
|
85
|
-
onClick: close
|
|
86
|
-
}, {
|
|
87
|
-
default: vue.withCtx(() => [
|
|
88
|
-
vue.createVNode(vue.unref(Close))
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["class"]))
|
|
92
|
-
], 64)) : vue.createCommentVNode("v-if", true)
|
|
93
|
-
], 2)
|
|
94
|
-
], 2), [
|
|
95
|
-
[vue.vShow, visible.value]
|
|
96
|
-
])
|
|
97
|
-
]),
|
|
98
|
-
_: 3
|
|
99
|
-
}, 8, ["name"]);
|
|
100
|
-
};
|
|
10
|
+
const alertEffects = ["light", "dark"];
|
|
11
|
+
const alertProps = runtime.buildProps({
|
|
12
|
+
title: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: objects.keysOf(icon.TypeComponentsMap),
|
|
23
|
+
default: "info"
|
|
24
|
+
},
|
|
25
|
+
closable: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
closeText: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
showIcon: Boolean,
|
|
34
|
+
center: Boolean,
|
|
35
|
+
effect: {
|
|
36
|
+
type: String,
|
|
37
|
+
values: alertEffects,
|
|
38
|
+
default: "light"
|
|
101
39
|
}
|
|
102
40
|
});
|
|
103
|
-
|
|
41
|
+
const alertEmits = {
|
|
42
|
+
close: (evt) => evt instanceof MouseEvent
|
|
43
|
+
};
|
|
104
44
|
|
|
105
|
-
exports
|
|
45
|
+
exports.alertEffects = alertEffects;
|
|
46
|
+
exports.alertEmits = alertEmits;
|
|
47
|
+
exports.alertProps = alertProps;
|
|
106
48
|
//# sourceMappingURL=alert2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.
|
|
1
|
+
{"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":["buildProps","keysOf","TypeComponentsMap"],"mappings":";;;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,cAAM,CAACC,sBAAiB,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -83,7 +83,7 @@ var index$1c = require('./message-box/index.js');
|
|
|
83
83
|
var index$1d = require('./notification/index.js');
|
|
84
84
|
var index$1e = require('./popover/index.js');
|
|
85
85
|
var affix = require('./affix/src/affix.js');
|
|
86
|
-
var alert = require('./alert/src/
|
|
86
|
+
var alert = require('./alert/src/alert2.js');
|
|
87
87
|
var autocomplete = require('./autocomplete/src/autocomplete.js');
|
|
88
88
|
var avatar = require('./avatar/src/avatar.js');
|
|
89
89
|
var backtop = require('./backtop/src/backtop.js');
|
|
@@ -157,7 +157,7 @@ var content = require('./popper/src/content2.js');
|
|
|
157
157
|
var progress = require('./progress/src/progress.js');
|
|
158
158
|
var radio = require('./radio/src/radio.js');
|
|
159
159
|
var radioGroup = require('./radio/src/radio-group.js');
|
|
160
|
-
var radioButton = require('./radio/src/radio-
|
|
160
|
+
var radioButton = require('./radio/src/radio-button2.js');
|
|
161
161
|
var constants$b = require('./radio/src/constants.js');
|
|
162
162
|
var rate = require('./rate/src/rate.js');
|
|
163
163
|
var result = require('./result/src/result.js');
|
|
@@ -214,7 +214,7 @@ var fixedSizeGrid = require('./virtual-list/src/components/fixed-size-grid.js');
|
|
|
214
214
|
var dynamicSizeGrid = require('./virtual-list/src/components/dynamic-size-grid.js');
|
|
215
215
|
var props$1 = require('./virtual-list/src/props.js');
|
|
216
216
|
var watermark = require('./watermark/src/watermark.js');
|
|
217
|
-
var tour = require('./tour/src/
|
|
217
|
+
var tour = require('./tour/src/tour.js');
|
|
218
218
|
var anchor = require('./anchor/src/anchor.js');
|
|
219
219
|
var directive = require('./loading/src/directive.js');
|
|
220
220
|
var service = require('./loading/src/service.js');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@element-plus/nightly/es/components/base/style/css';
|
|
2
|
-
import '@element-plus/nightly/es/nightly/theme-chalk/el-input-number.css';
|
|
3
2
|
import '@element-plus/nightly/es/components/input/style/css';
|
|
3
|
+
import '@element-plus/nightly/es/nightly/theme-chalk/el-input-number.css';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@element-plus/nightly/es/components/base/style';
|
|
2
|
-
import '@element-plus/nightly/es/nightly/theme-chalk/src/input-number.scss';
|
|
3
2
|
import '@element-plus/nightly/es/components/input/style';
|
|
3
|
+
import '@element-plus/nightly/es/nightly/theme-chalk/src/input-number.scss';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../../base/style/index.js');
|
|
4
|
-
require('@element-plus/nightly/theme-chalk/src/input-number.scss');
|
|
5
4
|
require('../../input/style/index.js');
|
|
5
|
+
require('@element-plus/nightly/theme-chalk/src/input-number.scss');
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var radio$1 = require('./src/radio2.js');
|
|
7
|
-
var radioButton$1 = require('./src/radio-
|
|
7
|
+
var radioButton$1 = require('./src/radio-button.js');
|
|
8
8
|
var radioGroup$1 = require('./src/radio-group2.js');
|
|
9
9
|
var radio = require('./src/radio.js');
|
|
10
10
|
var radioGroup = require('./src/radio-group.js');
|
|
11
|
-
var radioButton = require('./src/radio-
|
|
11
|
+
var radioButton = require('./src/radio-button2.js');
|
|
12
12
|
var constants = require('./src/constants.js');
|
|
13
13
|
var install = require('../../utils/vue/install.js');
|
|
14
14
|
|
|
@@ -2,13 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
|
|
7
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var useRadio = require('./use-radio.js');
|
|
8
|
+
var radioButton = require('./radio-button2.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
8
11
|
|
|
9
|
-
const
|
|
10
|
-
|
|
12
|
+
const _hoisted_1 = ["value", "name", "disabled"];
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElRadioButton"
|
|
11
15
|
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: radioButton.radioButtonProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const ns = index.useNamespace("radio");
|
|
22
|
+
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio.useRadio(props);
|
|
23
|
+
const activeStyle = vue.computed(() => {
|
|
24
|
+
return {
|
|
25
|
+
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
26
|
+
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
27
|
+
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
28
|
+
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
var _a;
|
|
33
|
+
return vue.openBlock(), vue.createElementBlock("label", {
|
|
34
|
+
class: vue.normalizeClass([
|
|
35
|
+
vue.unref(ns).b("button"),
|
|
36
|
+
vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
|
|
37
|
+
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
|
38
|
+
vue.unref(ns).is("focus", vue.unref(focus)),
|
|
39
|
+
vue.unref(ns).bm("button", vue.unref(size))
|
|
40
|
+
])
|
|
41
|
+
}, [
|
|
42
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
43
|
+
ref_key: "radioRef",
|
|
44
|
+
ref: radioRef,
|
|
45
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
|
|
46
|
+
class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
|
|
47
|
+
value: vue.unref(actualValue),
|
|
48
|
+
type: "radio",
|
|
49
|
+
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
|
50
|
+
disabled: vue.unref(disabled),
|
|
51
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
52
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
53
|
+
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, null, 42, _hoisted_1), [
|
|
56
|
+
[vue.vModelRadio, vue.unref(modelValue)]
|
|
57
|
+
]),
|
|
58
|
+
vue.createElementVNode("span", {
|
|
59
|
+
class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
|
|
60
|
+
style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
|
|
61
|
+
onKeydown: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
|
62
|
+
}, ["stop"]))
|
|
63
|
+
}, [
|
|
64
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
65
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
66
|
+
])
|
|
67
|
+
], 38)
|
|
68
|
+
], 2);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var RadioButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-button.vue"]]);
|
|
12
73
|
|
|
13
|
-
exports
|
|
74
|
+
exports["default"] = RadioButton;
|
|
14
75
|
//# sourceMappingURL=radio-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b('button'),\n ns.is('active', modelValue === actualValue),\n ns.is('disabled', disabled),\n ns.is('focus', focus),\n ns.bm('button', size),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.be('button', 'original-radio')\"\n :value=\"actualValue\"\n type=\"radio\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"disabled\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @click.stop\n />\n <span\n :class=\"ns.be('button', 'inner')\"\n :style=\"modelValue === actualValue ? activeStyle : {}\"\n @keydown.stop\n >\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useRadio } from './use-radio'\nimport { radioButtonProps } from './radio-button'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElRadioButton',\n})\n\nconst props = defineProps(radioButtonProps)\n\nconst ns = useNamespace('radio')\nconst { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } =\n useRadio(props)\n\nconst activeStyle = computed<CSSProperties>(() => {\n return {\n backgroundColor: radioGroup?.fill || '',\n borderColor: radioGroup?.fill || '',\n boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : '',\n color: radioGroup?.textColor || '',\n }\n})\n</script>\n"],"names":["useNamespace","useRadio","computed"],"mappings":";;;;;;;;;;;;uCAyCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,UAAU,KAAO,EAAA,IAAA,EAAM,UAAU,UAAY,EAAA,UAAA,EAAY,WAC/D,EAAA,GAAAC,iBAAA,CAAS,KAAK,CAAA,CAAA;AAEhB,IAAM,MAAA,WAAA,GAAcC,aAAwB,MAAM;AAChD,MAAO,OAAA;AAAA,QACL,eAAA,EAAiB,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACrC,WAAA,EAAa,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACjC,SAAW,EAAA,CAAA,UAAA,IAAmB,IAAA,GAAA,KAAA,CAAA,GAAA,eAAkC,IAAA,CAAA,WAAA,EAAA,UAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA;AAAA,QAChE,KAAA,EAAO,eAAyB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,SAAA,KAAA,EAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,74 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
var radioButton = require('./radio-button.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var radio = require('./radio.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
8
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
name: "ElRadioButton"
|
|
9
|
+
const radioButtonProps = runtime.buildProps({
|
|
10
|
+
...radio.radioPropsBase
|
|
15
11
|
});
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
-
...__default__,
|
|
18
|
-
props: radioButton.radioButtonProps,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const ns = index.useNamespace("radio");
|
|
22
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio.useRadio(props);
|
|
23
|
-
const activeStyle = vue.computed(() => {
|
|
24
|
-
return {
|
|
25
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
26
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
27
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
28
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
var _a;
|
|
33
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
34
|
-
class: vue.normalizeClass([
|
|
35
|
-
vue.unref(ns).b("button"),
|
|
36
|
-
vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
|
|
37
|
-
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
|
38
|
-
vue.unref(ns).is("focus", vue.unref(focus)),
|
|
39
|
-
vue.unref(ns).bm("button", vue.unref(size))
|
|
40
|
-
])
|
|
41
|
-
}, [
|
|
42
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
|
43
|
-
ref_key: "radioRef",
|
|
44
|
-
ref: radioRef,
|
|
45
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
|
|
46
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
|
|
47
|
-
value: vue.unref(actualValue),
|
|
48
|
-
type: "radio",
|
|
49
|
-
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
|
50
|
-
disabled: vue.unref(disabled),
|
|
51
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
52
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
53
|
-
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
54
|
-
}, ["stop"]))
|
|
55
|
-
}, null, 42, _hoisted_1), [
|
|
56
|
-
[vue.vModelRadio, vue.unref(modelValue)]
|
|
57
|
-
]),
|
|
58
|
-
vue.createElementVNode("span", {
|
|
59
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
|
|
60
|
-
style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
|
|
61
|
-
onKeydown: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
|
62
|
-
}, ["stop"]))
|
|
63
|
-
}, [
|
|
64
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
65
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
66
|
-
])
|
|
67
|
-
], 38)
|
|
68
|
-
], 2);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var RadioButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-button.vue"]]);
|
|
73
12
|
|
|
74
|
-
exports
|
|
13
|
+
exports.radioButtonProps = radioButtonProps;
|
|
75
14
|
//# sourceMappingURL=radio-button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\nexport type RadioButtonInstance = InstanceType<typeof RadioButton>\n"],"names":["buildProps","radioPropsBase"],"mappings":";;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,GAAGC,oBAAc;AACnB,CAAC;;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var tour$1 = require('./src/
|
|
6
|
+
var tour$1 = require('./src/tour2.js');
|
|
7
7
|
var step = require('./src/step2.js');
|
|
8
|
-
var tour = require('./src/
|
|
8
|
+
var tour = require('./src/tour.js');
|
|
9
9
|
var install = require('../../utils/vue/install.js');
|
|
10
10
|
|
|
11
11
|
const ElTour = install.withInstall(tour$1["default"], {
|