@fmdevui/fm-dev 1.0.114 → 1.0.116

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 (36) hide show
  1. package/es/component.mjs +3 -2
  2. package/es/core/api/base/index.d.ts +21 -21
  3. package/es/core/api/login/index.d.ts +4 -4
  4. package/es/core/api/sys/index.d.ts +29 -29
  5. package/es/core/index.d.ts +1 -0
  6. package/es/core/plugins/index.d.ts +1 -0
  7. package/es/core/ui/components/fmHBarChart/index.vue.d.ts +21 -0
  8. package/es/core/ui/components/index.d.ts +20 -1
  9. package/es/index.mjs +4 -1
  10. package/es/packages/core/hook/useChart.mjs +2 -0
  11. package/es/packages/core/index.mjs +5 -1
  12. package/es/packages/core/plugins/index.mjs +3 -0
  13. package/es/packages/core/ui/components/fmHBarChart/index.vue.mjs +5 -0
  14. package/es/packages/core/ui/components/fmHBarChart/index.vue2.mjs +169 -0
  15. package/es/packages/core/ui/components/index.mjs +4 -1
  16. package/index.js +89721 -87737
  17. package/index.min.js +73 -72
  18. package/index.min.mjs +73 -72
  19. package/index.mjs +89717 -87735
  20. package/lib/component.js +2 -1
  21. package/lib/core/api/base/index.d.ts +21 -21
  22. package/lib/core/api/login/index.d.ts +4 -4
  23. package/lib/core/api/sys/index.d.ts +29 -29
  24. package/lib/core/index.d.ts +1 -0
  25. package/lib/core/plugins/index.d.ts +1 -0
  26. package/lib/core/ui/components/fmHBarChart/index.vue.d.ts +21 -0
  27. package/lib/core/ui/components/index.d.ts +20 -1
  28. package/lib/index.js +5 -0
  29. package/lib/packages/core/hook/useChart.js +2 -0
  30. package/lib/packages/core/index.js +6 -0
  31. package/lib/packages/core/plugins/index.js +9 -0
  32. package/lib/packages/core/ui/components/fmHBarChart/index.vue.js +9 -0
  33. package/lib/packages/core/ui/components/fmHBarChart/index.vue2.js +173 -0
  34. package/lib/packages/core/ui/components/index.js +4 -0
  35. package/package.json +1 -1
  36. /package/lib/{defaults.css → make-installer.css} +0 -0
package/lib/component.js CHANGED
@@ -21,7 +21,8 @@ const plugins = [
21
21
  index$1.FmSelectTable,
22
22
  index$1.FmRenderCol,
23
23
  index$1.FmButton,
24
- index$1.FmAddressParsing
24
+ index$1.FmAddressParsing,
25
+ index$1.FmHBarChart
25
26
  ];
26
27
 
27
28
  exports.default = plugins;
@@ -2,28 +2,28 @@ import { CustomAxiosRequestConfig } from '../utils/request';
2
2
  import { AxiosResponse } from 'axios';
