xt-element-ui 1.3.3 → 1.3.4
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 +4112 -4122
- package/lib/index.umd.js +4072 -4081
- package/lib/index.umd.min.js +3 -3
- 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-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 +39 -39
- 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/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-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-text/index.js +7 -7
- package/src/components/xt-text/index.vue +1 -1
- package/src/components/xt-text/style/index.scss +92 -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 +162 -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,150 +1,150 @@
|
|
|
1
|
-
## XtInput 输入框组件
|
|
2
|
-
|
|
3
|
-
输入框组件用于收集用户输入的信息。
|
|
4
|
-
|
|
5
|
-
## 基本用法
|
|
6
|
-
|
|
7
|
-
::: demo 基本用法
|
|
8
|
-
```vue
|
|
9
|
-
<template>
|
|
10
|
-
<XtInput v-model="inputValue" placeholder="请输入内容"></XtInput>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
inputValue: ''
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
</script>
|
|
22
|
-
```
|
|
23
|
-
:::
|
|
24
|
-
|
|
25
|
-
## 属性说明
|
|
26
|
-
| 属性 | 类型 | 默认值 | 说明 |
|
|
27
|
-
|------|------|--------|------|
|
|
28
|
-
| `value` | String / Number | - | 输入值(支持 v-model) |
|
|
29
|
-
| `placeholder` | String | '请输入内容' | 占位提示文本 |
|
|
30
|
-
| `color` | String | - | 自定义聚焦颜色 |
|
|
31
|
-
|
|
32
|
-
## 示例
|
|
33
|
-
|
|
34
|
-
### 基础输入框
|
|
35
|
-
::: demo 基础输入框
|
|
36
|
-
```vue
|
|
37
|
-
<template>
|
|
38
|
-
<XtInput v-model="username" placeholder="请输入用户名"></XtInput>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script>
|
|
42
|
-
export default {
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
username: ''
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
```
|
|
51
|
-
:::
|
|
52
|
-
|
|
53
|
-
### 自定义占位符
|
|
54
|
-
|
|
55
|
-
::: demo 自定义占位符
|
|
56
|
-
```vue
|
|
57
|
-
<template>
|
|
58
|
-
<XtInput v-model="email" placeholder="请输入您的邮箱地址"></XtInput>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<script>
|
|
62
|
-
export default {
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
email: ''
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
70
|
-
```
|
|
71
|
-
:::
|
|
72
|
-
|
|
73
|
-
### 自定义聚焦颜色
|
|
74
|
-
::: demo 自定义聚焦颜色
|
|
75
|
-
```vue
|
|
76
|
-
<template>
|
|
77
|
-
<div style="display: flex; gap: 16px;">
|
|
78
|
-
<XtInput v-model="input1" placeholder="默认颜色"></XtInput>
|
|
79
|
-
<XtInput v-model="input2" placeholder="绿色主题" color="#52c41a"></XtInput>
|
|
80
|
-
<XtInput v-model="input3" placeholder="橙色主题" color="#faad14"></XtInput>
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
83
|
-
|
|
84
|
-
<script>
|
|
85
|
-
export default {
|
|
86
|
-
data() {
|
|
87
|
-
return {
|
|
88
|
-
input1: '',
|
|
89
|
-
input2: '',
|
|
90
|
-
input3: ''
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
```
|
|
96
|
-
:::
|
|
97
|
-
|
|
98
|
-
### 输入框组
|
|
99
|
-
|
|
100
|
-
::: demo 输入框组
|
|
101
|
-
```vue
|
|
102
|
-
<template>
|
|
103
|
-
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
104
|
-
<XtInput v-model="name" placeholder="姓名"></XtInput>
|
|
105
|
-
<XtInput v-model="phone" placeholder="手机"></XtInput>
|
|
106
|
-
<XtInput v-model="address" placeholder="地址"></XtInput>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
109
|
-
|
|
110
|
-
<script>
|
|
111
|
-
export default {
|
|
112
|
-
data() {
|
|
113
|
-
return {
|
|
114
|
-
name: '',
|
|
115
|
-
phone: '',
|
|
116
|
-
address: ''
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</script>
|
|
121
|
-
```
|
|
122
|
-
:::
|
|
123
|
-
|
|
124
|
-
### 监听输入事件
|
|
125
|
-
|
|
126
|
-
::: demo 监听输入事件
|
|
127
|
-
```vue
|
|
128
|
-
<template>
|
|
129
|
-
<div>
|
|
130
|
-
<XtInput :value="inputValue" placeholder="实时监听输入" @input="handleInput"></XtInput>
|
|
131
|
-
<p style="margin-top: 12px;">输入长度: {{ inputValue.length }}</p>
|
|
132
|
-
</div>
|
|
133
|
-
</template>
|
|
134
|
-
|
|
135
|
-
<script>
|
|
136
|
-
export default {
|
|
137
|
-
data() {
|
|
138
|
-
return {
|
|
139
|
-
inputValue: ''
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
methods: {
|
|
143
|
-
handleInput(value) {
|
|
144
|
-
this.inputValue = value
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
</script>
|
|
149
|
-
```
|
|
150
|
-
:::
|
|
1
|
+
## XtInput 输入框组件
|
|
2
|
+
|
|
3
|
+
输入框组件用于收集用户输入的信息。
|
|
4
|
+
|
|
5
|
+
## 基本用法
|
|
6
|
+
|
|
7
|
+
::: demo 基本用法
|
|
8
|
+
```vue
|
|
9
|
+
<template>
|
|
10
|
+
<XtInput v-model="inputValue" placeholder="请输入内容"></XtInput>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
inputValue: ''
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
```
|
|
23
|
+
:::
|
|
24
|
+
|
|
25
|
+
## 属性说明
|
|
26
|
+
| 属性 | 类型 | 默认值 | 说明 |
|
|
27
|
+
|------|------|--------|------|
|
|
28
|
+
| `value` | String / Number | - | 输入值(支持 v-model) |
|
|
29
|
+
| `placeholder` | String | '请输入内容' | 占位提示文本 |
|
|
30
|
+
| `color` | String | - | 自定义聚焦颜色 |
|
|
31
|
+
|
|
32
|
+
## 示例
|
|
33
|
+
|
|
34
|
+
### 基础输入框
|
|
35
|
+
::: demo 基础输入框
|
|
36
|
+
```vue
|
|
37
|
+
<template>
|
|
38
|
+
<XtInput v-model="username" placeholder="请输入用户名"></XtInput>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
export default {
|
|
43
|
+
data() {
|
|
44
|
+
return {
|
|
45
|
+
username: ''
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
```
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
### 自定义占位符
|
|
54
|
+
|
|
55
|
+
::: demo 自定义占位符
|
|
56
|
+
```vue
|
|
57
|
+
<template>
|
|
58
|
+
<XtInput v-model="email" placeholder="请输入您的邮箱地址"></XtInput>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
export default {
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
email: ''
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
```
|
|
71
|
+
:::
|
|
72
|
+
|
|
73
|
+
### 自定义聚焦颜色
|
|
74
|
+
::: demo 自定义聚焦颜色
|
|
75
|
+
```vue
|
|
76
|
+
<template>
|
|
77
|
+
<div style="display: flex; gap: 16px;">
|
|
78
|
+
<XtInput v-model="input1" placeholder="默认颜色"></XtInput>
|
|
79
|
+
<XtInput v-model="input2" placeholder="绿色主题" color="#52c41a"></XtInput>
|
|
80
|
+
<XtInput v-model="input3" placeholder="橙色主题" color="#faad14"></XtInput>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script>
|
|
85
|
+
export default {
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
input1: '',
|
|
89
|
+
input2: '',
|
|
90
|
+
input3: ''
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
```
|
|
96
|
+
:::
|
|
97
|
+
|
|
98
|
+
### 输入框组
|
|
99
|
+
|
|
100
|
+
::: demo 输入框组
|
|
101
|
+
```vue
|
|
102
|
+
<template>
|
|
103
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
104
|
+
<XtInput v-model="name" placeholder="姓名"></XtInput>
|
|
105
|
+
<XtInput v-model="phone" placeholder="手机"></XtInput>
|
|
106
|
+
<XtInput v-model="address" placeholder="地址"></XtInput>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<script>
|
|
111
|
+
export default {
|
|
112
|
+
data() {
|
|
113
|
+
return {
|
|
114
|
+
name: '',
|
|
115
|
+
phone: '',
|
|
116
|
+
address: ''
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
```
|
|
122
|
+
:::
|
|
123
|
+
|
|
124
|
+
### 监听输入事件
|
|
125
|
+
|
|
126
|
+
::: demo 监听输入事件
|
|
127
|
+
```vue
|
|
128
|
+
<template>
|
|
129
|
+
<div>
|
|
130
|
+
<XtInput :value="inputValue" placeholder="实时监听输入" @input="handleInput"></XtInput>
|
|
131
|
+
<p style="margin-top: 12px;">输入长度: {{ inputValue.length }}</p>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<script>
|
|
136
|
+
export default {
|
|
137
|
+
data() {
|
|
138
|
+
return {
|
|
139
|
+
inputValue: ''
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
methods: {
|
|
143
|
+
handleInput(value) {
|
|
144
|
+
this.inputValue = value
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
</script>
|
|
149
|
+
```
|
|
150
|
+
:::
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
## XtMapProvider 统一地图提供组件
|
|
2
|
-
|
|
3
|
-
### 全局配置(推荐)
|
|
4
|
-
|
|
5
|
-
使用 `XtMapProvider` 统一配置项目中所有地图,无需在每个 `<XtMap>` 上重复写密钥:
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<template>
|
|
9
|
-
<XtMapProvider
|
|
10
|
-
provider="amap"
|
|
11
|
-
api-key="你的高德密钥"
|
|
12
|
-
security-js-code="你的安全密钥"
|
|
13
|
-
theme="light"
|
|
14
|
-
>
|
|
15
|
-
<div style="width: 100%; height: 500px;">
|
|
16
|
-
<XtMap :center="[116.397428, 39.90923]" :zoom="11" />
|
|
17
|
-
</div>
|
|
18
|
-
<div style="width: 100%; height: 300px; margin-top: 12px;">
|
|
19
|
-
<XtMap :center="[121.473701, 31.230416]" :zoom="12" map-type="satellite" />
|
|
20
|
-
</div>
|
|
21
|
-
</XtMapProvider>
|
|
22
|
-
</template>
|
|
23
|
-
```
|
|
1
|
+
## XtMapProvider 统一地图提供组件
|
|
2
|
+
|
|
3
|
+
### 全局配置(推荐)
|
|
4
|
+
|
|
5
|
+
使用 `XtMapProvider` 统一配置项目中所有地图,无需在每个 `<XtMap>` 上重复写密钥:
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<XtMapProvider
|
|
10
|
+
provider="amap"
|
|
11
|
+
api-key="你的高德密钥"
|
|
12
|
+
security-js-code="你的安全密钥"
|
|
13
|
+
theme="light"
|
|
14
|
+
>
|
|
15
|
+
<div style="width: 100%; height: 500px;">
|
|
16
|
+
<XtMap :center="[116.397428, 39.90923]" :zoom="11" />
|
|
17
|
+
</div>
|
|
18
|
+
<div style="width: 100%; height: 300px; margin-top: 12px;">
|
|
19
|
+
<XtMap :center="[121.473701, 31.230416]" :zoom="12" map-type="satellite" />
|
|
20
|
+
</div>
|
|
21
|
+
</XtMapProvider>
|
|
22
|
+
</template>
|
|
23
|
+
```
|