xt-element-ui 1.3.4 → 2.0.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 +37 -20
- package/README.md +39 -35
- package/docs/README.md +25 -15
- package/docs/components/base/xt-badge.md +139 -0
- package/docs/components/base/xt-bar.md +182 -0
- package/docs/components/base/xt-card-item.md +12 -12
- package/docs/components/base/xt-chart.md +183 -0
- package/docs/components/base/xt-date-picker.md +111 -0
- package/docs/components/base/xt-icon.md +154 -0
- package/docs/components/base/xt-line.md +145 -0
- package/docs/components/base/xt-multi.md +278 -0
- package/docs/components/base/xt-page.md +84 -0
- package/docs/components/base/xt-pie.md +175 -0
- package/docs/components/base/xt-progress.md +134 -0
- package/docs/components/base/xt-select-tree.md +141 -0
- package/docs/components/base/xt-table.md +344 -0
- package/docs/components/base/xt-tabs.md +197 -0
- package/docs/components/base/xt-upload.md +85 -0
- package/lib/index.common.js +885 -828
- package/lib/index.css +1 -1
- package/lib/index.umd.js +890 -834
- package/lib/index.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/components/index.scss +11 -8
- 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 +8 -8
- package/src/components/xt-button/index.vue +43 -73
- package/src/components/xt-button/style/index.scss +51 -787
- package/src/components/xt-card/index.js +7 -8
- package/src/components/xt-card/index.vue +61 -21
- package/src/components/xt-card/style/index.scss +56 -32
- package/src/components/xt-card-item/index.vue +7 -7
- package/src/components/xt-chart/index.js +8 -0
- package/src/components/{ex-chart → xt-chart}/index.vue +13 -13
- package/src/components/{ex-chart → xt-chart}/pieList.vue +1 -1
- package/src/components/{ex-chart → xt-chart}/theme/dark.js +4 -1
- package/src/components/{ex-chart → xt-chart}/utils.js +1 -1
- package/src/components/xt-config-provider/index.vue +1 -1
- package/src/components/xt-date-picker/index.js +8 -0
- package/src/components/{ex-date-picker → xt-date-picker}/index.vue +1 -1
- package/src/components/xt-icon/index.js +8 -0
- package/src/components/{ex-icon → xt-icon}/index.vue +4 -4
- package/src/components/xt-layout/ExFieldset.vue +1 -1
- package/src/components/xt-page/index.js +8 -0
- package/src/components/{ex-page → xt-page}/index.vue +1 -1
- 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-select-tree/index.js +8 -0
- package/src/components/{ex-select-tree → xt-select-tree}/index.vue +1 -1
- package/src/components/{ex-table/ExTableCell.vue → xt-table/XtTableCell.vue} +1 -1
- package/src/components/xt-table/index.js +8 -0
- package/src/components/{ex-table → xt-table}/index.vue +6 -6
- 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.vue +15 -1
- package/src/components/xt-text/style/index.scss +18 -0
- package/src/components/xt-upload/index.js +8 -0
- package/src/index.js +24 -31
- package/src/utils/index.js +1 -1
- package/docs/components/extend/ex-bar.md +0 -68
- package/docs/components/extend/ex-button.md +0 -62
- package/docs/components/extend/ex-card.md +0 -86
- package/docs/components/extend/ex-chart.md +0 -463
- package/docs/components/extend/ex-date-picker.md +0 -0
- package/docs/components/extend/ex-icon.md +0 -189
- package/docs/components/extend/ex-line.md +0 -71
- package/docs/components/extend/ex-multi.md +0 -156
- package/docs/components/extend/ex-page.md +0 -0
- package/docs/components/extend/ex-pie.md +0 -70
- package/docs/components/extend/ex-select-tree.md +0 -210
- package/docs/components/extend/ex-table.md +0 -591
- package/docs/components/extend/ex-upload.md +0 -134
- package/src/components/ex-button/index.js +0 -8
- package/src/components/ex-button/index.vue +0 -67
- package/src/components/ex-button/style/index.scss +0 -67
- package/src/components/ex-card/index.js +0 -7
- package/src/components/ex-card/index.vue +0 -68
- package/src/components/ex-card/style/index.scss +0 -73
- package/src/components/ex-chart/index.js +0 -8
- package/src/components/ex-date-picker/index.js +0 -8
- package/src/components/ex-icon/index.js +0 -8
- package/src/components/ex-page/index.js +0 -8
- package/src/components/ex-select-tree/index.js +0 -8
- package/src/components/ex-table/index.js +0 -8
- package/src/components/ex-upload/index.js +0 -8
- package/src/config/element-registry.js +0 -136
- /package/src/components/{ex-chart/ExBar.vue → xt-chart/XtBar.vue} +0 -0
- /package/src/components/{ex-chart/ExLine.vue → xt-chart/XtLine.vue} +0 -0
- /package/src/components/{ex-chart/ExMulti.vue → xt-chart/XtMulti.vue} +0 -0
- /package/src/components/{ex-chart/ExPie.vue → xt-chart/XtPie.vue} +0 -0
- /package/src/components/{ex-chart → xt-chart}/theme/white.js +0 -0
- /package/src/components/{ex-date-picker → xt-date-picker}/SearchDate.vue +0 -0
- /package/src/components/{ex-date-picker → xt-date-picker}/quarter.vue +0 -0
- /package/src/components/{ex-icon → xt-icon}/style/index.scss +0 -0
- /package/src/components/{ex-table → xt-table}/VirtualElTable.vue +0 -0
- /package/src/components/{ex-table → xt-table}/virtualScrollData.js +0 -0
- /package/src/components/{ex-upload → xt-upload}/index.vue +0 -0
- /package/src/components/{ex-upload → xt-upload}/preview.vue +0 -0
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
## ExUpload 图片上传
|
|
2
|
-
|
|
3
|
-
基于 ElementUI `el-upload` 封装,支持图片上传、预览、删除,以及多图管理。
|
|
4
|
-
|
|
5
|
-
## 基础用法
|
|
6
|
-
|
|
7
|
-
设置 `action` 为上传接口路径,`base-url` 为图片基础地址,`v-model` 绑定逗号分隔的图片路径字符串:
|
|
8
|
-
|
|
9
|
-
::: demo 图片上传基础示例
|
|
10
|
-
```vue
|
|
11
|
-
<template>
|
|
12
|
-
<ex-upload
|
|
13
|
-
v-model="imgList"
|
|
14
|
-
action="/api/upload"
|
|
15
|
-
base-url="https://example.com"
|
|
16
|
-
/>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
export default {
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
imgList: ''
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
</script>
|
|
28
|
-
```
|
|
29
|
-
:::
|
|
30
|
-
|
|
31
|
-
## 多图上传
|
|
32
|
-
|
|
33
|
-
设置 `multiple` 开启多图上传,通过 `limit` 限制最多上传数量:
|
|
34
|
-
|
|
35
|
-
::: demo 多图上传示例
|
|
36
|
-
```vue
|
|
37
|
-
<template>
|
|
38
|
-
<ex-upload
|
|
39
|
-
v-model="imgList"
|
|
40
|
-
action="/api/upload"
|
|
41
|
-
base-url="https://example.com"
|
|
42
|
-
multiple
|
|
43
|
-
:limit="5"
|
|
44
|
-
/>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
export default {
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
imgList: ''
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
```
|
|
57
|
-
:::
|
|
58
|
-
|
|
59
|
-
## 图片大小
|
|
60
|
-
|
|
61
|
-
通过 `size` 属性设置显示尺寸:
|
|
62
|
-
|
|
63
|
-
::: demo 图片尺寸示例
|
|
64
|
-
```vue
|
|
65
|
-
<template>
|
|
66
|
-
<div>
|
|
67
|
-
<ex-upload v-model="img" action="/api/upload" base-url="https://example.com" />
|
|
68
|
-
<div style="margin-top: 20px">
|
|
69
|
-
<ex-upload v-model="img" action="/api/upload" base-url="https://example.com" size="big" />
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<script>
|
|
75
|
-
export default {
|
|
76
|
-
data() {
|
|
77
|
-
return {
|
|
78
|
-
img: ''
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
</script>
|
|
83
|
-
```
|
|
84
|
-
:::
|
|
85
|
-
|
|
86
|
-
## 禁用状态
|
|
87
|
-
|
|
88
|
-
`disabled` 属性可禁用上传和删除功能:
|
|
89
|
-
|
|
90
|
-
::: demo 禁用上传示例
|
|
91
|
-
```vue
|
|
92
|
-
<template>
|
|
93
|
-
<ex-upload
|
|
94
|
-
v-model="img"
|
|
95
|
-
action="/api/upload"
|
|
96
|
-
base-url="https://example.com"
|
|
97
|
-
disabled
|
|
98
|
-
/>
|
|
99
|
-
</template>
|
|
100
|
-
|
|
101
|
-
<script>
|
|
102
|
-
export default {
|
|
103
|
-
data() {
|
|
104
|
-
return {
|
|
105
|
-
img: 'demo.jpg'
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
</script>
|
|
110
|
-
```
|
|
111
|
-
:::
|
|
112
|
-
|
|
113
|
-
## Attributes
|
|
114
|
-
|
|
115
|
-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
|
116
|
-
|------|------|------|--------|--------|
|
|
117
|
-
| src | 当前图片列表,以英文逗号分隔(v-model) | string | — | '' |
|
|
118
|
-
| action | 上传接口路径,与 base-url 拼接 | string | — | '' |
|
|
119
|
-
| base-url | 图片基础地址(服务端域名) | string | — | '' |
|
|
120
|
-
| multiple | 是否支持多选 | boolean | — | false |
|
|
121
|
-
| limit | 最多上传数量 | number | — | 5 |
|
|
122
|
-
| accept | 允许的文件类型 | string | — | .jpg,.jpeg,.png |
|
|
123
|
-
| auto-upload | 是否在选取文件后立即上传 | boolean | — | true |
|
|
124
|
-
| disabled | 是否禁用 | boolean | — | false |
|
|
125
|
-
| size | 图片展示尺寸 | string | big | — |
|
|
126
|
-
| data | 上传时附带的额外参数 | object | — | {} |
|
|
127
|
-
| all-file-list | 用于图库预览的图片列表 | array | — | — |
|
|
128
|
-
| before-emit-data | 对上传结果进行处理的回调函数,返回 `false` 代表上传失败 | function(res, file, type) | — | (内部函数) |
|
|
129
|
-
|
|
130
|
-
## Events
|
|
131
|
-
|
|
132
|
-
| 事件名 | 说明 | 回调参数 |
|
|
133
|
-
|--------|------|----------|
|
|
134
|
-
| change | 图片列表变化时触发 | 以英文逗号分隔的图片路径字符串 |
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-button
|
|
3
|
-
class="ex-button"
|
|
4
|
-
:class="buttonClasses"
|
|
5
|
-
v-bind="$attrs"
|
|
6
|
-
@click="handleClick"
|
|
7
|
-
>
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</el-button>
|
|
10
|
-
</template>
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: 'ExButton',
|
|
14
|
-
inheritAttrs: false,
|
|
15
|
-
inject: {
|
|
16
|
-
xtConfig: {
|
|
17
|
-
default: () => ({
|
|
18
|
-
theme: 'light',
|
|
19
|
-
size: 'medium',
|
|
20
|
-
primaryColor: '#1890ff'
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
props: {
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: 'default',
|
|
28
|
-
validator: (val) => ['default', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
29
|
-
},
|
|
30
|
-
throttle: {
|
|
31
|
-
type: Number,
|
|
32
|
-
default: 0
|
|
33
|
-
},
|
|
34
|
-
size: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: null,
|
|
37
|
-
validator: (val) => !val || ['mini', 'small', 'medium', 'large'].includes(val)
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
lastClickTime: 0
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
finalSize() {
|
|
47
|
-
// 优先使用组件自身的 size,其次继承 XtConfigProvider 的 size,最后使用默认值
|
|
48
|
-
return this.size || this.xtConfig.size || 'medium'
|
|
49
|
-
},
|
|
50
|
-
buttonClasses() {
|
|
51
|
-
return [
|
|
52
|
-
`ex-button-${this.finalSize}`,
|
|
53
|
-
`ex-button-${this.type}`
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
methods: {
|
|
58
|
-
handleClick() {
|
|
59
|
-
if (this.throttle > 0 && Date.now() - this.lastClickTime < this.throttle) {
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
this.lastClickTime = Date.now()
|
|
63
|
-
this.$emit('click')
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
</script>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
@import '../../../styles/variables.scss';
|
|
2
|
-
|
|
3
|
-
.ex-button {
|
|
4
|
-
padding: 8px 16px;
|
|
5
|
-
border-radius: var(--xt-border-radius-base);
|
|
6
|
-
font-size: var(--xt-font-size-base);
|
|
7
|
-
border: 1px solid var(--xt-border-color, #dcdfe6);
|
|
8
|
-
transition: all 0.3s;
|
|
9
|
-
&-default{
|
|
10
|
-
background-color: var(--el-bg-color-page, #ffffff);
|
|
11
|
-
border: 1px solid var(--xt-border-color, #303133);
|
|
12
|
-
color: var(--el-text-color-primary, #303133);
|
|
13
|
-
}
|
|
14
|
-
&-primary{
|
|
15
|
-
background-color: var(--el-color-primary, #ffffff);
|
|
16
|
-
border-color: var(--el-color-primary, #ffffff);
|
|
17
|
-
color: var(--el-text-color-white, #ffffff);
|
|
18
|
-
}
|
|
19
|
-
&-success{
|
|
20
|
-
background-color: var(--el-color-success, #ffffff);
|
|
21
|
-
border-color: var(--el-color-success, #ffffff);
|
|
22
|
-
color: var(--el-text-color-white, #ffffff);
|
|
23
|
-
}
|
|
24
|
-
&-warning{
|
|
25
|
-
background-color: var(--el-color-warning, #ffffff);
|
|
26
|
-
border-color: var(--el-color-warning, #ffffff);
|
|
27
|
-
color: var(--el-text-color-white, #ffffff);
|
|
28
|
-
}
|
|
29
|
-
&-danger{
|
|
30
|
-
background-color: var(--el-color-danger, #ffffff);
|
|
31
|
-
border-color: var(--el-color-danger, #ffffff);
|
|
32
|
-
color: var(--el-text-color-white, #ffffff);
|
|
33
|
-
}
|
|
34
|
-
&-info{
|
|
35
|
-
background-color: var(--el-color-info, #ffffff);
|
|
36
|
-
border-color: var(--el-color-info, #ffffff);
|
|
37
|
-
color: var(--el-text-color-white, #ffffff);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
opacity: 0.8;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* small size - 字体大小 12px */
|
|
46
|
-
.ex-button-mini {
|
|
47
|
-
padding: 2px 4px;
|
|
48
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-extra-small);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* small size - 字体大小 14px */
|
|
52
|
-
.ex-button-small {
|
|
53
|
-
padding: 5px 10px;
|
|
54
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-base);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* medium size - 字体大小 16px */
|
|
58
|
-
.ex-button-medium {
|
|
59
|
-
padding: 8px 16px;
|
|
60
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-medium);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* large size - 字体大小 18px */
|
|
64
|
-
.ex-button-large {
|
|
65
|
-
padding: 11px 22px;
|
|
66
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-large);
|
|
67
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-card
|
|
3
|
-
class="ex-card"
|
|
4
|
-
:class="cardClasses"
|
|
5
|
-
v-bind="$attrs"
|
|
6
|
-
>
|
|
7
|
-
<template #header v-if="$slots.header || title">
|
|
8
|
-
<slot name="header">{{ title }}</slot>
|
|
9
|
-
</template>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</el-card>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
export default {
|
|
16
|
-
name: 'ExCard',
|
|
17
|
-
inheritAttrs: false,
|
|
18
|
-
inject: {
|
|
19
|
-
xtConfig: {
|
|
20
|
-
default: () => ({
|
|
21
|
-
theme: 'light',
|
|
22
|
-
size: 'medium',
|
|
23
|
-
primaryColor: '#1890ff'
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
props: {
|
|
28
|
-
title: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ''
|
|
31
|
-
},
|
|
32
|
-
shadow: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: 'always',
|
|
35
|
-
validator: (val) => ['always', 'hover', 'never'].includes(val)
|
|
36
|
-
},
|
|
37
|
-
bordered: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: true
|
|
40
|
-
},
|
|
41
|
-
bodyClass: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: ''
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: null,
|
|
48
|
-
validator: (val) => !val || ['small', 'medium', 'large'].includes(val)
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
finalSize() {
|
|
53
|
-
// 优先使用组件自身的 size,其次继承 XtConfigProvider 的 size,最后使用默认值
|
|
54
|
-
return this.size || this.xtConfig.size || 'medium'
|
|
55
|
-
},
|
|
56
|
-
cardClasses() {
|
|
57
|
-
return [
|
|
58
|
-
`ex-card-${this.shadow}`,
|
|
59
|
-
`ex-card-${this.finalSize}`,
|
|
60
|
-
{
|
|
61
|
-
'ex-card-no-border': !this.bordered,
|
|
62
|
-
[this.bodyClass]: this.bodyClass
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
</script>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// ExCard 组件样式
|
|
2
|
-
@import '../../../styles/element-theme.scss';
|
|
3
|
-
@import '../../../styles/variables.scss';
|
|
4
|
-
|
|
5
|
-
.ex-card {
|
|
6
|
-
border-radius: 8px;
|
|
7
|
-
transition: all 0.3s;
|
|
8
|
-
font-size: var(--ex-card-font-size, 14px);
|
|
9
|
-
background-color: var(--el-bg-color-block, #ffffff);
|
|
10
|
-
color: var(--el-text-color-primary, #303133);
|
|
11
|
-
border-color: var(--el-border-color, #303133);
|
|
12
|
-
|
|
13
|
-
.el-card__header {
|
|
14
|
-
padding: var(--ex-card-header-padding, 16px 20px);
|
|
15
|
-
border-bottom: 1px solid var(--el-border-color, #ebeef5);
|
|
16
|
-
background-color: var(--el-bg-color-block-head, #ffffff);
|
|
17
|
-
font-weight: 600;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.el-card__body {
|
|
21
|
-
padding: var(--ex-card-body-padding, 20px);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ex-card-small {
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
|
|
28
|
-
.el-card__header {
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ex-card-medium {
|
|
34
|
-
font-size: 14px;
|
|
35
|
-
|
|
36
|
-
.el-card__header {
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.ex-card-large {
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
|
|
44
|
-
.el-card__header {
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.ex-card-always {
|
|
50
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ex-card-hover {
|
|
54
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ex-card-never {
|
|
62
|
-
box-shadow: none;
|
|
63
|
-
border: 1px solid var(--el-border-color, #ebeef5);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ex-card-no-border {
|
|
67
|
-
border: none;
|
|
68
|
-
|
|
69
|
-
.el-card__header {
|
|
70
|
-
border-bottom: none;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XT-UI 组件注册配置文件
|
|
3
|
-
* 用于统一管理 Element UI 组件的自动注册配置
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// 已存在的 Ex 组件列表(不需要从 Element UI 自动注册)
|
|
7
|
-
export const existingExComponents = [
|
|
8
|
-
'Button', // ExButton 已存在
|
|
9
|
-
'Card', // ExCard 已存在
|
|
10
|
-
'Input', // XtInput 已存在(用户要求不自动注册)
|
|
11
|
-
'Table', // ExTable 已存在(在 ex-table 目录中)
|
|
12
|
-
'TableColumn', // ExColumn 已存在(在 ex-table 目录中)
|
|
13
|
-
'Chart' // ExChart 已存在
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
// Element UI 组件列表(用于自动注册为 Ex 开头,但排除已存在的组件)
|
|
17
|
-
export const elementComponentNames = [
|
|
18
|
-
'Autocomplete',
|
|
19
|
-
'Avatar',
|
|
20
|
-
'Backtop',
|
|
21
|
-
'Badge',
|
|
22
|
-
'Breadcrumb',
|
|
23
|
-
'BreadcrumbItem',
|
|
24
|
-
'ButtonGroup',
|
|
25
|
-
'Calendar',
|
|
26
|
-
'Carousel',
|
|
27
|
-
'CarouselItem',
|
|
28
|
-
'Cascader',
|
|
29
|
-
'Checkbox',
|
|
30
|
-
'CheckboxButton',
|
|
31
|
-
'CheckboxGroup',
|
|
32
|
-
'Col',
|
|
33
|
-
'Collapse',
|
|
34
|
-
'CollapseItem',
|
|
35
|
-
'ColorPicker',
|
|
36
|
-
'Container',
|
|
37
|
-
'DatePicker',
|
|
38
|
-
'Dialog',
|
|
39
|
-
'Divider',
|
|
40
|
-
'Drawer',
|
|
41
|
-
'Dropdown',
|
|
42
|
-
'DropdownItem',
|
|
43
|
-
'DropdownMenu',
|
|
44
|
-
'Footer',
|
|
45
|
-
'Form',
|
|
46
|
-
'FormItem',
|
|
47
|
-
'Header',
|
|
48
|
-
'Icon',
|
|
49
|
-
'Image',
|
|
50
|
-
'InputNumber',
|
|
51
|
-
'Link',
|
|
52
|
-
'Main',
|
|
53
|
-
'Menu',
|
|
54
|
-
'MenuItem',
|
|
55
|
-
'MenuItemGroup',
|
|
56
|
-
'Option',
|
|
57
|
-
'OptionGroup',
|
|
58
|
-
'Pagination',
|
|
59
|
-
'Popconfirm',
|
|
60
|
-
'Popover',
|
|
61
|
-
'Progress',
|
|
62
|
-
'Radio',
|
|
63
|
-
'RadioButton',
|
|
64
|
-
'RadioGroup',
|
|
65
|
-
'Rate',
|
|
66
|
-
'Row',
|
|
67
|
-
'Scrollbar',
|
|
68
|
-
'Select',
|
|
69
|
-
'Slider',
|
|
70
|
-
'Step',
|
|
71
|
-
'Steps',
|
|
72
|
-
'Submenu',
|
|
73
|
-
'Switch',
|
|
74
|
-
'TabPane',
|
|
75
|
-
'Tabs',
|
|
76
|
-
'Tag',
|
|
77
|
-
'TimePicker',
|
|
78
|
-
'TimeSelect',
|
|
79
|
-
'Timeline',
|
|
80
|
-
'TimelineItem',
|
|
81
|
-
'Tooltip',
|
|
82
|
-
'Transfer',
|
|
83
|
-
'Tree',
|
|
84
|
-
'Upload'
|
|
85
|
-
]
|
|
86
|
-
|
|
87
|
-
// Element UI 指令列表
|
|
88
|
-
export const elementDirectives = [
|
|
89
|
-
'Loading',
|
|
90
|
-
'Popover',
|
|
91
|
-
'Tooltip'
|
|
92
|
-
]
|
|
93
|
-
|
|
94
|
-
// 注册 Element UI 组件为 Ex 开头的工具函数
|
|
95
|
-
export function registerElementExComponents(Vue, ElementUI) {
|
|
96
|
-
if (!ElementUI) {
|
|
97
|
-
console.warn('[XT-UI] ElementUI not found, skipping Ex- prefix registration')
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
elementComponentNames.forEach(componentName => {
|
|
102
|
-
// 如果组件已存在于排除列表中,则跳过
|
|
103
|
-
if (existingExComponents.includes(componentName)) {
|
|
104
|
-
console.log(`[XT-UI] ${componentName} already exists, skipping registration`)
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const exComponentName = `Ex${componentName}`
|
|
109
|
-
|
|
110
|
-
// 检查是否已经注册过该组件
|
|
111
|
-
if (Vue.options.components[exComponentName]) {
|
|
112
|
-
return
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 注册 Element 的组件为 Ex 开头
|
|
116
|
-
const elementComponent = ElementUI[componentName]
|
|
117
|
-
if (elementComponent) {
|
|
118
|
-
Vue.component(exComponentName, elementComponent)
|
|
119
|
-
console.log(`[XT-UI] Registered Element component as ${exComponentName}`)
|
|
120
|
-
}
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// 注册 Element UI 指令的工具函数
|
|
125
|
-
export function registerElementDirectives(Vue, ElementUI) {
|
|
126
|
-
if (!ElementUI) {
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
elementDirectives.forEach(directiveName => {
|
|
131
|
-
const directive = ElementUI[directiveName]
|
|
132
|
-
if (directive && directive.install) {
|
|
133
|
-
Vue.use(directive)
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|