xt-element-ui 1.1.3 → 1.1.5

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.
Files changed (105) hide show
  1. package/lib/css/2.9f53fb10.css +1 -0
  2. package/lib/css/3.f955b130.css +1 -0
  3. package/lib/css/4.04feac2c.css +1 -0
  4. package/lib/css/5.6a8558e0.css +1 -0
  5. package/lib/css/6.e474b334.css +1 -0
  6. package/lib/index.common.0.js +16448 -15696
  7. package/lib/index.common.2.js +298 -270
  8. package/lib/index.common.3.js +82 -54
  9. package/lib/index.common.4.js +519 -489
  10. package/lib/index.common.5.js +74 -46
  11. package/lib/index.common.6.js +76 -48
  12. package/lib/index.common.js +1741 -316
  13. package/lib/index.css +1 -1
  14. package/lib/index.umd.0.js +16448 -15696
  15. package/lib/index.umd.2.js +298 -270
  16. package/lib/index.umd.3.js +82 -54
  17. package/lib/index.umd.4.js +519 -489
  18. package/lib/index.umd.5.js +74 -46
  19. package/lib/index.umd.6.js +76 -48
  20. package/lib/index.umd.js +1747 -321
  21. package/lib/index.umd.min.0.js +3 -3
  22. package/lib/index.umd.min.2.js +1 -1
  23. package/lib/index.umd.min.3.js +1 -1
  24. package/lib/index.umd.min.4.js +1 -1
  25. package/lib/index.umd.min.5.js +1 -1
  26. package/lib/index.umd.min.6.js +1 -1
  27. package/lib/index.umd.min.js +1 -1
  28. package/package.json +2 -1
  29. package/src/components/ex-button/index.js +2 -0
  30. package/src/components/ex-button/index.vue +61 -0
  31. package/src/components/ex-button/style/index.scss +31 -0
  32. package/src/components/ex-card/index.js +7 -0
  33. package/src/components/ex-card/index.vue +150 -0
  34. package/src/components/ex-card/style/index.scss +69 -0
  35. package/src/components/{chart → ex-chart}/ExBar.vue +3 -0
  36. package/src/components/{chart → ex-chart}/ExLine.vue +3 -0
  37. package/src/components/{chart → ex-chart}/ExMulti.vue +5 -0
  38. package/src/components/{chart → ex-chart}/ExPie.vue +3 -0
  39. package/src/components/{chart → ex-chart}/ExTrend.vue +3 -0
  40. package/src/components/ex-chart/index.js +2 -0
  41. package/src/components/ex-chart/index.vue +134 -0
  42. package/src/components/{chart → ex-chart}/theme/dark.js +1 -1
  43. package/src/components/{chart → ex-chart}/utils.js +40 -12
  44. package/src/components/{table → ex-table}/index.vue +62 -116
  45. package/src/components/index.scss +16 -7
  46. package/src/components/{button → xt-button}/index.vue +1 -1
  47. package/src/components/{card-item → xt-card-item}/index.vue +1 -1
  48. package/src/components/{config-provider → xt-config-provider}/index.vue +66 -0
  49. package/src/components/{date-picker → xt-date-picker}/index.vue +1 -1
  50. package/src/components/{date-picker → xt-date-picker}/quarter.vue +4 -2
  51. package/src/components/xt-grid-box/index.vue +135 -0
  52. package/src/components/xt-grid-box/style/index.scss +93 -0
  53. package/src/components/xt-grid-item/index.js +2 -0
  54. package/src/components/xt-grid-item/index.vue +107 -0
  55. package/src/components/{text → xt-text}/index.vue +6 -0
  56. package/src/components/{text → xt-text}/style/index.scss +26 -1
  57. package/src/config/element-registry.js +136 -0
  58. package/src/index.js +62 -32
  59. package/src/styles/theme/colors.scss +1 -0
  60. package/src/styles/theme/font.scss +6 -3
  61. package/lib/css/2.3f7aa432.css +0 -1
  62. package/lib/css/3.ffcc175d.css +0 -1
  63. package/lib/css/4.9abd1f2b.css +0 -1
  64. package/lib/css/5.1a31ed8a.css +0 -1
  65. package/lib/css/6.c2d0d77e.css +0 -1
  66. package/src/components/chart/index.js +0 -2
  67. package/src/components/chart/index.vue +0 -51
  68. package/src/components/grid-box/index.vue +0 -42
  69. /package/src/components/{chart → ex-chart}/pieList.vue +0 -0
  70. /package/src/components/{chart → ex-chart}/theme/blue.js +0 -0
  71. /package/src/components/{chart → ex-chart}/theme/orange.js +0 -0
  72. /package/src/components/{chart → ex-chart}/theme/starry.js +0 -0
  73. /package/src/components/{chart → ex-chart}/theme/white.js +0 -0
  74. /package/src/components/{table → ex-table}/ExCell.vue +0 -0
  75. /package/src/components/{table → ex-table}/ExColumn.vue +0 -0
  76. /package/src/components/{table → ex-table}/index.js +0 -0
  77. /package/src/components/{table → ex-table}/processor.js +0 -0
  78. /package/src/components/{button → xt-button}/index.js +0 -0
  79. /package/src/components/{button → xt-button}/style/index.scss +0 -0
  80. /package/src/components/{card → xt-card}/index.js +0 -0
  81. /package/src/components/{card → xt-card}/index.vue +0 -0
  82. /package/src/components/{card → xt-card}/style/index.scss +0 -0
  83. /package/src/components/{card-item → xt-card-item}/index.js +0 -0
  84. /package/src/components/{card-item → xt-card-item}/style/index.scss +0 -0
  85. /package/src/components/{config-provider → xt-config-provider}/index.js +0 -0
  86. /package/src/components/{config-provider → xt-config-provider}/style/index.scss +0 -0
  87. /package/src/components/{date-picker → xt-date-picker}/SearchDate.vue +0 -0
  88. /package/src/components/{date-picker → xt-date-picker}/index.js +0 -0
  89. /package/src/components/{flex-box → xt-flex-box}/index.js +0 -0
  90. /package/src/components/{flex-box → xt-flex-box}/index.vue +0 -0
  91. /package/src/components/{flex-box → xt-flex-box}/style/index.scss +0 -0
  92. /package/src/components/{grid-box → xt-grid-box}/index.js +0 -0
  93. /package/src/components/{input → xt-input}/index.js +0 -0
  94. /package/src/components/{input → xt-input}/index.vue +0 -0
  95. /package/src/components/{input → xt-input}/style/index.scss +0 -0
  96. /package/src/components/{layout → xt-layout}/BaseCollapse.vue +0 -0
  97. /package/src/components/{layout → xt-layout}/ExFieldset.vue +0 -0
  98. /package/src/components/{page → xt-page}/index.js +0 -0
  99. /package/src/components/{page → xt-page}/index.vue +0 -0
  100. /package/src/components/{select-tree → xt-select-tree}/index.js +0 -0
  101. /package/src/components/{select-tree → xt-select-tree}/index.vue +0 -0
  102. /package/src/components/{text → xt-text}/index.js +0 -0
  103. /package/src/components/{upload → xt-upload}/index.js +0 -0
  104. /package/src/components/{upload → xt-upload}/index.vue +0 -0
  105. /package/src/components/{upload → xt-upload}/preview.vue +0 -0
