element-ps 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +251 -183
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +252 -184
- package/es/components/button/index.d.ts +4 -0
- package/es/components/button/src/button.d.ts +1 -0
- package/es/components/button/src/button.vue.d.ts +4 -0
- package/es/index.mjs +5 -5
- package/es/packages/components/badge/index.mjs +2 -2
- package/es/packages/components/badge/src/badge.mjs +20 -5
- package/es/packages/components/badge/src/badge.mjs.map +1 -1
- package/es/packages/components/badge/src/badge.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/badge/src/badge2.mjs +5 -20
- package/es/packages/components/badge/src/badge2.mjs.map +1 -1
- package/es/packages/components/breadcrumb/index.mjs +2 -2
- package/es/packages/components/breadcrumb/src/breadcrumb.mjs +13 -5
- package/es/packages/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/packages/components/breadcrumb/src/breadcrumb.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/breadcrumb/src/breadcrumb2.mjs +5 -13
- package/es/packages/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/packages/components/button/index.mjs +3 -3
- package/es/packages/components/button/src/button-group.mjs +5 -7
- package/es/packages/components/button/src/button-group.mjs.map +1 -1
- package/es/packages/components/button/src/button-group.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/button/src/button-group2.mjs +7 -5
- package/es/packages/components/button/src/button-group2.mjs.map +1 -1
- package/es/packages/components/button/src/button.mjs +46 -5
- package/es/packages/components/button/src/button.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue&type=script&lang.mjs +40 -1
- package/es/packages/components/button/src/button.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.mjs +4 -3
- package/es/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.mjs.map +1 -1
- package/es/packages/components/button/src/button2.mjs +5 -45
- package/es/packages/components/button/src/button2.mjs.map +1 -1
- package/es/packages/components/image/index.mjs +2 -2
- package/es/packages/components/image/src/image.mjs +44 -5
- package/es/packages/components/image/src/image.mjs.map +1 -1
- package/es/packages/components/image/src/image.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/image/src/image2.mjs +5 -44
- package/es/packages/components/image/src/image2.mjs.map +1 -1
- package/es/packages/components/index.mjs +5 -5
- package/es/packages/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/packages/components/tag/index.mjs +2 -2
- package/es/packages/components/tag/src/tag.mjs +26 -5
- package/es/packages/components/tag/src/tag.mjs.map +1 -1
- package/es/packages/components/tag/src/tag.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/tag/src/tag2.mjs +5 -26
- package/es/packages/components/tag/src/tag2.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/button/index.d.ts +4 -0
- package/lib/components/button/src/button.d.ts +1 -0
- package/lib/components/button/src/button.vue.d.ts +4 -0
- package/lib/index.js +5 -5
- package/lib/packages/components/badge/index.js +2 -2
- package/lib/packages/components/badge/src/badge.js +19 -5
- package/lib/packages/components/badge/src/badge.js.map +1 -1
- package/lib/packages/components/badge/src/badge.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/badge/src/badge2.js +5 -19
- package/lib/packages/components/badge/src/badge2.js.map +1 -1
- package/lib/packages/components/breadcrumb/index.js +2 -2
- package/lib/packages/components/breadcrumb/src/breadcrumb.js +12 -5
- package/lib/packages/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/packages/components/breadcrumb/src/breadcrumb.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/breadcrumb/src/breadcrumb2.js +5 -12
- package/lib/packages/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/packages/components/button/index.js +3 -3
- package/lib/packages/components/button/src/button-group.js +5 -6
- package/lib/packages/components/button/src/button-group.js.map +1 -1
- package/lib/packages/components/button/src/button-group.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/button/src/button-group2.js +6 -5
- package/lib/packages/components/button/src/button-group2.js.map +1 -1
- package/lib/packages/components/button/src/button.js +49 -5
- package/lib/packages/components/button/src/button.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue&type=script&lang.js +40 -1
- package/lib/packages/components/button/src/button.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.js +3 -2
- package/lib/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.js.map +1 -1
- package/lib/packages/components/button/src/button2.js +5 -48
- package/lib/packages/components/button/src/button2.js.map +1 -1
- package/lib/packages/components/image/index.js +2 -2
- package/lib/packages/components/image/src/image.js +44 -5
- package/lib/packages/components/image/src/image.js.map +1 -1
- package/lib/packages/components/image/src/image.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/image/src/image2.js +5 -44
- package/lib/packages/components/image/src/image2.js.map +1 -1
- package/lib/packages/components/index.js +5 -5
- package/lib/packages/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/packages/components/tag/index.js +2 -2
- package/lib/packages/components/tag/src/tag.js +25 -5
- package/lib/packages/components/tag/src/tag.js.map +1 -1
- package/lib/packages/components/tag/src/tag.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/tag/src/tag2.js +5 -25
- package/lib/packages/components/tag/src/tag2.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withInstall, withNoopInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
2
|
+
import './src/breadcrumb2.mjs';
|
|
3
3
|
import './src/breadcrumb-item2.mjs';
|
|
4
|
-
export { breadcrumbProps } from './src/
|
|
4
|
+
export { breadcrumbProps } from './src/breadcrumb.mjs';
|
|
5
5
|
export { breadcrumbItemProps } from './src/breadcrumb-item.mjs';
|
|
6
6
|
import script from './src/breadcrumb.vue_vue&type=script&lang.mjs';
|
|
7
7
|
import script$1 from './src/breadcrumb-item.vue_vue&type=script&lang.mjs';
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { default } from './breadcrumb.vue_vue&type=script&lang.mjs';
|
|
3
|
-
import { render } from './breadcrumb.vue_vue&type=template&id=b67a42b6&lang.mjs';
|
|
1
|
+
import { buildProps, definePropType } from '../../../utils/props.mjs';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const breadcrumbProps = buildProps({
|
|
4
|
+
separator: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "/"
|
|
7
|
+
},
|
|
8
|
+
separatorIcon: {
|
|
9
|
+
type: definePropType([String, Object]),
|
|
10
|
+
default: ""
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { breadcrumbProps };
|
|
7
15
|
//# sourceMappingURL=breadcrumb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumb.mjs","sources":["../../../../../../../packages/components/breadcrumb/src/breadcrumb.ts"],"sourcesContent":["import type { Component, ExtractPropTypes } from 'vue'\nimport { buildProps, definePropType } from '@element-ps/utils/props'\n\nexport const breadcrumbProps = buildProps({\n separator: {\n type: String,\n default: '/',\n },\n separatorIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: '',\n },\n} as const)\nexport type BreadcrumbProps = ExtractPropTypes<typeof breadcrumbProps>\n"],"names":[],"mappings":";;MAGa,kBAAkB,WAAW;AAAA,EACxC,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,eAAe;AAAA,IACb,MAAM,eAAmC,CAAC,QAAQ;AAAA,IAClD,SAAS;AAAA;AAAA;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, provide, onMounted } from 'vue';
|
|
2
2
|
import '../../../tokens/index.mjs';
|
|
3
|
-
import { breadcrumbProps } from './
|
|
3
|
+
import { breadcrumbProps } from './breadcrumb.mjs';
|
|
4
4
|
import { elBreadcrumbKey } from '../../../tokens/breadcrumb.mjs';
|
|
5
5
|
|
|
6
6
|
var script = defineComponent({
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import script from './breadcrumb.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './breadcrumb.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './breadcrumb.vue_vue&type=template&id=b67a42b6&lang.mjs';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type: String,
|
|
6
|
-
default: "/"
|
|
7
|
-
},
|
|
8
|
-
separatorIcon: {
|
|
9
|
-
type: definePropType([String, Object]),
|
|
10
|
-
default: ""
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export { breadcrumbProps };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/breadcrumb/src/breadcrumb.vue";
|
|
15
7
|
//# sourceMappingURL=breadcrumb2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb2.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"breadcrumb2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withInstall, withNoopInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
import './src/button-
|
|
4
|
-
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './src/
|
|
2
|
+
import './src/button2.mjs';
|
|
3
|
+
import './src/button-group.mjs';
|
|
4
|
+
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './src/button.mjs';
|
|
5
5
|
import script from './src/button.vue_vue&type=script&lang.mjs';
|
|
6
6
|
import script$1 from './src/button-group.vue_vue&type=script&lang.mjs';
|
|
7
7
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import script from './button-group.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './button-group.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './button-group.vue_vue&type=template&id=1bab7d77&lang.mjs';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type: buttonProps.type
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { buttonGroupProps };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/button/src/button-group.vue";
|
|
9
7
|
//# sourceMappingURL=button-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"button-group.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, reactive, toRef } from 'vue';
|
|
2
2
|
import '../../../tokens/index.mjs';
|
|
3
|
-
import { buttonGroupProps } from './button-
|
|
3
|
+
import { buttonGroupProps } from './button-group2.mjs';
|
|
4
4
|
import { elButtonGroupKey } from '../../../tokens/button.mjs';
|
|
5
5
|
|
|
6
6
|
var script = defineComponent({
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { default } from './button-group.vue_vue&type=script&lang.mjs';
|
|
3
|
-
import { render } from './button-group.vue_vue&type=template&id=1bab7d77&lang.mjs';
|
|
1
|
+
import { buttonProps } from './button.mjs';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const buttonGroupProps = {
|
|
4
|
+
size: buttonProps.size,
|
|
5
|
+
type: buttonProps.type
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { buttonGroupProps };
|
|
7
9
|
//# sourceMappingURL=button-group2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-group2.mjs","sources":["../../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonGroupProps = {\n size: buttonProps.size,\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes<typeof buttonGroupProps>\n"],"names":[],"mappings":";;MAIa,mBAAmB;AAAA,EAC9B,MAAM,YAAY;AAAA,EAClB,MAAM,YAAY;AAAA;;;;"}
|
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import '../../../hooks/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/props.mjs';
|
|
3
|
+
import { useFormItemProps } from '../../../hooks/use-form-item/index.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const buttonType = [
|
|
6
|
+
"default",
|
|
7
|
+
"primary",
|
|
8
|
+
"success",
|
|
9
|
+
"warning",
|
|
10
|
+
"info",
|
|
11
|
+
"danger",
|
|
12
|
+
"text",
|
|
13
|
+
""
|
|
14
|
+
];
|
|
15
|
+
const buttonSize = ["", "large", "medium", "small", "mini"];
|
|
16
|
+
const buttonNativeType = ["button", "submit", "reset"];
|
|
17
|
+
const buttonProps = buildProps({
|
|
18
|
+
...useFormItemProps,
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
values: buttonType,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
type: definePropType([String, Object]),
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
nativeType: {
|
|
29
|
+
type: String,
|
|
30
|
+
values: buttonNativeType,
|
|
31
|
+
default: "button"
|
|
32
|
+
},
|
|
33
|
+
loading: Boolean,
|
|
34
|
+
plain: Boolean,
|
|
35
|
+
autofocus: Boolean,
|
|
36
|
+
round: Boolean,
|
|
37
|
+
circle: Boolean,
|
|
38
|
+
color: String,
|
|
39
|
+
autoInsertSpace: {
|
|
40
|
+
type: Boolean
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const buttonEmits = {
|
|
44
|
+
click: (evt) => evt instanceof MouseEvent
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType };
|
|
7
48
|
//# sourceMappingURL=button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.mjs","sources":["../../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useFormItemProps } from '@element-ps/hooks'\nimport { buildProps, definePropType } from '@element-ps/utils/props'\nimport type { ExtractPropTypes, Component } from 'vue'\n\nexport const buttonType = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n 'text',\n '',\n] as const\nexport const buttonSize = ['', 'large', 'medium', 'small', 'mini'] as const\nexport const buttonNativeType = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n ...useFormItemProps,\n type: {\n type: String,\n values: buttonType,\n default: '',\n },\n icon: {\n type: definePropType<string | Component>([String, Object]),\n default: '',\n },\n nativeType: {\n type: String,\n values: buttonNativeType,\n default: 'button',\n },\n loading: Boolean,\n plain: Boolean,\n autofocus: Boolean,\n round: Boolean,\n circle: Boolean,\n color: String,\n autoInsertSpace: {\n type: Boolean,\n },\n} as const)\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n\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"],"names":[],"mappings":";;;;MAIa,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;MAEW,aAAa,CAAC,IAAI,SAAS,UAAU,SAAS;MAC9C,mBAAmB,CAAC,UAAU,UAAU;MAExC,cAAc,WAAW;AAAA,KACjC;AAAA,EACH,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM,eAAmC,CAAC,QAAQ;AAAA,IAClD,SAAS;AAAA;AAAA,EAEX,YAAY;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA,EAEX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,iBAAiB;AAAA,IACf,MAAM;AAAA;AAAA;MAQG,cAAc;AAAA,EACzB,OAAO,CAAC,QAAoB,eAAe;AAAA;;;;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { defineComponent, inject, computed } from 'vue';
|
|
2
|
+
import { useCssVar } from '@vueuse/core';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
4
|
import '../../../tokens/index.mjs';
|
|
4
5
|
import { PsIcon } from '../../icon/index.mjs';
|
|
5
6
|
import { Loading } from '@element-plus/icons';
|
|
6
|
-
import {
|
|
7
|
+
import { darken, lighten } from '../../../utils/color.mjs';
|
|
8
|
+
import { buttonProps } from './button.mjs';
|
|
7
9
|
import { elButtonGroupKey } from '../../../tokens/button.mjs';
|
|
8
10
|
import { useGlobalConfig } from '../../../hooks/use-global-config/index.mjs';
|
|
9
11
|
import { useFormItem } from '../../../hooks/use-form-item/index.mjs';
|
|
@@ -38,7 +40,44 @@ var script = defineComponent({
|
|
|
38
40
|
size: computed(() => elBtnGroup == null ? void 0 : elBtnGroup.size)
|
|
39
41
|
});
|
|
40
42
|
const buttonType = computed(() => props.type || (elBtnGroup == null ? void 0 : elBtnGroup.type) || "default");
|
|
43
|
+
const typeColor = computed(() => useCssVar(`--el-color-${props.type}`).value);
|
|
44
|
+
const buttonStyle = computed(() => {
|
|
45
|
+
let styles = {};
|
|
46
|
+
const buttonColor = props.color || typeColor.value;
|
|
47
|
+
if (buttonColor) {
|
|
48
|
+
const darkenBgColor = darken(buttonColor, 0.1);
|
|
49
|
+
if (props.plain) {
|
|
50
|
+
styles = {
|
|
51
|
+
"--el-button-bg-color": lighten(buttonColor, 0.9),
|
|
52
|
+
"--el-button-text-color": buttonColor,
|
|
53
|
+
"--el-button-hover-text-color": "var(--el-color-white)",
|
|
54
|
+
"--el-button-hover-bg-color": buttonColor,
|
|
55
|
+
"--el-button-hover-border-color": buttonColor,
|
|
56
|
+
"--el-button-active-bg-color": darkenBgColor,
|
|
57
|
+
"--el-button-active-text-color": "var(--el-color-white)",
|
|
58
|
+
"--el-button-active-border-color": darkenBgColor
|
|
59
|
+
};
|
|
60
|
+
} else {
|
|
61
|
+
const lightenBgColor = lighten(buttonColor);
|
|
62
|
+
styles = {
|
|
63
|
+
"--el-button-bg-color": buttonColor,
|
|
64
|
+
"--el-button-border-color": buttonColor,
|
|
65
|
+
"--el-button-hover-bg-color": lightenBgColor,
|
|
66
|
+
"--el-button-hover-border-color": lightenBgColor,
|
|
67
|
+
"--el-button-active-bg-color": darkenBgColor,
|
|
68
|
+
"--el-button-active-border-color": darkenBgColor
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (buttonDisabled.value) {
|
|
72
|
+
const disabledButtonColor = lighten(buttonColor, 0.5);
|
|
73
|
+
styles["--el-button-disabled-bg-color"] = disabledButtonColor;
|
|
74
|
+
styles["--el-button-disabled-border-color"] = disabledButtonColor;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return styles;
|
|
78
|
+
});
|
|
41
79
|
return {
|
|
80
|
+
buttonStyle,
|
|
42
81
|
buttonSize,
|
|
43
82
|
buttonType,
|
|
44
83
|
buttonDisabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.vue_vue&type=script&lang.mjs","sources":["../../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <button\n :class=\"[\n 'el-button',\n buttonType ? 'el-button--' + buttonType : '',\n buttonSize ? 'el-button--' + buttonSize : '',\n {\n 'is-disabled': buttonDisabled,\n 'is-loading': loading,\n 'is-plain': plain,\n 'is-round': round,\n 'is-circle': circle,\n },\n ]\"\n :disabled=\"buttonDisabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n >\n <ps-icon v-if=\"loading\" class=\"is-loading\"><loading /></ps-icon>\n <ps-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </ps-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ 'el-button__text--expand': shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\nimport { computed, inject, defineComponent } from 'vue'\nimport { useFormItem, useGlobalConfig } from '@element-ps/hooks'\nimport { elButtonGroupKey } from '@element-ps/tokens'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { Loading } from '@element-plus/icons'\
|
|
1
|
+
{"version":3,"file":"button.vue_vue&type=script&lang.mjs","sources":["../../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <button\n :class=\"[\n 'el-button',\n buttonType ? 'el-button--' + buttonType : '',\n buttonSize ? 'el-button--' + buttonSize : '',\n {\n 'is-disabled': buttonDisabled,\n 'is-loading': loading,\n 'is-plain': plain,\n 'is-round': round,\n 'is-circle': circle,\n },\n ]\"\n :disabled=\"buttonDisabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n :style=\"buttonStyle\"\n >\n <ps-icon v-if=\"loading\" class=\"is-loading\"><loading /></ps-icon>\n <ps-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </ps-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ 'el-button__text--expand': shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\nimport { computed, inject, defineComponent } from 'vue'\nimport { useCssVar } from '@vueuse/core'\nimport { useFormItem, useGlobalConfig } from '@element-ps/hooks'\nimport { elButtonGroupKey } from '@element-ps/tokens'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { Loading } from '@element-plus/icons'\nimport { lighten, darken } from '@element-ps/utils/color'\nimport { buttonProps } from './button'\n\nexport default defineComponent({\n name: 'PsButton',\n components: {\n PsIcon,\n Loading,\n },\n props: buttonProps,\n\n setup(props, { slots }) {\n const elBtnGroup = inject(elButtonGroupKey, undefined)\n const globalConfig = useGlobalConfig()\n const autoInsertSpace = computed(() => {\n return props.autoInsertSpace ?? globalConfig?.button.autoInsertSpace\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\n return /^\\p{Unified_Ideograph}{2}$/u.test(text as string)\n }\n }\n return false\n })\n const { size: buttonSize, disabled: buttonDisabled } = useFormItem({\n size: computed(() => elBtnGroup?.size),\n })\n const buttonType = computed(\n () => props.type || elBtnGroup?.type || 'default'\n )\n\n // calculate hover & active color by color\n const typeColor = computed(\n () => useCssVar(`--el-color-${props.type}`).value\n )\n const buttonStyle = computed(() => {\n let styles = {}\n\n const buttonColor = props.color || typeColor.value\n\n if (buttonColor) {\n const darkenBgColor = darken(buttonColor, 0.1)\n if (props.plain) {\n styles = {\n '--el-button-bg-color': lighten(buttonColor, 0.9),\n '--el-button-text-color': buttonColor,\n '--el-button-hover-text-color': 'var(--el-color-white)',\n '--el-button-hover-bg-color': buttonColor,\n '--el-button-hover-border-color': buttonColor,\n '--el-button-active-bg-color': darkenBgColor,\n '--el-button-active-text-color': 'var(--el-color-white)',\n '--el-button-active-border-color': darkenBgColor,\n }\n } else {\n const lightenBgColor = lighten(buttonColor)\n styles = {\n '--el-button-bg-color': buttonColor,\n '--el-button-border-color': buttonColor,\n '--el-button-hover-bg-color': lightenBgColor,\n '--el-button-hover-border-color': lightenBgColor,\n '--el-button-active-bg-color': darkenBgColor,\n '--el-button-active-border-color': darkenBgColor,\n }\n }\n\n if (buttonDisabled.value) {\n const disabledButtonColor = lighten(buttonColor, 0.5)\n styles['--el-button-disabled-bg-color'] = disabledButtonColor\n styles['--el-button-disabled-border-color'] = disabledButtonColor\n }\n }\n\n return styles\n })\n\n return {\n buttonStyle,\n buttonSize,\n buttonType,\n buttonDisabled,\n\n shouldAddSpace,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AA0CA,aAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA;AAAA,EAEF,OAAO;AAAA,EAEP,MAAM,OAAO,EAAE,SAAS;AACtB,UAAM,aAAa,OAAO,kBAAkB;AAC5C,UAAM,eAAe;AACrB,UAAM,kBAAkB,SAAS,MAAM;;AACrC,aAAO,YAAM,oBAAN,YAAyB,6CAAc,OAAO;AAAA;AAIvD,UAAM,iBAAiB,SAAS,MAAM;;AACpC,YAAM,cAAc,YAAM,YAAN;AACpB,UAAI,gBAAgB,SAAS,4CAAa,YAAW,GAAG;AACtD,cAAM,OAAO,YAAY;AACzB,YAAI,8BAAM,UAAS,MAAM;AACvB,gBAAM,OAAO,KAAK;AAClB,iBAAO,8BAA8B,KAAK;AAAA;AAAA;AAG9C,aAAO;AAAA;AAET,UAAM,EAAE,MAAM,YAAY,UAAU,mBAAmB,YAAY;AAAA,MACjE,MAAM,SAAS,MAAM,yCAAY;AAAA;AAEnC,UAAM,aAAa,SACjB,MAAM,MAAM,kDAAoB,SAAQ;AAI1C,UAAM,YAAY,SAChB,MAAM,UAAU,cAAc,MAAM,QAAQ;AAE9C,UAAM,cAAc,SAAS,MAAM;AACjC,UAAI,SAAS;AAEb,YAAM,cAAc,MAAM,SAAS,UAAU;AAE7C,UAAI,aAAa;AACf,cAAM,gBAAgB,OAAO,aAAa;AAC1C,YAAI,MAAM,OAAO;AACf,mBAAS;AAAA,YACP,wBAAwB,QAAQ,aAAa;AAAA,YAC7C,0BAA0B;AAAA,YAC1B,gCAAgC;AAAA,YAChC,8BAA8B;AAAA,YAC9B,kCAAkC;AAAA,YAClC,+BAA+B;AAAA,YAC/B,iCAAiC;AAAA,YACjC,mCAAmC;AAAA;AAAA,eAEhC;AACL,gBAAM,iBAAiB,QAAQ;AAC/B,mBAAS;AAAA,YACP,wBAAwB;AAAA,YACxB,4BAA4B;AAAA,YAC5B,8BAA8B;AAAA,YAC9B,kCAAkC;AAAA,YAClC,+BAA+B;AAAA,YAC/B,mCAAmC;AAAA;AAAA;AAIvC,YAAI,eAAe,OAAO;AACxB,gBAAM,sBAAsB,QAAQ,aAAa;AACjD,iBAAO,mCAAmC;AAC1C,iBAAO,uCAAuC;AAAA;AAAA;AAIlD,aAAO;AAAA;AAGT,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA;AAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createVNode, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, withCtx, createVNode, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = ["disabled", "autofocus", "type"];
|
|
4
4
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -19,7 +19,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19
19
|
]),
|
|
20
20
|
disabled: _ctx.buttonDisabled || _ctx.loading,
|
|
21
21
|
autofocus: _ctx.autofocus,
|
|
22
|
-
type: _ctx.nativeType
|
|
22
|
+
type: _ctx.nativeType,
|
|
23
|
+
style: normalizeStyle(_ctx.buttonStyle)
|
|
23
24
|
}, [
|
|
24
25
|
_ctx.loading ? (openBlock(), createBlock(_component_ps_icon, {
|
|
25
26
|
key: 0,
|
|
@@ -41,7 +42,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41
42
|
}, [
|
|
42
43
|
renderSlot(_ctx.$slots, "default")
|
|
43
44
|
], 2)) : createCommentVNode("v-if", true)
|
|
44
|
-
],
|
|
45
|
+
], 14, _hoisted_1);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export { render };
|
package/es/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.vue_vue&type=template&id=802c5c76&lang.mjs","sources":["../../../../../../../packages/components/button/src/button.vue?vue&type=template&id=802c5c76&lang.js"],"sourcesContent":["<template>\n <button\n :class=\"[\n 'el-button',\n buttonType ? 'el-button--' + buttonType : '',\n buttonSize ? 'el-button--' + buttonSize : '',\n {\n 'is-disabled': buttonDisabled,\n 'is-loading': loading,\n 'is-plain': plain,\n 'is-round': round,\n 'is-circle': circle,\n },\n ]\"\n :disabled=\"buttonDisabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n >\n <ps-icon v-if=\"loading\" class=\"is-loading\"><loading /></ps-icon>\n <ps-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </ps-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ 'el-button__text--expand': shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\nimport { computed, inject, defineComponent } from 'vue'\nimport { useFormItem, useGlobalConfig } from '@element-ps/hooks'\nimport { elButtonGroupKey } from '@element-ps/tokens'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { Loading } from '@element-plus/icons'\
|
|
1
|
+
{"version":3,"file":"button.vue_vue&type=template&id=802c5c76&lang.mjs","sources":["../../../../../../../packages/components/button/src/button.vue?vue&type=template&id=802c5c76&lang.js"],"sourcesContent":["<template>\n <button\n :class=\"[\n 'el-button',\n buttonType ? 'el-button--' + buttonType : '',\n buttonSize ? 'el-button--' + buttonSize : '',\n {\n 'is-disabled': buttonDisabled,\n 'is-loading': loading,\n 'is-plain': plain,\n 'is-round': round,\n 'is-circle': circle,\n },\n ]\"\n :disabled=\"buttonDisabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n :style=\"buttonStyle\"\n >\n <ps-icon v-if=\"loading\" class=\"is-loading\"><loading /></ps-icon>\n <ps-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </ps-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ 'el-button__text--expand': shouldAddSpace }\"\n >\n <slot></slot>\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\nimport { computed, inject, defineComponent } from 'vue'\nimport { useCssVar } from '@vueuse/core'\nimport { useFormItem, useGlobalConfig } from '@element-ps/hooks'\nimport { elButtonGroupKey } from '@element-ps/tokens'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { Loading } from '@element-plus/icons'\nimport { lighten, darken } from '@element-ps/utils/color'\nimport { buttonProps } from './button'\n\nexport default defineComponent({\n name: 'PsButton',\n components: {\n PsIcon,\n Loading,\n },\n props: buttonProps,\n\n setup(props, { slots }) {\n const elBtnGroup = inject(elButtonGroupKey, undefined)\n const globalConfig = useGlobalConfig()\n const autoInsertSpace = computed(() => {\n return props.autoInsertSpace ?? globalConfig?.button.autoInsertSpace\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\n return /^\\p{Unified_Ideograph}{2}$/u.test(text as string)\n }\n }\n return false\n })\n const { size: buttonSize, disabled: buttonDisabled } = useFormItem({\n size: computed(() => elBtnGroup?.size),\n })\n const buttonType = computed(\n () => props.type || elBtnGroup?.type || 'default'\n )\n\n // calculate hover & active color by color\n const typeColor = computed(\n () => useCssVar(`--el-color-${props.type}`).value\n )\n const buttonStyle = computed(() => {\n let styles = {}\n\n const buttonColor = props.color || typeColor.value\n\n if (buttonColor) {\n const darkenBgColor = darken(buttonColor, 0.1)\n if (props.plain) {\n styles = {\n '--el-button-bg-color': lighten(buttonColor, 0.9),\n '--el-button-text-color': buttonColor,\n '--el-button-hover-text-color': 'var(--el-color-white)',\n '--el-button-hover-bg-color': buttonColor,\n '--el-button-hover-border-color': buttonColor,\n '--el-button-active-bg-color': darkenBgColor,\n '--el-button-active-text-color': 'var(--el-color-white)',\n '--el-button-active-border-color': darkenBgColor,\n }\n } else {\n const lightenBgColor = lighten(buttonColor)\n styles = {\n '--el-button-bg-color': buttonColor,\n '--el-button-border-color': buttonColor,\n '--el-button-hover-bg-color': lightenBgColor,\n '--el-button-hover-border-color': lightenBgColor,\n '--el-button-active-bg-color': darkenBgColor,\n '--el-button-active-border-color': darkenBgColor,\n }\n }\n\n if (buttonDisabled.value) {\n const disabledButtonColor = lighten(buttonColor, 0.5)\n styles['--el-button-disabled-bg-color'] = disabledButtonColor\n styles['--el-button-disabled-border-color'] = disabledButtonColor\n }\n }\n\n return styles\n })\n\n return {\n buttonStyle,\n buttonSize,\n buttonType,\n buttonDisabled,\n\n shouldAddSpace,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_createBlock","_createVNode","_renderSlot"],"mappings":";;;;;;sBACEA;IACG;;;;;;;;;;;;IAYA,UAAU,uBAAkB;IAC5B,WAAW;IACX,MAAM;IACN,sBAAO;;IAEO,6BAAfC;;MAAwB,OAAM;AAAA;uBAAa;QAAAC,YAAW;AAAA;AAAA;UAClC,0BAApBD;uBACE;sBAAAA,oCAAgB;;;;IAGV,YAAO,wBADfD;;MAEG,mDAAoC;;MAErCG;;;;;;;"}
|
|
@@ -1,47 +1,7 @@
|
|
|
1
|
-
import '
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import script from './button.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './button.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './button.vue_vue&type=template&id=802c5c76&lang.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"primary",
|
|
8
|
-
"success",
|
|
9
|
-
"warning",
|
|
10
|
-
"info",
|
|
11
|
-
"danger",
|
|
12
|
-
"text",
|
|
13
|
-
""
|
|
14
|
-
];
|
|
15
|
-
const buttonSize = ["", "large", "medium", "small", "mini"];
|
|
16
|
-
const buttonNativeType = ["button", "submit", "reset"];
|
|
17
|
-
const buttonProps = buildProps({
|
|
18
|
-
...useFormItemProps,
|
|
19
|
-
type: {
|
|
20
|
-
type: String,
|
|
21
|
-
values: buttonType,
|
|
22
|
-
default: ""
|
|
23
|
-
},
|
|
24
|
-
icon: {
|
|
25
|
-
type: definePropType([String, Object]),
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
nativeType: {
|
|
29
|
-
type: String,
|
|
30
|
-
values: buttonNativeType,
|
|
31
|
-
default: "button"
|
|
32
|
-
},
|
|
33
|
-
loading: Boolean,
|
|
34
|
-
plain: Boolean,
|
|
35
|
-
autofocus: Boolean,
|
|
36
|
-
round: Boolean,
|
|
37
|
-
circle: Boolean,
|
|
38
|
-
autoInsertSpace: {
|
|
39
|
-
type: Boolean
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const buttonEmits = {
|
|
43
|
-
click: (evt) => evt instanceof MouseEvent
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/button/src/button.vue";
|
|
47
7
|
//# sourceMappingURL=button2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
export { imageEmits, imageProps } from './src/
|
|
2
|
+
import './src/image2.mjs';
|
|
3
|
+
export { imageEmits, imageProps } from './src/image.mjs';
|
|
4
4
|
import script from './src/image.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsImage = withInstall(script);
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { render } from './image.vue_vue&type=template&id=34467287&lang.mjs';
|
|
1
|
+
import { buildProps, definePropType, mutable } from '../../../utils/props.mjs';
|
|
2
|
+
import { isNumber } from '../../../utils/util.mjs';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const imageProps = buildProps({
|
|
5
|
+
appendToBody: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false
|
|
8
|
+
},
|
|
9
|
+
hideOnClickModal: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
src: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
fit: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: ["", "contain", "cover", "fill", "none", "scale-down"],
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
lazy: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
scrollContainer: {
|
|
27
|
+
type: definePropType([String, Object])
|
|
28
|
+
},
|
|
29
|
+
previewSrcList: {
|
|
30
|
+
type: definePropType(Array),
|
|
31
|
+
default: () => mutable([])
|
|
32
|
+
},
|
|
33
|
+
zIndex: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 2e3
|
|
36
|
+
},
|
|
37
|
+
widget: String
|
|
38
|
+
});
|
|
39
|
+
const imageEmits = {
|
|
40
|
+
error: (evt) => evt instanceof Event,
|
|
41
|
+
switch: (val) => isNumber(val),
|
|
42
|
+
close: () => true
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { imageEmits, imageProps };
|
|
7
46
|
//# sourceMappingURL=image.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.mjs","sources":["../../../../../../../packages/components/image/src/image.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-ps/utils/props'\nimport { isNumber } from '@element-ps/utils/util'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const imageProps = buildProps({\n appendToBody: {\n type: Boolean,\n default: false,\n },\n hideOnClickModal: {\n type: Boolean,\n default: false,\n },\n src: {\n type: String,\n default: '',\n },\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n lazy: {\n type: Boolean,\n default: false,\n },\n scrollContainer: {\n type: definePropType<string | HTMLElement | undefined>([String, Object]),\n },\n previewSrcList: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n zIndex: {\n type: Number,\n default: 2000,\n },\n widget: String,\n} as const)\nexport type ImageProps = ExtractPropTypes<typeof imageProps>\n\nexport const imageEmits = {\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n}\nexport type ImageEmits = typeof imageEmits\n"],"names":[],"mappings":";;;MAKa,aAAa,WAAW;AAAA,EACnC,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,kBAAkB;AAAA,IAChB,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,KAAK;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,KAAK;AAAA,IACH,MAAM;AAAA,IACN,QAAQ,CAAC,IAAI,WAAW,SAAS,QAAQ,QAAQ;AAAA,IACjD,SAAS;AAAA;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,iBAAiB;AAAA,IACf,MAAM,eAAiD,CAAC,QAAQ;AAAA;AAAA,EAElE,gBAAgB;AAAA,IACd,MAAM,eAAyB;AAAA,IAC/B,SAAS,MAAM,QAAQ;AAAA;AAAA,EAEzB,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,QAAQ;AAAA;MAIG,aAAa;AAAA,EACxB,OAAO,CAAC,QAAe,eAAe;AAAA,EACtC,QAAQ,CAAC,QAAgB,SAAS;AAAA,EAClC,OAAO,MAAM;AAAA;;;;"}
|
|
@@ -5,7 +5,7 @@ import '../../../hooks/index.mjs';
|
|
|
5
5
|
import { PsImageViewer } from '../../image-viewer/index.mjs';
|
|
6
6
|
import isServer from '../../../utils/isServer.mjs';
|
|
7
7
|
import { isInContainer, getScrollContainer } from '../../../utils/dom.mjs';
|
|
8
|
-
import { imageProps, imageEmits } from './
|
|
8
|
+
import { imageProps, imageEmits } from './image.mjs';
|
|
9
9
|
import { useLocaleInject } from '../../../hooks/use-locale/index.mjs';
|
|
10
10
|
import useAttrs from '../../../hooks/use-attrs/index.mjs';
|
|
11
11
|
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import script from './image.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './image.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './image.vue_vue&type=template&id=34467287&lang.mjs';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false
|
|
8
|
-
},
|
|
9
|
-
hideOnClickModal: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false
|
|
12
|
-
},
|
|
13
|
-
src: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
fit: {
|
|
18
|
-
type: String,
|
|
19
|
-
values: ["", "contain", "cover", "fill", "none", "scale-down"],
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
lazy: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
scrollContainer: {
|
|
27
|
-
type: definePropType([String, Object])
|
|
28
|
-
},
|
|
29
|
-
previewSrcList: {
|
|
30
|
-
type: definePropType(Array),
|
|
31
|
-
default: () => mutable([])
|
|
32
|
-
},
|
|
33
|
-
zIndex: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 2e3
|
|
36
|
-
},
|
|
37
|
-
widget: String
|
|
38
|
-
});
|
|
39
|
-
const imageEmits = {
|
|
40
|
-
error: (evt) => evt instanceof Event,
|
|
41
|
-
switch: (val) => isNumber(val),
|
|
42
|
-
close: () => true
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { imageEmits, imageProps };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/image/src/image.vue";
|
|
46
7
|
//# sourceMappingURL=image2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image2.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"image2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -70,10 +70,10 @@ export { affixProps } from './affix/src/affix.mjs';
|
|
|
70
70
|
export { alertProps } from './alert/src/alert.mjs';
|
|
71
71
|
export { avatarProps } from './avatar/src/avatar2.mjs';
|
|
72
72
|
export { backtopProps } from './backtop/src/backtop.mjs';
|
|
73
|
-
export { badgeProps } from './badge/src/
|
|
74
|
-
export { breadcrumbProps } from './breadcrumb/src/
|
|
73
|
+
export { badgeProps } from './badge/src/badge.mjs';
|
|
74
|
+
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
75
75
|
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
76
|
-
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './button/src/
|
|
76
|
+
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './button/src/button.mjs';
|
|
77
77
|
export { cardProps } from './card/src/card.mjs';
|
|
78
78
|
export { CASCADER_PANEL_INJECTION_KEY, ExpandTrigger } from './cascader-panel/src/types.mjs';
|
|
79
79
|
export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
|
@@ -84,7 +84,7 @@ export { dialogProps } from './dialog/src/dialog.mjs';
|
|
|
84
84
|
export { dividerProps } from './divider/src/divider.mjs';
|
|
85
85
|
export { emptyProps } from './empty/src/empty.mjs';
|
|
86
86
|
export { iconProps } from './icon/src/icon.mjs';
|
|
87
|
-
export { imageEmits, imageProps } from './image/src/
|
|
87
|
+
export { imageEmits, imageProps } from './image/src/image.mjs';
|
|
88
88
|
export { imageViewerProps } from './image-viewer/src/image-viewer.mjs';
|
|
89
89
|
export { inputProps } from './input/src/input.mjs';
|
|
90
90
|
export { inputNumberProps } from './input-number/src/input-number.mjs';
|
|
@@ -107,7 +107,7 @@ export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
|
|
107
107
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
|
108
108
|
export { spaceProps } from './space/src/space.mjs';
|
|
109
109
|
export { useSpace } from './space/src/use-space.mjs';
|
|
110
|
-
export { tagProps } from './tag/src/
|
|
110
|
+
export { tagProps } from './tag/src/tag.mjs';
|
|
111
111
|
export { extractDateFormat, extractTimeFormat, rangeArr } from './time-picker/src/common/date-utils.mjs';
|
|
112
112
|
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME } from './time-picker/src/common/constant.mjs';
|
|
113
113
|
export { timePickerDefaultProps } from './time-picker/src/common/props.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
export { tagProps } from './src/
|
|
2
|
+
import './src/tag2.mjs';
|
|
3
|
+
export { tagProps } from './src/tag.mjs';
|
|
4
4
|
import script from './src/tag.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsTag = withInstall(script);
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { default } from './tag.vue_vue&type=script&lang.mjs';
|
|
3
|
-
import { render } from './tag.vue_vue&type=template&id=525996c5&lang.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/props.mjs';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const tagProps = buildProps({
|
|
4
|
+
closable: Boolean,
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
values: ["success", "info", "warning", "danger", ""],
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
hit: Boolean,
|
|
11
|
+
disableTransitions: Boolean,
|
|
12
|
+
color: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
type: String,
|
|
18
|
+
values: ["large", "medium", "small", "mini"]
|
|
19
|
+
},
|
|
20
|
+
effect: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: ["dark", "light", "plain"],
|
|
23
|
+
default: "light"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { tagProps };
|
|
7
28
|
//# sourceMappingURL=tag.mjs.map
|