cnhis-design-vue 3.1.11-beta.7 → 3.1.11-beta.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.
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- # Vue 3 + Typescript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
12
-
13
- ## 使用
14
- ```JavaScript
15
- import { createApp } from "vue";
16
- import App from "./App.vue";
17
- import cui from "cnhis-design-vue";
18
- import "cnhis-design-vue/es/index.css";
19
-
20
- const app = createApp(App);
21
- app.use(cui);
22
- app.mount("#app");
1
+ # Vue 3 + Typescript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ - [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8
+
9
+ ## Type Support For `.vue` Imports in TS
10
+
11
+ Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
12
+
13
+ ## 使用
14
+ ```JavaScript
15
+ import { createApp } from "vue";
16
+ import App from "./App.vue";
17
+ import cui from "cnhis-design-vue";
18
+ import "cnhis-design-vue/es/index.css";
19
+
20
+ const app = createApp(App);
21
+ app.use(cui);
22
+ app.mount("#app");
23
23
  ```
@@ -17,6 +17,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
17
17
  type: ObjectConstructor;
18
18
  default: () => {};
19
19
  };
20
+ menuConfig: {
21
+ type: ObjectConstructor;
22
+ default: () => {};
23
+ };
20
24
  columnConfig: {
21
25
  type: ObjectConstructor;
22
26
  default: () => {};
@@ -2582,6 +2586,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2582
2586
  type: ObjectConstructor;
2583
2587
  default: () => {};
2584
2588
  };
2589
+ menuConfig: {
2590
+ type: ObjectConstructor;
2591
+ default: () => {};
2592
+ };
2585
2593
  columnConfig: {
2586
2594
  type: ObjectConstructor;
2587
2595
  default: () => {};
@@ -3007,6 +3015,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
3007
3015
  handleClickAddBtnByInline: () => Promise<false | undefined>;
3008
3016
  handleClickSaveBtnByInline: () => false | undefined;
3009
3017
  removeInlineAddRow: () => false | undefined;
3018
+ handleMenuClickEvent: (payload: any) => void;
3010
3019
  setCurrentRow: (row: any) => void;
3011
3020
  loadColumnAndData: (data: any, config: any) => void;
3012
3021
  clearChecked: () => void;
@@ -4063,6 +4072,10 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
4063
4072
  type: ObjectConstructor;
4064
4073
  default: () => {};
4065
4074
  };
4075
+ menuConfig: {
4076
+ type: ObjectConstructor;
4077
+ default: () => {};
4078
+ };
4066
4079
  columnConfig: {
4067
4080
  type: ObjectConstructor;
4068
4081
  default: () => {};
@@ -4243,6 +4256,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
4243
4256
  data: unknown[];
4244
4257
  showFooter: boolean;
4245
4258
  columnConfig: Record<string, any>;
4259
+ menuConfig: Record<string, any>;
4246
4260
  maxCheckSize: number;
4247
4261
  sumData: Record<string, any>;
4248
4262
  avgData: Record<string, any>;
@@ -16,6 +16,10 @@ declare const _default: import("vue").DefineComponent<{
16
16
  type: ObjectConstructor;
17
17
  default: () => {};
18
18
  };
19
+ menuConfig: {
20
+ type: ObjectConstructor;
21
+ default: () => {};
22
+ };
19
23
  columnConfig: {
20
24
  type: ObjectConstructor;
21
25
  default: () => {};
@@ -2584,6 +2588,10 @@ declare const _default: import("vue").DefineComponent<{
2584
2588
  type: ObjectConstructor;
2585
2589
  default: () => {};
2586
2590
  };
2591
+ menuConfig: {
2592
+ type: ObjectConstructor;
2593
+ default: () => {};
2594
+ };
2587
2595
  columnConfig: {
2588
2596
  type: ObjectConstructor;
2589
2597
  default: () => {};
@@ -3009,6 +3017,7 @@ declare const _default: import("vue").DefineComponent<{
3009
3017
  handleClickAddBtnByInline: () => Promise<false | undefined>;
3010
3018
  handleClickSaveBtnByInline: () => false | undefined;
3011
3019
  removeInlineAddRow: () => false | undefined;
3020
+ handleMenuClickEvent: (payload: any) => void;
3012
3021
  setCurrentRow: (row: any) => void;
3013
3022
  loadColumnAndData: (data: any, config: any) => void;
3014
3023
  clearChecked: () => void;
@@ -4080,6 +4089,10 @@ declare const _default: import("vue").DefineComponent<{
4080
4089
  type: ObjectConstructor;
4081
4090
  default: () => {};
4082
4091
  };
4092
+ menuConfig: {
4093
+ type: ObjectConstructor;
4094
+ default: () => {};
4095
+ };
4083
4096
  columnConfig: {
4084
4097
  type: ObjectConstructor;
4085
4098
  default: () => {};
@@ -4260,6 +4273,7 @@ declare const _default: import("vue").DefineComponent<{
4260
4273
  data: unknown[];
4261
4274
  showFooter: boolean;
4262
4275
  columnConfig: Record<string, any>;
4276
+ menuConfig: Record<string, any>;
4263
4277
  maxCheckSize: number;
4264
4278
  sumData: Record<string, any>;
4265
4279
  avgData: Record<string, any>;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, isVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, mergeProps, withCtx, createBlock, toDisplayString, renderSlot, withDirectives, vShow } from 'vue';
1
+ import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, isVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, mergeProps, withCtx, renderSlot, createBlock, toDisplayString, withDirectives, vShow } from 'vue';
2
2
  import bigTableState from './bigTableState.js';
3
3
  import bigTableProps from './bigTableProps.js';
4
4
  import bigTableEmits from './bigTableEmits.js';
@@ -27,15 +27,12 @@ const _hoisted_1 = {
27
27
  class: "check-wrap"
28
28
  };
29
29
  const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u6709\u6570\u636E\u66F4\u65B0,", -1);
30
- const _hoisted_3 = {
31
- key: 0
32
- };
33
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("i", {
30
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("i", {
34
31
  class: "disabled-checked-tips"
35
32
  }, null, -1);
33
+ const _hoisted_4 = ["innerHTML"];
36
34
  const _hoisted_5 = ["innerHTML"];
37
- const _hoisted_6 = ["innerHTML"];
38
- const _hoisted_7 = {
35
+ const _hoisted_6 = {
39
36
  class: "refresh-row"
40
37
  };
41
38
  function _isSlot(s) {
@@ -2167,6 +2164,7 @@ var script = /* @__PURE__ */ defineComponent({
2167
2164
  }
2168
2165
  });
2169
2166
  });
2167
+ const handleMenuClickEvent = (payload) => emit("menuClick", payload);
2170
2168
  expose({
2171
2169
  formatData,
2172
2170
  xGrid
@@ -2253,6 +2251,7 @@ var script = /* @__PURE__ */ defineComponent({
2253
2251
  },
2254
2252
  "keyboard-config": _ctx.columnConfig.keyboardConfig || {},
2255
2253
  "edit-rules": _ctx.columnConfig.editRules || {},
2254
+ "menu-config": _ctx.menuConfig,
2256
2255
  onCellDblclick: rowdblclick,
2257
2256
  onCellClick: handlerClickRow,
2258
2257
  onCheckboxChange: selectionChange,
@@ -2261,13 +2260,16 @@ var script = /* @__PURE__ */ defineComponent({
2261
2260
  onSortChange: sortChange,
2262
2261
  onScroll: unref(scroll),
2263
2262
  onCellMouseenter: handleCellMouseenter,
2264
- onKeydown: unref(keyDown)
2263
+ onKeydown: unref(keyDown),
2264
+ onMenuClick: handleMenuClickEvent
2265
2265
  }), {
2266
- empty: withCtx(() => [state.isShowEmpty ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(script$1, {
2266
+ empty: withCtx(() => [state.isShowEmpty ? renderSlot(_ctx.$slots, "empty", {
2267
+ key: 0
2268
+ }, () => [createVNode(script$1, {
2267
2269
  "no-data-img": props.emptyItems.noDataImg,
2268
2270
  "no-data-tip": props.emptyItems.noDataTip,
2269
2271
  "show-img": !props.isNestTable
2270
- }, null, 8, ["no-data-img", "no-data-tip", "show-img"])])) : createCommentVNode("v-if", true)]),
2272
+ }, null, 8, ["no-data-img", "no-data-tip", "show-img"])]) : createCommentVNode("v-if", true)]),
2271
2273
  tooltip_checkbox: withCtx(({
2272
2274
  row,
2273
2275
  checked
@@ -2276,7 +2278,7 @@ var script = /* @__PURE__ */ defineComponent({
2276
2278
  trigger: "hover",
2277
2279
  placement: "right"
2278
2280
  }, {
2279
- trigger: withCtx(() => [_hoisted_4]),
2281
+ trigger: withCtx(() => [_hoisted_3]),
2280
2282
  default: withCtx(() => [createTextVNode(" " + toDisplayString(row.forbiddenBatchSelectReason), 1)]),
2281
2283
  _: 2
2282
2284
  }, 1024)) : (openBlock(), createBlock(unref(NCheckbox), {
@@ -2289,7 +2291,7 @@ var script = /* @__PURE__ */ defineComponent({
2289
2291
  }) => [createCommentVNode(" \u5206\u7EC4\u7EDF\u8BA1 "), _ctx.groupCountFields && _ctx.groupCountFields.length ? (openBlock(), createElementBlock("span", {
2290
2292
  key: 0,
2291
2293
  innerHTML: state.groupText
2292
- }, null, 8, _hoisted_5)) : (openBlock(), createElementBlock(Fragment, {
2294
+ }, null, 8, _hoisted_4)) : (openBlock(), createElementBlock(Fragment, {
2293
2295
  key: 1
2294
2296
  }, [createCommentVNode(" \u4E00\u822C\u7EDF\u8BA1 "), createVNode(unref(NTooltip), {
2295
2297
  trigger: "hover"
@@ -2297,7 +2299,7 @@ var script = /* @__PURE__ */ defineComponent({
2297
2299
  trigger: withCtx(() => [createTextVNode(toDisplayString(getFooterTitle(column)), 1)]),
2298
2300
  default: withCtx(() => [createElementVNode("div", {
2299
2301
  innerHTML: getFooterTooltipTitle(column)
2300
- }, null, 8, _hoisted_6)]),
2302
+ }, null, 8, _hoisted_5)]),
2301
2303
  _: 2
2302
2304
  }, 1024)], 2112))]),
2303
2305
  nest_table_content: withCtx(({
@@ -2314,13 +2316,13 @@ var script = /* @__PURE__ */ defineComponent({
2314
2316
  }
2315
2317
  })]),
2316
2318
  _: 3
2317
- }, 16, ["seq-config", "tree-config", "row-id", "cell-class-name", "row-config", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
2319
+ }, 16, ["seq-config", "tree-config", "row-id", "cell-class-name", "row-config", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "menu-config", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
2318
2320
  class: "refresh",
2319
2321
  onClick: hanldeClickRefresh
2320
2322
  }, [createVNode(unref(NIcon), {
2321
2323
  size: "14",
2322
2324
  component: unref(SyncOutline)
2323
- }, null, 8, ["component"]), createElementVNode("p", _hoisted_7, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6)], 2112);
2325
+ }, null, 8, ["component"]), createElementVNode("p", _hoisted_6, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6)], 2112);
2324
2326
  };
2325
2327
  }
2326
2328
  });
@@ -44,7 +44,8 @@ const bigTableEmits = [
44
44
  "formChange",
45
45
  "scroll",
46
46
  "keyboard",
47
- "checkboxChange"
47
+ "checkboxChange",
48
+ "menuClick"
48
49
  ];
49
50
 
50
51
  export { bigTableEmits as default };
@@ -16,6 +16,10 @@ declare const bigTableProps: {
16
16
  type: ObjectConstructor;
17
17
  default: () => {};
18
18
  };
19
+ menuConfig: {
20
+ type: ObjectConstructor;
21
+ default: () => {};
22
+ };
19
23
  columnConfig: {
20
24
  type: ObjectConstructor;
21
25
  default: () => {};
@@ -4,6 +4,7 @@ const bigTableProps = {
4
4
  showFooter: Boolean,
5
5
  sumData: { type: Object, default: () => ({}) },
6
6
  avgData: { type: Object, default: () => ({}) },
7
+ menuConfig: { type: Object, default: () => ({}) },
7
8
  columnConfig: {
8
9
  type: Object,
9
10
  default: () => {
@@ -101,11 +101,12 @@ declare const _default: import("vue").DefineComponent<{
101
101
  readonly default: 24;
102
102
  };
103
103
  readonly itemResponsive: BooleanConstructor;
104
- readonly collapsed: BooleanConstructor; /** line 类型 */
104
+ readonly collapsed: BooleanConstructor;
105
105
  readonly collapsedRows: {
106
106
  readonly type: NumberConstructor;
107
107
  readonly default: 1;
108
108
  };
109
+ /** line 类型 */
109
110
  readonly itemStyle: import("vue").PropType<string | import("vue").CSSProperties>;
110
111
  readonly xGap: {
111
112
  readonly type: import("vue").PropType<string | number>;
@@ -15326,7 +15327,7 @@ declare const _default: import("vue").DefineComponent<{
15326
15327
  dotColorActive: string;
15327
15328
  dotColorDisabled: string;
15328
15329
  buttonBorderColor: string;
15329
- buttonBorderColorActive: string; /** line 类型 */
15330
+ buttonBorderColorActive: string;
15330
15331
  buttonBorderColorHover: string;
15331
15332
  buttonColor: string;
15332
15333
  buttonColorActive: string;
@@ -817,7 +817,8 @@ var script = /* @__PURE__ */ defineComponent({
817
817
  } else {
818
818
  isSearchAllCheck();
819
819
  }
820
- emit("check", val);
820
+ const checkedKeys = [.../* @__PURE__ */ new Set([...state.checkedKeys.other, ...val])];
821
+ emit("check", checkedKeys);
821
822
  }, {
822
823
  immediate: true,
823
824
  deep: true
package/global.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as NaiveUI from 'naive-ui';
2
-
3
- declare module 'naive-ui' {
4
- // @ts-ignore
5
- export const NTree: any;
6
- }
7
-
8
- export {};
1
+ import * as NaiveUI from 'naive-ui';
2
+
3
+ declare module 'naive-ui' {
4
+ // @ts-ignore
5
+ export const NTree: any;
6
+ }
7
+
8
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.11-beta.7",
4
+ "version": "3.1.11-beta.8",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",