3
3
  export declare const useBaseApi: (module: string, options?: CustomAxiosRequestConfig) => {
4
4
  baseUrl: string;
5
- request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
6
- pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
7
- post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
8
- gcomm: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
9
- download: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
10
- get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
11
- page: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
12
- detail: (id: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
13
- dropdownData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
14
- add: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
15
- update: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
16
- setStatus: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
17
- delete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
18
- batchDelete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
19
- exportData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
20
- downloadTemplate: (cancel?: boolean) => Promise<AxiosResponse<any, any>>;
21
- importData: (file: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
22
- uploadFile: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
5
+ request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
6
+ pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
7
+ post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
8
+ gcomm: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
9
+ download: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
10
+ get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
11
+ page: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
12
+ detail: (id: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
13
+ dropdownData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
14
+ add: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
15
+ update: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
16
+ setStatus: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
17
+ delete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
18
+ batchDelete: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
19
+ exportData: (data: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
20
+ downloadTemplate: (cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
21
+ importData: (file: any, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
22
+ uploadFile: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
23
23
  };
24
24
  export declare const useApi: (url: string, options?: CustomAxiosRequestConfig) => {
25
25
  baseUrl: string;
26
- request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
27
- post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
28
- get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
26
+ request: <T>(config: CustomAxiosRequestConfig, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
27
+ post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
28
+ get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any, {}>>;
29
29
  };
@@ -1,7 +1,7 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  export declare function useLoginApi(): {
3
- signIn: (data: object) => Promise< AxiosResponse<any, any>>;
4
- loginPhonenumber: (data: object) => Promise< AxiosResponse<any, any>>;
5
- getCaptcha: () => Promise< AxiosResponse<any, any>>;
6
- signOut: (data: object) => Promise< AxiosResponse<any, any>>;
3
+ signIn: (data: object) => Promise< AxiosResponse<any, any, {}>>;
4
+ loginPhonenumber: (data: object) => Promise< AxiosResponse<any, any, {}>>;
5
+ getCaptcha: () => Promise< AxiosResponse<any, any, {}>>;
6
+ signOut: (data: object) => Promise< AxiosResponse<any, any, {}>>;
7
7
  };
@@ -1,34 +1,34 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  export declare function useSysApi(): {
3
- getSysInfo: (id: any) => Promise< AxiosResponse<any, any>>;
4
- getSmPublicKey: () => Promise< AxiosResponse<any, any>>;
5
- getMenuTree: () => Promise< AxiosResponse<any, any>>;
6
- getMenuUserMenuList: () => Promise< AxiosResponse<any, any>>;
7
- addUserMenu: (data: any) => Promise< AxiosResponse<any, any>>;
8
- setNoticeRead: (data: any) => Promise< AxiosResponse<any, any>>;
9
- getNoticeTitle: () => Promise< AxiosResponse<any, any>>;
10
- getNoticeUnReadList: () => Promise< AxiosResponse<any, any>>;
11
- NoticePageReceived: (data: any) => Promise< AxiosResponse<any, any>>;
12
- getUpgradeLastUnRead: () => Promise< AxiosResponse<any, any>>;
13
- getUserInfo: () => Promise< AxiosResponse<any, any>>;
14
- getUserRoleTableList: () => Promise< AxiosResponse<any, any>>;
15
- getConstList: () => Promise< AxiosResponse<any, any>>;
16
- getPosList: () => Promise< AxiosResponse<any, any>>;
17
- getOwnRoleListById: (userid: any) => Promise< AxiosResponse<any, any>>;
18
- getRoleList: () => Promise< AxiosResponse<any, any>>;
19
- getSysOrgChildTreePidLevel: (pid: any, level: any) => Promise< AxiosResponse<any, any>>;
20
- getOrgList: (params: any) => Promise< AxiosResponse<any, any>>;
21
- getUserBaseInfo: () => Promise< AxiosResponse<any, any>>;
22
- getOwnExtOrgListByid: (userid: any) => Promise< AxiosResponse<any, any>>;
23
- getAllDictList: () => Promise< AxiosResponse<any, any>>;
24
- verifyPwdExpirationTime: () => Promise< AxiosResponse<any, any>>;
25
- changePwd: (data: any) => Promise< AxiosResponse<any, any>>;
26
- resetPwd: (data: any) => Promise< AxiosResponse<any, any>>;
27
- unlockLogin: (data: any) => Promise< AxiosResponse<any, any>>;
28
- changeToken: (data: any) => Promise< AxiosResponse<any, any>>;
29
- Logout: () => Promise< AxiosResponse<any, any>>;
30
- unLockScreen: (password: any) => Promise< AxiosResponse<any, any>>;
31
- getOnlineUserList: (data: any) => Promise< AxiosResponse<any, any>>;
3
+ getSysInfo: (id: any) => Promise< AxiosResponse<any, any, {}>>;
4
+ getSmPublicKey: () => Promise< AxiosResponse<any, any, {}>>;
5
+ getMenuTree: () => Promise< AxiosResponse<any, any, {}>>;
6
+ getMenuUserMenuList: () => Promise< AxiosResponse<any, any, {}>>;
7
+ addUserMenu: (data: any) => Promise< AxiosResponse<any, any, {}>>;
8
+ setNoticeRead: (data: any) => Promise< AxiosResponse<any, any, {}>>;
9
+ getNoticeTitle: () => Promise< AxiosResponse<any, any, {}>>;
10
+ getNoticeUnReadList: () => Promise< AxiosResponse<any, any, {}>>;
11
+ NoticePageReceived: (data: any) => Promise< AxiosResponse<any, any, {}>>;
12
+ getUpgradeLastUnRead: () => Promise< AxiosResponse<any, any, {}>>;
13
+ getUserInfo: () => Promise< AxiosResponse<any, any, {}>>;
14
+ getUserRoleTableList: () => Promise< AxiosResponse<any, any, {}>>;
15
+ getConstList: () => Promise< AxiosResponse<any, any, {}>>;
16
+ getPosList: () => Promise< AxiosResponse<any, any, {}>>;
17
+ getOwnRoleListById: (userid: any) => Promise< AxiosResponse<any, any, {}>>;
18
+ getRoleList: () => Promise< AxiosResponse<any, any, {}>>;
19
+ getSysOrgChildTreePidLevel: (pid: any, level: any) => Promise< AxiosResponse<any, any, {}>>;
20
+ getOrgList: (params: any) => Promise< AxiosResponse<any, any, {}>>;
21
+ getUserBaseInfo: () => Promise< AxiosResponse<any, any, {}>>;
22
+ getOwnExtOrgListByid: (userid: any) => Promise< AxiosResponse<any, any, {}>>;
23
+ getAllDictList: () => Promise< AxiosResponse<any, any, {}>>;
24
+ verifyPwdExpirationTime: () => Promise< AxiosResponse<any, any, {}>>;
25
+ changePwd: (data: any) => Promise< AxiosResponse<any, any, {}>>;
26
+ resetPwd: (data: any) => Promise< AxiosResponse<any, any, {}>>;
27
+ unlockLogin: (data: any) => Promise< AxiosResponse<any, any, {}>>;
28
+ changeToken: (data: any) => Promise< AxiosResponse<any, any, {}>>;
29
+ Logout: () => Promise< AxiosResponse<any, any, {}>>;
30
+ unLockScreen: (password: any) => Promise< AxiosResponse<any, any, {}>>;
31
+ getOnlineUserList: (data: any) => Promise< AxiosResponse<any, any, {}>>;
32
32
  };
33
33
  /**
34
34
  * 包装 Promise 并返回 [Error, any]
@@ -10,5 +10,6 @@ export * from './auth';
10
10
  export * from './hook/dateTimeShortCust';
11
11
  export * from './hook/useVxeTableOptionsHook';
12
12
  export * from './hook/useChart';
13
+ export * from './plugins';
13
14
  export * from './utils/cityparess';
14
15
  export * from './types';
@@ -0,0 +1 @@
1
+ export * from './echarts';
@@ -0,0 +1,21 @@
1
+ import { BarChartProps, BarDataItem, LegendPosition } from '../../../types/chart';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<BarChartProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BarChartProps> & Readonly<{}>, {
4
+ data: number[] | BarDataItem[];
5
+ height: string;
6
+ xAxisData: string[];
7
+ barWidth: string | number;
8
+ stack: boolean;
9
+ loading: boolean;
10
+ isEmpty: boolean;
11
+ colors: string[];
12
+ showAxisLabel: boolean;
13
+ showAxisLine: boolean;
14
+ showSplitLine: boolean;
15
+ showTooltip: boolean;
16
+ showLegend: boolean;
17
+ legendPosition: LegendPosition;
18
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
19
+ chartRef: HTMLDivElement;
20
+ }, HTMLDivElement>;
21
+ export default _default;
@@ -4,6 +4,7 @@ import { TreeKey } from 'element-plus';
4
4
  import { TQueryConditionProps } from './querycondition/type';
5
5
  import { FmSelectTableProps } from './selecttable/type';
6
6
  import { FmButtonSelfProps } from './fmbutton/type';
7
+ import { BarChartProps, BarDataItem, LegendPosition } from 'fm-dev';
7
8
  export * from './selecttable/type';
8
9
  export * from './selecttable/ClickOutside';
9
10
  export * from './fmbutton/type';
@@ -2329,4 +2330,22 @@ declare const FmAddressParsing: DefineComponent<ExtractPropTypes<{
2329
2330
  fcity: string;
2330
2331
  fcounty: string;
2331
2332
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2332
- export { FmTransfer, FmNoticeBar, FmDragImg, Fmselect, FmAutocomplete, Fminputdropdown, Fminputtable, FmTree, Fmdatepicker, FmQueryCondition, FmMoreChoose, FmRenderComp, FmSelectTable, FmRenderCol, FmButton, FmAddressParsing, elSvg };
2333
+ declare const FmHBarChart: DefineComponent<BarChartProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< BarChartProps> & Readonly<{}>, {
2334
+ data: number[] | BarDataItem[];
2335
+ height: string;
2336
+ xAxisData: string[];
2337
+ barWidth: string | number;
2338
+ stack: boolean;
2339
+ loading: boolean;
2340
+ isEmpty: boolean;
2341
+ colors: string[];
2342
+ showAxisLabel: boolean;
2343
+ showAxisLine: boolean;
2344
+ showSplitLine: boolean;
2345
+ showTooltip: boolean;
2346
+ showLegend: boolean;
2347
+ legendPosition: LegendPosition;
2348
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
2349
+ chartRef: HTMLDivElement;
2350
+ }, HTMLDivElement>;
2351
+ export { FmTransfer, FmNoticeBar, FmDragImg, Fmselect, FmAutocomplete, Fminputdropdown, Fminputtable, FmTree, Fmdatepicker, FmQueryCondition, FmMoreChoose, FmRenderComp, FmSelectTable, FmRenderCol, FmButton, FmAddressParsing, FmHBarChart, elSvg };
package/lib/index.js CHANGED
@@ -43,6 +43,8 @@ var index$h = require('./packages/core/auth/index.js');
43
43
  var dateTimeShortCust = require('./packages/core/hook/dateTimeShortCust.js');
44
44
  var useVxeTableOptionsHook = require('./packages/core/hook/useVxeTableOptionsHook.js');
45
45
  var useChart = require('./packages/core/hook/useChart.js');
46
+ var core = require('./node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/core.js');
47
+ var echarts = require('./packages/core/plugins/echarts.js');
46
48
  var index$i = require('./packages/core/utils/cityparess/index.js');
47
49
 
48
50
  const install = defaults.default.install;
@@ -55,6 +57,7 @@ exports.FmAddressParsing = index$1.FmAddressParsing;
55
57
  exports.FmAutocomplete = index$1.FmAutocomplete;
56
58
  exports.FmButton = index$1.FmButton;
57
59
  exports.FmDragImg = index$1.FmDragImg;
60
+ exports.FmHBarChart = index$1.FmHBarChart;
58
61
  exports.FmMoreChoose = index$1.FmMoreChoose;
59
62
  exports.FmNoticeBar = index$1.FmNoticeBar;
60
63
  exports.FmQueryCondition = index$1.FmQueryCondition;
@@ -175,5 +178,7 @@ exports.useVxeTable = useVxeTableOptionsHook.useVxeTable;
175
178
  exports.useChart = useChart.useChart;
176
179
  exports.useChartComponent = useChart.useChartComponent;
177
180
  exports.useChartOps = useChart.useChartOps;
181
+ exports.echarts = core;
182
+ exports.graphic = echarts.graphic;
178
183
  exports.addressparsing = index$i.addressparsing;
179
184
  exports.install = install;
@@ -74,6 +74,8 @@ function useChart(options = {}) {
74
74
  let menuOpenStopHandle = null;
75
75
  let menuTypeStopHandle = null;
76
76
  const setupMenuWatchers = () => {
77
+ vue.nextTick(requestAnimationResize);
78
+ setTimeout(() => multiDelayResize(MENU_RESIZE_DELAYS), 0);
77
79
  };
78
80
  const cleanupMenuWatchers = () => {
79
81
  menuOpenStopHandle?.();
@@ -12,6 +12,7 @@ var index$g = require('./auth/index.js');
12
12
  var dateTimeShortCust = require('./hook/dateTimeShortCust.js');
13
13
  var useVxeTableOptionsHook = require('./hook/useVxeTableOptionsHook.js');
14
14
  var useChart = require('./hook/useChart.js');
15
+ require('./plugins/index.js');
15
16
  var index$h = require('./utils/cityparess/index.js');
16
17
  require('./types/index.js');
17
18
  var index$1 = require('./ui/components/svgIcon/index.js');
@@ -40,6 +41,8 @@ var gloabdata = require('./utils/comm/gloabdata.js');
40
41
  var commonFunction = require('./utils/comm/commonFunction.js');
41
42
  var index$e = require('./utils/comm/index.js');
42
43
  var index$f = require('./utils/const/index.js');
44
+ var core = require('../../node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/core.js');
45
+ var echarts = require('./plugins/echarts.js');
43
46
 
44
47
 
45
48
 
@@ -47,6 +50,7 @@ exports.FmAddressParsing = index.FmAddressParsing;
47
50
  exports.FmAutocomplete = index.FmAutocomplete;
48
51
  exports.FmButton = index.FmButton;
49
52
  exports.FmDragImg = index.FmDragImg;
53
+ exports.FmHBarChart = index.FmHBarChart;
50
54
  exports.FmMoreChoose = index.FmMoreChoose;
51
55
  exports.FmNoticeBar = index.FmNoticeBar;
52
56
  exports.FmQueryCondition = index.FmQueryCondition;
@@ -168,3 +172,5 @@ exports.getAppItemText = gloabdata.getAppItemText;
168
172
  exports.commonFunction = commonFunction.default;
169
173
  exports.commonFunctionObj = index$e.commonFunctionObj;
170
174
  exports.PUB = index$f.PUB;
175
+ exports.echarts = core;
176
+ exports.graphic = echarts.graphic;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var echarts = require('./echarts.js');
4
+ var core = require('../../../node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/core.js');
5
+
6
+
7
+
8
+ exports.graphic = echarts.graphic;
9
+ exports.echarts = core;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index_vue_vue_type_script_setup_true_lang = require('./index.vue2.js');
6
+
7
+
8
+
9
+ exports.default = index_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,173 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var useChart = require('../../../hook/useChart.js');
7
+ var echarts = require('../../../plugins/echarts.js');
8
+
9
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
+ ...{ name: "FmHBarChart" },
11
+ __name: "index",
12
+ props: {
13
+ data: { default: () => [0, 0, 0, 0, 0, 0, 0] },
14
+ xAxisData: { default: () => [] },
15
+ barWidth: { default: "36%" },
16
+ stack: { type: Boolean, default: false },
17
+ borderRadius: {},
18
+ height: { default: useChart.useChartOps().chartHeight },
19
+ loading: { type: Boolean, default: false },
20
+ isEmpty: { type: Boolean, default: false },
21
+ colors: { default: () => useChart.useChartOps().colors },
22
+ showAxisLabel: { type: Boolean, default: true },
23
+ showAxisLine: { type: Boolean, default: true },
24
+ showSplitLine: { type: Boolean, default: true },
25
+ showTooltip: { type: Boolean, default: true },
26
+ showLegend: { type: Boolean, default: false },
27
+ legendPosition: { default: "bottom" }
28
+ },
29
+ setup(__props) {
30
+ const props = __props;
31
+ const isMultipleData = vue.computed(() => {
32
+ return Array.isArray(props.data) && props.data.length > 0 && typeof props.data[0] === "object" && "name" in props.data[0];
33
+ });
34
+ const getColor = (customColor, index) => {
35
+ if (customColor) return customColor;
36
+ if (index !== void 0) {
37
+ return props.colors[index % props.colors.length];
38
+ }
39
+ return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
40
+ {
41
+ offset: 0,
42
+ color: "#4ABEFF"
43
+ },
44
+ {
45
+ offset: 1,
46
+ color: "#00E4E5"
47
+ }
48
+ ]);
49
+ };
50
+ const createGradientColor = (color) => {
51
+ return new echarts.graphic.LinearGradient(0, 0, 1, 0, [
52
+ {
53
+ offset: 0,
54
+ color
55
+ },
56
+ {
57
+ offset: 1,
58
+ color
59
+ }
60
+ ]);
61
+ };
62
+ const getBaseItemStyle = (color) => ({
63
+ borderRadius: 4,
64
+ color: typeof color === "string" ? createGradientColor(color) : color
65
+ });
66
+ const createSeriesItem = (config) => {
67
+ const animationConfig = getAnimationConfig();
68
+ return {
69
+ name: config.name,
70
+ data: config.data,
71
+ type: "bar",
72
+ stack: config.stack,
73
+ itemStyle: getBaseItemStyle(config.color),
74
+ barWidth: config.barWidth || props.barWidth,
75
+ ...animationConfig
76
+ };
77
+ };
78
+ const {
79
+ chartRef,
80
+ getAxisLineStyle,
81
+ getAxisLabelStyle,
82
+ getAxisTickStyle,
83
+ getSplitLineStyle,
84
+ getAnimationConfig,
85
+ getTooltipStyle,
86
+ getLegendStyle,
87
+ getGridWithLegend
88
+ } = useChart.useChartComponent({
89
+ props,
90
+ checkEmpty: () => {
91
+ if (Array.isArray(props.data) && typeof props.data[0] === "number") {
92
+ const singleData = props.data;
93
+ return !singleData.length || singleData.every((val) => val === 0);
94
+ }
95
+ if (Array.isArray(props.data) && typeof props.data[0] === "object") {
96
+ const multiData = props.data;
97
+ return !multiData.length || multiData.every((item) => !item.data?.length || item.data.every((val) => val === 0));
98
+ }
99
+ return true;
100
+ },
101
+ watchSources: [() => props.data, () => props.xAxisData, () => props.colors],
102
+ generateOptions: () => {
103
+ const options = {
104
+ grid: getGridWithLegend(props.showLegend && isMultipleData.value, props.legendPosition, {
105
+ top: 15,
106
+ right: 0,
107
+ left: 0
108
+ }),
109
+ tooltip: props.showTooltip ? getTooltipStyle() : void 0,
110
+ xAxis: {
111
+ type: "value",
112
+ axisTick: getAxisTickStyle(),
113
+ axisLine: getAxisLineStyle(props.showAxisLine),
114
+ axisLabel: getAxisLabelStyle(props.showAxisLabel),
115
+ splitLine: getSplitLineStyle(props.showSplitLine)
116
+ },
117
+ yAxis: {
118
+ type: "category",
119
+ data: props.xAxisData,
120
+ axisTick: getAxisTickStyle(),
121
+ axisLabel: getAxisLabelStyle(props.showAxisLabel),
122
+ axisLine: getAxisLineStyle(props.showAxisLine)
123
+ }
124
+ };
125
+ if (props.showLegend && isMultipleData.value) {
126
+ options.legend = getLegendStyle(props.legendPosition);
127
+ }
128
+ if (isMultipleData.value) {
129
+ const multiData = props.data;
130
+ options.series = multiData.map((item, index) => {
131
+ const computedColor = getColor(props.colors[index], index);
132
+ return createSeriesItem({
133
+ name: item.name,
134
+ data: item.data,
135
+ color: computedColor,
136
+ barWidth: item.barWidth,
137
+ stack: props.stack ? item.stack || "total" : void 0
138
+ });
139
+ });
140
+ } else {
141
+ const singleData = props.data;
142
+ const computedColor = getColor();
143
+ options.series = [
144
+ createSeriesItem({
145
+ data: singleData,
146
+ color: computedColor
147
+ })
148
+ ];
149
+ }
150
+ return options;
151
+ }
152
+ });
153
+ return (_ctx, _cache) => {
154
+ const _directive_loading = vue.resolveDirective("loading");
155
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock(
156
+ "div",
157
+ {
158
+ ref_key: "chartRef",
159
+ ref: chartRef,
160
+ class: "relative w-full",
161
+ style: vue.normalizeStyle({ height: props.height })
162
+ },
163
+ null,
164
+ 4
165
+ /* STYLE */
166
+ )), [
167
+ [_directive_loading, props.loading]
168
+ ]);
169
+ };
170
+ }
171
+ });
172
+
173
+ exports.default = _sfc_main;
@@ -16,6 +16,7 @@ require('./selecttable/index.vue.js');
16
16
  require('./selecttable/renderCol.vue.js');