@@ -0,0 +1,93 @@
1
+ @import '../../../styles/variables.scss';
2
+
3
+ .xt-grid-box {
4
+ display: grid;
5
+ box-sizing: border-box;
6
+ min-height: 0;
7
+ }
8
+
9
+ // 默认间距变量
10
+ :root {
11
+ --xt-grid-box-gap: 8px;
12
+ }
13
+
14
+ // 响应式网格类
15
+ .xt-grid-box--auto-fill {
16
+ grid-template-columns: repeat(auto-fill, minmax(var(--xt-grid-item-min-width, 200px), 1fr));
17
+ }
18
+
19
+ .xt-grid-box--auto-fit {
20
+ grid-template-columns: repeat(auto-fit, minmax(var(--xt-grid-item-min-width, 200px), 1fr));
21
+ }
22
+
23
+ // 常见列数快捷类
24
+ .xt-grid-box--cols-2 {
25
+ grid-template-columns: repeat(2, 1fr);
26
+ }
27
+
28
+ .xt-grid-box--cols-3 {
29
+ grid-template-columns: repeat(3, 1fr);
30
+ }
31
+
32
+ .xt-grid-box--cols-4 {
33
+ grid-template-columns: repeat(4, 1fr);
34
+ }
35
+
36
+ .xt-grid-box--cols-6 {
37
+ grid-template-columns: repeat(6, 1fr);
38
+ }
39
+
40
+ .xt-grid-box--cols-12 {
41
+ grid-template-columns: repeat(12, 1fr);
42
+ }
43
+
44
+ // 子项默认样式
45
+ .xt-grid-item {
46
+ box-sizing: border-box;
47
+ }
48
+
49
+ // 响应式断点
50
+ @media (min-width: 576px) {
51
+ .xt-grid-box--sm-cols-2 {
52
+ grid-template-columns: repeat(2, 1fr);
53
+ }
54
+ .xt-grid-box--sm-cols-3 {
55
+ grid-template-columns: repeat(3, 1fr);
56
+ }
57
+ }
58
+
59
+ @media (min-width: 768px) {
60
+ .xt-grid-box--md-cols-2 {
61
+ grid-template-columns: repeat(2, 1fr);
62
+ }
63
+ .xt-grid-box--md-cols-3 {
64
+ grid-template-columns: repeat(3, 1fr);
65
+ }
66
+ .xt-grid-box--md-cols-4 {
67
+ grid-template-columns: repeat(4, 1fr);
68
+ }
69
+ }
70
+
71
+ @media (min-width: 992px) {
72
+ .xt-grid-box--lg-cols-3 {
73
+ grid-template-columns: repeat(3, 1fr);
74
+ }
75
+ .xt-grid-box--lg-cols-4 {
76
+ grid-template-columns: repeat(4, 1fr);
77
+ }
78
+ .xt-grid-box--lg-cols-6 {
79
+ grid-template-columns: repeat(6, 1fr);
80
+ }
81
+ }
82
+
83
+ @media (min-width: 1200px) {
84
+ .xt-grid-box--xl-cols-4 {
85
+ grid-template-columns: repeat(4, 1fr);
86
+ }
87
+ .xt-grid-box--xl-cols-6 {
88
+ grid-template-columns: repeat(6, 1fr);
89
+ }
90
+ .xt-grid-box--xl-cols-12 {
91
+ grid-template-columns: repeat(12, 1fr);
92
+ }
93
+ }
@@ -0,0 +1,2 @@
1
+ import XtGridItem from './index.vue'
2
+ export default XtGridItem
@@ -0,0 +1,107 @@
1
+ <template>
2
+ <div class="xt-grid-item" :style="styleAttrs">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: "XtGridItem",
10
+ props: {
11
+ // 跨列数
12
+ span: {
13
+ type: Number,
14
+ default: 1,
15
+ validator: (val) => val > 0
16
+ },
17
+ // 跨行数
18
+ rowSpan: {
19
+ type: Number,
20
+ default: 1,
21
+ validator: (val) => val > 0
22
+ },
23
+ // 起始列
24
+ start: {
25
+ type: Number,
26
+ default: 0,
27
+ validator: (val) => val >= 0
28
+ },
29
+ // 起始行
30
+ rowStart: {
31
+ type: Number,
32
+ default: 0,
33
+ validator: (val) => val >= 0
34
+ },
35
+ // 命名区域
36
+ area: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ // 对齐方式(justify-self)
41
+ justifySelf: {
42
+ type: String,
43
+ default: "auto",
44
+ validator: (val) => ['auto', 'start', 'end', 'center', 'stretch'].includes(val)
45
+ },
46
+ // 对齐方式(align-self)
47
+ alignSelf: {
48
+ type: String,
49
+ default: "auto",
50
+ validator: (val) => ['auto', 'start', 'end', 'center', 'stretch', 'baseline'].includes(val)
51
+ },
52
+ // 自定义样式类
53
+ customClass: {
54
+ type: String,
55
+ default: ""
56
+ }
57
+ },
58
+ computed: {
59
+ styleAttrs() {
60
+ const styles = {};
61
+
62
+ // 处理跨列
63
+ if (this.span > 1) {
64
+ styles.gridColumnEnd = `span ${this.span}`;
65
+ }
66
+
67
+ // 处理跨行
68
+ if (this.rowSpan > 1) {
69
+ styles.gridRowEnd = `span ${this.rowSpan}`;
70
+ }
71
+
72
+ // 处理起始列
73
+ if (this.start > 0) {
74
+ styles.gridColumnStart = this.start;
75
+ }
76
+
77
+ // 处理起始行
78
+ if (this.rowStart > 0) {
79
+ styles.gridRowStart = this.rowStart;
80
+ }
81
+
82
+ // 处理命名区域
83
+ if (this.area) {
84
+ styles.gridArea = this.area;
85
+ }
86
+
87
+ // 处理 justify-self
88
+ if (this.justifySelf && this.justifySelf !== 'auto') {
89
+ styles.justifySelf = this.justifySelf;
90
+ }
91
+
92
+ // 处理 align-self
93
+ if (this.alignSelf && this.alignSelf !== 'auto') {
94
+ styles.alignSelf = this.alignSelf;
95
+ }
96
+
97
+ return styles;
98
+ }
99
+ }
100
+ };
101
+ </script>
102
+
103
+ <style lang="scss" scoped>
104
+ .xt-grid-item {
105
+ box-sizing: border-box;
106
+ }
107
+ </style>
@@ -3,6 +3,7 @@
3
3
  class="xt-text"
