cnhis-design-vue 3.2.5-beta.14 → 3.2.5-beta.16
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 +87 -87
- package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/form-config/index.d.ts +5 -30
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -30
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -12
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -4
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +1 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -4
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-1.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-3.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-4.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-5.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-6.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-7.png.js +1 -1
- package/es/shared/assets/img/tooth/l-b-8.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-1.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-2.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-3.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-4.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-5.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-6.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-7.png.js +1 -1
- package/es/shared/assets/img/tooth/l-t-8.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-1.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-2.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-3.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-4.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-5.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-6.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-7.png.js +1 -1
- package/es/shared/assets/img/tooth/r-b-8.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-1.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-2.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-3.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-4.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-5.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-6.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-7.png.js +1 -1
- package/es/shared/assets/img/tooth/r-t-8.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- 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/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
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.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
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.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,watch as n,withDirectives as s,openBlock as i,createElementBlock as
|
|
1
|
+
import{defineComponent as e,ref as t,watch as n,withDirectives as s,openBlock as i,createElementBlock as r,normalizeStyle as o,unref as a,createElementVNode as c,toDisplayString as l,createVNode as u,createCommentVNode as d,withCtx as f,Fragment as p,renderList as m,createBlock as g,createTextVNode as v,vShow as h}from"vue";import{NIcon as y,NPopover as M,NTooltip as k,NUpload as x,NUploadTrigger as C,NButton as T}from"naive-ui";import{format as b}from"date-fns";import{useState as w}from"../hooks/useState.js";import{useSession as E}from"../hooks/useSession.js";import{images as I,alt as _}from"../utils/emoji.js";import{MESSAGE_TYPE as R}from"../constants/index.js";import{uploadFileApi as j}from"../api/index.js";import{CloseCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as S}from"lodash-es";import{simplifyMessage as F}from"../utils/index.js";const H={key:0,class:"reference-content-box"},K={class:"reference-content"},D=["innerHTML"],N={class:"tool-box"},J=c("span",null,[c("i",{class:"chat--iconfont chat--icon-face"})],-1),O={class:"emoji-box"},A=c("span",null,"默认表情",-1),G={class:"list-box"},U=["onClick"],X=["src"],z=[c("i",{class:"chat--iconfont chat--icon-good"},null,-1)],B=["onClick"],q=[c("i",{class:"chat--iconfont chat--icon-image"},null,-1)],P=["onClick"],Q=[c("i",{class:"chat--iconfont chat--icon-folder"},null,-1)],V={class:"btn-box"},W=c("span",{class:"tip"},"Enter 发送, Shift + Enter 换行",-1);var Y=e({__name:"ChatFooter",setup(e){const Y=t(),Z=t(""),{state:$,stompClient:ee}=w(),{setCurrentSessionItem:te}=E($),ne=t(!1);function se(e){["Enter"].includes(e.key)&&(function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),oe()))}function ie(){var e,t;Z.value=(null==(t=null==(e=Y.value)?void 0:e.innerText)?void 0:t.trim())||""}async function re(e,t){const{file:n,name:s}=e.file,i=new FormData;i.append("sender",$.userInfo.id),i.append("file",n);const r=await j(i);if(!r)return console.log("上传失败");ae({chatMessageType:t,msg:t===R.FILE?s:r,url:r})}function oe(){if(!(Z.value.length>2e3))return Z.value?void ae({msg:Z.value}):console.log("请输入内容");console.log("请控制在2000字以内")}async function ae(e){const{chatMessageType:t=R.TEXT,msg:n,url:s}=e,i={msg:n,chatMessageType:t};t===R.FILE&&(i.fileUrl=s),[R.TEXT,R.BLEND].includes(t)&&(Y.value.innerHTML="",Z.value=""),$.currentReferenceMsg.id&&(i.referenceContent=S($.currentReferenceMsg),$.currentReferenceMsg.id="");const r=b(new Date,"yyyy-MM-dd HH:mm:ss");$.currentMsg={content:i,sender:$.userInfo.id,id:"",sendTime:r,sending:!0,fail:!1},$.isAppendMsg=!0,te({lastMessageSendTime:r,lastMessage:i,sortTime:r});try{ee.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:i,receiver:$.currentSessionItem.receiver})),$.currentMsg={...$.currentMsg,fail:!1}}catch(e){$.currentMsg={...$.currentMsg,fail:!0}}finally{$.currentMsg={...$.currentMsg,sending:!1}}}return n((()=>$.currentReferenceMsg.id),(e=>{var t;e&&(null==(t=Y.value)||t.focus())})),(e,t)=>s((i(),r("section",{class:"chat-footer",style:o({cursor:a($).id?"default":"not-allowed"})},[a($).currentReferenceMsg.id?(i(),r("div",H,[c("div",K,[c("span",null,l(a($).currentReferenceMsg.senderName)+":",1),c("pre",{innerHTML:a(F)(a($).currentReferenceMsg.content)},null,8,D)]),u(a(y),{component:a(L),onClick:t[0]||(t[0]=()=>a($).currentReferenceMsg.id="")},null,8,["component"])])):d("v-if",!0),c("div",N,[u(a(M),{show:ne.value,"onUpdate:show":t[1]||(t[1]=e=>ne.value=e),placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show",delay:0},{trigger:f((()=>[J])),default:f((()=>[c("div",O,[d(' <span>最近使用</span>\r\n\t\t\t\t\t<div class="list-box">\r\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\r\n\t\t\t\t\t\t\t<i>\r\n\t\t\t\t\t\t\t\t<img :src="img" />\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</div> '),A,c("div",G,[(i(!0),r(p,null,m(a(I),((e,t)=>(i(),r(p,{key:t},[t>0?(i(),g(a(k),{key:0,"show-arrow":!1,trigger:"hover"},{trigger:f((()=>[c("i",{onClick:()=>function(e){ne.value=!1,ae({chatMessageType:R.EMOJI,msg:e})}(t)},[c("img",{src:e},null,8,X)],8,U)])),default:f((()=>[v(" "+l(a(_)[t-1]||"微笑"),1)])),_:2},1024)):d("v-if",!0)],64)))),128))])])])),_:1},8,["show"]),c("span",{onClick:t[2]||(t[2]=()=>ae({chatMessageType:a(R).EMOJI,msg:0}))},z),u(a(x),{abstract:"",multiple:"",accept:"image/*",onChange:t[3]||(t[3]=e=>re(e,a(R).IMAGE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},q,8,B)])),_:1})])),_:1}),u(a(x),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:t[4]||(t[4]=e=>re(e,a(R).FILE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},Q,8,P)])),_:1})])),_:1})]),s(c("div",{ref_key:"inputRef",ref:Y,class:"input-box",contenteditable:"",onKeydown:se,onInput:ie},null,544),[[h,a($).id]]),c("div",V,[W,u(a(T),{type:"primary",round:"",disabled:!Z.value,onClick:oe},{default:f((()=>[v("发送")])),_:1},8,["disabled"])])],4)),[[h,a($).id]])}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
1
|
+
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r({selfWindow:a.selfWindow})}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
699
699
|
handleInitConditions: () => Promise<void>;
|
|
700
700
|
validate: () => Promise<unknown>;
|
|
701
701
|
saveAdd: () => void;
|
|
702
|
+
/**
|
|
703
|
+
* 改变展示方式
|
|
704
|
+
*/
|
|
702
705
|
cancelSaveAdd: () => void;
|
|
703
706
|
checkActionList: () => boolean;
|
|
704
707
|
NSpin: any;
|
|
@@ -1449,9 +1452,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1449
1452
|
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
|
1450
1453
|
};
|
|
1451
1454
|
NSelect: any;
|
|
1452
|
-
/**
|
|
1453
|
-
* 改变展示方式
|
|
1454
|
-
*/
|
|
1455
1455
|
NPopover: any;
|
|
1456
1456
|
CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
1457
1457
|
updateUnchangedValue: {
|
|
@@ -127,12 +127,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
127
127
|
beforeMove: {
|
|
128
128
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
129
129
|
};
|
|
130
|
-
requiredReminderConfig: {
|
|
131
|
-
type: import("vue").PropType<Partial<Partial<{
|
|
132
|
-
enabled: boolean;
|
|
133
|
-
content: string;
|
|
134
|
-
}>>>;
|
|
135
|
-
};
|
|
136
130
|
}, {
|
|
137
131
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
138
132
|
maxHeight: {
|
|
@@ -260,12 +254,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
260
254
|
beforeMove: {
|
|
261
255
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
262
256
|
};
|
|
263
|
-
requiredReminderConfig: {
|
|
264
|
-
type: import("vue").PropType<Partial<Partial<{
|
|
265
|
-
enabled: boolean;
|
|
266
|
-
content: string;
|
|
267
|
-
}>>>;
|
|
268
|
-
};
|
|
269
257
|
}>> & {
|
|
270
258
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
271
259
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1815,10 +1803,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1815
1803
|
value?: any;
|
|
1816
1804
|
describe?: string | undefined;
|
|
1817
1805
|
} | undefined;
|
|
1818
|
-
|
|
1819
|
-
enabled?: boolean | undefined;
|
|
1820
|
-
content?: string | undefined;
|
|
1821
|
-
} | undefined;
|
|
1806
|
+
requiredReminderContent?: string | undefined;
|
|
1822
1807
|
date_format?: string | undefined;
|
|
1823
1808
|
step_length?: string | number | undefined;
|
|
1824
1809
|
urlConfig?: {
|
|
@@ -3474,6 +3459,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3474
3459
|
fold?: boolean | undefined;
|
|
3475
3460
|
required?: boolean | undefined;
|
|
3476
3461
|
requiredDisabled?: boolean | undefined;
|
|
3462
|
+
requiredReminderContent?: string | undefined;
|
|
3477
3463
|
editableDisabled?: boolean | undefined;
|
|
3478
3464
|
editable?: boolean | undefined;
|
|
3479
3465
|
notes?: string | undefined;
|
|
@@ -3489,6 +3475,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3489
3475
|
fold?: boolean | undefined;
|
|
3490
3476
|
required?: boolean | undefined;
|
|
3491
3477
|
requiredDisabled?: boolean | undefined;
|
|
3478
|
+
requiredReminderContent?: string | undefined;
|
|
3492
3479
|
editableDisabled?: boolean | undefined;
|
|
3493
3480
|
editable?: boolean | undefined;
|
|
3494
3481
|
notes?: string | undefined;
|
|
@@ -3586,10 +3573,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3586
3573
|
value?: any;
|
|
3587
3574
|
describe?: string | undefined;
|
|
3588
3575
|
} | undefined;
|
|
3589
|
-
|
|
3590
|
-
enabled?: boolean | undefined;
|
|
3591
|
-
content?: string | undefined;
|
|
3592
|
-
} | undefined;
|
|
3576
|
+
requiredReminderContent?: string | undefined;
|
|
3593
3577
|
date_format?: string | undefined;
|
|
3594
3578
|
step_length?: string | number | undefined;
|
|
3595
3579
|
urlConfig?: {
|
|
@@ -5330,10 +5314,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5330
5314
|
value?: any;
|
|
5331
5315
|
describe?: string | undefined;
|
|
5332
5316
|
} | undefined;
|
|
5333
|
-
|
|
5334
|
-
enabled?: boolean | undefined;
|
|
5335
|
-
content?: string | undefined;
|
|
5336
|
-
} | undefined;
|
|
5317
|
+
requiredReminderContent?: string | undefined;
|
|
5337
5318
|
date_format?: string | undefined;
|
|
5338
5319
|
step_length?: string | number | undefined;
|
|
5339
5320
|
urlConfig?: {
|
|
@@ -8354,12 +8335,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8354
8335
|
beforeMove: {
|
|
8355
8336
|
type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
8356
8337
|
};
|
|
8357
|
-
requiredReminderConfig: {
|
|
8358
|
-
type: import("vue").PropType<Partial<Partial<{
|
|
8359
|
-
enabled: boolean;
|
|
8360
|
-
content: string;
|
|
8361
|
-
}>>>;
|
|
8362
|
-
};
|
|
8363
8338
|
}>> & {
|
|
8364
8339
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
8365
8340
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -130,12 +130,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
130
130
|
beforeMove: {
|
|
131
131
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
132
132
|
};
|
|
133
|
-
requiredReminderConfig: {
|
|
134
|
-
type: PropType<Partial<Partial<{
|
|
135
|
-
enabled: boolean;
|
|
136
|
-
content: string;
|
|
137
|
-
}>>>;
|
|
138
|
-
};
|
|
139
133
|
}, {
|
|
140
134
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
141
135
|
maxHeight: {
|
|
@@ -263,12 +257,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
263
257
|
beforeMove: {
|
|
264
258
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
265
259
|
};
|
|
266
|
-
requiredReminderConfig: {
|
|
267
|
-
type: PropType<Partial<Partial<{
|
|
268
|
-
enabled: boolean;
|
|
269
|
-
content: string;
|
|
270
|
-
}>>>;
|
|
271
|
-
};
|
|
272
260
|
}>> & {
|
|
273
261
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
274
262
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1818,10 +1806,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1818
1806
|
value?: any;
|
|
1819
1807
|
describe?: string | undefined;
|
|
1820
1808
|
} | undefined;
|
|
1821
|
-
|
|
1822
|
-
enabled?: boolean | undefined;
|
|
1823
|
-
content?: string | undefined;
|
|
1824
|
-
} | undefined;
|
|
1809
|
+
requiredReminderContent?: string | undefined;
|
|
1825
1810
|
date_format?: string | undefined;
|
|
1826
1811
|
step_length?: string | number | undefined;
|
|
1827
1812
|
urlConfig?: {
|
|
@@ -3477,6 +3462,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3477
3462
|
fold?: boolean | undefined;
|
|
3478
3463
|
required?: boolean | undefined;
|
|
3479
3464
|
requiredDisabled?: boolean | undefined;
|
|
3465
|
+
requiredReminderContent?: string | undefined;
|
|
3480
3466
|
editableDisabled?: boolean | undefined;
|
|
3481
3467
|
editable?: boolean | undefined;
|
|
3482
3468
|
notes?: string | undefined;
|
|
@@ -3492,6 +3478,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3492
3478
|
fold?: boolean | undefined;
|
|
3493
3479
|
required?: boolean | undefined;
|
|
3494
3480
|
requiredDisabled?: boolean | undefined;
|
|
3481
|
+
requiredReminderContent?: string | undefined;
|
|
3495
3482
|
editableDisabled?: boolean | undefined;
|
|
3496
3483
|
editable?: boolean | undefined;
|
|
3497
3484
|
notes?: string | undefined;
|
|
@@ -3589,10 +3576,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3589
3576
|
value?: any;
|
|
3590
3577
|
describe?: string | undefined;
|
|
3591
3578
|
} | undefined;
|
|
3592
|
-
|
|
3593
|
-
enabled?: boolean | undefined;
|
|
3594
|
-
content?: string | undefined;
|
|
3595
|
-
} | undefined;
|
|
3579
|
+
requiredReminderContent?: string | undefined;
|
|
3596
3580
|
date_format?: string | undefined;
|
|
3597
3581
|
step_length?: string | number | undefined;
|
|
3598
3582
|
urlConfig?: {
|
|
@@ -5333,10 +5317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5333
5317
|
value?: any;
|
|
5334
5318
|
describe?: string | undefined;
|
|
5335
5319
|
} | undefined;
|
|
5336
|
-
|
|
5337
|
-
enabled?: boolean | undefined;
|
|
5338
|
-
content?: string | undefined;
|
|
5339
|
-
} | undefined;
|
|
5320
|
+
requiredReminderContent?: string | undefined;
|
|
5340
5321
|
date_format?: string | undefined;
|
|
5341
5322
|
step_length?: string | number | undefined;
|
|
5342
5323
|
urlConfig?: {
|
|
@@ -8357,12 +8338,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8357
8338
|
beforeMove: {
|
|
8358
8339
|
type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
|
|
8359
8340
|
};
|
|
8360
|
-
requiredReminderConfig: {
|
|
8361
|
-
type: PropType<Partial<Partial<{
|
|
8362
|
-
enabled: boolean;
|
|
8363
|
-
content: string;
|
|
8364
|
-
}>>>;
|
|
8365
|
-
};
|
|
8366
8341
|
}>> & {
|
|
8367
8342
|
onAddItem?: ((...args: any[]) => any) | undefined;
|
|
8368
8343
|
onRemoveItem?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import w from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as E}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as I,InjectionFormConfigEmit as D,InjectionFieldList as H,InjectionMaterialList as O,InjectionLowCodeReactions as S,InjectionActiveFieldItem as N,FORM_CONFIG_GROUP as U}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as A}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const B=["id"],T={class:"form-config__material"},P=m("header",{class:"form-config__materialHeader"},"物料区",-1),z={class:"form-config__displayWrapper"},W={class:"form-config__displayHeader"},q={class:"form-config__config"},G=m("header",{class:"form-config__configHeader"},"配置区",-1),J={class:"form-config__configContent"};var K=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:K,emit:Q}){const X=e;o(I,X),o(D,Q);const Y=x(),Z=h(),$=t([]);o(H,$);const ee=t([]);o(O,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(S,oe);const re=(e,o)=>y(X.textFormatter)?X.textFormatter(e,o):o,ae=t();o(N,ae);const ie=t(),{transform:se,inverseTransform:le}=E(X),ne=r({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),Q("addItem",o))}}),me=t([]),ue=r((()=>{if(!g(me.value))return[];const e=[];return C([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){X.extraMaterialList&&!me.value.length&&(me.value=y(X.extraMaterialList)?await X.extraMaterialList():X.extraMaterialList)}return K({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):t.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(a(e))))),$.value=se(t),ee.value=r,oe.value=o,ae.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(a($.value)),e,{show:!0}),materialList:le(_(a(ee.value)),e,{show:!1}),lowCodeReactions:_(a(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Z)},id:n(Y)},n(k)()),[m("section",T,[P,u(n(F),l(A({fieldList:$,materialList:ee,hooks:{beforeMove:X.beforeMove}}),{class:"form-config__materialContent",modelValue:n(ee),"onUpdate:modelValue":t[0]||(t[0]=e=>f(ee)?ee.value=e:null)}),{item:d((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":re,"material-List":n(ee)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>f(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",z,[m("header",W,[v(" 布局区 "),u(n(L),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(w,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>Q("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(b,{onSubmit:te})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":re,modelValue:n($),"onUpdate:modelValue":t[4]||(t[4]=e=>f($)?$.value=e:null)},null,8,["group","modelValue"])]),m("section",q,[G,m("section",J,[u(M,{ref_key:"formConfigEditRef",ref:ie,uuid:n(Y),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,B))}});export{K as default};
|
|
@@ -326,10 +326,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
326
326
|
value?: any;
|
|
327
327
|
describe?: string | undefined;
|
|
328
328
|
} | undefined;
|
|
329
|
-
|
|
330
|
-
enabled?: boolean | undefined;
|
|
331
|
-
content?: string | undefined;
|
|
332
|
-
} | undefined;
|
|
329
|
+
requiredReminderContent?: string | undefined;
|
|
333
330
|
date_format?: string | undefined;
|
|
334
331
|
step_length?: string | number | undefined;
|
|
335
332
|
urlConfig?: {
|
|
@@ -1985,6 +1982,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1985
1982
|
fold?: boolean | undefined;
|
|
1986
1983
|
required?: boolean | undefined;
|
|
1987
1984
|
requiredDisabled?: boolean | undefined;
|
|
1985
|
+
requiredReminderContent?: string | undefined;
|
|
1988
1986
|
editableDisabled?: boolean | undefined;
|
|
1989
1987
|
editable?: boolean | undefined;
|
|
1990
1988
|
notes?: string | undefined;
|
|
@@ -2000,6 +1998,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2000
1998
|
fold?: boolean | undefined;
|
|
2001
1999
|
required?: boolean | undefined;
|
|
2002
2000
|
requiredDisabled?: boolean | undefined;
|
|
2001
|
+
requiredReminderContent?: string | undefined;
|
|
2003
2002
|
editableDisabled?: boolean | undefined;
|
|
2004
2003
|
editable?: boolean | undefined;
|
|
2005
2004
|
notes?: string | undefined;
|
|
@@ -2097,10 +2096,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2097
2096
|
value?: any;
|
|
2098
2097
|
describe?: string | undefined;
|
|
2099
2098
|
} | undefined;
|
|
2100
|
-
|
|
2101
|
-
enabled?: boolean | undefined;
|
|
2102
|
-
content?: string | undefined;
|
|
2103
|
-
} | undefined;
|
|
2099
|
+
requiredReminderContent?: string | undefined;
|
|
2104
2100
|
date_format?: string | undefined;
|
|
2105
2101
|
step_length?: string | number | undefined;
|
|
2106
2102
|
urlConfig?: {
|
|
@@ -3841,10 +3837,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3841
3837
|
value?: any;
|
|
3842
3838
|
describe?: string | undefined;
|
|
3843
3839
|
} | undefined;
|
|
3844
|
-
|
|
3845
|
-
enabled?: boolean | undefined;
|
|
3846
|
-
content?: string | undefined;
|
|
3847
|
-
} | undefined;
|
|
3840
|
+
requiredReminderContent?: string | undefined;
|
|
3848
3841
|
date_format?: string | undefined;
|
|
3849
3842
|
step_length?: string | number | undefined;
|
|
3850
3843
|
urlConfig?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{omit as e,pick as
|
|
1
|
+
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as _,isNullOptionConfig as n,isVisibleOptionConfig as m,rowsOptionConfig as r}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as s}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=s();function E(){const s=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",requiredReminderContent:null==e?void 0:e.requiredReminderContent,...n()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...m()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...r()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=s.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),h=[l.KEY,l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:E,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||h;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),E(a,e,t)}}}export{E as useConfigurationField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as v,assignValueBindKey as p}from"../../utils/schema.js";import{connect as d,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=d(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:v}){const p=o(),d=t(!1),{field:c,fieldKey:h}=m(),f=i((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),y=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),w=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),j=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},k=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},C=i({get:()=>e.value===y.value,set(o){if(!f.value||"SWITCH"!==e.showMode||o)return v("update:value",o?y.value:w.value);d.value=!0}});function D(){v("update:value",w.value)}return()=>"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},p),{checked:j,unchecked:k}),f.value?l(a,{show:d.value,"onUpdate:show":e=>d.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:f.value,onPositiveClick:D},null):null]:l(s,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:j})}}),c(v,p));export{h as SWITCH};
|
|
@@ -103,10 +103,7 @@ export declare type FieldItem = {
|
|
|
103
103
|
wordbook: LowCodeTypes.wordbook;
|
|
104
104
|
open: LowCodeTypes.switchProperty;
|
|
105
105
|
close: LowCodeTypes.switchProperty;
|
|
106
|
-
|
|
107
|
-
enabled: boolean;
|
|
108
|
-
content: string;
|
|
109
|
-
}>;
|
|
106
|
+
requiredReminderContent: string;
|
|
110
107
|
date_format: string;
|
|
111
108
|
step_length: string | number;
|
|
112
109
|
urlConfig: UrlConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as
|
|
1
|
+
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as c,InjectionIhoTableXeInstance as h}from"../constants/index.js";import{mergeVxeStyle as v,useUUIDMap as g,mergeVxeClass as m}from"../utils/index.js";import{defineTablePlugin as x}from"../hooks/useTablePlugin.js";function b(){const b="stickyFixedPlugin";return x({name:b,apply(x){x.configHooks.config.tap(b,((e,{$table:l})=>{var t;if(null==(t=e.stickyFixedConfig)?void 0:t.enable){const t=e=>{if(!l.value)return{left:0,right:0};return{left:l.value.getColumns().slice(0,e).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0),right:l.value.getColumns().slice(e+1).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0)}};e.cellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.cellStyle),e.headerCellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.headerCellStyle)}return e}));const{getItemFromUUID:p,removeItemFromUUID:y}=g((()=>({left:[],noFixed:[],right:[]}))),{getItemFromUUID:B,removeItemFromUUID:H}=g((()=>({tableBody:null,tableHeader:null,leftEle:null,leftBorderEle:null,rightEle:null,rightBorderEle:null})),!1);function k(e){const l=B(e),{leftEle:t,rightEle:i,tableBody:r}=l;r&&(t&&(r.scrollLeft>0?t.classList.add("scrolling--middle"):null==t||t.classList.remove("scrolling--middle")),i&&(Math.ceil(r.scrollLeft)<r.scrollWidth-r.clientWidth?i.classList.add("scrolling--middle"):null==i||i.classList.remove("scrolling--middle")))}function E(e){var l,t;const i=B(e);if(!i.tableBody||!i.tableHeader)return;const{leftEle:r,rightBorderEle:u,rightEle:d,leftBorderEle:o,tableHeader:a}=i;if(r){const e=n(null==(l=i.tableHeader)?void 0:l.querySelectorAll("th.iho-table--fixed-left"));e&&(r.style.width=e.offsetLeft+e.clientWidth-e.scrollLeft+"px",o.style.width=r.style.width)}if(d){const e=s(null==(t=i.tableHeader)?void 0:t.querySelectorAll("th.iho-table--fixed-right"));if(e){const l=i.tableBody.scrollHeight>i.tableBody.clientHeight;d.style.width=i.tableBody.clientWidth-e.offsetLeft+e.scrollLeft-(l?0:10)+"px",u.style.width=d.style.width}}}x.fieldHooks.fieldList.tap({name:b,stage:f},((e,l)=>{var t;if(!(null==(t=l.stickyFixedConfig)?void 0:t.enable)||!l.uuid)return e;const i=p(l.uuid);return i.left=[],i.noFixed=[],i.right=[],o(e,(e=>{e.fixed?(i[e.fixed].push(e),e.className=m(e.className,`iho-table--fixed-${e.fixed}`),e.headerClassName=m(e.headerClassName,`iho-table--fixed-${e.fixed}`)):i.noFixed.push(e),e.fixed=void 0})),[...i.left||[],...i.noFixed||[],...i.right||[]]})),x.setupHooks.setup.tap(b,(l=>{e((()=>{var e;(null==(e=l.value)?void 0:e.uuid)&&(H(l.value.uuid),y(l.value.uuid))}))})),x.dataHooks.dataEnd.tap(b,(async e=>{var l;(null==(l=e.stickyFixedConfig)?void 0:l.enable)&&e.uuid&&(await a(100),E(e.uuid))})),x.eventHooks.onScroll.tap(b,(({isX:e},l)=>{var t;e&&(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)})),x.eventHooks.onResizableChange.tap(b,((e,l)=>{var t;(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)}));const F=t({setup(){const e=i(c),t=i(h),o=r((()=>{const l=p(e.value.uuid);return!(!l.left||!l.left.length)})),n=r((()=>{const l=p(e.value.uuid);return!(!l.right||!l.right.length)})),s=l=>{B(e.value.uuid).leftEle=l},f=l=>{B(e.value.uuid).leftBorderEle=l},v=l=>{B(e.value.uuid).rightEle=l},g=l=>{B(e.value.uuid).rightBorderEle=l};function m(){if(!t.value||!e.value.uuid)return;const{refTableBody:l,refTableHeader:i}=t.value.getRefMaps();if(!l.value)return;const r=B(e.value.uuid);r.tableBody=l.value.$el,r.tableHeader=i.value.$el,k(e.value.uuid),E(e.value.uuid)}return u([()=>p(e.value.uuid).left,()=>p(e.value.uuid).right],m),d((async()=>{await a(100),m()})),()=>[o.value?[l("div",{class:"iho-table__fixedLeftWrapper",ref:s},null),l("div",{class:"iho-table__fixedLeftTopBorder",ref:f},null)]:null,n.value?[l("div",{class:"iho-table__fixedRightWrapper",ref:v},null),l("div",{class:"iho-table__fixedRightTopBorder",ref:g},null)]:null]}}),C=t({setup(){const e=i(c);return()=>{var t,i;return(null==(i=null==(t=e.value)?void 0:t.stickyFixedConfig)?void 0:i.enable)?l(F,null,null):null}}});x.domInsertHooks.header.tap(b,(e=>(e.push(l(C,null,null)),e)))}})}export{b as stickyFixedPlugin};
|