hfn-components 0.3.8 → 0.4.0

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/dist/index.css CHANGED
@@ -1 +1 @@
1
- .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
1
+ .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.target-head{display:grid;grid:auto/repeat(5,1fr)}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}
@@ -16,6 +16,10 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
16
16
  readonly default: "#f0f0f0";
17
17
  };
18
18
  }, {
19
+ targetHead: import("vue").Ref<{
20
+ name: string;
21
+ key: string;
22
+ }[]>;
19
23
  props: import("@vue/shared").LooseRequired<{
20
24
  readonly loading: boolean;
21
25
  readonly dataSource: unknown[];
@@ -706,10 +710,6 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
706
710
  readonly money_name: "金额(元)";
707
711
  };
708
712
  readonly convertKey: (data: any, key: string) => any;
709
- readonly TARGET_HEAD_KEY: {
710
- name: string;
711
- key: string;
712
- }[];
713
713
  readonly TARGET_END_KEY: {
714
714
  name: string;
715
715
  key: string;
@@ -16,6 +16,10 @@ declare const _default: import("vue").DefineComponent<{
16
16
  readonly default: "#f0f0f0";
17
17
  };
18
18
  }, {
19
+ targetHead: import("vue").Ref<{
20
+ name: string;
21
+ key: string;
22
+ }[]>;
19
23
  props: import("@vue/shared").LooseRequired<{
20
24
  readonly loading: boolean;
21
25
  readonly dataSource: unknown[];
@@ -706,10 +710,6 @@ declare const _default: import("vue").DefineComponent<{
706
710
  readonly money_name: "金额(元)";
707
711
  };
708
712
  readonly convertKey: (data: any, key: string) => any;
709
- readonly TARGET_HEAD_KEY: {
710
- name: string;
711
- key: string;
712
- }[];
713
713
  readonly TARGET_END_KEY: {
714
714
  name: string;
715
715
  key: string;
@@ -35,7 +35,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
35
35
  createElementVNode(
36
36
  "div",
37
37
  null,
38
- toDisplayString($setup.TARGET_HEAD_KEY.filter((items) => items.key === item.key.split("_")[0])[0].name),
38
+ toDisplayString($setup.targetHead.filter((items) => items.key === item.key.split("_")[0])[0].name),
39
39
  1
40
40
  /* TEXT */
41
41
  ),
@@ -1,8 +1,9 @@
1
- import { defineComponent } from 'vue';
1
+ import { defineComponent, ref, onMounted } from 'vue';
2
2
  import { ElTable, ElTableColumn, vLoading } from 'element-plus';
3
3
  import { TABLE_KEY, convertKey } from '../../../constants/table.mjs';
4
4
  import { TARGET_HEAD_KEY, TARGET_END_KEY } from '../../../constants/target.mjs';
5
5
  import '../../../constants/chartConfig.mjs';
6
+ import cloneDeep from 'lodash.clonedeep';
6
7
  import ColumnDeal from './columnDeal.vue.mjs';
7
8
  import { elTableProps } from './elTable.mjs';
8
9
 
@@ -11,8 +12,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  props: elTableProps,
12
13
  setup(__props, { expose: __expose }) {
13
14
  __expose();
15
+ const targetHead = ref(cloneDeep(TARGET_HEAD_KEY));
16
+ onMounted(() => {
17
+ let startYear = 2018;
18
+ const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
19
+ while (startYear <= nowYear) {
20
+ targetHead.value.push({
21
+ name: `${startYear}`,
22
+ key: `${startYear}`
23
+ });
24
+ startYear++;
25
+ }
26
+ });
14
27
  const props = __props;
15
- const __returned__ = { props, get ElTable() {
28
+ const __returned__ = { targetHead, props, get ElTable() {
16
29
  return ElTable;
17
30
  }, get ElTableColumn() {
18
31
  return ElTableColumn;
@@ -22,8 +35,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
22
35
  return TABLE_KEY;
23
36
  }, get convertKey() {
24
37
  return convertKey;
25
- }, get TARGET_HEAD_KEY() {
26
- return TARGET_HEAD_KEY;
27
38
  }, get TARGET_END_KEY() {
28
39
  return TARGET_END_KEY;
29
40
  }, ColumnDeal };
@@ -13,7 +13,32 @@ const _hoisted_3 = {
13
13
  };
14
14
  const _hoisted_4 = { class: "factor-content" };
15
15
  const _hoisted_5 = ["onClick"];
16
- const _hoisted_6 = { class: "dialog-footer" };
16
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode(
17
+ "svg",
18
+ {
19
+ t: "1736836637226",
20
+ class: "icon",
21
+ viewBox: "0 0 1024 1024",
22
+ version: "1.1",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ "p-id": "8732",
25
+ width: "15",
26
+ height: "15"
27
+ },
28
+ [
29
+ /* @__PURE__ */ createElementVNode("path", {
30
+ d: "M912.064 187.984L583.968 516.064l316.768 316.8-67.872 67.872-316.768-316.8-328.112 328.128-67.888-67.888 328.112-328.112L108.784 176.672l67.888-67.888 339.424 339.392L844.16 120.096l67.888 67.888z",
31
+ fill: "#bfbfbf",
32
+ "p-id": "8733"
33
+ })
34
+ ],
35
+ -1
36
+ /* HOISTED */
37
+ );
38
+ const _hoisted_7 = [
39
+ _hoisted_6
40
+ ];
41
+ const _hoisted_8 = { class: "dialog-footer" };
17
42
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18
43
  return openBlock(), createElementBlock("div", null, [
19
44
  createVNode($setup["ElDialog"], {
@@ -23,13 +48,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
23
48
  onClose: _cache[5] || (_cache[5] = ($event) => $setup.emit("choiceCancel"))
24
49
  }, {
25
50
  footer: withCtx(() => [
26
- createElementVNode("div", _hoisted_6, [
51
+ createElementVNode("div", _hoisted_8, [
27
52
  createVNode($setup["ElButton"], {
28
53
  onClick: $setup.confirmTarge,
29
54
  type: "primary"
30
55
  }, {
31
56
  default: withCtx(() => [
32
- createTextVNode(" Confirm ")
57
+ createTextVNode(" \u786E\u8BA4 ")
33
58
  ]),
34
59
  _: 1
35
60
  /* STABLE */
@@ -65,7 +90,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
65
90
  createVNode($setup["ElRadioGroup"], {
66
91
  modelValue: $setup.selectedHead,
67
92
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.selectedHead = $event),
68
- onChange: $setup.headChange
93
+ onChange: $setup.headChange,
94
+ class: "target-head"
69
95
  }, {
70
96
  default: withCtx(() => [
71
97
  (openBlock(true), createElementBlock(
@@ -183,8 +209,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
183
209
  /* TEXT */
184
210
  ),
185
211
  createElementVNode("span", {
212
+ class: "flex-alignCnter",
186
213
  onClick: ($event) => $setup.deleteItem(item.key)
187
- }, "\u274C", 8, _hoisted_5)
214
+ }, [..._hoisted_7], 8, _hoisted_5)
188
215
  ]);
189
216
  }),
190
217
  128
@@ -73,10 +73,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
73
73
  } else {
74
74
  selectedTree.value[headKey] = [val];
75
75
  }
76
- const filterHead = TARGET_HEAD_KEY.filter((item) => item.key === headKey);
76
+ const filterHead = targetHead.value.filter((item) => item.key === headKey);
77
77
  const filterFoot = TARGET_END_KEY.filter((item) => item.key === val);
78
78
  const headName = filterHead.length > 0 ? filterHead[0].name : "";
79
79
  const footName = filterFoot.length > 0 ? filterFoot[0].name : "";
80
+ console.log(headKey);
80
81
  itemObj = {
81
82
  name: headName + footName,
82
83
  key: `${headKey}_${val}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.3.8",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",
@@ -1 +1 @@
1
- .dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
1
+ .dialog{padding:24px!important;width:860px!important}.target-head{display:grid;grid:auto/repeat(5,1fr)}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}
@@ -1 +1 @@
1
- .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
1
+ .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.target-head{display:grid;grid:auto/repeat(5,1fr)}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}.flex-alignCnter{align-items:center;cursor:pointer;display:flex}
@@ -2,6 +2,10 @@
2
2
  width: 860px !important;
3
3
  padding: 24px !important;
4
4
  }
5
+ .target-head {
6
+ display: grid;
7
+ grid: auto / repeat(5, 1fr);
8
+ }
5
9
  .factor-content {
6
10
  width: 100%;
7
11
  height: 380px;
@@ -18,3 +22,9 @@
18
22
  display: flex;
19
23
  justify-content: space-between;
20
24
  }
25
+
26
+ .flex-alignCnter {
27
+ display: flex;
28
+ align-items: center;
29
+ cursor: pointer;
30
+ }