4
4
  :class="[
5
5
  type ? 'xt-text--' + type : '',
6
+ 'xt-text--' + size,
6
7
  { 'xt-text--bold': bold },
7
8
  { 'xt-text--money': money }
8
9
  ]"
@@ -27,6 +28,11 @@ export default {
27
28
  default: '',
28
29
  validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
29
30
  },
31
+ size: {
32
+ type: String,
33
+ default: 'base',
34
+ validator: (val) => ['extra-large', 'large', 'medium', 'base', 'small', 'extra-small'].includes(val)
35
+ },
30
36
  bold: {
31
37
  type: Boolean,
32
38
  default: false
@@ -2,7 +2,32 @@
2
2
 
3
3
  // 文字组件
4
4
  .xt-text {
5
- letter-spacing: $xt-spacing-xs;
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);
6
31
  }
7
32
 
8
33
  // 不同类型文字颜色
@@ -0,0 +1,136 @@
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
+ }
package/src/index.js CHANGED
@@ -16,38 +16,48 @@ const utils = utilsModule.default || utilsModule
16
16
  const { getConfig, setConfig, getTheme, getSize, getPrimaryColor, resetConfig, onConfigChange, setTheme, setSize, setPrimaryColor } = utils
17
17
 
18
18
  // 导入组件
