@fmdevui/fm-dev 1.0.114 → 1.0.115
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/es/component.mjs +3 -2
- package/es/core/api/base/index.d.ts +21 -21
- package/es/core/api/login/index.d.ts +4 -4
- package/es/core/api/sys/index.d.ts +29 -29
- package/es/core/ui/components/fmHBarChart/index.vue.d.ts +21 -0
- package/es/core/ui/components/index.d.ts +20 -1
- package/es/index.mjs +1 -1
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/ui/components/fmHBarChart/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/fmHBarChart/index.vue2.mjs +169 -0
- package/es/packages/core/ui/components/index.mjs +4 -1
- package/index.js +93851 -93231
- package/index.min.js +72 -72
- package/index.min.mjs +72 -72
- package/index.mjs +93848 -93228
- package/lib/component.js +2 -1
- package/lib/core/api/base/index.d.ts +21 -21
- package/lib/core/api/login/index.d.ts +4 -4
- package/lib/core/api/sys/index.d.ts +29 -29
- package/lib/core/ui/components/fmHBarChart/index.vue.d.ts +21 -0
- package/lib/core/ui/components/index.d.ts +20 -1
- package/lib/index.js +1 -0
- package/lib/packages/core/index.js +1 -0
- package/lib/packages/core/ui/components/fmHBarChart/index.vue.js +9 -0
- package/lib/packages/core/ui/components/fmHBarChart/index.vue2.js +173 -0
- package/lib/packages/core/ui/components/index.js +4 -0
- package/package.json +1 -1
- /package/es/{defaults.css → make-installer.css} +0 -0
- /package/lib/{defaults.css → index.css} +0 -0
package/es/component.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
2
|
-
import { FmTransfer, FmNoticeBar, Fmselect, FmAutocomplete, Fminputtable, Fminputdropdown, FmTree, Fmdatepicker, FmQueryCondition, FmMoreChoose, FmRenderComp, FmSelectTable, FmRenderCol, FmButton, FmAddressParsing } from './packages/core/ui/components/index.mjs';
|
|
2
|
+
import { FmTransfer, FmNoticeBar, Fmselect, FmAutocomplete, Fminputtable, Fminputdropdown, FmTree, Fmdatepicker, FmQueryCondition, FmMoreChoose, FmRenderComp, FmSelectTable, FmRenderCol, FmButton, FmAddressParsing, FmHBarChart } from './packages/core/ui/components/index.mjs';
|
|
3
3
|
|
|
4
4
|
const plugins = [
|
|
5
5
|
FmLogin,
|
|
@@ -17,7 +17,8 @@ const plugins = [
|
|
|
17
17
|
FmSelectTable,
|
|
18
18
|
FmRenderCol,
|
|
19
19
|
FmButton,
|
|
20
|
-
FmAddressParsing
|
|
20
|
+
FmAddressParsing,
|
|
21
|
+
FmHBarChart
|
|
21
22
|
];
|
|
22
23
|
|
|
23
24
|
export { plugins as default };
|
|
@@ -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]
|
|
@@ -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
|
-
|
|
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/es/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { default as emitter } from './packages/core/utils/emit/index.mjs';
|
|
|
3
3
|
export { default as setIntroduction } from './packages/core/utils/comm/setIconfont.mjs';
|
|
4
4
|
import './packages/core/index.mjs';
|
|
5
5
|
export { version } from './version.mjs';
|
|
6
|
-
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect } from './packages/core/ui/components/index.mjs';
|
|
6
|
+
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmHBarChart, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect } from './packages/core/ui/components/index.mjs';
|
|
7
7
|
export { elSvg } from './packages/core/ui/components/svgIcon/index.mjs';
|
|
8
8
|
export { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
9
9
|
export { NextLoading } from './packages/core/ui/loading/index.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect } from './ui/components/index.mjs';
|
|
1
|
+
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmHBarChart, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect } from './ui/components/index.mjs';
|
|
2
2
|
export { FmLogin } from './ui/login/index.mjs';
|
|
3
3
|
export { NextLoading } from './ui/loading/index.mjs';
|
|
4
4
|
export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum } from './api/index.mjs';
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent, computed, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeStyle } from 'vue';
|
|
2
|
+
import { useChartComponent, useChartOps } from '../../../hook/useChart.mjs';
|
|
3
|
+
import { graphic } from '../../../plugins/echarts.mjs';
|
|
4
|
+
|
|
5
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
...{ name: "FmHBarChart" },
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
data: { default: () => [0, 0, 0, 0, 0, 0, 0] },
|
|
10
|
+
xAxisData: { default: () => [] },
|
|
11
|
+
barWidth: { default: "36%" },
|
|
12
|
+
stack: { type: Boolean, default: false },
|
|
13
|
+
borderRadius: {},
|
|
14
|
+
height: { default: useChartOps().chartHeight },
|
|
15
|
+
loading: { type: Boolean, default: false },
|
|
16
|
+
isEmpty: { type: Boolean, default: false },
|
|
17
|
+
colors: { default: () => useChartOps().colors },
|
|
18
|
+
showAxisLabel: { type: Boolean, default: true },
|
|
19
|
+
showAxisLine: { type: Boolean, default: true },
|
|
20
|
+
showSplitLine: { type: Boolean, default: true },
|
|
21
|
+
showTooltip: { type: Boolean, default: true },
|
|
22
|
+
showLegend: { type: Boolean, default: false },
|
|
23
|
+
legendPosition: { default: "bottom" }
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const isMultipleData = computed(() => {
|
|
28
|
+
return Array.isArray(props.data) && props.data.length > 0 && typeof props.data[0] === "object" && "name" in props.data[0];
|
|
29
|
+
});
|
|
30
|
+
const getColor = (customColor, index) => {
|
|
31
|
+
if (customColor) return customColor;
|
|
32
|
+
if (index !== void 0) {
|
|
33
|
+
return props.colors[index % props.colors.length];
|
|
34
|
+
}
|
|
35
|
+
return new graphic.LinearGradient(0, 0, 1, 0, [
|
|
36
|
+
{
|
|
37
|
+
offset: 0,
|
|
38
|
+
color: "#4ABEFF"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
offset: 1,
|
|
42
|
+
color: "#00E4E5"
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
};
|
|
46
|
+
const createGradientColor = (color) => {
|
|
47
|
+
return new graphic.LinearGradient(0, 0, 1, 0, [
|
|
48
|
+
{
|
|
49
|
+
offset: 0,
|
|
50
|
+
color
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
offset: 1,
|
|
54
|
+
color
|
|
55
|
+
}
|
|
56
|
+
]);
|
|
57
|
+
};
|
|
58
|
+
const getBaseItemStyle = (color) => ({
|
|
59
|
+
borderRadius: 4,
|
|
60
|
+
color: typeof color === "string" ? createGradientColor(color) : color
|
|
61
|
+
});
|
|
62
|
+
const createSeriesItem = (config) => {
|
|
63
|
+
const animationConfig = getAnimationConfig();
|
|
64
|
+
return {
|
|
65
|
+
name: config.name,
|
|
66
|
+
data: config.data,
|
|
67
|
+
type: "bar",
|
|
68
|
+
stack: config.stack,
|
|
69
|
+
itemStyle: getBaseItemStyle(config.color),
|
|
70
|
+
barWidth: config.barWidth || props.barWidth,
|
|
71
|
+
...animationConfig
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
const {
|
|
75
|
+
chartRef,
|
|
76
|
+
getAxisLineStyle,
|
|
77
|
+
getAxisLabelStyle,
|
|
78
|
+
getAxisTickStyle,
|
|
79
|
+
getSplitLineStyle,
|
|
80
|
+
getAnimationConfig,
|
|
81
|
+
getTooltipStyle,
|
|
82
|
+
getLegendStyle,
|
|
83
|
+
getGridWithLegend
|
|
84
|
+
} = useChartComponent({
|
|
85
|
+
props,
|
|
86
|
+
checkEmpty: () => {
|
|
87
|
+
if (Array.isArray(props.data) && typeof props.data[0] === "number") {
|
|
88
|
+
const singleData = props.data;
|
|
89
|
+
return !singleData.length || singleData.every((val) => val === 0);
|
|
90
|
+
}
|
|
91
|
+
if (Array.isArray(props.data) && typeof props.data[0] === "object") {
|
|
92
|
+
const multiData = props.data;
|
|
93
|
+
return !multiData.length || multiData.every((item) => !item.data?.length || item.data.every((val) => val === 0));
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
},
|
|
97
|
+
watchSources: [() => props.data, () => props.xAxisData, () => props.colors],
|
|
98
|
+
generateOptions: () => {
|
|
99
|
+
const options = {
|
|
100
|
+
grid: getGridWithLegend(props.showLegend && isMultipleData.value, props.legendPosition, {
|
|
101
|
+
top: 15,
|
|
102
|
+
right: 0,
|
|
103
|
+
left: 0
|
|
104
|
+
}),
|
|
105
|
+
tooltip: props.showTooltip ? getTooltipStyle() : void 0,
|
|
106
|
+
xAxis: {
|
|
107
|
+
type: "value",
|
|
108
|
+
axisTick: getAxisTickStyle(),
|
|
109
|
+
axisLine: getAxisLineStyle(props.showAxisLine),
|
|
110
|
+
axisLabel: getAxisLabelStyle(props.showAxisLabel),
|
|
111
|
+
splitLine: getSplitLineStyle(props.showSplitLine)
|
|
112
|
+
},
|
|
113
|
+
yAxis: {
|
|
114
|
+
type: "category",
|
|
115
|
+
data: props.xAxisData,
|
|
116
|
+
axisTick: getAxisTickStyle(),
|
|
117
|
+
axisLabel: getAxisLabelStyle(props.showAxisLabel),
|
|
118
|
+
axisLine: getAxisLineStyle(props.showAxisLine)
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
if (props.showLegend && isMultipleData.value) {
|
|
122
|
+
options.legend = getLegendStyle(props.legendPosition);
|
|
123
|
+
}
|
|
124
|
+
if (isMultipleData.value) {
|
|
125
|
+
const multiData = props.data;
|
|
126
|
+
options.series = multiData.map((item, index) => {
|
|
127
|
+
const computedColor = getColor(props.colors[index], index);
|
|
128
|
+
return createSeriesItem({
|
|
129
|
+
name: item.name,
|
|
130
|
+
data: item.data,
|
|
131
|
+
color: computedColor,
|
|
132
|
+
barWidth: item.barWidth,
|
|
133
|
+
stack: props.stack ? item.stack || "total" : void 0
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
} else {
|
|
137
|
+
const singleData = props.data;
|
|
138
|
+
const computedColor = getColor();
|
|
139
|
+
options.series = [
|
|
140
|
+
createSeriesItem({
|
|
141
|
+
data: singleData,
|
|
142
|
+
color: computedColor
|
|
143
|
+
})
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
return options;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
return (_ctx, _cache) => {
|
|
150
|
+
const _directive_loading = resolveDirective("loading");
|
|
151
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
ref_key: "chartRef",
|
|
155
|
+
ref: chartRef,
|
|
156
|
+
class: "relative w-full",
|
|
157
|
+
style: normalizeStyle({ height: props.height })
|
|
158
|
+
},
|
|
159
|
+
null,
|
|
160
|
+
4
|
|
161
|
+
/* STYLE */
|
|
162
|
+
)), [
|
|
163
|
+
[_directive_loading, props.loading]
|
|
164
|
+
]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export { _sfc_main as default };
|
|
@@ -14,6 +14,7 @@ import './selecttable/index.vue.mjs';
|
|
|
14
14
|
import './selecttable/renderCol.vue.mjs';
|
|
15
15
|
import './fmbutton/index.vue.mjs';
|
|
16
16
|
import './fmaddressparsing/index.vue.mjs';
|
|
17
|
+
import './fmHBarChart/index.vue.mjs';
|
|
17
18
|
import './selecttable/type.mjs';
|
|
18
19
|
import './selecttable/ClickOutside.mjs';
|
|
19
20
|
import './fmbutton/type.mjs';
|
|
@@ -32,6 +33,7 @@ import _sfc_main$a from './selecttable/index.vue2.mjs';
|
|
|
32
33
|
import _sfc_main$b from './selecttable/renderCol.vue2.mjs';
|
|
33
34
|
import _sfc_main$c from './fmbutton/index.vue2.mjs';
|
|
34
35
|
import _sfc_main$d from './fmaddressparsing/index.vue2.mjs';
|
|
36
|
+
import _sfc_main$e from './fmHBarChart/index.vue2.mjs';
|
|
35
37
|
|
|
36
38
|
const FmTransfer = _sfc_main;
|
|
37
39
|
const FmNoticeBar = _sfc_main$1;
|
|
@@ -49,5 +51,6 @@ const FmSelectTable = _sfc_main$a;
|
|
|
49
51
|
const FmRenderCol = _sfc_main$b;
|
|
50
52
|
const FmButton = _sfc_main$c;
|
|
51
53
|
const FmAddressParsing = _sfc_main$d;
|
|
54
|
+
const FmHBarChart = _sfc_main$e;
|
|
52
55
|
|
|
53
|
-
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect };
|
|
56
|
+
export { FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmHBarChart, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect };
|