@element-plus/nightly 0.0.20230408 → 0.0.20230410
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +92 -75
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +92 -75
- 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/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/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/button/index.d.ts +15 -0
- package/es/components/button/src/button.d.ts +4 -3
- package/es/components/button/src/button.mjs +5 -1
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +15 -0
- package/es/components/button/src/button2.mjs +34 -35
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +11 -0
- package/es/components/button/src/use-button.mjs +12 -0
- package/es/components/button/src/use-button.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +15 -0
- package/es/components/calendar/src/calendar.vue.d.ts +17 -2
- package/es/components/color-picker/index.d.ts +15 -0
- package/es/components/color-picker/src/color-picker.vue.d.ts +15 -0
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +23 -74
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +74 -23
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/es/components/date-picker/src/panel-utils.d.ts +30 -0
- package/es/components/image/src/image2.mjs +30 -28
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/popconfirm/index.d.ts +15 -0
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/es/components/time-picker/src/common/props.d.ts +27 -9
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/props/shared.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +6 -0
- package/es/components/time-picker/src/time-picker.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +15 -0
- package/es/components/transfer/src/transfer.vue.d.ts +15 -0
- package/es/index.mjs +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/button/index.d.ts +15 -0
- package/lib/components/button/src/button.d.ts +4 -3
- package/lib/components/button/src/button.js +4 -0
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +15 -0
- package/lib/components/button/src/button2.js +33 -34
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +11 -0
- package/lib/components/button/src/use-button.js +12 -0
- package/lib/components/button/src/use-button.js.map +1 -1
- package/lib/components/calendar/index.d.ts +15 -0
- package/lib/components/calendar/src/calendar.vue.d.ts +17 -2
- package/lib/components/color-picker/index.d.ts +15 -0
- package/lib/components/color-picker/src/color-picker.vue.d.ts +15 -0
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +24 -74
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +74 -24
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +30 -0
- package/lib/components/image/src/image2.js +29 -27
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -0
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/lib/components/time-picker/src/common/props.d.ts +27 -9
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/props/shared.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +6 -0
- package/lib/components/time-picker/src/time-picker.js.map +1 -1
- package/lib/components/transfer/index.d.ts +15 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +15 -0
- package/lib/index.js +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/tags.json +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/image.scss +6 -6
- package/theme-chalk/src/menu.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes } from 'vue';
|
|
1
|
+
import type { Component, ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare const buttonTypes: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
|
|
3
3
|
export declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
|
|
4
4
|
export declare const buttonProps: {
|
|
@@ -11,14 +11,14 @@ export declare const buttonProps: {
|
|
|
11
11
|
readonly disabled: BooleanConstructor;
|
|
12
12
|
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger", unknown, "", boolean>;
|
|
13
13
|
readonly icon: {
|
|
14
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string |
|
|
14
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
15
15
|
readonly required: false;
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
18
18
|
};
|
|
19
19
|
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
20
20
|
readonly loading: BooleanConstructor;
|
|
21
|
-
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string |
|
|
21
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>, boolean>;
|
|
22
22
|
readonly plain: BooleanConstructor;
|
|
23
23
|
readonly text: BooleanConstructor;
|
|
24
24
|
readonly link: BooleanConstructor;
|
|
@@ -29,6 +29,7 @@ export declare const buttonProps: {
|
|
|
29
29
|
readonly color: StringConstructor;
|
|
30
30
|
readonly dark: BooleanConstructor;
|
|
31
31
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
32
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
32
33
|
};
|
|
33
34
|
export declare const buttonEmits: {
|
|
34
35
|
click: (evt: MouseEvent) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../hooks/index.mjs';
|
|
2
2
|
import '../../../utils/index.mjs';
|
|
3
3
|
import { Loading } from '@element-plus/icons-vue';
|
|
4
|
-
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
5
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
6
6
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
7
7
|
|
|
@@ -49,6 +49,10 @@ const buttonProps = buildProps({
|
|
|
49
49
|
autoInsertSpace: {
|
|
50
50
|
type: Boolean,
|
|
51
51
|
default: void 0
|
|
52
|
+
},
|
|
53
|
+
tag: {
|
|
54
|
+
type: definePropType([String, Object]),
|
|
55
|
+
default: "button"
|
|
52
56
|
}
|
|
53
57
|
});
|
|
54
58
|
const buttonEmits = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnD,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,OAAO;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
|
1
|
+
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnD,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,OAAO;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
|
@@ -26,6 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
readonly color: StringConstructor;
|
|
27
27
|
readonly dark: BooleanConstructor;
|
|
28
28
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
29
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
29
30
|
}, {
|
|
30
31
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
31
32
|
readonly size: {
|
|
@@ -55,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
56
|
readonly color: StringConstructor;
|
|
56
57
|
readonly dark: BooleanConstructor;
|
|
57
58
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
59
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
58
60
|
}>> & {
|
|
59
61
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
60
62
|
}>>;
|
|
@@ -82,6 +84,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
84
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
83
85
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
84
86
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
87
|
+
_props: import("vue").ComputedRef<{
|
|
88
|
+
ariaDisabled: boolean;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
autofocus: boolean;
|
|
91
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
92
|
+
} | {
|
|
93
|
+
ariaDisabled?: undefined;
|
|
94
|
+
disabled?: undefined;
|
|
95
|
+
autofocus?: undefined;
|
|
96
|
+
type?: undefined;
|
|
97
|
+
}>;
|
|
85
98
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
86
99
|
handleClick: (evt: MouseEvent) => void;
|
|
87
100
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -177,6 +190,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
190
|
readonly color: StringConstructor;
|
|
178
191
|
readonly dark: BooleanConstructor;
|
|
179
192
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
193
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
180
194
|
}>> & {
|
|
181
195
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
182
196
|
}, {
|
|
@@ -187,6 +201,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
201
|
readonly text: boolean;
|
|
188
202
|
readonly round: boolean;
|
|
189
203
|
readonly circle: boolean;
|
|
204
|
+
readonly tag: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
190
205
|
readonly nativeType: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
191
206
|
readonly loadingIcon: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
192
207
|
readonly autoInsertSpace: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock,
|
|
1
|
+
import { defineComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createElementBlock, Fragment, renderSlot, normalizeClass, createCommentVNode } from 'vue';
|
|
2
2
|
import { ElIcon } from '../../icon/index.mjs';
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import { useButton } from './use-button.mjs';
|
|
@@ -7,7 +7,6 @@ import { useButtonCustomStyle } from './button-custom.mjs';
|
|
|
7
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
8
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
9
|
|
|
10
|
-
const _hoisted_1 = ["aria-disabled", "disabled", "autofocus", "type"];
|
|
11
10
|
const __default__ = defineComponent({
|
|
12
11
|
name: "ElButton"
|
|
13
12
|
});
|
|
@@ -19,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
18
|
const props = __props;
|
|
20
19
|
const buttonStyle = useButtonCustomStyle(props);
|
|
21
20
|
const ns = useNamespace("button");
|
|
22
|
-
const { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } = useButton(props, emit);
|
|
21
|
+
const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit);
|
|
23
22
|
expose({
|
|
24
23
|
ref: _ref,
|
|
25
24
|
size: _size,
|
|
@@ -28,10 +27,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
27
|
shouldAddSpace
|
|
29
28
|
});
|
|
30
29
|
return (_ctx, _cache) => {
|
|
31
|
-
return openBlock(),
|
|
30
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({
|
|
32
31
|
ref_key: "_ref",
|
|
33
|
-
ref: _ref
|
|
34
|
-
|
|
32
|
+
ref: _ref
|
|
33
|
+
}, unref(_props), {
|
|
34
|
+
class: [
|
|
35
35
|
unref(ns).b(),
|
|
36
36
|
unref(ns).m(unref(_type)),
|
|
37
37
|
unref(ns).m(unref(_size)),
|
|
@@ -43,37 +43,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
unref(ns).is("text", _ctx.text),
|
|
44
44
|
unref(ns).is("link", _ctx.link),
|
|
45
45
|
unref(ns).is("has-bg", _ctx.bg)
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
],
|
|
47
|
+
style: unref(buttonStyle),
|
|
48
|
+
onClick: unref(handleClick)
|
|
49
|
+
}), {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
52
|
+
_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: normalizeClass(unref(ns).is("loading"))
|
|
55
|
+
}, {
|
|
56
|
+
default: withCtx(() => [
|
|
57
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["class"]))
|
|
61
|
+
], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
59
62
|
default: withCtx(() => [
|
|
60
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.
|
|
63
|
+
_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
|
|
61
64
|
]),
|
|
62
|
-
_:
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
renderSlot(_ctx.$slots, "default")
|
|
75
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
76
|
-
], 14, _hoisted_1);
|
|
65
|
+
_: 3
|
|
66
|
+
})) : createCommentVNode("v-if", true),
|
|
67
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
68
|
+
key: 2,
|
|
69
|
+
class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
|
|
70
|
+
}, [
|
|
71
|
+
renderSlot(_ctx.$slots, "default")
|
|
72
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
73
|
+
]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 16, ["class", "style", "onClick"]);
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ns.is('text', text),\n ns.is('link', link),\n ns.is('has-bg', bg),\n ]\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits, buttonProps } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } =\n useButton(props, emit)\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCA+Cc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAc,qBAAqB,KAAK,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAO,KAAO,EAAA,SAAA,EAAW,QAAQ,cAAgB,EAAA,WAAA,EAAA,GAC7D,SAAU,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEvB,IAAa,MAAA,CAAA;AAAA,MAEX,GAAK,EAAA,IAAA;AAAA,MAEL,IAAM,EAAA,KAAA;AAAA,MAEN,IAAM,EAAA,KAAA;AAAA,MAEN,QAAU,EAAA,SAAA;AAAA,MAEV,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,6 +5,17 @@ export declare const useButton: (props: ButtonProps, emit: SetupContext<ButtonEm
|
|
|
5
5
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
6
6
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
7
7
|
_ref: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
8
|
+
_props: import("vue").ComputedRef<{
|
|
9
|
+
ariaDisabled: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
autofocus: boolean;
|
|
12
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
13
|
+
} | {
|
|
14
|
+
ariaDisabled?: undefined;
|
|
15
|
+
disabled?: undefined;
|
|
16
|
+
autofocus?: undefined;
|
|
17
|
+
type?: undefined;
|
|
18
|
+
}>;
|
|
8
19
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
9
20
|
handleClick: (evt: MouseEvent) => void;
|
|
10
21
|
};
|
|
@@ -28,6 +28,17 @@ const useButton = (props, emit) => {
|
|
|
28
28
|
var _a, _b, _c;
|
|
29
29
|
return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false;
|
|
30
30
|
});
|
|
31
|
+
const _props = computed(() => {
|
|
32
|
+
if (props.tag === "button") {
|
|
33
|
+
return {
|
|
34
|
+
ariaDisabled: _disabled.value || props.loading,
|
|
35
|
+
disabled: _disabled.value || props.loading,
|
|
36
|
+
autofocus: props.autofocus,
|
|
37
|
+
type: props.nativeType
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {};
|
|
41
|
+
});
|
|
31
42
|
const shouldAddSpace = computed(() => {
|
|
32
43
|
var _a;
|
|
33
44
|
const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
@@ -51,6 +62,7 @@ const useButton = (props, emit) => {
|
|
|
51
62
|
_size,
|
|
52
63
|
_type,
|
|
53
64
|
_ref,
|
|
65
|
+
_props,
|
|
54
66
|
shouldAddSpace,
|
|
55
67
|
handleClick
|
|
56
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-button.mjs","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"use-button.mjs","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -85,6 +85,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
85
85
|
readonly color: StringConstructor;
|
|
86
86
|
readonly dark: BooleanConstructor;
|
|
87
87
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
88
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
88
89
|
}, {
|
|
89
90
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
90
91
|
readonly size: {
|
|
@@ -114,6 +115,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
114
115
|
readonly color: StringConstructor;
|
|
115
116
|
readonly dark: BooleanConstructor;
|
|
116
117
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
118
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
117
119
|
}>> & {
|
|
118
120
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
119
121
|
}>>;
|
|
@@ -141,6 +143,17 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
141
143
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
142
144
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
143
145
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
146
|
+
_props: import("vue").ComputedRef<{
|
|
147
|
+
ariaDisabled: boolean;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
autofocus: boolean;
|
|
150
|
+
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
151
|
+
} | {
|
|
152
|
+
ariaDisabled?: undefined;
|
|
153
|
+
disabled?: undefined;
|
|
154
|
+
autofocus?: undefined;
|
|
155
|
+
type?: undefined;
|
|
156
|
+
}>;
|
|
144
157
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
145
158
|
handleClick: (evt: MouseEvent) => void;
|
|
146
159
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -236,6 +249,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
236
249
|
readonly color: StringConstructor;
|
|
237
250
|
readonly dark: BooleanConstructor;
|
|
238
251
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
252
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
239
253
|
}>> & {
|
|
240
254
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
241
255
|
}, {
|
|
@@ -246,6 +260,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
246
260
|
readonly text: boolean;
|
|
247
261
|
readonly round: boolean;
|
|
248
262
|
readonly circle: boolean;
|
|
263
|
+
readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
249
264
|
readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
250
265
|
readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
251
266
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
85
|
readonly color: StringConstructor;
|
|
86
86
|
readonly dark: BooleanConstructor;
|
|
87
87
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
88
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
88
89
|
}, {
|
|
89
90
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
90
91
|
readonly size: {
|
|
@@ -114,11 +115,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
115
|
readonly color: StringConstructor;
|
|
115
116
|
readonly dark: BooleanConstructor;
|
|
116
117
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
118
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
117
119
|
}>> & {
|
|
118
120
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
119
121
|
}>>;
|
|
120
122
|
emit: (event: "click", evt: MouseEvent) => void;
|
|
121
|
-
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
123
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
122
124
|
ns: {
|
|
123
125
|
namespace: import("vue").ComputedRef<string>;
|
|
124
126
|
b: (blockSuffix?: string) => string;
|
|
@@ -141,8 +143,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
143
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
142
144
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
143
145
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
146
|
+
_props: import("vue").ComputedRef<{
|
|
147
|
+
ariaDisabled: boolean;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
autofocus: boolean;
|
|
150
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
151
|
+
} | {
|
|
152
|
+
ariaDisabled?: undefined;
|
|
153
|
+
disabled?: undefined;
|
|
154
|
+
autofocus?: undefined;
|
|
155
|
+
type?: undefined;
|
|
156
|
+
}>;
|
|
144
157
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
145
|
-
handleClick: (evt: MouseEvent) => void;
|
|
158
|
+
handleClick: (evt: MouseEvent) => void; /** @description select a specific date */
|
|
146
159
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
147
160
|
readonly size: {
|
|
148
161
|
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
@@ -236,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
249
|
readonly color: StringConstructor;
|
|
237
250
|
readonly dark: BooleanConstructor;
|
|
238
251
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
252
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
239
253
|
}>> & {
|
|
240
254
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
241
255
|
}, {
|
|
@@ -246,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
246
260
|
readonly text: boolean;
|
|
247
261
|
readonly round: boolean;
|
|
248
262
|
readonly circle: boolean;
|
|
263
|
+
readonly tag: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
249
264
|
readonly nativeType: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
250
265
|
readonly loadingIcon: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
251
266
|
readonly autoInsertSpace: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -6692,6 +6692,7 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6692
6692
|
readonly color: StringConstructor;
|
|
6693
6693
|
readonly dark: BooleanConstructor;
|
|
6694
6694
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6695
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6695
6696
|
}, {
|
|
6696
6697
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
6697
6698
|
readonly size: {
|
|
@@ -6721,6 +6722,7 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6721
6722
|
readonly color: StringConstructor;
|
|
6722
6723
|
readonly dark: BooleanConstructor;
|
|
6723
6724
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6725
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6724
6726
|
}>> & {
|
|
6725
6727
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
6726
6728
|
}>>;
|
|
@@ -6748,6 +6750,17 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6748
6750
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
6749
6751
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
6750
6752
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
6753
|
+
_props: import("vue").ComputedRef<{
|
|
6754
|
+
ariaDisabled: boolean;
|
|
6755
|
+
disabled: boolean;
|
|
6756
|
+
autofocus: boolean;
|
|
6757
|
+
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
6758
|
+
} | {
|
|
6759
|
+
ariaDisabled?: undefined;
|
|
6760
|
+
disabled?: undefined;
|
|
6761
|
+
autofocus?: undefined;
|
|
6762
|
+
type?: undefined;
|
|
6763
|
+
}>;
|
|
6751
6764
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
6752
6765
|
handleClick: (evt: MouseEvent) => void;
|
|
6753
6766
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -6843,6 +6856,7 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6843
6856
|
readonly color: StringConstructor;
|
|
6844
6857
|
readonly dark: BooleanConstructor;
|
|
6845
6858
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6859
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6846
6860
|
}>> & {
|
|
6847
6861
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
6848
6862
|
}, {
|
|
@@ -6853,6 +6867,7 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6853
6867
|
readonly text: boolean;
|
|
6854
6868
|
readonly round: boolean;
|
|
6855
6869
|
readonly circle: boolean;
|
|
6870
|
+
readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
6856
6871
|
readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
6857
6872
|
readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
6858
6873
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -6694,6 +6694,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6694
6694
|
readonly color: StringConstructor;
|
|
6695
6695
|
readonly dark: BooleanConstructor;
|
|
6696
6696
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6697
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6697
6698
|
}, {
|
|
6698
6699
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
6699
6700
|
readonly size: {
|
|
@@ -6723,6 +6724,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6723
6724
|
readonly color: StringConstructor;
|
|
6724
6725
|
readonly dark: BooleanConstructor;
|
|
6725
6726
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6727
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6726
6728
|
}>> & {
|
|
6727
6729
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
6728
6730
|
}>>;
|
|
@@ -6750,6 +6752,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6750
6752
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
6751
6753
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
6752
6754
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
6755
|
+
_props: import("vue").ComputedRef<{
|
|
6756
|
+
ariaDisabled: boolean;
|
|
6757
|
+
disabled: boolean;
|
|
6758
|
+
autofocus: boolean;
|
|
6759
|
+
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
6760
|
+
} | {
|
|
6761
|
+
ariaDisabled?: undefined;
|
|
6762
|
+
disabled?: undefined;
|
|
6763
|
+
autofocus?: undefined;
|
|
6764
|
+
type?: undefined;
|
|
6765
|
+
}>;
|
|
6753
6766
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
6754
6767
|
handleClick: (evt: MouseEvent) => void;
|
|
6755
6768
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -6845,6 +6858,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6845
6858
|
readonly color: StringConstructor;
|
|
6846
6859
|
readonly dark: BooleanConstructor;
|
|
6847
6860
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
6861
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
6848
6862
|
}>> & {
|
|
6849
6863
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
6850
6864
|
}, {
|
|
@@ -6855,6 +6869,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6855
6869
|
readonly text: boolean;
|
|
6856
6870
|
readonly round: boolean;
|
|
6857
6871
|
readonly circle: boolean;
|
|
6872
|
+
readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
6858
6873
|
readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
6859
6874
|
readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
6860
6875
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Countdown from './src/
|
|
3
|
-
export { countdownEmits, countdownProps } from './src/
|
|
2
|
+
import Countdown from './src/countdown2.mjs';
|
|
3
|
+
export { countdownEmits, countdownProps } from './src/countdown.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElCountdown = withInstall(Countdown);
|