19
- import Button from './components/button'
20
- import Input from './components/input'
21
- import FlexBox from './components/flex-box'
22
- import Card from './components/card'
23
- import CardItem from './components/card-item'
24
- import ConfigProvider from './components/config-provider'
25
- import Text from './components/text'
26
- import Chart from './components/chart' // Chart 组件
27
- import GridBox from './components/grid-box'
28
- import DatePicker from './components/date-picker'
19
+ import XtButton from './components/xt-button'
20
+ import XtInput from './components/xt-input'
21
+ import XtFlexBox from './components/xt-flex-box'
22
+ import XtCard from './components/xt-card'
23
+ import XtCardItem from './components/xt-card-item'
24
+ import XtConfigProvider from './components/xt-config-provider'
25
+ import XtText from './components/xt-text'
26
+ import XtGridBox from './components/xt-grid-box'
27
+ import XtGridItem from './components/xt-grid-item'
28
+ import XtDatePicker from './components/xt-date-picker'
29
+ import ExButton from './components/ex-button'
30
+ import ExChart from './components/ex-chart' // ExChart 组件(基于 ECharts 封装)
31
+ import ExCard from './components/ex-card'
32
+ import ExTable from './components/ex-table' // ExTable 组件(基于 ElementUI Table 封装)
33
+
34
+ // 导入 Element UI 组件注册配置
35
+ import { registerElementExComponents } from './config/element-registry'
29
36
 
