hfn-components 0.0.7 → 0.0.8

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.
@@ -0,0 +1,25 @@
1
+ import { defineComponent } from 'vue';
2
+ import { ElTable, ElTableColumn } from 'element-plus';
3
+ import ColumnDeal from './columnDeal.vue.mjs';
4
+ import { TABLE_KEY } from '../../../constants/table.mjs';
5
+ import { elTableProps } from './elTable.mjs';
6
+
7
+ var _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "elTable",
9
+ props: elTableProps,
10
+ setup(__props, { expose: __expose }) {
11
+ __expose();
12
+ const props = __props;
13
+ const __returned__ = { props, get ElTable() {
14
+ return ElTable;
15
+ }, get ElTableColumn() {
16
+ return ElTableColumn;
17
+ }, ColumnDeal, get TABLE_KEY() {
18
+ return TABLE_KEY;
19
+ } };
20
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
21
+ return __returned__;
22
+ }
23
+ });
24
+
25
+ export { _sfc_main as default };
File without changes
@@ -0,0 +1 @@
1
+
File without changes
@@ -0,0 +1,10 @@
1
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
2
+
3
+ const _sfc_main = {};
4
+
5
+ function _sfc_render(_ctx, _cache) {
6
+ return null
7
+ }
8
+ var eleTable = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',"/Users/libiluo/Desktop/company/component-library/packages/components/eleTable/src/eleTable.vue"]]);
9
+
10
+ export { eleTable as default };
@@ -1 +1,2 @@
1
1
  export * from './table';
2
+ export * from './elTable';
@@ -1,2 +1,4 @@
1
1
  export { HtTable } from './table/index.mjs';
2
+ export { HtElTable } from './elTable/index.mjs';
2
3
  export { tableProps } from './table/HtTable.mjs';
4
+ export { elTableProps } from './elTable/src/elTable.mjs';
@@ -108,13 +108,13 @@ declare const _default: import("vue").DefineComponent<{
108
108
  };
