xt-element-ui 1.3.3 → 1.4.0
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/CHANGELOG.md +72 -72
- package/LICENSE +21 -21
- package/README.md +240 -240
- package/docs/README.md +100 -100
- package/docs/components/base/xt-button.md +114 -114
- package/docs/components/base/xt-card-item.md +104 -104
- package/docs/components/base/xt-card.md +108 -108
- package/docs/components/base/xt-config-provider.md +199 -199
- package/docs/components/base/xt-flex-box.md +115 -115
- package/docs/components/base/xt-grid-box.md +302 -302
- package/docs/components/base/xt-input.md +150 -150
- package/docs/components/base/xt-map-provider.md +23 -23
- package/docs/components/base/xt-map.md +331 -331
- package/docs/components/base/xt-step-price.md +165 -165
- package/docs/components/base/xt-text.md +212 -212
- package/docs/components/base/xt-time.md +165 -165
- package/docs/components/extend/ex-bar.md +67 -67
- package/docs/components/extend/ex-button.md +62 -62
- package/docs/components/extend/ex-card.md +86 -86
- package/docs/components/extend/ex-chart.md +463 -463
- package/docs/components/extend/ex-icon.md +189 -189
- package/docs/components/extend/ex-line.md +70 -70
- package/docs/components/extend/ex-multi.md +155 -155
- package/docs/components/extend/ex-pie.md +69 -69
- package/docs/components/extend/ex-select-tree.md +210 -210
- package/docs/components/extend/ex-table.md +590 -590
- package/docs/components/extend/ex-upload.md +134 -134
- package/docs/components/utils/size.md +147 -147
- package/docs/components/utils/theme.md +182 -182
- package/lib/index.common.js +4575 -4186
- package/lib/index.css +1 -1
- package/lib/index.umd.js +4475 -4085
- package/lib/index.umd.min.js +5 -5
- package/package.json +80 -81
- package/src/components/ex-button/index.js +7 -7
- package/src/components/ex-button/index.vue +66 -66
- package/src/components/ex-button/style/index.scss +67 -67
- package/src/components/ex-card/index.js +7 -7
- package/src/components/ex-card/index.vue +68 -68
- package/src/components/ex-card/style/index.scss +73 -73
- package/src/components/ex-chart/index.js +7 -7
- package/src/components/ex-chart/index.vue +136 -136
- package/src/components/ex-chart/theme/dark.js +4 -1
- package/src/components/ex-date-picker/index.js +7 -7
- package/src/components/ex-icon/index.js +7 -7
- package/src/components/ex-icon/index.vue +168 -168
- package/src/components/ex-icon/style/index.scss +7 -7
- package/src/components/ex-page/index.js +7 -7
- package/src/components/ex-select-tree/index.js +7 -7
- package/src/components/ex-table/ExTableCell.vue +22 -22
- package/src/components/ex-table/index.js +7 -7
- package/src/components/ex-table/virtualScrollData.js +35 -35
- package/src/components/ex-upload/index.js +7 -7
- package/src/components/index.scss +49 -40
- package/src/components/xt-badge/index.js +7 -0
- package/src/components/xt-badge/index.vue +71 -0
- package/src/components/xt-badge/style/index.scss +88 -0
- package/src/components/xt-button/index.js +7 -7
- package/src/components/xt-button/index.vue +97 -97
- package/src/components/xt-card/index.js +7 -7
- package/src/components/xt-card/style/index.scss +48 -48
- package/src/components/xt-card-item/index.js +7 -7
- package/src/components/xt-card-item/index.vue +5 -5
- package/src/components/xt-card-item/style/index copy.scss +71 -71
- package/src/components/xt-card-item/style/index.scss +82 -82
- package/src/components/xt-config-provider/index.js +7 -7
- package/src/components/xt-config-provider/index.vue +362 -362
- package/src/components/xt-config-provider/style/index.scss +11 -11
- package/src/components/xt-flex-box/index.js +7 -7
- package/src/components/xt-flex-box/style/index.scss +81 -81
- package/src/components/xt-grid-box/index.js +7 -7
- package/src/components/xt-grid-box/style/index.scss +92 -92
- package/src/components/xt-grid-item/index.js +7 -7
- package/src/components/xt-grid-item/index.vue +106 -106
- package/src/components/xt-input/index.js +7 -7
- package/src/components/xt-input/index.vue +66 -66
- package/src/components/xt-input/style/index.scss +84 -84
- package/src/components/xt-map/adapters/amap.js +235 -235
- package/src/components/xt-map/adapters/baidu.js +254 -254
- package/src/components/xt-map/adapters/base.js +267 -267
- package/src/components/xt-map/adapters/index.js +29 -29
- package/src/components/xt-map/adapters/tianditu.js +242 -242
- package/src/components/xt-map/config/xt-map-config.js +197 -197
- package/src/components/xt-map/index.js +8 -8
- package/src/components/xt-map/index.vue +351 -351
- package/src/components/xt-map/loaders/script-loader.js +114 -114
- package/src/components/xt-map/provider.vue +200 -200
- package/src/components/xt-map/style/index.scss +77 -77
- package/src/components/xt-map-provider/index.js +8 -8
- package/src/components/xt-progress/index.js +7 -0
- package/src/components/xt-progress/index.vue +103 -0
- package/src/components/xt-progress/style/index.scss +119 -0
- package/src/components/xt-step-price/index.js +10 -10
- package/src/components/xt-step-price/index.vue +272 -272
- package/src/components/xt-step-price/style/index.scss +123 -123
- package/src/components/xt-step-price-item/index.js +7 -7
- package/src/components/xt-step-price-item/index.vue +187 -187
- package/src/components/xt-tabs/TabPane.vue +36 -0
- package/src/components/xt-tabs/index.js +10 -0
- package/src/components/xt-tabs/index.vue +113 -0
- package/src/components/xt-tabs/style/index.scss +197 -0
- package/src/components/xt-text/index.js +7 -7
- package/src/components/xt-text/index.vue +16 -2
- package/src/components/xt-text/style/index.scss +110 -92
- package/src/components/xt-time/index.js +7 -7
- package/src/components/xt-time/index.vue +313 -313
- package/src/components/xt-time/style/index.scss +23 -23
- package/src/config/element-registry.js +135 -135
- package/src/index.js +169 -178
- package/src/styles/css-variables.scss +257 -257
- package/src/styles/theme/background.scss +5 -5
- package/src/styles/theme/border-radius.scss +3 -3
- package/src/styles/theme/borders.scss +3 -3
- package/src/styles/theme/colors.scss +101 -101
- package/src/styles/theme/component-variables.scss +69 -69
- package/src/styles/theme/dark-variables.scss +28 -28
- package/src/styles/theme/font.scss +12 -12
- package/src/styles/theme/index.scss +11 -11
- package/src/styles/theme/shadows.scss +2 -2
- package/src/styles/theme/spacing.scss +4 -4
- package/src/styles/theme/transitions.scss +2 -2
- package/src/styles/theme/typography.scss +4 -4
- package/src/styles/variables-export.scss +85 -85
- package/src/utils/index.js +191 -202
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="xt-input"
|
|
4
|
-
:class="[
|
|
5
|
-
size ? 'xt-input--' + size : '',
|
|
6
|
-
{ 'is-disabled': disabled }
|
|
7
|
-
]"
|
|
8
|
-
>
|
|
9
|
-
<el-input
|
|
10
|
-
:value="value"
|
|
11
|
-
:placeholder="placeholder"
|
|
12
|
-
:type="type"
|
|
13
|
-
:size="size"
|
|
14
|
-
:disabled="disabled"
|
|
15
|
-
:readonly="readonly"
|
|
16
|
-
:style="inputStyle"
|
|
17
|
-
@input="$emit('input', $event)"
|
|
18
|
-
@change="$emit('change', $event)"
|
|
19
|
-
@focus="$emit('focus', $event)"
|
|
20
|
-
@blur="$emit('blur', $event)"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
export default {
|
|
27
|
-
name: 'XtInput',
|
|
28
|
-
props: {
|
|
29
|
-
value: [String, Number],
|
|
30
|
-
placeholder: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: '请输入内容'
|
|
33
|
-
},
|
|
34
|
-
type: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: 'text'
|
|
37
|
-
},
|
|
38
|
-
size: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: ''
|
|
41
|
-
},
|
|
42
|
-
disabled: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
readonly: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
},
|
|
50
|
-
color: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: ''
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
computed: {
|
|
56
|
-
inputStyle() {
|
|
57
|
-
if (this.color) {
|
|
58
|
-
return {
|
|
59
|
-
'--xt-input-focus-color': this.color
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return {}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="xt-input"
|
|
4
|
+
:class="[
|
|
5
|
+
size ? 'xt-input--' + size : '',
|
|
6
|
+
{ 'is-disabled': disabled }
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<el-input
|
|
10
|
+
:value="value"
|
|
11
|
+
:placeholder="placeholder"
|
|
12
|
+
:type="type"
|
|
13
|
+
:size="size"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
:readonly="readonly"
|
|
16
|
+
:style="inputStyle"
|
|
17
|
+
@input="$emit('input', $event)"
|
|
18
|
+
@change="$emit('change', $event)"
|
|
19
|
+
@focus="$emit('focus', $event)"
|
|
20
|
+
@blur="$emit('blur', $event)"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
export default {
|
|
27
|
+
name: 'XtInput',
|
|
28
|
+
props: {
|
|
29
|
+
value: [String, Number],
|
|
30
|
+
placeholder: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '请输入内容'
|
|
33
|
+
},
|
|
34
|
+
type: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'text'
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
readonly: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
color: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
inputStyle() {
|
|
57
|
+
if (this.color) {
|
|
58
|
+
return {
|
|
59
|
+
'--xt-input-focus-color': this.color
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return {}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
@import '../../../styles/variables.scss';
|
|
2
|
-
|
|
3
|
-
// 基础变量定义 - 通过组件顶层设置统一的 CSS 变量
|
|
4
|
-
.xt-input {
|
|
5
|
-
--xt-input-bg-color: var(--xt-fill-color-blank, #ffffff);
|
|
6
|
-
--xt-input-text-color: var(--xt-text-color-regular, #606266);
|
|
7
|
-
--xt-input-border-color: var(--xt-border-color, #dcdfe6);
|
|
8
|
-
--xt-input-border-color-hover: var(--xt-border-color-dark, #c0c4cc);
|
|
9
|
-
--xt-input-border-color-focus: var(--xt-color-primary, #1890ff);
|
|
10
|
-
--xt-input-placeholder-color: var(--xt-text-color-placeholder, #c0c4cc);
|
|
11
|
-
--xt-input-disabled-bg-color: var(--xt-fill-color-light, #f5f7fa);
|
|
12
|
-
--xt-input-disabled-text-color: var(--xt-text-color-placeholder, #c0c4cc);
|
|
13
|
-
--xt-input-disabled-border-color: var(--xt-border-color-light, #e4e7ed);
|
|
14
|
-
--xt-input-focus-color: var(--xt-color-primary, #1890ff);
|
|
15
|
-
--xt-input-border-radius: var(--xt-border-radius-base, 4px);
|
|
16
|
-
--xt-input-font-size: var(--xt-font-size-base, 14px);
|
|
17
|
-
--xt-input-height: 32px;
|
|
18
|
-
--xt-input-padding-x: 15px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// 尺寸:small
|
|
22
|
-
.xt-input--small {
|
|
23
|
-
--xt-input-height: 28px;
|
|
24
|
-
--xt-input-font-size: var(--xt-font-size-small, 12px);
|
|
25
|
-
--xt-input-padding-x: 10px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// 尺寸:medium(默认,无需单独覆盖)
|
|
29
|
-
.xt-input--medium {
|
|
30
|
-
--xt-input-height: 32px;
|
|
31
|
-
--xt-input-font-size: var(--xt-font-size-base, 14px);
|
|
32
|
-
--xt-input-padding-x: 15px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 尺寸:large
|
|
36
|
-
.xt-input--large {
|
|
37
|
-
--xt-input-height: 40px;
|
|
38
|
-
--xt-input-font-size: var(--xt-font-size-large, 16px);
|
|
39
|
-
--xt-input-padding-x: 16px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 内部结构样式(Element UI 2.x 结构)
|
|
43
|
-
.xt-input .el-input {
|
|
44
|
-
height: var(--xt-input-height);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.xt-input .el-input__inner {
|
|
48
|
-
background-color: var(--xt-input-bg-color);
|
|
49
|
-
border-color: var(--xt-input-border-color);
|
|
50
|
-
color: var(--xt-input-text-color);
|
|
51
|
-
font-size: var(--xt-input-font-size);
|
|
52
|
-
border-radius: var(--xt-input-border-radius);
|
|
53
|
-
height: var(--xt-input-height);
|
|
54
|
-
line-height: var(--xt-input-height);
|
|
55
|
-
padding: 0 var(--xt-input-padding-x);
|
|
56
|
-
transition: border-color var(--xt-transition-duration-fast, 0.2s) ease;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.xt-input .el-input__inner::placeholder {
|
|
60
|
-
color: var(--xt-input-placeholder-color);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// hover 状态
|
|
64
|
-
.xt-input .el-input__inner:hover {
|
|
65
|
-
border-color: var(--xt-input-border-color-hover);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// focus 状态
|
|
69
|
-
.xt-input .el-input__inner:focus {
|
|
70
|
-
border-color: var(--xt-input-border-color-focus);
|
|
71
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--xt-input-focus-color) 20%, transparent);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// disabled 状态
|
|
75
|
-
.xt-input.is-disabled .el-input__inner {
|
|
76
|
-
background-color: var(--xt-input-disabled-bg-color);
|
|
77
|
-
border-color: var(--xt-input-disabled-border-color);
|
|
78
|
-
color: var(--xt-input-disabled-text-color);
|
|
79
|
-
cursor: not-allowed;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.xt-input.is-disabled .el-input__inner::placeholder {
|
|
83
|
-
color: var(--xt-input-disabled-text-color);
|
|
84
|
-
}
|
|
1
|
+
@import '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
// 基础变量定义 - 通过组件顶层设置统一的 CSS 变量
|
|
4
|
+
.xt-input {
|
|
5
|
+
--xt-input-bg-color: var(--xt-fill-color-blank, #ffffff);
|
|
6
|
+
--xt-input-text-color: var(--xt-text-color-regular, #606266);
|
|
7
|
+
--xt-input-border-color: var(--xt-border-color, #dcdfe6);
|
|
8
|
+
--xt-input-border-color-hover: var(--xt-border-color-dark, #c0c4cc);
|
|
9
|
+
--xt-input-border-color-focus: var(--xt-color-primary, #1890ff);
|
|
10
|
+
--xt-input-placeholder-color: var(--xt-text-color-placeholder, #c0c4cc);
|
|
11
|
+
--xt-input-disabled-bg-color: var(--xt-fill-color-light, #f5f7fa);
|
|
12
|
+
--xt-input-disabled-text-color: var(--xt-text-color-placeholder, #c0c4cc);
|
|
13
|
+
--xt-input-disabled-border-color: var(--xt-border-color-light, #e4e7ed);
|
|
14
|
+
--xt-input-focus-color: var(--xt-color-primary, #1890ff);
|
|
15
|
+
--xt-input-border-radius: var(--xt-border-radius-base, 4px);
|
|
16
|
+
--xt-input-font-size: var(--xt-font-size-base, 14px);
|
|
17
|
+
--xt-input-height: 32px;
|
|
18
|
+
--xt-input-padding-x: 15px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 尺寸:small
|
|
22
|
+
.xt-input--small {
|
|
23
|
+
--xt-input-height: 28px;
|
|
24
|
+
--xt-input-font-size: var(--xt-font-size-small, 12px);
|
|
25
|
+
--xt-input-padding-x: 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 尺寸:medium(默认,无需单独覆盖)
|
|
29
|
+
.xt-input--medium {
|
|
30
|
+
--xt-input-height: 32px;
|
|
31
|
+
--xt-input-font-size: var(--xt-font-size-base, 14px);
|
|
32
|
+
--xt-input-padding-x: 15px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 尺寸:large
|
|
36
|
+
.xt-input--large {
|
|
37
|
+
--xt-input-height: 40px;
|
|
38
|
+
--xt-input-font-size: var(--xt-font-size-large, 16px);
|
|
39
|
+
--xt-input-padding-x: 16px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 内部结构样式(Element UI 2.x 结构)
|
|
43
|
+
.xt-input .el-input {
|
|
44
|
+
height: var(--xt-input-height);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.xt-input .el-input__inner {
|
|
48
|
+
background-color: var(--xt-input-bg-color);
|
|
49
|
+
border-color: var(--xt-input-border-color);
|
|
50
|
+
color: var(--xt-input-text-color);
|
|
51
|
+
font-size: var(--xt-input-font-size);
|
|
52
|
+
border-radius: var(--xt-input-border-radius);
|
|
53
|
+
height: var(--xt-input-height);
|
|
54
|
+
line-height: var(--xt-input-height);
|
|
55
|
+
padding: 0 var(--xt-input-padding-x);
|
|
56
|
+
transition: border-color var(--xt-transition-duration-fast, 0.2s) ease;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.xt-input .el-input__inner::placeholder {
|
|
60
|
+
color: var(--xt-input-placeholder-color);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// hover 状态
|
|
64
|
+
.xt-input .el-input__inner:hover {
|
|
65
|
+
border-color: var(--xt-input-border-color-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// focus 状态
|
|
69
|
+
.xt-input .el-input__inner:focus {
|
|
70
|
+
border-color: var(--xt-input-border-color-focus);
|
|
71
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--xt-input-focus-color) 20%, transparent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// disabled 状态
|
|
75
|
+
.xt-input.is-disabled .el-input__inner {
|
|
76
|
+
background-color: var(--xt-input-disabled-bg-color);
|
|
77
|
+
border-color: var(--xt-input-disabled-border-color);
|
|
78
|
+
color: var(--xt-input-disabled-text-color);
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.xt-input.is-disabled .el-input__inner::placeholder {
|
|
83
|
+
color: var(--xt-input-disabled-text-color);
|
|
84
|
+
}
|