30
37
  // 存储组件列表
31
38
  const components = [
32
- Button,
33
- Input,
34
- FlexBox,
35
- Card,
36
- CardItem,
37
- ConfigProvider,
38
- Text,
39
- Chart,
40
- GridBox,
41
- DatePicker
39
+ XtButton,
40
+ XtInput,
41
+ XtFlexBox,
42
+ XtCard,
43
+ XtCardItem,
44
+ XtConfigProvider,
45
+ XtText,
46
+ XtGridBox,
47
+ XtGridItem,
48
+ XtDatePicker,
49
+ ExButton,
50
+ ExChart,
51
+ ExCard,
52
+ ExTable
42
53
  ]
43
54
 
44
-
45
55
  // 定义 install 方法,Vue.use() 会自动调用
46
56
  const install = function (Vue, options = {}) {
47
57
  if (install.installed) return
48
58
  install.installed = true
49
59
 
50
- // 全局注册所有 xt- 组件
60
+ // 全局注册所有组件
51
61
  components.forEach(component => {
52
62
  Vue.component(component.name, component)
53
63
  })
@@ -85,6 +95,18 @@ const install = function (Vue, options = {}) {
85
95
  setConfig(options.config)
86
96
  }
87
97
  }
98
+
99
+ // 尝试获取 ElementUI(如果已安装)并注册 Ex 开头的组件
100
+ let ElementUI = null
101
+ try {
102
+ ElementUI = require('element-ui')
103
+ } catch (e) {
104
+ console.warn('[XT-UI] ElementUI not found, skipping Ex- prefix registration for Element components')
105
+ return
106
+ }
107
+
108
+ // 调用统一的注册函数
109
+ registerElementExComponents(Vue, ElementUI)
88
110
  }
89
111
 
90
112
  // 支持全局 script 标签引入
