xt-element-ui 1.3.4 → 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/docs/components/base/xt-card-item.md +12 -12
- package/lib/index.common.js +415 -16
- package/lib/index.css +1 -1
- package/lib/index.umd.js +415 -16
- package/lib/index.umd.min.js +4 -4
- package/package.json +1 -1
- package/src/components/ex-chart/theme/dark.js +4 -1
- package/src/components/index.scss +10 -1
- 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-card-item/index.vue +5 -5
- 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-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/index.js +9 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
::: demo 基本用法
|
|
8
8
|
```vue
|
|
9
9
|
<template>
|
|
10
|
-
<XtCardItem title="销售额"
|
|
10
|
+
<XtCardItem title="销售额" :value="12345" unit="元" style="width: 350px;"></XtCardItem>
|
|
11
11
|
</template>
|
|
12
12
|
```
|
|
13
13
|
:::
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
::: demo 边框型卡片项
|
|
41
41
|
```vue
|
|
42
42
|
<template>
|
|
43
|
-
<XtCardItem
|
|
43
|
+
<XtCardItem title="销售额" value="12345" unit="元" type="primary" style="width: 350px;"></XtCardItem>
|
|
44
44
|
</template>
|
|
45
45
|
```
|
|
46
46
|
:::
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
::: demo 不同类型的边框卡片项
|
|
51
51
|
```vue
|
|
52
52
|
<template>
|
|
53
|
-
<div style="display: flex; flex-direction: column; gap: 8px;">
|
|
54
|
-
<XtCardItem
|
|
55
|
-
<XtCardItem
|
|
56
|
-
<XtCardItem
|
|
53
|
+
<div style="display: flex; flex-direction: column; gap: 8px;width: 350px;">
|
|
54
|
+
<XtCardItem title="成功" value="309894" type="success"></XtCardItem>
|
|
55
|
+
<XtCardItem title="警告" value="309894" type="warning"></XtCardItem>
|
|
56
|
+
<XtCardItem title="危险" value="309894" type="danger"></XtCardItem>
|
|
57
57
|
</div>
|
|
58
58
|
</template>
|
|
59
59
|
```
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
::: demo 自定义颜色
|
|
64
64
|
```vue
|
|
65
65
|
<template>
|
|
66
|
-
<XtCardItem
|
|
66
|
+
<XtCardItem title="自定义颜色" value="100%" color="#722ed1" style="width: 350px;"></XtCardItem>
|
|
67
67
|
</template>
|
|
68
68
|
```
|
|
69
69
|
:::
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
::: demo 自定义插槽
|
|
73
73
|
```vue
|
|
74
74
|
<template>
|
|
75
|
-
<XtCardItem>
|
|
75
|
+
<XtCardItem style="width: 350px;">
|
|
76
76
|
<template #label>
|
|
77
77
|
<span style="color: #1890ff; font-weight: bold;">自定义标签</span>
|
|
78
78
|
</template>
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
```vue
|
|
94
94
|
<template>
|
|
95
95
|
<XtCard title="统计数据">
|
|
96
|
-
<div style="display: flex; flex-direction: column; gap: 8px;">
|
|
97
|
-
<XtCardItem
|
|
98
|
-
<XtCardItem
|
|
99
|
-
<XtCardItem
|
|
96
|
+
<div style="display: flex; flex-direction: column; gap: 8px; style="width: 350px;">
|
|
97
|
+
<XtCardItem title="总销售额" value="123456" unit="元"></XtCardItem>
|
|
98
|
+
<XtCardItem title="订单数量" value="520" unit="单" type="success"></XtCardItem>
|
|
99
|
+
<XtCardItem title="转化率" value="23.5" unit="%" type="warning"></XtCardItem>
|
|
100
100
|
</div>
|
|
101
101
|
</XtCard>
|
|
102
102
|
</template>
|
package/lib/index.common.js
CHANGED
|
@@ -128220,6 +128220,9 @@ var variables_export_default = /*#__PURE__*/__webpack_require__.n(variables_expo
|
|
|
128220
128220
|
color: "#ffffff"
|
|
128221
128221
|
}
|
|
128222
128222
|
},
|
|
128223
|
+
axisLabel: {
|
|
128224
|
+
color: "#ffffff"
|
|
128225
|
+
},
|
|
128223
128226
|
line: {
|
|
128224
128227
|
itemStyle: {
|
|
128225
128228
|
},
|
|
@@ -128230,7 +128233,7 @@ var variables_export_default = /*#__PURE__*/__webpack_require__.n(variables_expo
|
|
|
128230
128233
|
bar: {
|
|
128231
128234
|
itemStyle: {
|
|
128232
128235
|
borderRadius: 4
|
|
128233
|
-
}
|
|
128236
|
+
},
|
|
128234
128237
|
},
|
|
128235
128238
|
pie: {
|
|
128236
128239
|
roseType: "radius",
|
|
@@ -129367,13 +129370,13 @@ xt_card.install = function (Vue) {
|
|
|
129367
129370
|
/* harmony default export */ var components_xt_card = (xt_card);
|
|
129368
129371
|
|
|
129369
129372
|
|
|
129370
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card-item/index.vue?vue&type=template&id=
|
|
129371
|
-
var
|
|
129373
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card-item/index.vue?vue&type=template&id=c934c274
|
|
129374
|
+
var xt_card_itemvue_type_template_id_c934c274_render = function render(){var _vm=this,_c=_vm._self._c;return _c('ex-card',{staticClass:"xt-card-item",class:{ [`is-${_vm.type}`]: _vm.type ? true : false},attrs:{"bordered":false}},[_c('xt-flex-box',{attrs:{"content":"between"}},[_c('div',[_c('div',[_c('xt-text',{attrs:{"bold":"","size":"extra-large"}},[_vm._v(_vm._s(_vm.title))])],1),_c('xt-text',{attrs:{"bold":"","size":"large","format":"thousand","type":_vm.type,"decimals":0},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}}),_c('div',{staticStyle:{"margin":"5px 0"}},[_c('xt-text',{attrs:{"size":"small"}},[_vm._v("较昨日")]),_c('xt-text',{attrs:{"format":"normal","type":_vm.diff > 0 ? 'success' : 'danger',"suffix":_vm.diff > 0 ? '↑' : '↓'},model:{value:(_vm.change),callback:function ($$v) {_vm.change=$$v},expression:"change"}})],1)],1),_c('div',{staticStyle:{"height":"100%"}},[_vm._t("icon",function(){return [_c('xt-text',{attrs:{"size":"extra-large","type":_vm.type}},[_c('ex-icon',{attrs:{"name":"el-icon-user","size":48}})],1)]})],2)])],1)
|
|
129372
129375
|
}
|
|
129373
|
-
var
|
|
129376
|
+
var xt_card_itemvue_type_template_id_c934c274_staticRenderFns = []
|
|
129374
129377
|
|
|
129375
129378
|
|
|
129376
|
-
// CONCATENATED MODULE: ./src/components/xt-card-item/index.vue?vue&type=template&id=
|
|
129379
|
+
// CONCATENATED MODULE: ./src/components/xt-card-item/index.vue?vue&type=template&id=c934c274
|
|
129377
129380
|
|
|
129378
129381
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card-item/index.vue?vue&type=script&lang=js
|
|
129379
129382
|
|
|
@@ -129404,8 +129407,8 @@ var xt_card_itemvue_type_template_id_1e46df45_staticRenderFns = []
|
|
|
129404
129407
|
|
|
129405
129408
|
var xt_card_item_component = normalizeComponent(
|
|
129406
129409
|
components_xt_card_itemvue_type_script_lang_js,
|
|
129407
|
-
|
|
129408
|
-
|
|
129410
|
+
xt_card_itemvue_type_template_id_c934c274_render,
|
|
129411
|
+
xt_card_itemvue_type_template_id_c934c274_staticRenderFns,
|
|
129409
129412
|
false,
|
|
129410
129413
|
null,
|
|
129411
129414
|
null,
|
|
@@ -129815,18 +129818,20 @@ xt_config_provider.install = function (Vue) {
|
|
|
129815
129818
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
129816
129819
|
|
|
129817
129820
|
|
|
129818
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=template&id=
|
|
129819
|
-
var
|
|
129821
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=template&id=7abe6280
|
|
129822
|
+
var xt_textvue_type_template_id_7abe6280_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
|
|
129820
129823
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
129821
129824
|
'xt-text--' + _vm.size,
|
|
129822
129825
|
{ 'xt-text--bold': _vm.bold },
|
|
129823
|
-
{ 'xt-text--money': _vm.format === 'money' }
|
|
129826
|
+
{ 'xt-text--money': _vm.format === 'money' },
|
|
129827
|
+
{ 'xt-text--ellipsis': _vm.ellipsis },
|
|
129828
|
+
{ 'xt-text--ellipsis-multiline': _vm.ellipsis && _vm.ellipsisRows > 1 }
|
|
129824
129829
|
],style:(_vm.customStyle)},[_vm._t("prefix",function(){return [_vm._v(_vm._s(_vm.prefix))]}),_vm._t("default",function(){return [(_vm.formattedValue !== undefined)?[_vm._v(_vm._s(_vm.formattedValue))]:_vm._e()]}),_vm._t("suffix",function(){return [_vm._v(_vm._s(_vm.suffix))]})],2)
|
|
129825
129830
|
}
|
|
129826
|
-
var
|
|
129831
|
+
var xt_textvue_type_template_id_7abe6280_staticRenderFns = []
|
|
129827
129832
|
|
|
129828
129833
|
|
|
129829
|
-
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=
|
|
129834
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=7abe6280
|
|
129830
129835
|
|
|
129831
129836
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=script&lang=js
|
|
129832
129837
|
|
|
@@ -129855,6 +129860,15 @@ var xt_textvue_type_template_id_2607326b_staticRenderFns = []
|
|
|
129855
129860
|
type: [String, Number],
|
|
129856
129861
|
default: ''
|
|
129857
129862
|
},
|
|
129863
|
+
ellipsis: {
|
|
129864
|
+
type: Boolean,
|
|
129865
|
+
default: false
|
|
129866
|
+
},
|
|
129867
|
+
ellipsisRows: {
|
|
129868
|
+
type: Number,
|
|
129869
|
+
default: 1,
|
|
129870
|
+
validator: (val) => val >= 1 && val <= 10
|
|
129871
|
+
},
|
|
129858
129872
|
|
|
129859
129873
|
// 格式化模式:normal 普通 | thousand 千分位 | money 金额
|
|
129860
129874
|
format: {
|
|
@@ -129910,6 +129924,9 @@ var xt_textvue_type_template_id_2607326b_staticRenderFns = []
|
|
|
129910
129924
|
if (this.letterSpacing) {
|
|
129911
129925
|
style.letterSpacing = typeof this.letterSpacing === 'number' ? `${this.letterSpacing}px` : this.letterSpacing
|
|
129912
129926
|
}
|
|
129927
|
+
if (this.ellipsis && this.ellipsisRows > 1) {
|
|
129928
|
+
style.WebkitLineClamp = this.ellipsisRows
|
|
129929
|
+
}
|
|
129913
129930
|
return style
|
|
129914
129931
|
},
|
|
129915
129932
|
|
|
@@ -129976,8 +129993,8 @@ var xt_textvue_type_template_id_2607326b_staticRenderFns = []
|
|
|
129976
129993
|
|
|
129977
129994
|
var xt_text_component = normalizeComponent(
|
|
129978
129995
|
components_xt_textvue_type_script_lang_js,
|
|
129979
|
-
|
|
129980
|
-
|
|
129996
|
+
xt_textvue_type_template_id_7abe6280_render,
|
|
129997
|
+
xt_textvue_type_template_id_7abe6280_staticRenderFns,
|
|
129981
129998
|
false,
|
|
129982
129999
|
null,
|
|
129983
130000
|
null,
|
|
@@ -132987,6 +133004,381 @@ xt_grid_item.install = function (Vue) {
|
|
|
132987
133004
|
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
132988
133005
|
|
|
132989
133006
|
|
|
133007
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-progress/index.vue?vue&type=template&id=76c95a92
|
|
133008
|
+
var xt_progressvue_type_template_id_76c95a92_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-progress",class:[
|
|
133009
|
+
`xt-progress--${_vm.type}`,
|
|
133010
|
+
`xt-progress--${_vm.size}`
|
|
133011
|
+
]},[(_vm.type === 'line')?_c('div',{staticClass:"xt-progress__bar"},[_c('div',{staticClass:"xt-progress__bar-inner",style:({ width: `${_vm.percentage}%`, backgroundColor: _vm.color })},[_c('transition',{attrs:{"name":"xt-progress-fade"}},[(_vm.showText)?_c('div',{staticClass:"xt-progress__bar-text"},[_vm._v(_vm._s(_vm.percentage)+"%")]):_vm._e()])],1)]):(_vm.type === 'circle')?_c('div',{staticClass:"xt-progress__circle"},[_c('svg',{staticClass:"xt-progress__circle-svg",attrs:{"width":_vm.circleSize,"height":_vm.circleSize}},[_c('circle',{staticClass:"xt-progress__circle-bg",attrs:{"cx":_vm.circleSize / 2,"cy":_vm.circleSize / 2,"r":_vm.circleRadius,"fill":"none","stroke":_vm.bgColor,"stroke-width":_vm.strokeWidth}}),_c('circle',{staticClass:"xt-progress__circle-bar",attrs:{"cx":_vm.circleSize / 2,"cy":_vm.circleSize / 2,"r":_vm.circleRadius,"fill":"none","stroke":_vm.color,"stroke-width":_vm.strokeWidth,"stroke-dasharray":_vm.circleLength,"stroke-dashoffset":_vm.circleOffset,"stroke-linecap":"round","transform":"rotate(-90 ${circleSize / 2} ${circleSize / 2})"}})]),(_vm.showText)?_c('div',{staticClass:"xt-progress__circle-text"},[_c('span',{staticClass:"xt-progress__circle-percent"},[_vm._v(_vm._s(_vm.percentage)+"%")])]):_vm._e()]):_vm._e(),(_vm.showText && _vm.type === 'line')?_c('div',{staticClass:"xt-progress__text"},[_vm._v(_vm._s(_vm.percentage)+"%")]):_vm._e()])
|
|
133012
|
+
}
|
|
133013
|
+
var xt_progressvue_type_template_id_76c95a92_staticRenderFns = []
|
|
133014
|
+
|
|
133015
|
+
|
|
133016
|
+
// CONCATENATED MODULE: ./src/components/xt-progress/index.vue?vue&type=template&id=76c95a92
|
|
133017
|
+
|
|
133018
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-progress/index.vue?vue&type=script&lang=js
|
|
133019
|
+
|
|
133020
|
+
/* harmony default export */ var xt_progressvue_type_script_lang_js = ({
|
|
133021
|
+
name: 'XtProgress',
|
|
133022
|
+
props: {
|
|
133023
|
+
percentage: {
|
|
133024
|
+
type: Number,
|
|
133025
|
+
default: 0,
|
|
133026
|
+
validator: (val) => val >= 0 && val <= 100
|
|
133027
|
+
},
|
|
133028
|
+
type: {
|
|
133029
|
+
type: String,
|
|
133030
|
+
default: 'line',
|
|
133031
|
+
validator: (val) => ['line', 'circle'].includes(val)
|
|
133032
|
+
},
|
|
133033
|
+
size: {
|
|
133034
|
+
type: String,
|
|
133035
|
+
default: 'medium',
|
|
133036
|
+
validator: (val) => ['small', 'medium', 'large'].includes(val)
|
|
133037
|
+
},
|
|
133038
|
+
color: {
|
|
133039
|
+
type: String,
|
|
133040
|
+
default: '#1890ff'
|
|
133041
|
+
},
|
|
133042
|
+
bgColor: {
|
|
133043
|
+
type: String,
|
|
133044
|
+
default: '#ebeef5'
|
|
133045
|
+
},
|
|
133046
|
+
showText: {
|
|
133047
|
+
type: Boolean,
|
|
133048
|
+
default: true
|
|
133049
|
+
},
|
|
133050
|
+
strokeWidth: {
|
|
133051
|
+
type: Number,
|
|
133052
|
+
default: 6
|
|
133053
|
+
},
|
|
133054
|
+
circleSize: {
|
|
133055
|
+
type: Number,
|
|
133056
|
+
default: 120
|
|
133057
|
+
}
|
|
133058
|
+
},
|
|
133059
|
+
computed: {
|
|
133060
|
+
circleRadius() {
|
|
133061
|
+
return (this.circleSize - this.strokeWidth) / 2
|
|
133062
|
+
},
|
|
133063
|
+
circleLength() {
|
|
133064
|
+
return 2 * Math.PI * this.circleRadius
|
|
133065
|
+
},
|
|
133066
|
+
circleOffset() {
|
|
133067
|
+
return this.circleLength * (1 - this.percentage / 100)
|
|
133068
|
+
}
|
|
133069
|
+
}
|
|
133070
|
+
});
|
|
133071
|
+
|
|
133072
|
+
// CONCATENATED MODULE: ./src/components/xt-progress/index.vue?vue&type=script&lang=js
|
|
133073
|
+
/* harmony default export */ var components_xt_progressvue_type_script_lang_js = (xt_progressvue_type_script_lang_js);
|
|
133074
|
+
// CONCATENATED MODULE: ./src/components/xt-progress/index.vue
|
|
133075
|
+
|
|
133076
|
+
|
|
133077
|
+
|
|
133078
|
+
|
|
133079
|
+
|
|
133080
|
+
/* normalize component */
|
|
133081
|
+
|
|
133082
|
+
var xt_progress_component = normalizeComponent(
|
|
133083
|
+
components_xt_progressvue_type_script_lang_js,
|
|
133084
|
+
xt_progressvue_type_template_id_76c95a92_render,
|
|
133085
|
+
xt_progressvue_type_template_id_76c95a92_staticRenderFns,
|
|
133086
|
+
false,
|
|
133087
|
+
null,
|
|
133088
|
+
null,
|
|
133089
|
+
null
|
|
133090
|
+
|
|
133091
|
+
)
|
|
133092
|
+
|
|
133093
|
+
/* harmony default export */ var xt_progress = (xt_progress_component.exports);
|
|
133094
|
+
// CONCATENATED MODULE: ./src/components/xt-progress/index.js
|
|
133095
|
+
|
|
133096
|
+
|
|
133097
|
+
xt_progress.install = function(Vue) {
|
|
133098
|
+
Vue.component(xt_progress.name, xt_progress)
|
|
133099
|
+
}
|
|
133100
|
+
|
|
133101
|
+
/* harmony default export */ var components_xt_progress = (xt_progress);
|
|
133102
|
+
|
|
133103
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-tabs/index.vue?vue&type=template&id=04b02574
|
|
133104
|
+
var xt_tabsvue_type_template_id_04b02574_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-tabs",class:[
|
|
133105
|
+
`xt-tabs--${_vm.position}`,
|
|
133106
|
+
{ 'xt-tabs--card': _vm.type === 'card' }
|
|
133107
|
+
]},[_c('div',{staticClass:"xt-tabs__header"},[_c('div',{staticClass:"xt-tabs__nav"},_vm._l((_vm.panes),function(pane,index){return _c('div',{key:pane.name,staticClass:"xt-tabs__nav-item",class:{ 'xt-tabs__nav-item--active': _vm.activeName === pane.name },on:{"click":function($event){return _vm.handleTabClick(pane.name)}}},[_c('span',{staticClass:"xt-tabs__nav-link"},[_vm._v(_vm._s(pane.label))])])}),0),_c('div',{staticClass:"xt-tabs__nav-indicator",style:(_vm.indicatorStyle)})]),_c('div',{staticClass:"xt-tabs__content"},[_c('transition',{attrs:{"name":"xt-tabs-fade","mode":"out-in"}},_vm._l((_vm.panes),function(pane,index){return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.activeName === pane.name),expression:"activeName === pane.name"}],key:pane.name,staticClass:"xt-tabs__pane"},[_vm._t(pane.name)],2)}),0)],1)])
|
|
133108
|
+
}
|
|
133109
|
+
var xt_tabsvue_type_template_id_04b02574_staticRenderFns = []
|
|
133110
|
+
|
|
133111
|
+
|
|
133112
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/index.vue?vue&type=template&id=04b02574
|
|
133113
|
+
|
|
133114
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-tabs/index.vue?vue&type=script&lang=js
|
|
133115
|
+
|
|
133116
|
+
/* harmony default export */ var xt_tabsvue_type_script_lang_js = ({
|
|
133117
|
+
name: 'XtTabs',
|
|
133118
|
+
props: {
|
|
133119
|
+
value: {
|
|
133120
|
+
type: [String, Number],
|
|
133121
|
+
default: ''
|
|
133122
|
+
},
|
|
133123
|
+
type: {
|
|
133124
|
+
type: String,
|
|
133125
|
+
default: 'default',
|
|
133126
|
+
validator: (val) => ['default', 'card'].includes(val)
|
|
133127
|
+
},
|
|
133128
|
+
position: {
|
|
133129
|
+
type: String,
|
|
133130
|
+
default: 'top',
|
|
133131
|
+
validator: (val) => ['top', 'bottom', 'left', 'right'].includes(val)
|
|
133132
|
+
}
|
|
133133
|
+
},
|
|
133134
|
+
data() {
|
|
133135
|
+
return {
|
|
133136
|
+
panes: [],
|
|
133137
|
+
activeName: this.value
|
|
133138
|
+
}
|
|
133139
|
+
},
|
|
133140
|
+
watch: {
|
|
133141
|
+
value(val) {
|
|
133142
|
+
this.activeName = val
|
|
133143
|
+
},
|
|
133144
|
+
activeName(val) {
|
|
133145
|
+
this.$emit('input', val)
|
|
133146
|
+
this.$emit('change', val)
|
|
133147
|
+
}
|
|
133148
|
+
},
|
|
133149
|
+
computed: {
|
|
133150
|
+
indicatorStyle() {
|
|
133151
|
+
const activeIndex = this.panes.findIndex(p => p.name === this.activeName)
|
|
133152
|
+
if (activeIndex === -1) return { display: 'none' }
|
|
133153
|
+
|
|
133154
|
+
const navItems = this.$el && this.$el.querySelectorAll('.xt-tabs__nav-item')
|
|
133155
|
+
if (!navItems || navItems.length === 0) return { display: 'none' }
|
|
133156
|
+
|
|
133157
|
+
const activeItem = navItems[activeIndex]
|
|
133158
|
+
return {
|
|
133159
|
+
left: `${activeItem.offsetLeft}px`,
|
|
133160
|
+
width: `${activeItem.offsetWidth}px`,
|
|
133161
|
+
display: 'block'
|
|
133162
|
+
}
|
|
133163
|
+
}
|
|
133164
|
+
},
|
|
133165
|
+
methods: {
|
|
133166
|
+
handleTabClick(name) {
|
|
133167
|
+
this.activeName = name
|
|
133168
|
+
},
|
|
133169
|
+
addPane(pane) {
|
|
133170
|
+
if (!this.panes.find(p => p.name === pane.name)) {
|
|
133171
|
+
this.panes.push(pane)
|
|
133172
|
+
if (!this.activeName && this.panes.length === 1) {
|
|
133173
|
+
this.activeName = pane.name
|
|
133174
|
+
}
|
|
133175
|
+
}
|
|
133176
|
+
},
|
|
133177
|
+
removePane(name) {
|
|
133178
|
+
const index = this.panes.findIndex(p => p.name === name)
|
|
133179
|
+
if (index > -1) {
|
|
133180
|
+
this.panes.splice(index, 1)
|
|
133181
|
+
}
|
|
133182
|
+
}
|
|
133183
|
+
},
|
|
133184
|
+
mounted() {
|
|
133185
|
+
this.$children.forEach(child => {
|
|
133186
|
+
if (child.$options.name === 'XtTabPane') {
|
|
133187
|
+
this.addPane({ name: child.name, label: child.label })
|
|
133188
|
+
}
|
|
133189
|
+
})
|
|
133190
|
+
}
|
|
133191
|
+
});
|
|
133192
|
+
|
|
133193
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/index.vue?vue&type=script&lang=js
|
|
133194
|
+
/* harmony default export */ var components_xt_tabsvue_type_script_lang_js = (xt_tabsvue_type_script_lang_js);
|
|
133195
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/index.vue
|
|
133196
|
+
|
|
133197
|
+
|
|
133198
|
+
|
|
133199
|
+
|
|
133200
|
+
|
|
133201
|
+
/* normalize component */
|
|
133202
|
+
|
|
133203
|
+
var xt_tabs_component = normalizeComponent(
|
|
133204
|
+
components_xt_tabsvue_type_script_lang_js,
|
|
133205
|
+
xt_tabsvue_type_template_id_04b02574_render,
|
|
133206
|
+
xt_tabsvue_type_template_id_04b02574_staticRenderFns,
|
|
133207
|
+
false,
|
|
133208
|
+
null,
|
|
133209
|
+
null,
|
|
133210
|
+
null
|
|
133211
|
+
|
|
133212
|
+
)
|
|
133213
|
+
|
|
133214
|
+
/* harmony default export */ var xt_tabs = (xt_tabs_component.exports);
|
|
133215
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-tabs/TabPane.vue?vue&type=template&id=0c2246dc
|
|
133216
|
+
var TabPanevue_type_template_id_0c2246dc_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"xt-tab-pane"},[_vm._t("default")],2)
|
|
133217
|
+
}
|
|
133218
|
+
var TabPanevue_type_template_id_0c2246dc_staticRenderFns = []
|
|
133219
|
+
|
|
133220
|
+
|
|
133221
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/TabPane.vue?vue&type=template&id=0c2246dc
|
|
133222
|
+
|
|
133223
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-tabs/TabPane.vue?vue&type=script&lang=js
|
|
133224
|
+
|
|
133225
|
+
/* harmony default export */ var TabPanevue_type_script_lang_js = ({
|
|
133226
|
+
name: 'XtTabPane',
|
|
133227
|
+
props: {
|
|
133228
|
+
name: {
|
|
133229
|
+
type: [String, Number],
|
|
133230
|
+
required: true
|
|
133231
|
+
},
|
|
133232
|
+
label: {
|
|
133233
|
+
type: String,
|
|
133234
|
+
default: ''
|
|
133235
|
+
}
|
|
133236
|
+
},
|
|
133237
|
+
computed: {
|
|
133238
|
+
isActive() {
|
|
133239
|
+
return this.$parent && this.$parent.activeName === this.name
|
|
133240
|
+
}
|
|
133241
|
+
},
|
|
133242
|
+
mounted() {
|
|
133243
|
+
if (this.$parent && typeof this.$parent.addPane === 'function') {
|
|
133244
|
+
this.$parent.addPane({ name: this.name, label: this.label })
|
|
133245
|
+
}
|
|
133246
|
+
},
|
|
133247
|
+
beforeDestroy() {
|
|
133248
|
+
if (this.$parent && typeof this.$parent.removePane === 'function') {
|
|
133249
|
+
this.$parent.removePane(this.name)
|
|
133250
|
+
}
|
|
133251
|
+
}
|
|
133252
|
+
});
|
|
133253
|
+
|
|
133254
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/TabPane.vue?vue&type=script&lang=js
|
|
133255
|
+
/* harmony default export */ var xt_tabs_TabPanevue_type_script_lang_js = (TabPanevue_type_script_lang_js);
|
|
133256
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/TabPane.vue
|
|
133257
|
+
|
|
133258
|
+
|
|
133259
|
+
|
|
133260
|
+
|
|
133261
|
+
|
|
133262
|
+
/* normalize component */
|
|
133263
|
+
|
|
133264
|
+
var TabPane_component = normalizeComponent(
|
|
133265
|
+
xt_tabs_TabPanevue_type_script_lang_js,
|
|
133266
|
+
TabPanevue_type_template_id_0c2246dc_render,
|
|
133267
|
+
TabPanevue_type_template_id_0c2246dc_staticRenderFns,
|
|
133268
|
+
false,
|
|
133269
|
+
null,
|
|
133270
|
+
null,
|
|
133271
|
+
null
|
|
133272
|
+
|
|
133273
|
+
)
|
|
133274
|
+
|
|
133275
|
+
/* harmony default export */ var TabPane = (TabPane_component.exports);
|
|
133276
|
+
// CONCATENATED MODULE: ./src/components/xt-tabs/index.js
|
|
133277
|
+
|
|
133278
|
+
|
|
133279
|
+
|
|
133280
|
+
xt_tabs.install = function(Vue) {
|
|
133281
|
+
Vue.component(xt_tabs.name, xt_tabs)
|
|
133282
|
+
Vue.component(TabPane.name, TabPane)
|
|
133283
|
+
}
|
|
133284
|
+
|
|
133285
|
+
/* harmony default export */ var components_xt_tabs = (xt_tabs);
|
|
133286
|
+
|
|
133287
|
+
|
|
133288
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-badge/index.vue?vue&type=template&id=20f2da48
|
|
133289
|
+
var xt_badgevue_type_template_id_20f2da48_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-badge",class:[
|
|
133290
|
+
`xt-badge--${_vm.type}`,
|
|
133291
|
+
{ 'xt-badge--dot': _vm.isDot },
|
|
133292
|
+
{ 'xt-badge--hidden': _vm.hidden },
|
|
133293
|
+
{ 'xt-badge--fixed': _vm.fixed }
|
|
133294
|
+
]},[_c('span',{staticClass:"xt-badge__content"},[_vm._t("default")],2),(!_vm.hidden && (_vm.value || _vm.isDot))?_c('span',{staticClass:"xt-badge__badge",style:(_vm.badgeStyle)},[(_vm.isDot)?void 0:(_vm.showOverflow && _vm.value > _vm.max)?[_vm._v(_vm._s(_vm.max)+"+")]:[_vm._v(_vm._s(_vm.value))]],2):_vm._e()])
|
|
133295
|
+
}
|
|
133296
|
+
var xt_badgevue_type_template_id_20f2da48_staticRenderFns = []
|
|
133297
|
+
|
|
133298
|
+
|
|
133299
|
+
// CONCATENATED MODULE: ./src/components/xt-badge/index.vue?vue&type=template&id=20f2da48
|
|
133300
|
+
|
|
133301
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-badge/index.vue?vue&type=script&lang=js
|
|
133302
|
+
|
|
133303
|
+
/* harmony default export */ var xt_badgevue_type_script_lang_js = ({
|
|
133304
|
+
name: 'XtBadge',
|
|
133305
|
+
props: {
|
|
133306
|
+
value: {
|
|
133307
|
+
type: [Number, String],
|
|
133308
|
+
default: ''
|
|
133309
|
+
},
|
|
133310
|
+
type: {
|
|
133311
|
+
type: String,
|
|
133312
|
+
default: 'primary',
|
|
133313
|
+
validator: (val) => ['primary', 'success', 'warning', 'danger', 'info'].includes(val)
|
|
133314
|
+
},
|
|
133315
|
+
max: {
|
|
133316
|
+
type: Number,
|
|
133317
|
+
default: 99
|
|
133318
|
+
},
|
|
133319
|
+
isDot: {
|
|
133320
|
+
type: Boolean,
|
|
133321
|
+
default: false
|
|
133322
|
+
},
|
|
133323
|
+
hidden: {
|
|
133324
|
+
type: Boolean,
|
|
133325
|
+
default: false
|
|
133326
|
+
},
|
|
133327
|
+
showOverflow: {
|
|
133328
|
+
type: Boolean,
|
|
133329
|
+
default: true
|
|
133330
|
+
},
|
|
133331
|
+
fixed: {
|
|
133332
|
+
type: Boolean,
|
|
133333
|
+
default: false
|
|
133334
|
+
},
|
|
133335
|
+
color: {
|
|
133336
|
+
type: String,
|
|
133337
|
+
default: ''
|
|
133338
|
+
}
|
|
133339
|
+
},
|
|
133340
|
+
computed: {
|
|
133341
|
+
badgeStyle() {
|
|
133342
|
+
const style = {}
|
|
133343
|
+
if (this.color) {
|
|
133344
|
+
style.backgroundColor = this.color
|
|
133345
|
+
}
|
|
133346
|
+
return style
|
|
133347
|
+
}
|
|
133348
|
+
}
|
|
133349
|
+
});
|
|
133350
|
+
|
|
133351
|
+
// CONCATENATED MODULE: ./src/components/xt-badge/index.vue?vue&type=script&lang=js
|
|
133352
|
+
/* harmony default export */ var components_xt_badgevue_type_script_lang_js = (xt_badgevue_type_script_lang_js);
|
|
133353
|
+
// CONCATENATED MODULE: ./src/components/xt-badge/index.vue
|
|
133354
|
+
|
|
133355
|
+
|
|
133356
|
+
|
|
133357
|
+
|
|
133358
|
+
|
|
133359
|
+
/* normalize component */
|
|
133360
|
+
|
|
133361
|
+
var xt_badge_component = normalizeComponent(
|
|
133362
|
+
components_xt_badgevue_type_script_lang_js,
|
|
133363
|
+
xt_badgevue_type_template_id_20f2da48_render,
|
|
133364
|
+
xt_badgevue_type_template_id_20f2da48_staticRenderFns,
|
|
133365
|
+
false,
|
|
133366
|
+
null,
|
|
133367
|
+
null,
|
|
133368
|
+
null
|
|
133369
|
+
|
|
133370
|
+
)
|
|
133371
|
+
|
|
133372
|
+
/* harmony default export */ var xt_badge = (xt_badge_component.exports);
|
|
133373
|
+
// CONCATENATED MODULE: ./src/components/xt-badge/index.js
|
|
133374
|
+
|
|
133375
|
+
|
|
133376
|
+
xt_badge.install = function(Vue) {
|
|
133377
|
+
Vue.component(xt_badge.name, xt_badge)
|
|
133378
|
+
}
|
|
133379
|
+
|
|
133380
|
+
/* harmony default export */ var components_xt_badge = (xt_badge);
|
|
133381
|
+
|
|
132990
133382
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"267e1ec1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-date-picker/index.vue?vue&type=template&id=ff20c256&scoped=true
|
|
132991
133383
|
var ex_date_pickervue_type_template_id_ff20c256_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticStyle:{"display":"inline-block"}},[(_vm.dateType=='quarter')?_c('FlexBox',{staticClass:"xt-date-picker",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"开始时间","quarter-type":"quarter-start","clearable":""},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"结束时间","quarter-type":"quarter-end","clearable":""},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1):_c('FlexBox',{staticClass:"xt-date",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('el-date-picker',{key:"startSelect",ref:"timeStart",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.startTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"开始时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('el-date-picker',{key:"endSelect",ref:"timeEnd",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.endTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"结束时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1)],1)
|
|
132992
133384
|
}
|
|
@@ -135597,6 +135989,9 @@ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getThe
|
|
|
135597
135989
|
|
|
135598
135990
|
|
|
135599
135991
|
|
|
135992
|
+
|
|
135993
|
+
|
|
135994
|
+
|
|
135600
135995
|
// ExChart 组件(基于 ECharts 封装)
|
|
135601
135996
|
|
|
135602
135997
|
// ExIcon 组件(支持 el-icon / svg / 自定义字体)
|
|
@@ -135619,6 +136014,9 @@ const src_components = [
|
|
|
135619
136014
|
components_xt_map_provider,
|
|
135620
136015
|
components_xt_grid_box,
|
|
135621
136016
|
components_xt_grid_item,
|
|
136017
|
+
components_xt_progress,
|
|
136018
|
+
components_xt_tabs,
|
|
136019
|
+
components_xt_badge,
|
|
135622
136020
|
components_ex_date_picker,
|
|
135623
136021
|
components_ex_button,
|
|
135624
136022
|
components_ex_chart,
|
|
@@ -135680,9 +136078,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
135680
136078
|
// 导出
|
|
135681
136079
|
/* harmony default export */ var src_0 = ({
|
|
135682
136080
|
install,
|
|
135683
|
-
// 导出组件列表
|
|
135684
136081
|
components: src_components,
|
|
135685
|
-
// 按需导出组件
|
|
135686
136082
|
XtButton: components_xt_button,
|
|
135687
136083
|
XtInput: components_xt_input,
|
|
135688
136084
|
XtFlexBox: components_xt_flex_box,
|
|
@@ -135697,6 +136093,9 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
135697
136093
|
XtMapProvider: components_xt_map_provider,
|
|
135698
136094
|
XtGridBox: components_xt_grid_box,
|
|
135699
136095
|
XtGridItem: components_xt_grid_item,
|
|
136096
|
+
XtProgress: components_xt_progress,
|
|
136097
|
+
XtTabs: components_xt_tabs,
|
|
136098
|
+
XtBadge: components_xt_badge,
|
|
135700
136099
|
ExDatePicker: components_ex_date_picker,
|
|
135701
136100
|
ExButton: components_ex_button,
|
|
135702
136101
|
ExCard: components_ex_card,
|