17
17
  require('./fmbutton/index.vue.js');
18
18
  require('./fmaddressparsing/index.vue.js');
19
+ require('./fmHBarChart/index.vue.js');
19
20
  require('./selecttable/type.js');
20
21
  require('./selecttable/ClickOutside.js');
21
22
  require('./fmbutton/type.js');
@@ -34,6 +35,7 @@ var index_vue_vue_type_script_setup_true_lang$8 = require('./selecttable/index.v
34
35
  var renderCol_vue_vue_type_script_setup_true_lang = require('./selecttable/renderCol.vue2.js');
35
36
  var index_vue_vue_type_script_setup_true_lang$9 = require('./fmbutton/index.vue2.js');
36
37
  var index_vue_vue_type_script_setup_true_lang$a = require('./fmaddressparsing/index.vue2.js');
38
+ var index_vue_vue_type_script_setup_true_lang$b = require('./fmHBarChart/index.vue2.js');
37
39
 
38
40
  const FmTransfer = index_vue_vue_type_script_setup_true_lang.default;
39
41
  const FmNoticeBar = index_vue_vue_type_script_setup_true_lang$1.default;
@@ -51,12 +53,14 @@ const FmSelectTable = index_vue_vue_type_script_setup_true_lang$8.default;
51
53
  const FmRenderCol = renderCol_vue_vue_type_script_setup_true_lang.default;
52
54
  const FmButton = index_vue_vue_type_script_setup_true_lang$9.default;
53
55
  const FmAddressParsing = index_vue_vue_type_script_setup_true_lang$a.default;
56
+ const FmHBarChart = index_vue_vue_type_script_setup_true_lang$b.default;
54
57
 
55
58
  exports.elSvg = index.elSvg;
56
59
  exports.FmAddressParsing = FmAddressParsing;
57
60
  exports.FmAutocomplete = FmAutocomplete;
58
61
  exports.FmButton = FmButton;
59
62
  exports.FmDragImg = FmDragImg;
63
+ exports.FmHBarChart = FmHBarChart;
60
64
  exports.FmMoreChoose = FmMoreChoose;
61
65
  exports.FmNoticeBar = FmNoticeBar;
62
66
  exports.FmQueryCondition = FmQueryCondition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.114",
3
+ "version": "1.0.116",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes