cnhis-design-vue 3.1.11-beta.4 → 3.1.11-beta.5

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.
@@ -3,6 +3,10 @@ export declare const LINEBAR: import("vue").DefineComponent<{
3
3
  type: BooleanConstructor;
4
4
  default: boolean;
5
5
  };
6
+ line: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
6
10
  title: {
7
11
  type: StringConstructor;
8
12
  default: string;
@@ -16,6 +20,10 @@ export declare const LINEBAR: import("vue").DefineComponent<{
16
20
  type: BooleanConstructor;
17
21
  default: boolean;
18
22
  };
23
+ line: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
19
27
  title: {
20
28
  type: StringConstructor;
21
29
  default: string;
@@ -28,4 +36,5 @@ export declare const LINEBAR: import("vue").DefineComponent<{
28
36
  disabled: boolean;
29
37
  show: boolean;
30
38
  title: string;
39
+ line: boolean;
31
40
  }>;
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, onMounted, inject, createVNode } from 'vue';
1
+ import { defineComponent, ref, onMounted, inject, createVNode, createTextVNode } from 'vue';
2
2
  import { connect, mapProps } from '@formily/vue';
3
- import { NCollapseTransition } from 'naive-ui';
3
+ import { NDivider, NCollapseTransition } from 'naive-ui';
4
4
  import { useFormField } from '../../../../../packages/form-render';
5
5
  import { InjectionFormItemDepsCollector, FormItemLineBarDepKeyPrepend } from '../../constants/index.js';
6
6
 
@@ -11,6 +11,10 @@ const script = defineComponent({
11
11
  type: Boolean,
12
12
  default: true
13
13
  },
14
+ line: {
15
+ type: Boolean,
16
+ default: false
17
+ },
14
18
  title: {
15
19
  type: String,
16
20
  default: ""
@@ -43,10 +47,18 @@ const script = defineComponent({
43
47
  return createVNode("section", {
44
48
  "class": "form-render__linebar",
45
49
  "anchor-target": true
46
- }, [createVNode("header", {
50
+ }, [props.line ? createVNode(NDivider, {
51
+ "style": {
52
+ margin: "4px 0"
53
+ }
54
+ }, {
55
+ default() {
56
+ return [props.title];
57
+ }
58
+ }) : createVNode("header", {
47
59
  "class": "form-render__linebarHeader",
48
60
  "onClick": toggleShow
49
- }, [props.title]), createVNode(NCollapseTransition, {
61
+ }, [createTextVNode(" "), props.title, createTextVNode(" ")]), createVNode(NCollapseTransition, {
50
62
  "class": "form-render__linebarItem",
51
63
  "show": _show.value
52
64
  }, slots)]);
@@ -122,6 +122,7 @@ function useFieldList2Schema(collector) {
122
122
  title: item.alias || item.name,
123
123
  "x-component": "LINEBAR",
124
124
  "x-component-props": {
125
+ line: item.__line,
125
126
  disabled: item.is_not_fold === "1",
126
127
  id: item.val_key,
127
128
  show: !!item.is_show
@@ -1,4 +1,4 @@
1
- import { FieldItem } from "../types";
1
+ import { FieldItem } from '../types';
2
2
  export declare function useTypeNormalize(): {
3
3
  normalize: (item: FieldItem) => void;
4
4
  };
@@ -16,13 +16,18 @@ function useTypeNormalize() {
16
16
  ["RADIO_BLOCK", "RADIO"],
17
17
  [["DATE-INPUT", "DATETIME-INPUT"], "DATE"],
18
18
  ["SWITCH_COMPONENT", "SWITCH"],
19
- ["SLIDER_COMPONENT", "SLIDER"]
19
+ ["SLIDER_COMPONENT", "SLIDER"],
20
+ ["LINE_BREAKS", "LINEBAR"]
20
21
  ];
21
22
  function normalize(item) {
22
23
  const type = item.html_type;
23
- if (["CHECK_BLOCK", "RADIO_BLOCK"].includes(item.html_type)) {
24
+ if (["CHECK_BLOCK", "RADIO_BLOCK"].includes(type)) {
24
25
  item.__vertical = true;
25
26
  }
27
+ if (["LINE_BREAKS"].includes(type)) {
28
+ item.__line = true;
29
+ item.is_show = "1";
30
+ }
26
31
  if (item.html_type === "AGE") {
27
32
  normalizeAgeField(item);
28
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.11-beta.4",
4
+ "version": "3.1.11-beta.5",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",