ct-component-plus 0.0.42 → 0.0.43

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 (91) hide show
  1. package/package.json +36 -36
  2. package/packages/components/button/index.js +8 -8
  3. package/packages/components/button/src/button.vue +171 -171
  4. package/packages/components/cascader/index.js +7 -7
  5. package/packages/components/cascader/src/cascader.vue +247 -247
  6. package/packages/components/cascader/src/ct-cascader.vue +260 -260
  7. package/packages/components/cascader/src/index.js +50 -50
  8. package/packages/components/checkbox/index.js +7 -7
  9. package/packages/components/checkbox/src/checkbox.vue +51 -51
  10. package/packages/components/checkbox/src/index.js +12 -12
  11. package/packages/components/date-picker/index.js +8 -8
  12. package/packages/components/date-picker/src/clear-icon.vue +2 -2
  13. package/packages/components/date-picker/src/date-icon.vue +2 -2
  14. package/packages/components/date-picker/src/date-picker.vue +77 -77
  15. package/packages/components/date-picker/src/index.js +33 -33
  16. package/packages/components/dialog/index.js +8 -8
  17. package/packages/components/dialog/src/dialog.vue +103 -103
  18. package/packages/components/empty/index.js +8 -8
  19. package/packages/components/empty/src/empty.vue +97 -97
  20. package/packages/components/index.js +81 -81
  21. package/packages/components/input/index.js +7 -7
  22. package/packages/components/input/src/index.js +13 -13
  23. package/packages/components/input/src/input.vue +106 -106
  24. package/packages/components/input-range/index.js +7 -7
  25. package/packages/components/input-range/src/index.js +29 -29
  26. package/packages/components/input-range/src/input-range.vue +233 -233
  27. package/packages/components/loading/index.js +7 -7
  28. package/packages/components/loading/src/CtLoading.vue +74 -74
  29. package/packages/components/loading/src/beating.vue +71 -71
  30. package/packages/components/loading/src/progress.vue +120 -120
  31. package/packages/components/loading/src/spinner.vue +38 -38
  32. package/packages/components/menu/index.js +7 -7
  33. package/packages/components/menu/src/item.vue +46 -46
  34. package/packages/components/menu/src/link.vue +28 -28
  35. package/packages/components/menu/src/logo.vue +25 -25
  36. package/packages/components/menu/src/menu-item.vue +103 -103
  37. package/packages/components/menu/src/menu.vue +191 -191
  38. package/packages/components/menu/src/utils/index.js +4 -4
  39. package/packages/components/message/icon/ErrorIcon.vue +25 -25
  40. package/packages/components/message/icon/InfoIcon.vue +25 -25
  41. package/packages/components/message/icon/SuccessIcon.vue +25 -25
  42. package/packages/components/message/icon/WarningIcon.vue +25 -25
  43. package/packages/components/message/index.js +8 -8
  44. package/packages/components/message/src/method.js +54 -54
  45. package/packages/components/message-box/index.js +7 -7
  46. package/packages/components/message-box/src/message-box.vue +107 -107
  47. package/packages/components/page/index.js +7 -7
  48. package/packages/components/page/src/modules/DownloadButton.vue +21 -21
  49. package/packages/components/page/src/modules/TableTitle.vue +151 -151
  50. package/packages/components/page/src/page.vue +382 -382
  51. package/packages/components/pagination/index.js +7 -7
  52. package/packages/components/pagination/src/pagination.vue +36 -36
  53. package/packages/components/radio/index.js +7 -7
  54. package/packages/components/radio/src/index.js +12 -12
  55. package/packages/components/radio/src/radio.vue +47 -47
  56. package/packages/components/search-box/index.js +24 -24
  57. package/packages/components/search-box/src/index.js +29 -29
  58. package/packages/components/search-box/src/search-box.vue +250 -251
  59. package/packages/components/search-box/src/slot.vue +4 -4
  60. package/packages/components/select/index.js +7 -7
  61. package/packages/components/select/src/arrow-down.vue +2 -2
  62. package/packages/components/select/src/clear-icon.vue +2 -2
  63. package/packages/components/select/src/empty.vue +13 -13
  64. package/packages/components/select/src/index.js +51 -51
  65. package/packages/components/select/src/select.vue +380 -380
  66. package/packages/components/table/index.js +7 -7
  67. package/packages/components/table/src/TableSort.vue +179 -179
  68. package/packages/components/table/src/index.js +70 -66
  69. package/packages/components/table/src/table.vue +287 -287
  70. package/packages/components/tabs/index.js +7 -7
  71. package/packages/components/tabs/src/tabs.vue +225 -225
  72. package/packages/components/year-select/index.js +7 -7
  73. package/packages/components/year-select/src/index.js +44 -44
  74. package/packages/components/year-select/src/year-select.vue +273 -273
  75. package/packages/echarts/bar/index.js +63 -63
  76. package/packages/echarts/base.js +99 -99
  77. package/packages/echarts/line/index.js +106 -106
  78. package/packages/hooks/index.js +5 -5
  79. package/packages/hooks/use-buried/index.js +46 -46
  80. package/packages/hooks/use-checked-all/index.js +37 -37
  81. package/packages/hooks/use-echarts/index.js +1 -1
  82. package/packages/hooks/use-echarts/use-bar/index.js +72 -72
  83. package/packages/hooks/use-echarts/use-line/index.js +88 -88
  84. package/packages/hooks/use-namespace/index.js +65 -65
  85. package/packages/hooks/use-search-component/index.js +28 -28
  86. package/packages/style/element.less +725 -725
  87. package/packages/style/index.js +2 -2
  88. package/packages/style/init.less +114 -114
  89. package/packages/utils/index.js +1 -1
  90. package/packages/utils/operate.js +77 -77
  91. package/packages/utils/types.js +35 -35