109
109
  }, {
110
110
  props: import("@vue/shared").LooseRequired<{
111
- readonly columns: TableColumns[];
111
+ readonly dataSource: unknown[];
112
112
  readonly loading: boolean;
113
113
  readonly selectedKeys: (string | number)[];
114
- readonly dataSource: unknown[];
115
114
  readonly total: number;
116
115
  readonly pageSize: number;
117
116
  readonly actions: import("./HtTable").ActionItem[];
117
+ readonly columns: TableColumns[];
118
118
  readonly nowPage: number;
119
119
  readonly selectShow: boolean;
120
120
  readonly isPagination: boolean;
@@ -164,7 +164,7 @@ declare const _default: import("vue").DefineComponent<{
164
164
  y?: undefined;
165
165
  }>;
166
166
  tableColumns: import("vue").ComputedRef<TableColumns[]>;
167
- getIconComponent: (iconType: string | undefined) => import("@ant-design/icons-vue/lib/components/Icon").IconType | typeof Icons.createFromIconfontCN | import("@ant-design/icons-vue/lib/icons/AccountBookFilled").AccountBookFilledIconType | typeof Icons.setTwoToneColor;
167
+ getIconComponent: (iconType: string | undefined) => import("@ant-design/icons-vue/lib/components/Icon").IconType | import("@ant-design/icons-vue/lib/icons/PictureFilled").PictureFilledIconType | typeof Icons.createFromIconfontCN | typeof Icons.setTwoToneColor;
168
168
  shouldShowAction: (action: any, record: any) => any;
169
169
  resizeColumn: (w: any, col: any) => void;
170
170
  pageChange: (val: any) => void;
@@ -325,7 +325,7 @@ declare const _default: import("vue").DefineComponent<{
325
325
  };
326
326
  };
327
327
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
328
- size: import("vue").PropType<"default" | "small">;
328
+ size: import("vue").PropType<"small" | "default">;
329
329
  simple: {
330
330
  type: BooleanConstructor;
331
331
  default: any;
@@ -337,7 +337,7 @@ declare const _default: import("vue").DefineComponent<{
337
337
  selectComponentClass: StringConstructor;
338
338
  itemRender: import("vue").PropType<(opt: {
339
339
  page: number;
340
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
340
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
341
341
  originalElement: any;
342
342
  }) => any>;
343
343
  role: StringConstructor;
@@ -395,7 +395,7 @@ declare const _default: import("vue").DefineComponent<{
395
395
  };
396
396
  };
397
397
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
398
- size: import("vue").PropType<"default" | "small">;
398
+ size: import("vue").PropType<"small" | "default">;
399
399
  simple: {
400
400
  type: BooleanConstructor;
401
401
  default: any;
@@ -407,7 +407,7 @@ declare const _default: import("vue").DefineComponent<{
407
407
  selectComponentClass: StringConstructor;
408
408
  itemRender: import("vue").PropType<(opt: {
409
409
  page: number;
410
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
410
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
411
411
  originalElement: any;
412
412
  }) => any>;
413
413
  role: StringConstructor;
@@ -481,7 +481,7 @@ declare const _default: import("vue").DefineComponent<{
481
481
  };
482
482
  };
483
483
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
484
- size: import("vue").PropType<"default" | "small">;
484
+ size: import("vue").PropType<"small" | "default">;
485
485
  simple: {
486
486
  type: BooleanConstructor;
487
487
  default: any;
@@ -493,7 +493,7 @@ declare const _default: import("vue").DefineComponent<{
493
493
  selectComponentClass: StringConstructor;
494
494
  itemRender: import("vue").PropType<(opt: {
495
495
  page: number;
496
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
496
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
497
497
  originalElement: any;
498
498
  }) => any>;
499
499
  role: StringConstructor;
@@ -541,7 +541,7 @@ declare const _default: import("vue").DefineComponent<{
541
541
  };
542
542
  };
543
543
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
544
- size: import("vue").PropType<"default" | "small">;
544
+ size: import("vue").PropType<"small" | "default">;
545
545
  simple: {
546
546
  type: BooleanConstructor;
547
547
  default: any;
@@ -553,7 +553,7 @@ declare const _default: import("vue").DefineComponent<{
553
553
  selectComponentClass: StringConstructor;
554
554
  itemRender: import("vue").PropType<(opt: {
555
555
  page: number;
556
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
556
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
557
557
  originalElement: any;
558
558
  }) => any>;
559
559
  role: StringConstructor;
@@ -1817,13 +1817,13 @@ declare const _default: import("vue").DefineComponent<{
1817
1817
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1818
1818
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1819
1819
  }, {
1820
- readonly columns: TableColumns[];
1820
+ readonly dataSource: unknown[];
1821
1821
  readonly loading: boolean;
1822
1822
  readonly selectedKeys: (string | number)[];
1823
- readonly dataSource: unknown[];
1824
1823
  readonly total: number;
1825
1824
  readonly pageSize: number;
1826
1825
  readonly actions: import("./HtTable").ActionItem[];
1826
+ readonly columns: TableColumns[];
1827
1827
  readonly nowPage: number;
1828
1828
  readonly selectShow: boolean;
1829
1829
  readonly isPagination: boolean;
@@ -105,13 +105,13 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
105
105
  };
106
106
  }, {
107
107
  props: import("@vue/shared").LooseRequired<{
108
- readonly columns: import("./HtTable").TableColumns[];
108
+ readonly dataSource: unknown[];
109
109
  readonly loading: boolean;
110
110
  readonly selectedKeys: (string | number)[];
111
- readonly dataSource: unknown[];
112
111
  readonly total: number;
113
112
  readonly pageSize: number;
114
113
  readonly actions: import("./HtTable").ActionItem[];
114
+ readonly columns: import("./HtTable").TableColumns[];
115
115
  readonly nowPage: number;
116
116
  readonly selectShow: boolean;
117
117
  readonly isPagination: boolean;
@@ -161,7 +161,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
161
161
  y?: undefined;
162
162
  }>;
163
163
  tableColumns: import("vue").ComputedRef<import("./HtTable").TableColumns[]>;
164
- getIconComponent: (iconType: string | undefined) => import("@ant-design/icons-vue/lib/components/Icon").IconType | typeof import("@ant-design/icons-vue").createFromIconfontCN | import("@ant-design/icons-vue/lib/icons/AccountBookFilled").AccountBookFilledIconType | typeof import("@ant-design/icons-vue").setTwoToneColor;
164
+ getIconComponent: (iconType: string | undefined) => import("@ant-design/icons-vue/lib/components/Icon").IconType | import("@ant-design/icons-vue/lib/icons/PictureFilled").PictureFilledIconType | typeof import("@ant-design/icons-vue").createFromIconfontCN | typeof import("@ant-design/icons-vue").setTwoToneColor;
165
165
  shouldShowAction: (action: any, record: any) => any;
166
166
  resizeColumn: (w: any, col: any) => void;
167
167
  pageChange: (val: any) => void;
@@ -322,7 +322,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
322
322
  };
323
323
  };
324
324
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
325
- size: import("vue").PropType<"default" | "small">;
325
+ size: import("vue").PropType<"small" | "default">;
326
326
  simple: {
327
327
  type: BooleanConstructor;
328
328
  default: any;
@@ -334,7 +334,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
334
334
  selectComponentClass: StringConstructor;
335
335
  itemRender: import("vue").PropType<(opt: {
336
336
  page: number;
337
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
337
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
338
338
  originalElement: any;
339
339
  }) => any>;
340
340
  role: StringConstructor;
@@ -392,7 +392,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
392
392
  };
393
393
  };
394
394
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
395
- size: import("vue").PropType<"default" | "small">;
395
+ size: import("vue").PropType<"small" | "default">;
396
396
  simple: {
397
397
  type: BooleanConstructor;
398
398
  default: any;
@@ -404,7 +404,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
404
404
  selectComponentClass: StringConstructor;
405
405
  itemRender: import("vue").PropType<(opt: {
406
406
  page: number;
407
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
407
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
408
408
  originalElement: any;
409
409
  }) => any>;
410
410
  role: StringConstructor;
@@ -478,7 +478,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
478
478
  };
479
479
  };
480
480
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
481
- size: import("vue").PropType<"default" | "small">;
481
+ size: import("vue").PropType<"small" | "default">;
482
482
  simple: {
483
483
  type: BooleanConstructor;
484
484
  default: any;
@@ -490,7 +490,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
490
490
  selectComponentClass: StringConstructor;
491
491
  itemRender: import("vue").PropType<(opt: {
492
492
  page: number;
493
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
493
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
494
494
  originalElement: any;
495
495
  }) => any>;
496
496
  role: StringConstructor;
@@ -538,7 +538,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
538
538
  };
539
539
  };
540
540
  showTotal: import("vue").PropType<(total: number, range: [number, number]) => any>;
541
- size: import("vue").PropType<"default" | "small">;
541
+ size: import("vue").PropType<"small" | "default">;
542
542
  simple: {
543
543
  type: BooleanConstructor;
544
544
  default: any;
@@ -550,7 +550,7 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
550
550
  selectComponentClass: StringConstructor;
551
551
  itemRender: import("vue").PropType<(opt: {
552
552
  page: number;
553
- type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
553
+ type: "next" | "prev" | "page" | "jump-prev" | "jump-next";
554
554
  originalElement: any;
555
555
  }) => any>;
556
556
  role: StringConstructor;
@@ -1814,13 +1814,13 @@ export declare const HtTable: import("hfn-components/es/utils").SFCWithInstall<i
1814
1814
  onHandleSelectAll?: ((...args: any[]) => any) | undefined;
1815
1815
  onResizeColumn?: ((...args: any[]) => any) | undefined;
1816
1816
  }, {
1817
- readonly columns: import("./HtTable").TableColumns[];
1817
+ readonly dataSource: unknown[];
1818
1818
  readonly loading: boolean;
1819
1819
  readonly selectedKeys: (string | number)[];
1820
- readonly dataSource: unknown[];
1821
1820
  readonly total: number;
1822
1821
  readonly pageSize: number;
1823
1822
  readonly actions: import("./HtTable").ActionItem[];
1823
+ readonly columns: import("./HtTable").TableColumns[];
1824
1824
  readonly nowPage: number;
1825
1825
  readonly selectShow: boolean;
1826
1826
  readonly isPagination: boolean;
@@ -1 +1,2 @@
1
1
  export * from './key';
2
+ export * from './table';
@@ -1 +1,2 @@
1
1
  export { INSTALLED_KEY } from './key.mjs';
2
+ export { CLOUMN_DEAL, TABLE_KEY } from './table.mjs';
@@ -0,0 +1,2 @@
1
+ export declare const TABLE_KEY: Record<string, string>;
2
+ export declare const CLOUMN_DEAL: Record<string, Function>;
@@ -0,0 +1,26 @@
1
+ const TABLE_KEY = {
2
+ year: "\u5E74\u4EFD",
3
+ cucmulativeReturn: "\u533A\u95F4\u6536\u76CA",
4
+ vol: "\u5E74\u5316\u6CE2\u52A8\u7387",
5
+ sharpeRatio: "\u590F\u666E\u6BD4\u7387",
6
+ calmarRatio: "\u5361\u739B\u6BD4\u7387",
7
+ sortinoRatio: "\u7D22\u63D0\u8BFA\u6BD4\u7387",
8
+ downsideDev: "\u4E0B\u884C\u98CE\u9669",
9
+ maxDrawdown: "\u6700\u5927\u56DE\u64A4",
10
+ maxDrawdownDays: "\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
11
+ maxNormalDays: "\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09"
12
+ };
13
+ const basicText4 = (val) => {
14
+ return val === "-" ? "-" : val.toFixed(4);
15
+ };
16
+ const percentage = (val) => {
17
+ return val === "-" ? "-" : (val * 100).toFixed(2) + "%";
18
+ };
19
+ const CLOUMN_DEAL = {
20
+ basicText4,
21
+ colorText: basicText4,
22
+ colorPercentage: percentage,
23
+ percentage
24
+ };
25
+
26
+ export { CLOUMN_DEAL, TABLE_KEY };
package/es/index.mjs CHANGED
@@ -1,7 +1,9 @@
1
1
  import installer from './defaults.mjs';
2
2
  export { makeInstaller } from './make-installer.mjs';
3
3
  export { HtTable } from './components/table/index.mjs';
4
+ export { HtElTable } from './components/elTable/index.mjs';
4
5
  export { tableProps } from './components/table/HtTable.mjs';
6
+ export { elTableProps } from './components/elTable/src/elTable.mjs';
5
7
 
6
8
  const install = installer.install;
7
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",
@@ -11,6 +11,11 @@
11
11
  "keywords": [],
12
12
  "author": "",
13
13
  "license": "ISC",
14
+ "devDependencies":{
15
+ "ant-design-vue": "3.2.20",
16
+ "@ant-design/icons-vue": "^7.0.1",
17
+ "element-plus": "^2.7.7"
18
+ },
14
19
  "peerDependencies": {
15
20
  "vue": "^3.2.0"
16
21
  }