cnhis-design-vue 3.1.40-beta.1 → 3.1.40-beta.2

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 (37) hide show
  1. package/README.md +123 -123
  2. package/es/components/scale-view/index.d.ts +4 -2
  3. package/es/components/scale-view/src/ScaleView.vue.d.ts +4 -2
  4. package/es/components/scale-view/src/ScaleView.vue.js +3 -2
  5. package/es/env.d.ts +24 -24
  6. package/es/shared/assets/img/failure.js +1 -1
  7. package/es/shared/assets/img/failure.png.js +1 -1
  8. package/es/shared/assets/img/icon-asc.js +1 -1
  9. package/es/shared/assets/img/icon-desc.js +1 -1
  10. package/es/shared/assets/img/no-permission.js +1 -1
  11. package/es/shared/assets/img/no-permission.png.js +1 -1
  12. package/es/shared/assets/img/nodata.js +1 -1
  13. package/es/shared/assets/img/nodata.png.js +1 -1
  14. package/es/shared/assets/img/notfound.js +1 -1
  15. package/es/shared/assets/img/notfound.png.js +1 -1
  16. package/es/shared/assets/img/qr.js +1 -1
  17. package/es/shared/assets/img/qr.png.js +1 -1
  18. package/es/shared/assets/img/success.js +1 -1
  19. package/es/shared/assets/img/success.png.js +1 -1
  20. package/es/shared/assets/img/video.js +1 -1
  21. package/es/shared/assets/img/video.png.js +1 -1
  22. package/es/shared/assets/img/video_default_cover.js +1 -1
  23. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  24. package/es/shared/assets/img/video_hover.js +1 -1
  25. package/es/shared/assets/img/video_play_hover.js +1 -1
  26. package/es/shared/assets/img/xb_big.js +1 -1
  27. package/es/shared/assets/img/xb_big.png.js +1 -1
  28. package/es/shared/assets/img/xb_small.js +1 -1
  29. package/es/shared/assets/img/xb_small.png.js +1 -1
  30. package/package.json +2 -2
  31. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  32. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  33. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  34. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  35. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  36. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  37. package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md CHANGED