@@ -1,274 +1,274 @@
1
- <template>
2
- <div
3
- :class="[ns.b(), ns.is('disabled', disabled), ns.is('multiple', multiple)]"
4
- >
5
- <div :class="[ns.e('wrapper')]">
6
- <span :class="[ns.e('prefix')]">
7
- <slot name="prefix"></slot>
8
- </span>
9
- <el-select
10
- ref="selectRef1"
11
- :class="[ns.e('select'), ns.is('start')]"
12
- v-model="selectYearS"
13
- :placeholder="startPlaceholder"
14
- :disabled="disabled"
15
- filterable
16
- v-bind="eventList0"
17
- >
18
- <el-option
19
- v-for="item in yearList"
20
- :key="item.value"
21
- :label="item.label"
22
- :value="item.value"
23
- >
24
- </el-option>
25
- </el-select>
26
- <template v-if="multiple">
27
- <span :class="[ns.e('separator')]">
28
- <slot name="separator">
29
- <template v-if="isString(separator)">{{ separator }}</template>
30
- <component v-else :is="separator" />
31
- </slot>
32
- </span>
33
- <el-select
34
- ref="selectRef2"
35
- :class="[ns.e('select'), ns.is('end')]"
36
- v-model="selectYearE"
37
- :placeholder="endPlaceholder"
38
- filterable
39
- :disabled="disabled"
40
- :filter-method="filterHandleE"
41
- v-bind="eventList1"
42
- >
43
- <el-option
44
- v-for="item in yearList"
45
- :key="item.value"
46
- :label="item.label"
47
- :value="item.value"
48
- >
49
- </el-option>
50
- </el-select>
51
- </template>
52
- <span :class="[ns.e('suffix')]">
53
- <slot name="suffix"></slot>
54
- </span>
55
- </div>
56
- </div>
57
- </template>
58
-
59
- <script setup>
60
- import { computed, onMounted, ref } from "vue";
61
- import { useNamespace, useBuriedParams } from "../../../hooks";
62
- import { isArray, isString } from "../../../utils";
63
- import { yearSelectEmits, yearSelectProps } from "./index";
64
- const props = defineProps(yearSelectProps);
65
- const emit = defineEmits(yearSelectEmits);
66
-
67
- const ns = useNamespace("year-select");
68
-
69
- const selectRef1 = ref(null);
70
- const selectRef2 = ref(null);
71
- const yearList = ref([]);
72
- const selectYearS = computed({
73
- get() {
74
- if (props.multiple) {
75
- if (isArray(props.modelValue)) {
76
- return props.modelValue[0];
77
- }
78
- return "";
79
- }
80
- return props.modelValue;
81
- },
82
- set(value) {
83
- let newValue = "";
84
- if (props.multiple) {
85
- newValue = [toNumber(value), toNumber(selectYearE)];
86
- } else {
87
- newValue = toNumber(value);
88
- }
89
- handleNewValue(newValue);
90
- },
91
- });
92
- const selectYearE = computed({
93
- get() {
94
- if (isArray(props.modelValue)) {
95
- return props.modelValue[1];
96
- }
97
- return "";
98
- },
99
- set(value) {
100
- let newValue = [toNumber(selectYearS), toNumber(value)];
101
- handleNewValue(newValue);
102
- },
103
- });
104
-
105
- const handleNewValue = (newValue) => {
106
- let newArr = JSON.parse(JSON.stringify(newValue));
107
- if (isArray(newValue)) {
108
- if (newArr[0] && newArr[1] && newArr[0] > newArr[1]) {
109
- newArr = [newValue[1], newValue[0]];
110
- }
111
- }
112
- emit("update:modelValue", newArr);
113
- emit("change", newArr);
114
- };
115
- const toNumber = (value) => {
116
- const res = value.value || value;
117
- const num = Number(res);
118
- return isNaN(num) ? "" : num;
119
- };
120
- const judgeYear = (str) => {
121
- let reg = /\d{4}/;
122
- return reg.test(str);
123
- };
124
- const judgeRange = (str) => {
125
- const range = props.range;
126
- return str <= range[1] && range[0] <= str;
127
- };
128
- const getYearList = () => {
129
- const yearRang = props.range;
130
- const start = yearRang[0];
131
- const end = yearRang[1];
132
- let yearArr = [];
133
- for (let i = end; i >= start; i--) {
134
- yearArr.push({ label: i + "", value: i });
135
- }
136
- yearList.value = yearArr;
137
- };
138
- const filterHandleE = (str) => {
139
- //处理结束年
140
- if (judgeYear(str) && judgeRange(str)) {
141
- selectYearE.value = str;
142
- }
143
- };
144
- const filterHandleS = (str) => {
145
- //通过该方法把输入的年份放进数据里面
146
- if (judgeYear(str) && judgeRange(str)) {
147
- selectYearS.value = str;
148
- }
149
- };
150
- const clearValue = () => {
151
- selectYearS.value = "";
152
- selectYearE.value = "";
153
- };
154
-
155
- // 绑定在select上的事件
156
- const eventList0 = {
157
- onChange: (value) => {
158
- onChange(value, 0);
159
- },
160
- onVisibleChange: (value) => {
161
- onVisibleChange(value, 0);
162
- },
163
- onBlur: (value) => {
164
- onBlur(value, 0);
165
- },
166
- onFocus: (value) => {
167
- onFocus(value, 0);
168
- },
169
- };
170
- const eventList1 = {
171
- onChange: (value) => {
172
- onChange(value, 1);
173
- },
174
- onVisibleChange: (value) => {
175
- onVisibleChange(value, 1);
176
- },
177
- onBlur: (value) => {
178
- onBlur(value, 1);
179
- },
180
- onFocus: (value) => {
181
- onFocus(value, 1);
182
- },
183
- };
184
- const onChange = (value, index) => {
185
- emit("changeSelect", value, index);
186
- };
187
- const onVisibleChange = (value, index) => {
188
- emit("visible-change", value, index);
189
- };
190
- const onBlur = (value, index) => {
191
- emit("blur", value, index);
192
- };
193
- const onFocus = (value, index) => {
194
- emit("focus", value, index);
195
- };
196
-
197
- useBuriedParams(props, emit);
198
- defineExpose({
199
- ref: props.multiple ? [selectRef1, selectRef2] : selectRef1,
200
- clearValue,
201
- yearList,
202
- });
203
- onMounted(() => {
204
- getYearList();
205
- });
206
- </script>
207
- <style lang='less'>
208
- .ct-year-select {
209
- --el-select-input-focus-border-color: transparent;
210
- --ct-year-select-select-inner-box-shadow: none;
211
- position: relative;
212
- display: inline-flex;
213
- width: var(--ct-component-width);
214
- font-size: var(--ct-font-size);
215
- color: var(--ct-border-color);
216
- box-sizing: border-box;
217
- vertical-align: middle;
218
- @R: .ct-year-select;
219
- &:not(.is-disabled):hover {
220
- --ct-component-border-color: var(--ct-component-hover-border-color);
221
- }
222
- &.is-disabled {
223
- cursor: not-allowed;
224
- --ct-component-fill-color: var(--ct-component-disabled-bg-color);
225
- }
226
- &__wrapper {
227
- display: inline-flex;
228
- flex-grow: 1;
229
- align-items: center;
230
- justify-content: center;
231
- padding: 1px 0;
232
- background-color: var(--ct-component-fill-color);
233
- background-image: none;
234
- border-radius: var(--ct-component-border-radius);
235
- transition: var(--el-transition-box-shadow);
236
- transform: translate3d(0, 0, 0);
237
- box-shadow: 0 0 0 1px var(--ct-component-border-color) inset;
238
- &:focus-within {
239
- --ct-component-border-color: var(--ct-color-primary);
240
- .el-input {
241
- .el-icon,
242
- .ct-icon {
243
- color: var(--ct-component-border-color);
244
- }
245
- }
246
- }
247
- }
248
- &__select {
249
- width: 50%;
250
- flex-grow: 1;
251
- padding: 0 1px;
252
- -webkit-appearance: none;
253
- color: var(--ct-component-color);
254
- font-size: inherit;
255
- height: var(--ct-component-inner-height);
256
- line-height: var(--ct-component-inner-height);
257
- outline: 0;
258
- border: none;
259
- background: 0 0;
260
- box-sizing: border-box;
261
- .el-input {
262
- --el-input-height: var(--ct-component-inner-height);
263
- }
264
- }
265
- & &__select {
266
- .el-input.is-focus,
267
- .el-input {
268
- .el-input__wrapper {
269
- box-shadow: var(--ct-year-select-select-inner-box-shadow) !important;
270
- }
271
- }
272
- }
273
- }
1
+ <template>
2
+ <div
3
+ :class="[ns.b(), ns.is('disabled', disabled), ns.is('multiple', multiple)]"
4
+ >
5
+ <div :class="[ns.e('wrapper')]">
6
+ <span :class="[ns.e('prefix')]">
7
+ <slot name="prefix"></slot>
8
+ </span>
9
+ <el-select
10
+ ref="selectRef1"
11
+ :class="[ns.e('select'), ns.is('start')]"
12
+ v-model="selectYearS"
13
+ :placeholder="startPlaceholder"
14
+ :disabled="disabled"
15
+ filterable
16
+ v-bind="eventList0"
17
+ >
18
+ <el-option
19
+ v-for="item in yearList"
20
+ :key="item.value"
21
+ :label="item.label"
22
+ :value="item.value"
23
+ >
24
+ </el-option>
25
+ </el-select>
26
+ <template v-if="multiple">
27
+ <span :class="[ns.e('separator')]">
28
+ <slot name="separator">
29
+ <template v-if="isString(separator)">{{ separator }}</template>
30
+ <component v-else :is="separator" />
31
+ </slot>
32
+ </span>
33
+ <el-select
34
+ ref="selectRef2"
35
+ :class="[ns.e('select'), ns.is('end')]"
36
+ v-model="selectYearE"
37
+ :placeholder="endPlaceholder"
38
+ filterable
39
+ :disabled="disabled"
40
+ :filter-method="filterHandleE"
41
+ v-bind="eventList1"
42
+ >
43
+ <el-option
44
+ v-for="item in yearList"
45
+ :key="item.value"
46
+ :label="item.label"
47
+ :value="item.value"
48
+ >
49
+ </el-option>
50
+ </el-select>
51
+ </template>
52
+ <span :class="[ns.e('suffix')]">
53
+ <slot name="suffix"></slot>
54
+ </span>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script setup>
60
+ import { computed, onMounted, ref } from "vue";
61
+ import { useNamespace, useBuriedParams } from "../../../hooks";
62
+ import { isArray, isString } from "../../../utils";
63
+ import { yearSelectEmits, yearSelectProps } from "./index";
64
+ const props = defineProps(yearSelectProps);
65
+ const emit = defineEmits(yearSelectEmits);
66
+
67
+ const ns = useNamespace("year-select");
68
+
69
+ const selectRef1 = ref(null);
70
+ const selectRef2 = ref(null);
71
+ const yearList = ref([]);
72
+ const selectYearS = computed({
73
+ get() {
74
+ if (props.multiple) {
75
+ if (isArray(props.modelValue)) {
76
+ return props.modelValue[0];
77
+ }
78
+ return "";
79
+ }
80
+ return props.modelValue;
81
+ },
82
+ set(value) {
83
+ let newValue = "";
84
+ if (props.multiple) {
85
+ newValue = [toNumber(value), toNumber(selectYearE)];
86
+ } else {
87
+ newValue = toNumber(value);
88
+ }
89
+ handleNewValue(newValue);
90
+ },
91
+ });
92
+ const selectYearE = computed({
93
+ get() {
94
+ if (isArray(props.modelValue)) {
95
+ return props.modelValue[1];
96
+ }
97
+ return "";
98
+ },
99
+ set(value) {
100
+ let newValue = [toNumber(selectYearS), toNumber(value)];
101
+ handleNewValue(newValue);
102
+ },
103
+ });
104
+
105
+ const handleNewValue = (newValue) => {
106
+ let newArr = JSON.parse(JSON.stringify(newValue));
107
+ if (isArray(newValue)) {
108
+ if (newArr[0] && newArr[1] && newArr[0] > newArr[1]) {
109
+ newArr = [newValue[1], newValue[0]];
110
+ }
111
+ }
112
+ emit("update:modelValue", newArr);
113
+ emit("change", newArr);
114
+ };
115
+ const toNumber = (value) => {
116
+ const res = value.value || value;
117
+ const num = Number(res);
118
+ return isNaN(num) ? "" : num;
119
+ };
120
+ const judgeYear = (str) => {
121
+ let reg = /\d{4}/;
122
+ return reg.test(str);
123
+ };
124
+ const judgeRange = (str) => {
125
+ const range = props.range;
126
+ return str <= range[1] && range[0] <= str;
127
+ };
128
+ const getYearList = () => {
129
+ const yearRang = props.range;
130
+ const start = yearRang[0];
131
+ const end = yearRang[1];
132
+ let yearArr = [];
133
+ for (let i = end; i >= start; i--) {
134
+ yearArr.push({ label: i + "", value: i });
135
+ }
136
+ yearList.value = yearArr;
137
+ };
138
+ const filterHandleE = (str) => {
139
+ //处理结束年
140
+ if (judgeYear(str) && judgeRange(str)) {
141
+ selectYearE.value = str;
142
+ }
143
+ };
144
+ const filterHandleS = (str) => {
145
+ //通过该方法把输入的年份放进数据里面
146
+ if (judgeYear(str) && judgeRange(str)) {
147
+ selectYearS.value = str;
148
+ }
149
+ };
150
+ const clearValue = () => {
151
+ selectYearS.value = "";
152
+ selectYearE.value = "";
153
+ };
154
+
155
+ // 绑定在select上的事件
156
+ const eventList0 = {
157
+ onChange: (value) => {
158
+ onChange(value, 0);
159
+ },
160
+ onVisibleChange: (value) => {
161
+ onVisibleChange(value, 0);
162
+ },
163
+ onBlur: (value) => {
164
+ onBlur(value, 0);
165
+ },
166
+ onFocus: (value) => {
167
+ onFocus(value, 0);
168
+ },
169
+ };
170
+ const eventList1 = {
171
+ onChange: (value) => {
172
+ onChange(value, 1);
173
+ },
174
+ onVisibleChange: (value) => {
175
+ onVisibleChange(value, 1);
176
+ },
177
+ onBlur: (value) => {
178
+ onBlur(value, 1);
179
+ },
180
+ onFocus: (value) => {
181
+ onFocus(value, 1);
182
+ },
183
+ };
184
+ const onChange = (value, index) => {
185
+ emit("changeSelect", value, index);
186
+ };
187
+ const onVisibleChange = (value, index) => {
188
+ emit("visible-change", value, index);
189
+ };
190
+ const onBlur = (value, index) => {
191
+ emit("blur", value, index);
192
+ };
193
+ const onFocus = (value, index) => {
194
+ emit("focus", value, index);
195
+ };
196
+
197
+ useBuriedParams(props, emit);
198
+ defineExpose({
199
+ ref: props.multiple ? [selectRef1, selectRef2] : selectRef1,
200
+ clearValue,
201
+ yearList,
202
+ });
203
+ onMounted(() => {
204
+ getYearList();
205
+ });
206
+ </script>
207
+ <style lang='less'>
208
+ .ct-year-select {
209
+ --el-select-input-focus-border-color: transparent;
210
+ --ct-year-select-select-inner-box-shadow: none;
211
+ position: relative;
212
+ display: inline-flex;
213
+ width: var(--ct-component-width);
214
+ font-size: var(--ct-font-size);
215
+ color: var(--ct-border-color);
216
+ box-sizing: border-box;
217
+ vertical-align: middle;
218
+ @R: .ct-year-select;
219
+ &:not(.is-disabled):hover {
220
+ --ct-component-border-color: var(--ct-component-hover-border-color);
221
+ }
222
+ &.is-disabled {
223
+ cursor: not-allowed;
224
+ --ct-component-fill-color: var(--ct-component-disabled-bg-color);
225
+ }
226
+ &__wrapper {
227
+ display: inline-flex;
228
+ flex-grow: 1;
229
+ align-items: center;
230
+ justify-content: center;
231
+ padding: 1px 0;
232
+ background-color: var(--ct-component-fill-color);
233
+ background-image: none;
234
+ border-radius: var(--ct-component-border-radius);
235
+ transition: var(--el-transition-box-shadow);
236
+ transform: translate3d(0, 0, 0);
237
+ box-shadow: 0 0 0 1px var(--ct-component-border-color) inset;
238
+ &:focus-within {
239
+ --ct-component-border-color: var(--ct-color-primary);
240
+ .el-input {
241
+ .el-icon,
242
+ .ct-icon {
243
+ color: var(--ct-component-border-color);
244
+ }
245
+ }
246
+ }
247
+ }
248
+ &__select {
249
+ width: 50%;
250
+ flex-grow: 1;
251
+ padding: 0 1px;
252
+ -webkit-appearance: none;
253
+ color: var(--ct-component-color);
254
+ font-size: inherit;
255
+ height: var(--ct-component-inner-height);
256
+ line-height: var(--ct-component-inner-height);
257
+ outline: 0;
258
+ border: none;
259
+ background: 0 0;
260
+ box-sizing: border-box;
261
+ .el-input {
262
+ --el-input-height: var(--ct-component-inner-height);
263
+ }
264
+ }
265
+ & &__select {
266
+ .el-input.is-focus,
267
+ .el-input {
268
+ .el-input__wrapper {
269
+ box-shadow: var(--ct-year-select-select-inner-box-shadow) !important;
270
+ }
271
+ }
272
+ }
273
+ }
274
274
  </style>
