cnhis-design-vue 3.3.3-beta.30 → 3.3.3-beta.33
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/button-print/src/components/NewPrintComponent.vue2.js +2 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +2 -2
- package/es/components/form-render/src/components/renderer/searchCascade.js +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +2 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
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
|
+
```
|
@@ -1223,6 +1223,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1223
1223
|
}), createCommentVNode(" \u5916\u663E\u8BBE\u7F6E\u6309\u94AE "), outerPrintItems.value.length > 0 && outerPrintItems.value.length == unref(showSettingItems).length && unref(isShowOutSettingBtn) && unref(isPrintAllType) != 2 ? (openBlock(), createBlock(unref(NPopover), {
|
1224
1224
|
key: 0,
|
1225
1225
|
trigger: "click",
|
1226
|
+
placement: "bottom-start",
|
1226
1227
|
to: unref(positionElement),
|
1227
1228
|
"show-arrow": false,
|
1228
1229
|
show: downlistPopover.isOutSetting,
|
@@ -1299,6 +1300,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1299
1300
|
}, [createCommentVNode(" \u6253\u5370\u5168\u90E8\u6309\u94AE "), createVNode(unref(NPopover), {
|
1300
1301
|
trigger: "click",
|
1301
1302
|
"show-arrow": false,
|
1303
|
+
placement: "bottom-start",
|
1302
1304
|
to: unref(positionElement),
|
1303
1305
|
show: downlistPopover.oneShow,
|
1304
1306
|
onClickoutside: _cache[10] || (_cache[10] = ($event) => handleClickOutHide("oneShow"))
|
@@ -40,7 +40,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
40
|
expose
|
41
41
|
}) {
|
42
42
|
const props = __props;
|
43
|
-
computed(() => `#${props.uuid} .form-config__config`);
|
43
|
+
const wrapperSelector = computed(() => `#${props.uuid} .form-config__config`);
|
44
44
|
const formRenderRef = ref();
|
45
45
|
const currentActiveField = inject(InjectionActiveFieldItem);
|
46
46
|
const fieldList = ref([]);
|
@@ -173,7 +173,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
173
173
|
show: showOptionModal.value,
|
174
174
|
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => showOptionModal.value = $event),
|
175
175
|
preset: "dialog",
|
176
|
-
to:
|
176
|
+
to: unref(wrapperSelector),
|
177
177
|
"close-on-esc": false,
|
178
178
|
"mask-closable": false,
|
179
179
|
title: unref(useFormConfigLocale)("configArea.modifyOptionTitle"),
|
@@ -253,6 +253,7 @@ const script = /* @__PURE__ */ defineComponent({
|
|
253
253
|
target.dispatchEvent(new CustomEvent("scroll"));
|
254
254
|
}
|
255
255
|
function filterValue(pattern, option) {
|
256
|
+
var _a;
|
256
257
|
if (!pattern || !option)
|
257
258
|
return false;
|
258
259
|
const {
|
@@ -260,6 +261,8 @@ const script = /* @__PURE__ */ defineComponent({
|
|
260
261
|
} = option;
|
261
262
|
if (props.checkStrategy.includes("child") && option.depth < maxDepthValue.value)
|
262
263
|
return false;
|
264
|
+
if (!mergeItemValue)
|
265
|
+
return (_a = option[labelKey.value]) == null ? void 0 : _a.includes(pattern.trim());
|
263
266
|
return mergeItemValue.length > 0 && mergeItemValue.some((item) => item.includes(pattern.trim()));
|
264
267
|
}
|
265
268
|
const {
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
225
225
|
round: "",
|
226
226
|
size: 100,
|
227
227
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
228
|
-
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\
|
228
|
+
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
229
229
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
230
230
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
231
231
|
strong: "",
|
@@ -15,6 +15,7 @@ function highLightSetPlugin() {
|
|
15
15
|
name: pluginName,
|
16
16
|
apply(hooks) {
|
17
17
|
hooks.dataHooks.data.tapPromise(pluginName, async (row, config) => {
|
18
|
+
var _a, _b;
|
18
19
|
if (!config.uuid || getItemFromUUID(config.uuid))
|
19
20
|
return;
|
20
21
|
let hasColor = false;
|
@@ -23,7 +24,7 @@ function highLightSetPlugin() {
|
|
23
24
|
return;
|
24
25
|
hasColor = true;
|
25
26
|
stop();
|
26
|
-
}, ["
|
27
|
+
}, ["childrenList", (_b = (_a = config.treeConfig) == null ? void 0 : _a.children) != null ? _b : "children"]);
|
27
28
|
hasColor && setItemFromUUID(config.uuid, true);
|
28
29
|
});
|
29
30
|
hooks.dataHooks.dataEnd.tap(pluginName, (_, config) => {
|
package/es/env.d.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
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';
|
25
|
-
|
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';
|
25
|
+
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.3.3-beta.
|
3
|
+
"version": "3.3.3-beta.33",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -73,5 +73,5 @@
|
|
73
73
|
"iOS 7",
|
74
74
|
"last 3 iOS versions"
|
75
75
|
],
|
76
|
-
"gitHead": "
|
76
|
+
"gitHead": "99006fb9e77b0c1ac7fb3102d9d3ff40dfb3e3d8"
|
77
77
|
}
|