cnhis-design-vue 3.1.24-beta.2 → 3.1.24-beta.3
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 +123 -123
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -16
- package/es/components/big-table/src/components/edit-form/edit-input.js +3 -1
- package/es/components/form-render/src/components/renderer/index.d.ts +3 -20
- package/es/components/form-render/src/components/renderer/index.js +49 -20
- package/es/components/form-render/src/components/renderer/levelSearchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/search.js +1 -19
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -19
- package/es/components/form-render/src/components/renderer/select.js +1 -19
- package/es/components/form-render/src/hooks/useFormContext.js +2 -2
- package/es/components/iho-table/index.js +2 -2
- package/es/components/iho-table/src/plugins/index.d.ts +3 -5
- package/es/components/iho-table/src/plugins/index.js +39 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.js +4 -9
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +4 -1
- package/es/components/search-cascader/index.d.ts +2 -2
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +0 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +0 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +0 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +0 -11
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +0 -6
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +0 -6
- 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
|
+
```
|
|
@@ -912,22 +912,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
912
912
|
NIcon: any;
|
|
913
913
|
CGrid: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
914
914
|
checkMethod: ({ row }: {
|
|
915
|
-
row: any;
|
|
916
|
-
* 针对 bigTable 的设置列
|
|
917
|
-
* type: 列的类型
|
|
918
|
-
* field: 列字段名(注:属性层级越深,渲染性能将直线下降)
|
|
919
|
-
* title: 列标题(支持开启国际化)
|
|
920
|
-
* width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
|
|
921
|
-
* minWidth: 最小列宽度;会自动将剩余空间按比例分配
|
|
922
|
-
* resizable: 列是否允许拖动列宽调整大小
|
|
923
|
-
* visible: 列是否显示
|
|
924
|
-
* fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
|
|
925
|
-
* align: 列对齐方式
|
|
926
|
-
* headerAlign: 表头列的对齐方式
|
|
927
|
-
* footerAlign: 表尾列的对齐方式
|
|
928
|
-
* formatter: 格式化显示内容 Function({cellValue, row, column})
|
|
929
|
-
* sortable: 是否允许列排序
|
|
930
|
-
*/
|
|
915
|
+
row: any;
|
|
931
916
|
}) => boolean;
|
|
932
917
|
visibleMethod: ({ row }: any) => boolean;
|
|
933
918
|
getRowStyle: ({ row }: any) => string | null;
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export * from './textarea';
|
|
5
|
-
export * from './inputNumber';
|
|
6
|
-
export * from './lineBar';
|
|
7
|
-
export * from './inputGroup';
|
|
8
|
-
export * from './date';
|
|
9
|
-
export * from './levelSearchCascade';
|
|
10
|
-
export * from './jsonCombination';
|
|
11
|
-
export * from './combination';
|
|
12
|
-
export * from './checkbox';
|
|
13
|
-
export * from './switch';
|
|
14
|
-
export * from './radio';
|
|
15
|
-
export * from './labelSelect';
|
|
16
|
-
export * from './slider';
|
|
17
|
-
export * from './complex';
|
|
18
|
-
export * from './simpleComponent';
|
|
19
|
-
export * from './search';
|
|
20
|
-
export * from './searchCascade';
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
declare const exportModules: Record<string, Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
3
|
+
export default exportModules;
|
|
@@ -1,20 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import * as checkbox from './checkbox.js';
|
|
2
|
+
import * as combination from './combination.js';
|
|
3
|
+
import * as complex from './complex.js';
|
|
4
|
+
import * as date from './date.js';
|
|
5
|
+
import * as formItem from './formItem.js';
|
|
6
|
+
import * as input from './input.js';
|
|
7
|
+
import * as inputGroup from './inputGroup.js';
|
|
8
|
+
import * as inputNumber from './inputNumber.js';
|
|
9
|
+
import * as index from './jsonCombination/index.js';
|
|
10
|
+
import * as labelSelect from './labelSelect.js';
|
|
11
|
+
import * as levelSearchCascade from './levelSearchCascade.js';
|
|
12
|
+
import * as index$1 from './lineBar/index.js';
|
|
13
|
+
import * as radio from './radio.js';
|
|
14
|
+
import * as search from './search.js';
|
|
15
|
+
import * as searchCascade from './searchCascade.js';
|
|
16
|
+
import * as select from './select.js';
|
|
17
|
+
import * as simpleComponent from './simpleComponent.js';
|
|
18
|
+
import * as slider from './slider.js';
|
|
19
|
+
import * as _switch from './switch.js';
|
|
20
|
+
import * as textarea from './textarea.js';
|
|
21
|
+
|
|
22
|
+
const modules = Object.assign({
|
|
23
|
+
"./checkbox.tsx": checkbox,
|
|
24
|
+
"./combination.tsx": combination,
|
|
25
|
+
"./complex.tsx": complex,
|
|
26
|
+
"./date.tsx": date,
|
|
27
|
+
"./formItem.tsx": formItem,
|
|
28
|
+
"./input.tsx": input,
|
|
29
|
+
"./inputGroup.ts": inputGroup,
|
|
30
|
+
"./inputNumber.tsx": inputNumber,
|
|
31
|
+
"./jsonCombination/index.tsx": index,
|
|
32
|
+
"./labelSelect.tsx": labelSelect,
|
|
33
|
+
"./levelSearchCascade.tsx": levelSearchCascade,
|
|
34
|
+
"./lineBar/index.ts": index$1,
|
|
35
|
+
"./radio.tsx": radio,
|
|
36
|
+
"./search.tsx": search,
|
|
37
|
+
"./searchCascade.tsx": searchCascade,
|
|
38
|
+
"./select.tsx": select,
|
|
39
|
+
"./simpleComponent.tsx": simpleComponent,
|
|
40
|
+
"./slider.tsx": slider,
|
|
41
|
+
"./switch.tsx": _switch,
|
|
42
|
+
"./textarea.tsx": textarea
|
|
43
|
+
});
|
|
44
|
+
const exportModules = Object.values(modules).reduce((result, m) => {
|
|
45
|
+
Object.assign(result, m);
|
|
46
|
+
return result;
|
|
47
|
+
}, {});
|
|
48
|
+
|
|
49
|
+
export { exportModules as default };
|
|
@@ -7,8 +7,8 @@ import { formRenderLog } from '../../utils/index.js';
|
|
|
7
7
|
import { connect, mapProps } from '@formily/vue';
|
|
8
8
|
import SearchCascader from '../../../../search-cascader/index.js';
|
|
9
9
|
import script$1 from '../../../../../shared/components/no-data/NoData.js';
|
|
10
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
11
10
|
import { visitedDecorator, assignUpdateValue } from '../../utils/schema.js';
|
|
11
|
+
import { useFormField } from '../../hooks/useFormField.js';
|
|
12
12
|
import { useFormRequest } from '../../hooks/useFormRequest.js';
|
|
13
13
|
|
|
14
14
|
const script = defineComponent({
|
|
@@ -22,25 +22,7 @@ import '../../hooks/useFormValidator.js';
|
|
|
22
22
|
import '@formily/core';
|
|
23
23
|
import '@vue/shared';
|
|
24
24
|
import { connect, mapProps } from '@formily/vue';
|
|
25
|
-
import './
|
|
26
|
-
import './select.js';
|
|
27
|
-
import './formItem.js';
|
|
28
|
-
import './textarea.js';
|
|
29
|
-
import './inputNumber.js';
|
|
30
|
-
import './lineBar/index.js';
|
|
31
|
-
import './inputGroup.js';
|
|
32
|
-
import './date.js';
|
|
33
|
-
import './levelSearchCascade.js';
|
|
34
|
-
import './jsonCombination/index.js';
|
|
35
|
-
import './combination.js';
|
|
36
|
-
import './checkbox.js';
|
|
37
|
-
import './switch.js';
|
|
38
|
-
import './radio.js';
|
|
39
|
-
import './labelSelect.js';
|
|
40
|
-
import './slider.js';
|
|
41
|
-
import './complex.js';
|
|
42
|
-
import './simpleComponent.js';
|
|
43
|
-
import './searchCascade.js';
|
|
25
|
+
import './index.js';
|
|
44
26
|
import { NSelect } from 'naive-ui';
|
|
45
27
|
import { visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
46
28
|
|
|
@@ -21,25 +21,7 @@ import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
|
21
21
|
import '../../hooks/useFormValidator.js';
|
|
22
22
|
import '@vue/shared';
|
|
23
23
|
import { connect, mapProps } from '@formily/vue';
|
|
24
|
-
import './
|
|
25
|
-
import './select.js';
|
|
26
|
-
import './formItem.js';
|
|
27
|
-
import './textarea.js';
|
|
28
|
-
import './inputNumber.js';
|
|
29
|
-
import './lineBar/index.js';
|
|
30
|
-
import './inputGroup.js';
|
|
31
|
-
import './date.js';
|
|
32
|
-
import './levelSearchCascade.js';
|
|
33
|
-
import './jsonCombination/index.js';
|
|
34
|
-
import './combination.js';
|
|
35
|
-
import './checkbox.js';
|
|
36
|
-
import './switch.js';
|
|
37
|
-
import './radio.js';
|
|
38
|
-
import './labelSelect.js';
|
|
39
|
-
import './slider.js';
|
|
40
|
-
import './complex.js';
|
|
41
|
-
import './simpleComponent.js';
|
|
42
|
-
import './search.js';
|
|
24
|
+
import './index.js';
|
|
43
25
|
import { NCascader } from 'naive-ui';
|
|
44
26
|
import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
|
|
45
27
|
|
|
@@ -21,25 +21,7 @@ import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
|
21
21
|
import '../../hooks/useFormValidator.js';
|
|
22
22
|
import '@vue/shared';
|
|
23
23
|
import { connect, mapProps } from '@formily/vue';
|
|
24
|
-
import './
|
|
25
|
-
import './formItem.js';
|
|
26
|
-
import './textarea.js';
|
|
27
|
-
import './inputNumber.js';
|
|
28
|
-
import './lineBar/index.js';
|
|
29
|
-
import './inputGroup.js';
|
|
30
|
-
import './date.js';
|
|
31
|
-
import './levelSearchCascade.js';
|
|
32
|
-
import './jsonCombination/index.js';
|
|
33
|
-
import './combination.js';
|
|
34
|
-
import './checkbox.js';
|
|
35
|
-
import './switch.js';
|
|
36
|
-
import './radio.js';
|
|
37
|
-
import './labelSelect.js';
|
|
38
|
-
import './slider.js';
|
|
39
|
-
import './complex.js';
|
|
40
|
-
import './simpleComponent.js';
|
|
41
|
-
import './search.js';
|
|
42
|
-
import './searchCascade.js';
|
|
24
|
+
import './index.js';
|
|
43
25
|
import { NSelect } from 'naive-ui';
|
|
44
26
|
import { traverseDependKey, visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
45
27
|
|
|
@@ -4,7 +4,7 @@ import { cloneDeep } from 'lodash-es';
|
|
|
4
4
|
import { provide, computed, readonly } from 'vue';
|
|
5
5
|
import { createSchemaField } from '@formily/vue';
|
|
6
6
|
import '../../index.js';
|
|
7
|
-
import
|
|
7
|
+
import exportModules from '../components/renderer/index.js';
|
|
8
8
|
import { useFormRenderLifeCycle } from './useFormRenderLifeCycle.js';
|
|
9
9
|
import { usePresetScope } from './usePresetScope.js';
|
|
10
10
|
import { injectOrProvide, presetRequestHandler } from '../utils/index.js';
|
|
@@ -30,7 +30,7 @@ function useFormContext(props, formModel) {
|
|
|
30
30
|
const SchemaField = injectOrProvide(
|
|
31
31
|
InjectionSchemaField,
|
|
32
32
|
() => createSchemaField({
|
|
33
|
-
components: { ...
|
|
33
|
+
components: { ...exportModules, ...props.components },
|
|
34
34
|
scope: Object.assign({}, usePresetScope(), props.scope)
|
|
35
35
|
}).SchemaField
|
|
36
36
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index.js';
|
|
3
3
|
import script from './src/IhoTable.js';
|
|
4
|
-
import
|
|
4
|
+
import exportModules from './src/plugins/index.js';
|
|
5
5
|
import 'vue';
|
|
6
6
|
import 'lodash-es';
|
|
7
7
|
import './src/constants/index.js';
|
|
@@ -22,7 +22,7 @@ export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin.js
|
|
|
22
22
|
const { use } = useTablePlugin();
|
|
23
23
|
const useIhoTablePresetPlugins = (instance) => {
|
|
24
24
|
use(
|
|
25
|
-
Object.values(
|
|
25
|
+
Object.values(exportModules).map((plugin) => plugin()),
|
|
26
26
|
instance
|
|
27
27
|
);
|
|
28
28
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export * from './rowGroupSettingPlugin';
|
|
5
|
-
export * from './virtualTreePlugin';
|
|
1
|
+
import { TablePlugin } from '../../../../../es/components/iho-table';
|
|
2
|
+
declare const exportModules: Record<string, () => TablePlugin>;
|
|
3
|
+
export default exportModules;
|
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import * as index from './defaultConfigPlugin/index.js';
|
|
2
|
+
import * as index$1 from './lowCodeFieldAdaptorPlugin/index.js';
|
|
3
|
+
import * as index$2 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
|
|
4
|
+
import * as inputRendererPlugin from './rendererPlugins/editableWidgets/inputRendererPlugin.js';
|
|
5
|
+
import * as index$3 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
|
|
6
|
+
import * as index$4 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
7
|
+
import * as index$5 from './rendererPlugins/editableWidgets/timeRendererPlugin/index.js';
|
|
8
|
+
import * as checkRendererPlugin from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
9
|
+
import * as colorRendererPlugin from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
10
|
+
import * as defaultRendererPlugin from './rendererPlugins/widgets/defaultRendererPlugin.js';
|
|
11
|
+
import * as labelRendererPlugin from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
12
|
+
import * as pictureRendererPlugin from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
13
|
+
import * as seqRendererPlugin from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
14
|
+
import * as index$6 from './rowGroupSettingPlugin/index.js';
|
|
15
|
+
import * as index$7 from './virtualTreePlugin/index.js';
|
|
16
|
+
|
|
17
|
+
const plugins = Object.assign({
|
|
18
|
+
"./defaultConfigPlugin/index.ts": index,
|
|
19
|
+
"./lowCodeFieldAdaptorPlugin/index.ts": index$1,
|
|
20
|
+
"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$2,
|
|
21
|
+
"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx": inputRendererPlugin,
|
|
22
|
+
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$3,
|
|
23
|
+
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$4,
|
|
24
|
+
"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx": index$5,
|
|
25
|
+
"./rendererPlugins/widgets/checkRendererPlugin.tsx": checkRendererPlugin,
|
|
26
|
+
"./rendererPlugins/widgets/colorRendererPlugin.tsx": colorRendererPlugin,
|
|
27
|
+
"./rendererPlugins/widgets/defaultRendererPlugin.tsx": defaultRendererPlugin,
|
|
28
|
+
"./rendererPlugins/widgets/labelRendererPlugin.tsx": labelRendererPlugin,
|
|
29
|
+
"./rendererPlugins/widgets/pictureRendererPlugin.tsx": pictureRendererPlugin,
|
|
30
|
+
"./rendererPlugins/widgets/seqRendererPlugin.tsx": seqRendererPlugin,
|
|
31
|
+
"./rowGroupSettingPlugin/index.ts": index$6,
|
|
32
|
+
"./virtualTreePlugin/index.ts": index$7
|
|
33
|
+
});
|
|
34
|
+
const exportModules = Object.values(plugins).reduce((result, m) => {
|
|
35
|
+
Object.assign(result, m);
|
|
36
|
+
return result;
|
|
37
|
+
}, {});
|
|
38
|
+
|
|
39
|
+
export { exportModules as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, watch, computed,
|
|
1
|
+
import { defineComponent, inject, ref, watch, computed, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString, renderSlot, createVNode } from 'vue';
|
|
2
2
|
import { cloneDeep, isObject, isArray } from 'lodash-es';
|
|
3
3
|
import { NPopover, NInput } from 'naive-ui';
|
|
4
4
|
import { InjectionIhoTableEmits, InjectionIhoTableHandler } from '../../../../constants/index.js';
|
|
@@ -8,7 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
__name: "editSeparate",
|
|
9
9
|
props: {
|
|
10
10
|
value: {},
|
|
11
|
-
height: { type: Number },
|
|
11
|
+
height: { type: Number, default: 48 },
|
|
12
12
|
column: { type: Object, required: true },
|
|
13
13
|
row: { type: Object, required: true },
|
|
14
14
|
displayContent: { type: String, default: "" },
|
|
@@ -55,16 +55,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
}
|
|
56
56
|
const style = computed(() => ({
|
|
57
57
|
border: "1px solid #f5f5f5",
|
|
58
|
-
height: props.height + "px",
|
|
58
|
+
height: props.height - 16 + "px",
|
|
59
59
|
padding: "4px 0 4px 0",
|
|
60
60
|
background: "white",
|
|
61
|
+
wordBreak: "keep-all",
|
|
61
62
|
boxSizing: "border-box",
|
|
62
63
|
"border-radius": "4px"
|
|
63
64
|
}));
|
|
64
|
-
const elementRef = ref();
|
|
65
|
-
onMounted(() => {
|
|
66
|
-
console.log(elementRef.value);
|
|
67
|
-
});
|
|
68
65
|
onDeactivated(onClose);
|
|
69
66
|
return (_ctx, _cache) => {
|
|
70
67
|
return openBlock(), createBlock(unref(NPopover), {
|
|
@@ -77,8 +74,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
74
|
}, {
|
|
78
75
|
trigger: withCtx(() => [
|
|
79
76
|
createElementVNode("div", {
|
|
80
|
-
ref_key: "elementRef",
|
|
81
|
-
ref: elementRef,
|
|
82
77
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => show.value = !show.value, ["stop"])),
|
|
83
78
|
style: normalizeStyle(unref(style))
|
|
84
79
|
}, toDisplayString(__props.displayContent || " "), 5)
|