@@ -1,64 +1,64 @@
1
- import { baseOption } from "../base"
2
- export const baseBarOption = {
3
- ...baseOption,
4
- color: [
5
- 'rgba(77, 100, 255, 1)',
6
- "rgba(255, 173, 44, 1)",
7
- "rgba(30, 183, 173, 1)",
8
- "rgba(255, 146, 24, 1)",
9
- "rgba(66, 166, 255, 1)",
10
- "rgba(136, 206, 119, 1)",
11
- ],
12
- axisPointer: {
13
- lineStyle: {
14
- opacity: 0
15
- },
16
- },
17
- series: []
18
- }
19
-
20
- export const seriesItem = {
21
- name: "",
22
- type: 'bar',
23
- silent: true,
24
- barWidth: 28,
25
- barGap: '50%',
26
- barCategoryGap: 0,
27
- label: {
28
- show: false,
29
- position: "outside",
30
- fontSize: 14,
31
- color: '#141617',
32
- fontWeight: 400,
33
- },
34
- emphasis: {
35
- label: {
36
- show: false,
37
- position: "outside",
38
- fontSize: 14,
39
- color: '#141617',
40
- fontWeight: 400,
41
- },
42
- },
43
- itemStyle: {
44
- borderRadius: [4, 4, 0, 0],
45
- borderWidth: 4,
46
- borderColor: {
47
- type: 'linear',
48
- x: 0,
49
- y: 0,
50
- x2: 0,
51
- y2: 1,
52
- colorStops: [{
53
- offset: 0, color: '#999CFF' // 0% 处的颜色
54
- }, {
55
- offset: 1, color: '#696EFF' // 100% 处的颜色
56
- }],
57
- global: false // 缺省为 false
58
- }
59
- },
60
- labelLayout: {
61
- draggable: true,
62
- },
63
- data: [],
1
+ import { baseOption } from "../base"
2
+ export const baseBarOption = {
3
+ ...baseOption,
4
+ color: [
5
+ 'rgba(77, 100, 255, 1)',
6
+ "rgba(255, 173, 44, 1)",
7
+ "rgba(30, 183, 173, 1)",
8
+ "rgba(255, 146, 24, 1)",
9
+ "rgba(66, 166, 255, 1)",
10
+ "rgba(136, 206, 119, 1)",
11
+ ],
12
+ axisPointer: {
13
+ lineStyle: {
14
+ opacity: 0
15
+ },
16
+ },
17
+ series: []
18
+ }
19
+
20
+ export const seriesItem = {
21
+ name: "",
22
+ type: 'bar',
23
+ silent: true,
24
+ barWidth: 28,
25
+ barGap: '50%',
26
+ barCategoryGap: 0,
27
+ label: {
28
+ show: false,
29
+ position: "outside",
30
+ fontSize: 14,
31
+ color: '#141617',
32
+ fontWeight: 400,
33
+ },
34
+ emphasis: {
35
+ label: {
36
+ show: false,
37
+ position: "outside",
38
+ fontSize: 14,
39
+ color: '#141617',
40
+ fontWeight: 400,
41
+ },
42
+ },
43
+ itemStyle: {
44
+ borderRadius: [4, 4, 0, 0],
45
+ borderWidth: 4,
46
+ borderColor: {
47
+ type: 'linear',
48
+ x: 0,
49
+ y: 0,
50
+ x2: 0,
51
+ y2: 1,
52
+ colorStops: [{
53
+ offset: 0, color: '#999CFF' // 0% 处的颜色
54
+ }, {
55
+ offset: 1, color: '#696EFF' // 100% 处的颜色
56
+ }],
57
+ global: false // 缺省为 false
58
+ }
59
+ },
60
+ labelLayout: {
61
+ draggable: true,
62
+ },
63
+ data: [],
64
64
  }