@@ -95,18 +117,26 @@ if (typeof window !== 'undefined' && window.Vue) {
95
117
  // 导出
96
118
  export default {
97
119
  install,
120
+ // 导出组件列表
121
+ components,
98
122
  // 按需导出组件
99
- Button,
100
- Input,
101
- FlexBox,
102
- Card,
103
- CardItem,
104
- ConfigProvider,
105
- Text
123
+ XtButton,
124
+ XtInput,
125
+ XtFlexBox,
126
+ XtCard,
127
+ XtCardItem,
128
+ XtConfigProvider,
129
+ XtText,
130
+ XtGridBox,
131
+ XtGridItem,
132
+ XtDatePicker,
133
+ ExButton,
134
+ ExCard,
135
+ ExTable
106
136
  }
107
137
 
108
- // Chart 组件按需导出(使用时需自行安装 echarts 依赖)
109
- export { default as Chart } from './components/chart'
138
+ // ExChart 组件按需导出(使用时需自行安装 echarts 依赖)
139
+ export { default as ExChart } from './components/ex-chart'
110
140
 
111
141
  // 导出工具函数和变量
112
142
  export {
@@ -123,4 +153,4 @@ export {
123
153
  setTheme,
124
154
  setSize,
125
155
  setPrimaryColor
126
- }
156
+ }
@@ -98,3 +98,4 @@ $xt-dark-color-info-light-7: #393a3c; // 信息色暗色 70%
98
98
  $xt-dark-color-info-light-8: #2d2d2f; // 信息色暗色 80%
99
99
  $xt-dark-color-info-light-9: #202121; // 信息色暗色 90%
100
100
  $xt-dark-color-info-dark-2: #a6a9ad; // 信息色亮色 20%
101
+
@@ -5,6 +5,9 @@ $xt-font-size-base: 14px; // 基准字体 - Element UI 默认
5
5
  $xt-font-size-small: 13px; // 小字体基础值
6
6
  $xt-font-size-extra-small: 12px; // 特小字体基础值
7
7
 
8
- $xt-font-size-increment-small: 0px; // 小尺寸增量
9
- $xt-font-size-increment-medium: 2px; // 中尺寸增量
10
- $xt-font-size-increment-large: 4px; // 大尺寸增量
8
+ $xt-font-size-increment-extra-small: -2px; // 特小尺寸增量
9
+ $xt-font-size-increment-small: -1px; // 小尺寸增量
10
+ $xt-font-size-increment-base: 0px; // 基准尺寸增量
11
+ $xt-font-size-increment-medium: 2px; // 中尺寸增量
12
+ $xt-font-size-increment-large: 4px; // 大尺寸增量
13
+ $xt-font-size-increment-extra-large: 6px; // 特大尺寸增量
@@ -1 +0,0 @@
1
- .bar-box[data-v-730aa873]{position:relative;height:100%;width:100%}
@@ -1 +0,0 @@
1
- .line-box[data-v-52e2b0b2]{position:relative;height:100%;width:100%}
@@ -1 +0,0 @@
1
- .multiline-box[data-v-6f25e9c5]{height:100%;width:100%}
@@ -1 +0,0 @@
1
- .pie-box[data-v-6735cf79]{position:relative;height:100%;width:100%}
@@ -1 +0,0 @@
1
- .bar-box[data-v-9e2bb3de]{position:relative}
@@ -1,2 +0,0 @@
1
- import XtChart from './index.vue'
2
- export default XtChart
@@ -1,51 +0,0 @@
1
- <template>
2
- <ex-bar v-if="type=='bar'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-bar>
3
- <ex-line v-else-if="type=='line'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-line>
4
- <ex-pie v-else-if="type=='pie'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-pie>
5
- <ex-multi v-else-if="type=='multi'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-multi>
6
- <ex-trend v-else-if="type=='trend'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-trend>
7
- </template>
8
- <script>
9
- export default {
10
- name: "XtChart",
11
- components: {
12
- ExBar: () => import("./ExBar.vue"),
13
- ExLine: () => import("./ExLine.vue"),
14
- ExPie: () => import("./ExPie.vue"),
15
- ExMulti: () => import("./ExMulti.vue"),
16
- ExTrend: () => import("./ExTrend.vue")
17
- },
18
- props: {
19
- theme: {
20
- type: String,
21
- default: ""
22
- },
23
- size: {
24
- type: String,
25
- default: "medium",
26
- validator: (value) => {
27
- return ['small', 'medium', 'large'].includes(value)
28
- }
29
- },
30
- type: {
31
- type: String,
32
- required: true,
33
- default: "bar"
34
- }
35
- },
36
- data() {
37
- return {
38
- myTheme: this.theme,
39
- mySize: this.size
40
- };
41
- },
42
- watch: {
43
- theme(newVal) {
44
- this.myTheme = newVal;
45
- },
46
- size(newVal) {
47
- this.mySize = newVal;
48
- }
49
- }
50
- };
51
- </script>
@@ -1,42 +0,0 @@
1
- <template>
2
- <div class="ex-grid-box" :style="styleAttrs">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: "XtGridBox",
10
- props: {
11
- columns: {
12
- type: [String, Array], // ["1fr","2fr", "20%"]
13
- default: "1fr"
14
- },
15
- rows: { // 1
16
- type: [String, Array], // ["1fr","2fr", "20%"]
17
- default: "1fr"
18
- },
19
- gap: { type: String, default: "" }
20
- },
21
- computed: {
22
- styleAttrs() {
23
- const gridTemplateRows = (typeof this.rows !== "string") ? this.rows.join(" ") : this.rows;
24
- const gridTemplateColumns = (typeof this.columns !== "string") ? this.columns.join(" ") : this.columns;
25
- return this.gap ? {
26
- gridTemplateColumns,
27
- gridTemplateRows,
28
- gap: this.gap.toString().split(" ").map(_getGap).join(" ")
29
- } : {
30
- gridTemplateColumns,
31
- gridTemplateRows
32
- };
33
- }
34
- }
35
- };
36
- </script>
37
-
38
- <style lang="scss">
39
- .ex-grid-box{
40
- display: grid;
41
- }
42
- </style>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes