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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="xt-tabs" :class="[
|
|
3
|
+
`xt-tabs--${position}`,
|
|
4
|
+
{ 'xt-tabs--card': type === 'card' }
|
|
5
|
+
]">
|
|
6
|
+
<div class="xt-tabs__header">
|
|
7
|
+
<div class="xt-tabs__nav">
|
|
8
|
+
<div
|
|
9
|
+
v-for="(pane, index) in panes"
|
|
10
|
+
:key="pane.name"
|
|
11
|
+
class="xt-tabs__nav-item"
|
|
12
|
+
:class="{ 'xt-tabs__nav-item--active': activeName === pane.name }"
|
|
13
|
+
@click="handleTabClick(pane.name)"
|
|
14
|
+
>
|
|
15
|
+
<span class="xt-tabs__nav-link">{{ pane.label }}</span>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="xt-tabs__nav-indicator" :style="indicatorStyle"></div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="xt-tabs__content">
|
|
22
|
+
<transition name="xt-tabs-fade" mode="out-in">
|
|
23
|
+
<div
|
|
24
|
+
v-for="(pane, index) in panes"
|
|
25
|
+
:key="pane.name"
|
|
26
|
+
class="xt-tabs__pane"
|
|
27
|
+
v-show="activeName === pane.name"
|
|
28
|
+
>
|
|
29
|
+
<slot :name="pane.name"></slot>
|
|
30
|
+
</div>
|
|
31
|
+
</transition>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
export default {
|
|
38
|
+
name: 'XtTabs',
|
|
39
|
+
props: {
|
|
40
|
+
value: {
|
|
41
|
+
type: [String, Number],
|
|
42
|
+
default: ''
|
|
43
|
+
},
|
|
44
|
+
type: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: 'default',
|
|
47
|
+
validator: (val) => ['default', 'card'].includes(val)
|
|
48
|
+
},
|
|
49
|
+
position: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'top',
|
|
52
|
+
validator: (val) => ['top', 'bottom', 'left', 'right'].includes(val)
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
panes: [],
|
|
58
|
+
activeName: this.value
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
watch: {
|
|
62
|
+
value(val) {
|
|
63
|
+
this.activeName = val
|
|
64
|
+
},
|
|
65
|
+
activeName(val) {
|
|
66
|
+
this.$emit('input', val)
|
|
67
|
+
this.$emit('change', val)
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
indicatorStyle() {
|
|
72
|
+
const activeIndex = this.panes.findIndex(p => p.name === this.activeName)
|
|
73
|
+
if (activeIndex === -1) return { display: 'none' }
|
|
74
|
+
|
|
75
|
+
const navItems = this.$el && this.$el.querySelectorAll('.xt-tabs__nav-item')
|
|
76
|
+
if (!navItems || navItems.length === 0) return { display: 'none' }
|
|
77
|
+
|
|
78
|
+
const activeItem = navItems[activeIndex]
|
|
79
|
+
return {
|
|
80
|
+
left: `${activeItem.offsetLeft}px`,
|
|
81
|
+
width: `${activeItem.offsetWidth}px`,
|
|
82
|
+
display: 'block'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
handleTabClick(name) {
|
|
88
|
+
this.activeName = name
|
|
89
|
+
},
|
|
90
|
+
addPane(pane) {
|
|
91
|
+
if (!this.panes.find(p => p.name === pane.name)) {
|
|
92
|
+
this.panes.push(pane)
|
|
93
|
+
if (!this.activeName && this.panes.length === 1) {
|
|
94
|
+
this.activeName = pane.name
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
removePane(name) {
|
|
99
|
+
const index = this.panes.findIndex(p => p.name === name)
|
|
100
|
+
if (index > -1) {
|
|
101
|
+
this.panes.splice(index, 1)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
mounted() {
|
|
106
|
+
this.$children.forEach(child => {
|
|
107
|
+
if (child.$options.name === 'XtTabPane') {
|
|
108
|
+
this.addPane({ name: child.name, label: child.label })
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
</script>
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
@import '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.xt-tabs {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.xt-tabs--left,
|
|
9
|
+
.xt-tabs--right {
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.xt-tabs__header {
|
|
14
|
+
position: relative;
|
|
15
|
+
border-bottom: 1px solid $xt-color-border-light;
|
|
16
|
+
padding-bottom: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.xt-tabs--card .xt-tabs__header {
|
|
20
|
+
border-bottom: none;
|
|
21
|
+
background: $xt-color-bg-secondary;
|
|
22
|
+
padding: 4px 4px 0;
|
|
23
|
+
border-radius: 4px 4px 0 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.xt-tabs--left .xt-tabs__header {
|
|
27
|
+
border-right: 1px solid $xt-color-border-light;
|
|
28
|
+
border-bottom: none;
|
|
29
|
+
padding-right: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.xt-tabs--right .xt-tabs__header {
|
|
33
|
+
border-left: 1px solid $xt-color-border-light;
|
|
34
|
+
border-bottom: none;
|
|
35
|
+
padding-left: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.xt-tabs__nav {
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.xt-tabs--left .xt-tabs__nav,
|
|
43
|
+
.xt-tabs--right .xt-tabs__nav {
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.xt-tabs__nav-item {
|
|
48
|
+
position: relative;
|
|
49
|
+
padding: 12px 20px;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
color: $xt-color-text-secondary;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: color 0.3s ease;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.xt-tabs--card .xt-tabs__nav-item {
|
|
57
|
+
margin-bottom: -1px;
|
|
58
|
+
border-radius: 4px 4px 0 0;
|
|
59
|
+
background: transparent;
|
|
60
|
+
border: 1px solid transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.xt-tabs--card .xt-tabs__nav-item--active {
|
|
64
|
+
background: $xt-color-bg-primary;
|
|
65
|
+
border-color: $xt-color-border-light;
|
|
66
|
+
border-bottom-color: $xt-color-bg-primary;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.xt-tabs__nav-item:hover {
|
|
70
|
+
color: $xt-color-primary;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.xt-tabs__nav-item--active {
|
|
74
|
+
color: $xt-color-primary;
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.xt-tabs__nav-link {
|
|
79
|
+
display: inline-block;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.xt-tabs__nav-indicator {
|
|
83
|
+
position: absolute;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
height: 2px;
|
|
86
|
+
background: $xt-color-primary;
|
|
87
|
+
transition: left 0.3s ease, width 0.3s ease;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.xt-tabs--left .xt-tabs__nav-indicator {
|
|
91
|
+
bottom: auto;
|
|
92
|
+
left: auto;
|
|
93
|
+
right: 0;
|
|
94
|
+
width: 2px;
|
|
95
|
+
height: auto;
|
|
96
|
+
top: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.xt-tabs--right .xt-tabs__nav-indicator {
|
|
100
|
+
bottom: auto;
|
|
101
|
+
right: auto;
|
|
102
|
+
left: 0;
|
|
103
|
+
width: 2px;
|
|
104
|
+
height: auto;
|
|
105
|
+
top: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.xt-tabs--card .xt-tabs__nav-indicator {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.xt-tabs__content {
|
|
113
|
+
flex: 1;
|
|
114
|
+
padding: 20px 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.xt-tabs--card .xt-tabs__content {
|
|
118
|
+
border: 1px solid $xt-color-border-light;
|
|
119
|
+
border-top: none;
|
|
120
|
+
border-radius: 0 0 4px 4px;
|
|
121
|
+
padding: 20px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.xt-tabs--left .xt-tabs__content,
|
|
125
|
+
.xt-tabs--right .xt-tabs__content {
|
|
126
|
+
padding: 0 20px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.xt-tabs__pane {
|
|
130
|
+
animation: xt-tabs-fade-in 0.3s ease;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes xt-tabs-fade-in {
|
|
134
|
+
from {
|
|
135
|
+
opacity: 0;
|
|
136
|
+
transform: translateY(10px);
|
|
137
|
+
}
|
|
138
|
+
to {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transform: translateY(0);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.xt-tabs-fade-enter-active,
|
|
145
|
+
.xt-tabs-fade-leave-active {
|
|
146
|
+
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.xt-tabs-fade-enter {
|
|
150
|
+
opacity: 0;
|
|
151
|
+
transform: translateY(10px);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.xt-tabs-fade-leave-to {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
transform: translateY(-10px);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
[data-theme='dark'], html.dark {
|
|
160
|
+
.xt-tabs__header {
|
|
161
|
+
border-color: $xt-dark-color-border;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.xt-tabs--card .xt-tabs__header {
|
|
165
|
+
background: $xt-dark-color-bg-secondary;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.xt-tabs--card .xt-tabs__nav-item--active {
|
|
169
|
+
background: $xt-dark-color-bg-primary;
|
|
170
|
+
border-color: $xt-dark-color-border;
|
|
171
|
+
border-bottom-color: $xt-dark-color-bg-primary;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.xt-tabs--left .xt-tabs__header {
|
|
175
|
+
border-color: $xt-dark-color-border;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.xt-tabs--right .xt-tabs__header {
|
|
179
|
+
border-color: $xt-dark-color-border;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.xt-tabs__nav-item {
|
|
183
|
+
color: $xt-dark-color-text-secondary;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.xt-tabs__nav-item:hover {
|
|
187
|
+
color: $xt-dark-color-primary;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.xt-tabs__nav-item--active {
|
|
191
|
+
color: $xt-dark-color-primary;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.xt-tabs--card .xt-tabs__content {
|
|
195
|
+
border-color: $xt-dark-color-border;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import XtText from './index.vue'
|
|
2
|
-
|
|
3
|
-
XtText.install = function (Vue) {
|
|
4
|
-
Vue.component(XtText.name, XtText)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default XtText
|
|
1
|
+
import XtText from './index.vue'
|
|
2
|
+
|
|
3
|
+
XtText.install = function (Vue) {
|
|
4
|
+
Vue.component(XtText.name, XtText)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default XtText
|
|
8
8
|
export { XtText }
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
type ? 'xt-text--' + type : '',
|
|
6
6
|
'xt-text--' + size,
|
|
7
7
|
{ 'xt-text--bold': bold },
|
|
8
|
-
{ 'xt-text--money': format === 'money' }
|
|
8
|
+
{ 'xt-text--money': format === 'money' },
|
|
9
|
+
{ 'xt-text--ellipsis': ellipsis },
|
|
10
|
+
{ 'xt-text--ellipsis-multiline': ellipsis && ellipsisRows > 1 }
|
|
9
11
|
]"
|
|
10
12
|
:style="customStyle"
|
|
11
13
|
>
|
|
@@ -43,6 +45,15 @@ export default {
|
|
|
43
45
|
type: [String, Number],
|
|
44
46
|
default: ''
|
|
45
47
|
},
|
|
48
|
+
ellipsis: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
ellipsisRows: {
|
|
53
|
+
type: Number,
|
|
54
|
+
default: 1,
|
|
55
|
+
validator: (val) => val >= 1 && val <= 10
|
|
56
|
+
},
|
|
46
57
|
|
|
47
58
|
// 格式化模式:normal 普通 | thousand 千分位 | money 金额
|
|
48
59
|
format: {
|
|
@@ -98,6 +109,9 @@ export default {
|
|
|
98
109
|
if (this.letterSpacing) {
|
|
99
110
|
style.letterSpacing = typeof this.letterSpacing === 'number' ? `${this.letterSpacing}px` : this.letterSpacing
|
|
100
111
|
}
|
|
112
|
+
if (this.ellipsis && this.ellipsisRows > 1) {
|
|
113
|
+
style.WebkitLineClamp = this.ellipsisRows
|
|
114
|
+
}
|
|
101
115
|
return style
|
|
102
116
|
},
|
|
103
117
|
|
|
@@ -151,4 +165,4 @@ export default {
|
|
|
151
165
|
}
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
|
-
</script>
|
|
168
|
+
</script>
|
|
@@ -1,92 +1,110 @@
|
|
|
1
|
-
@import '../../../styles/variables.scss';
|
|
2
|
-
|
|
3
|
-
// 文字组件
|
|
4
|
-
.xt-text {
|
|
5
|
-
letter-spacing: normal;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// 字体大小 - 使用增量方式
|
|
9
|
-
.xt-text--extra-large {
|
|
10
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-extra-large);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.xt-text--large {
|
|
14
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-large);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.xt-text--medium {
|
|
18
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-medium);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.xt-text--base {
|
|
22
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-base);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.xt-text--small {
|
|
26
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-small);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.xt-text--extra-small {
|
|
30
|
-
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-extra-small);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// 不同类型文字颜色
|
|
34
|
-
.xt-text--primary {
|
|
35
|
-
color: var(--xt-color-primary, #1890ff);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.xt-text--success {
|
|
39
|
-
color: $xt-color-success;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.xt-text--warning {
|
|
43
|
-
color: $xt-color-warning;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.xt-text--danger {
|
|
47
|
-
color: $xt-color-danger;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// 粗体
|
|
51
|
-
.xt-text--bold {
|
|
52
|
-
font-weight: bold;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
.xt-text--
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
color: $xt-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
@import '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
// 文字组件
|
|
4
|
+
.xt-text {
|
|
5
|
+
letter-spacing: normal;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// 字体大小 - 使用增量方式
|
|
9
|
+
.xt-text--extra-large {
|
|
10
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-extra-large);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.xt-text--large {
|
|
14
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-large);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.xt-text--medium {
|
|
18
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-medium);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.xt-text--base {
|
|
22
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-base);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.xt-text--small {
|
|
26
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-small);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.xt-text--extra-small {
|
|
30
|
+
font-size: calc(var(--xt-font-size-base) + $xt-font-size-increment-extra-small);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 不同类型文字颜色
|
|
34
|
+
.xt-text--primary {
|
|
35
|
+
color: var(--xt-color-primary, #1890ff);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.xt-text--success {
|
|
39
|
+
color: $xt-color-success;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.xt-text--warning {
|
|
43
|
+
color: $xt-color-warning;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.xt-text--danger {
|
|
47
|
+
color: $xt-color-danger;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 粗体
|
|
51
|
+
.xt-text--bold {
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 单行省略
|
|
56
|
+
.xt-text--ellipsis {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 多行省略
|
|
65
|
+
.xt-text--ellipsis-multiline {
|
|
66
|
+
display: -webkit-box;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
-webkit-box-orient: vertical;
|
|
69
|
+
text-overflow: ellipsis;
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 金额样式
|
|
74
|
+
.xt-text--money {
|
|
75
|
+
font-family: 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
letter-spacing: 0;
|
|
78
|
+
|
|
79
|
+
&.xt-text--primary {
|
|
80
|
+
color: var(--xt-color-primary, #1890ff);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.xt-text--success {
|
|
84
|
+
color: $xt-color-success;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.xt-text--warning {
|
|
88
|
+
color: $xt-color-warning;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.xt-text--danger {
|
|
92
|
+
color: $xt-color-danger;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 暗色主题
|
|
97
|
+
[data-theme='dark'], html.dark {
|
|
98
|
+
.xt-text--primary {
|
|
99
|
+
color: $xt-dark-color-primary;
|
|
100
|
+
}
|
|
101
|
+
.xt-text--success {
|
|
102
|
+
color: $xt-dark-color-success;
|
|
103
|
+
}
|
|
104
|
+
.xt-text--warning {
|
|
105
|
+
color: $xt-dark-color-warning;
|
|
106
|
+
}
|
|
107
|
+
.xt-text--danger {
|
|
108
|
+
color: $xt-dark-color-danger;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import XtTime from './index.vue'
|
|
2
|
-
|
|
3
|
-
XtTime.install = function (Vue) {
|
|
4
|
-
Vue.component(XtTime.name, XtTime)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default XtTime
|
|
1
|
+
import XtTime from './index.vue'
|
|
2
|
+
|
|
3
|
+
XtTime.install = function (Vue) {
|
|
4
|
+
Vue.component(XtTime.name, XtTime)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default XtTime
|
|
8
8
|
export { XtTime }
|