@@ -1,123 +1,123 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式 1(按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式 2(全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3. 注意
65
-
66
- 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
-
68
- ```typescript
69
- // main.ts
70
- import { createApp } from 'vue';
71
- import App from './App.vue';
72
-
73
- import { CGrid } from 'cnhis-design-vue';
74
- // 或者
75
- import { CBigTable } from 'cnhis-design-vue';
76
-
77
- const app = createApp(App);
78
- app.use(CGrid);
79
- // 或者
80
- app.use(CBigTable);
81
- app.mount('#app');
82
- ```
83
-
84
- ## 4.FAQ
85
-
86
- ### 4.1 项目打包后样式丢失
87
-
88
- > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
-
90
- ```typescript
91
- // vite.config.ts
92
- import { defineConfig } from 'vite';
93
-
94
- export default defineConfig({
95
- rollupOptions: {
96
- // ..otherOptions
97
- output: {
98
- dir: './dist',
99
- manualChunks(id: string) {
100
- if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
- return 'vendor';
102
- }
103
- }
104
- }
105
- }
106
- });
107
- ```
108
-
109
- ### 4.2 找不到文件
110
-
111
- > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
-
113
- ```javascript
114
- // vite.config.ts
115
- const config = {
116
- // ...otherOptions
117
- resolve: {
118
- // ...otherOptions
119
- // 如果没有配置, 则不用考虑
120
- extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
- }
122
- };
123
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式 1(按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式 2(全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3. 注意
65
+
66
+ 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
+
68
+ ```typescript
69
+ // main.ts
70
+ import { createApp } from 'vue';
71
+ import App from './App.vue';
72
+
73
+ import { CGrid } from 'cnhis-design-vue';
74
+ // 或者
75
+ import { CBigTable } from 'cnhis-design-vue';
76
+
77
+ const app = createApp(App);
78
+ app.use(CGrid);
79
+ // 或者
80
+ app.use(CBigTable);
81
+ app.mount('#app');
82
+ ```
83
+
84
+ ## 4.FAQ
85
+
86
+ ### 4.1 项目打包后样式丢失
87
+
88
+ > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
+
90
+ ```typescript
91
+ // vite.config.ts
92
+ import { defineConfig } from 'vite';
93
+
94
+ export default defineConfig({
95
+ rollupOptions: {
96
+ // ..otherOptions
97
+ output: {
98
+ dir: './dist',
99
+ manualChunks(id: string) {
100
+ if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
+ return 'vendor';
102
+ }
103
+ }
104
+ }
105
+ }
106
+ });
107
+ ```
108
+
109
+ ### 4.2 找不到文件
110
+
111
+ > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
+
113
+ ```javascript
114
+ // vite.config.ts
115
+ const config = {
116
+ // ...otherOptions
117
+ resolve: {
118
+ // ...otherOptions
119
+ // 如果没有配置, 则不用考虑
120
+ extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
+ }
122
+ };
123
+ ```
@@ -261,9 +261,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
261
261
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
262
262
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
263
263
  onOnSubmit?: ((...args: any[]) => any) | undefined;
264
+ onStartWriteScale?: ((...args: any[]) => any) | undefined;
264
265
  }>>;
265
266
  state: any;
266
- emit: (event: "onCloseSetting" | "submitNoRequest" | "onSubmit", ...args: any[]) => void;
267
+ emit: (event: "onCloseSetting" | "submitNoRequest" | "onSubmit" | "startWriteScale", ...args: any[]) => void;
267
268
  dialog: import("naive-ui").DialogApi;
268
269
  message: import("naive-ui").MessageApi;
269
270
  countdownDom: any;
@@ -1079,7 +1080,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
1079
1080
  readonly showLabel: boolean | undefined;
1080
1081
  readonly ignorePathChange: boolean;
1081
1082
  }>;
1082
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onCloseSetting" | "submitNoRequest" | "onSubmit")[], "onSubmit" | "onCloseSetting" | "submitNoRequest", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1083
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onCloseSetting" | "submitNoRequest" | "onSubmit" | "startWriteScale")[], "onSubmit" | "onCloseSetting" | "submitNoRequest" | "startWriteScale", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1083
1084
  ids: {
1084
1085
  type: ObjectConstructor;
1085
1086
  default: () => {
@@ -1196,6 +1197,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
1196
1197
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
1197
1198
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
1198
1199
  onOnSubmit?: ((...args: any[]) => any) | undefined;
1200
+ onStartWriteScale?: ((...args: any[]) => any) | undefined;
1199
1201
  }, {
1200
1202
  params: Record<string, any>;
1201
1203
  type: string;
@@ -260,9 +260,10 @@ declare const _default: import("vue").DefineComponent<{
260
260
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
261
261
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
262
262
  onOnSubmit?: ((...args: any[]) => any) | undefined;
263
+ onStartWriteScale?: ((...args: any[]) => any) | undefined;
263
264
  }>>;
264
265
  state: any;
265
- emit: (event: "onCloseSetting" | "submitNoRequest" | "onSubmit", ...args: any[]) => void;
266
+ emit: (event: "onCloseSetting" | "submitNoRequest" | "onSubmit" | "startWriteScale", ...args: any[]) => void;
266
267
  dialog: import("naive-ui").DialogApi;
267
268
  message: import("naive-ui").MessageApi;
268
269
  countdownDom: any;
@@ -1078,7 +1079,7 @@ declare const _default: import("vue").DefineComponent<{
1078
1079
  readonly showLabel: boolean | undefined;
1079
1080
  readonly ignorePathChange: boolean;
1080
1081
  }>;
1081
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onCloseSetting" | "submitNoRequest" | "onSubmit")[], "onSubmit" | "onCloseSetting" | "submitNoRequest", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1082
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onCloseSetting" | "submitNoRequest" | "onSubmit" | "startWriteScale")[], "onSubmit" | "onCloseSetting" | "submitNoRequest" | "startWriteScale", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1082
1083
  ids: {
1083
1084
  type: ObjectConstructor;
1084
1085
  default: () => {
@@ -1195,6 +1196,7 @@ declare const _default: import("vue").DefineComponent<{
1195
1196
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
1196
1197
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
1197
1198
  onOnSubmit?: ((...args: any[]) => any) | undefined;
1199
+ onStartWriteScale?: ((...args: any[]) => any) | undefined;
1198
1200
  }, {
1199
1201
  params: Record<string, any>;
1200
1202
  type: string;
@@ -33,7 +33,7 @@ const _hoisted_5 = {
33
33
  const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  __name: "ScaleView",
35
35
  props: ScaleViewProps,
36
- emits: ["onCloseSetting", "submitNoRequest", "onSubmit"],
36
+ emits: ["onCloseSetting", "submitNoRequest", "onSubmit", "startWriteScale"],
37
37
  setup(__props, { expose, emit }) {
38
38
  const props = __props;
39
39
  const { ScaleViewState } = getScaleViewState();
@@ -117,6 +117,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
117
117
  const writeGuage = (showCountdown) => {
118
118
  state.showEvaluateSettingWrap = false;
119
119
  state.showEvaluateCountdown = !!showCountdown;
120
+ emit("startWriteScale");
120
121
  };
121
122
  const closeEvaluateCountdown = () => {
122
123
  console.log("----closeEvaluateCountdown");
@@ -314,7 +315,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
314
315
  return openBlock(), createElementBlock("div", {
315
316
  class: normalizeClass(["c-scale", { "c-scale-nobtn": unref(showSaveBtn) }])
316
317
  }, [
317
- createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '),
318
+ createCommentVNode(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\r\n </template> '),
318
319
  !state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
319
320
  unref(noDataState).noData ? (openBlock(), createBlock(NoData, {
320
321
  key: 0,
package/es/env.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';