@epie/bi-crud 2.0.5 → 2.0.8

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.
@@ -16166,8 +16166,9 @@ function useApi(_ref5) {
16166
16166
  function useRender$3(ctx) {
16167
16167
  var _useTools = useTools(),
16168
16168
  browser = _useTools.browser,
16169
- style = _useTools.style; // 渲染表单及表单项
16169
+ style = _useTools.style;
16170
16170
 
16171
+ var baseSpan = ctx.conf.baseSpan || 24; // 渲染表单及表单项
16171
16172
 
16172
16173
  function renderForm() {
16173
16174
  // 表单项列表
@@ -16248,7 +16249,7 @@ function useRender$3(ctx) {
16248
16249
  }
16249
16250
 
16250
16251
  return createVNode(resolveComponent("el-col"), mergeProps({
16251
- "span": 24
16252
+ "span": baseSpan
16252
16253
  }, e), _isSlot$3(FormItem) ? FormItem : {
16253
16254
  default: function _default() {
16254
16255
  return [FormItem];
@@ -16735,6 +16736,7 @@ var Form = defineComponent({
16735
16736
  props: {
16736
16737
  labelWidth: 100
16737
16738
  },
16739
+ baseSpan: 24,
16738
16740
  on: {},
16739
16741
  op: {
16740
16742
  hidden: false,
@@ -16935,7 +16937,8 @@ var Form = defineComponent({
16935
16937
  } // 显示对话框
16936
16938
 
16937
16939
 
16938
- visible.value = true; // 合并配置
16940
+ visible.value = true; //;
16941
+ // 合并配置
16939
16942
 
16940
16943
  for (var i in conf) {
16941
16944
  switch (i) {
@@ -16946,9 +16949,14 @@ var Form = defineComponent({
16946
16949
 
16947
16950
  case "title":
16948
16951
  case "width":
16952
+ // case "baseSpan":
16949
16953
  conf[i] = options[i];
16950
16954
  break;
16951
16955
 
16956
+ case "baseSpan":
16957
+ conf.baseSpan = options.baseSpan;
16958
+ break;
16959
+
16952
16960
  case "on":
16953
16961
  case "op":
16954
16962
  case "props":
@@ -18221,8 +18229,7 @@ function useHeight(_ref6) {
18221
18229
  while (n && (n.className || "").includes("el-row")) {
18222
18230
  _h += n.clientHeight + 5;
18223
18231
  n = n.nextSibling;
18224
- } // debugger;
18225
- // 设置表格最大高度
18232
+ } // 设置表格最大高度
18226
18233
 
18227
18234
 
18228
18235
  maxHeight.value = r.clientHeight - _h;
@@ -18380,7 +18387,7 @@ function useRender$2(_ref7) {
18380
18387
  return d.value == v;
18381
18388
  });
18382
18389
 
18383
- if (d) {
18390
+ if (d && d.type) {
18384
18391
  var ElTag = createVNode(resolveComponent("el-tag"), {
18385
18392
  "disable-transitions": true,
18386
18393
  "effect": "dark",
@@ -18392,6 +18399,8 @@ function useRender$2(_ref7) {
18392
18399
  return d.label;
18393
18400
  }
18394
18401
  });
18402
+ } else if (d) {
18403
+ return d.label;
18395
18404
  } else {
18396
18405
  return v;
18397
18406
  }
@@ -18641,6 +18650,10 @@ var Upsert = defineComponent({
18641
18650
  return [];
18642
18651
  }
18643
18652
  },
18653
+ // 基础span
18654
+ baseSpan: {
18655
+ type: Number
18656
+ },
18644
18657
  // el-form
18645
18658
  props: Object,
18646
18659
  // 编辑时是否同步打开
@@ -18758,6 +18771,7 @@ var Upsert = defineComponent({
18758
18771
  op: props.op,
18759
18772
  dialog: props.dialog,
18760
18773
  items: props.items,
18774
+ baseSpan: props.baseSpan,
18761
18775
  on: {
18762
18776
  open: function open(data) {
18763
18777
  if (props.onOpen) {
@@ -19757,7 +19771,7 @@ function useRender(_ref) {
19757
19771
  return d.value == v;
19758
19772
  });
19759
19773
 
19760
- if (d) {
19774
+ if (d && d.type) {
19761
19775
  var ElTag = createVNode(resolveComponent("el-tag"), {
19762
19776
  "disable-transitions": true,
19763
19777
  "effect": "dark",
@@ -19769,6 +19783,8 @@ function useRender(_ref) {
19769
19783
  return d.label;
19770
19784
  }
19771
19785
  });
19786
+ } else if (d) {
19787
+ return d.label;
19772
19788
  } else {
19773
19789
  return v;
19774
19790
  }
@@ -16169,8 +16169,9 @@
16169
16169
  function useRender$3(ctx) {
16170
16170
  var _useTools = useTools(),
16171
16171
  browser = _useTools.browser,
16172
- style = _useTools.style; // 渲染表单及表单项
16172
+ style = _useTools.style;
16173
16173
 
16174
+ var baseSpan = ctx.conf.baseSpan || 24; // 渲染表单及表单项
16174
16175
 
16175
16176
  function renderForm() {
16176
16177
  // 表单项列表
@@ -16251,7 +16252,7 @@
16251
16252
  }
16252
16253
 
16253
16254
  return vue.createVNode(vue.resolveComponent("el-col"), vue.mergeProps({
16254
- "span": 24
16255
+ "span": baseSpan
16255
16256
  }, e), _isSlot$3(FormItem) ? FormItem : {
16256
16257
  default: function _default() {
16257
16258
  return [FormItem];
@@ -16738,6 +16739,7 @@
16738
16739
  props: {
16739
16740
  labelWidth: 100
16740
16741
  },
16742
+ baseSpan: 24,
16741
16743
  on: {},
16742
16744
  op: {
16743
16745
  hidden: false,
@@ -16938,7 +16940,8 @@
16938
16940
  } // 显示对话框
16939
16941
 
16940
16942
 
16941
- visible.value = true; // 合并配置
16943
+ visible.value = true; //;
16944
+ // 合并配置
16942
16945
 
16943
16946
  for (var i in conf) {
16944
16947
  switch (i) {
@@ -16949,9 +16952,14 @@
16949
16952
 
16950
16953
  case "title":
16951
16954
  case "width":
16955
+ // case "baseSpan":
16952
16956
  conf[i] = options[i];
16953
16957
  break;
16954
16958
 
16959
+ case "baseSpan":
16960
+ conf.baseSpan = options.baseSpan;
16961
+ break;
16962
+
16955
16963
  case "on":
16956
16964
  case "op":
16957
16965
  case "props":
@@ -18224,8 +18232,7 @@
18224
18232
  while (n && (n.className || "").includes("el-row")) {
18225
18233
  _h += n.clientHeight + 5;
18226
18234
  n = n.nextSibling;
18227
- } // debugger;
18228
- // 设置表格最大高度
18235
+ } // 设置表格最大高度
18229
18236
 
18230
18237
 
18231
18238
  maxHeight.value = r.clientHeight - _h;
@@ -18383,7 +18390,7 @@
18383
18390
  return d.value == v;
18384
18391
  });
18385
18392
 
18386
- if (d) {
18393
+ if (d && d.type) {
18387
18394
  var ElTag = vue.createVNode(vue.resolveComponent("el-tag"), {
18388
18395
  "disable-transitions": true,
18389
18396
  "effect": "dark",
@@ -18395,6 +18402,8 @@
18395
18402
  return d.label;
18396
18403
  }
18397
18404
  });
18405
+ } else if (d) {
18406
+ return d.label;
18398
18407
  } else {
18399
18408
  return v;
18400
18409
  }
@@ -18644,6 +18653,10 @@
18644
18653
  return [];
18645
18654
  }
18646
18655
  },
18656
+ // 基础span
18657
+ baseSpan: {
18658
+ type: Number
18659
+ },
18647
18660
  // el-form
18648
18661
  props: Object,
18649
18662
  // 编辑时是否同步打开
@@ -18761,6 +18774,7 @@
18761
18774
  op: props.op,
18762
18775
  dialog: props.dialog,
18763
18776
  items: props.items,
18777
+ baseSpan: props.baseSpan,
18764
18778
  on: {
18765
18779
  open: function open(data) {
18766
18780
  if (props.onOpen) {
@@ -19760,7 +19774,7 @@
19760
19774
  return d.value == v;
19761
19775
  });
19762
19776
 
19763
- if (d) {
19777
+ if (d && d.type) {
19764
19778
  var ElTag = vue.createVNode(vue.resolveComponent("el-tag"), {
19765
19779
  "disable-transitions": true,
19766
19780
  "effect": "dark",
@@ -19772,6 +19786,8 @@
19772
19786
  return d.label;
19773
19787
  }
19774
19788
  });
19789
+ } else if (d) {
19790
+ return d.label;
19775
19791
  } else {
19776
19792
  return v;
19777
19793
  }
@@ -5,6 +5,9 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: PropType<EpieForm.Item[]>;
6
6
  default: () => never[];
7
7
  };
8
+ baseSpan: {
9
+ type: NumberConstructor;
10
+ };
8
11
  props: PropType<ElementPlus.FormProps | undefined>;
9
12
  sync: BooleanConstructor;
10
13
  op: PropType<{
@@ -29,6 +32,9 @@ declare const _default: import("vue").DefineComponent<{
29
32
  type: PropType<EpieForm.Item[]>;
30
33
  default: () => never[];
31
34
  };
35
+ baseSpan: {
36
+ type: NumberConstructor;
37
+ };
32
38
  props: PropType<ElementPlus.FormProps | undefined>;
33
39
  sync: BooleanConstructor;
34
40
  op: PropType<{
@@ -46,6 +46,7 @@ export declare namespace EpieForm {
46
46
  props?: ElementPlus.FormProps;
47
47
  items: Item[];
48
48
  form?: any;
49
+ baseSpan?: number;
49
50
  on?: {
50
51
  open?(form: any): void;
51
52
  close?(done: fun): void;
@@ -1,16 +1,16 @@
1
- import { Ref as VueRef } from "vue";
2
1
  import { fun, NSEpieContextMenu, Render } from ".";
3
2
  import { EpieSchema } from "./base";
3
+ export declare type EpieDict = {
4
+ label: string;
5
+ value?: any;
6
+ type?: "success" | "warning" | "info" | "danger";
7
+ size?: "medium" | "default" | "small";
8
+ effect?: "dark" | "light" | "plain";
9
+ color?: string;
10
+ };
4
11
  export declare type EpieColumn = EpieSchema<"table"> & {
5
12
  type?: "index" | "selection" | "expand" | "op";
6
- dict?: Array<{
7
- label: string;
8
- value?: any;
9
- type?: "success" | "warning" | "info" | "danger";
10
- size?: "medium" | "default" | "small";
11
- effect?: "dark" | "light" | "plain";
12
- color?: string;
13
- }>;
13
+ dict?: Array<EpieDict>;
14
14
  buttons?: Array<"edit" | "delete" | Render.OpButton>;
15
15
  align?: "left" | "center" | "right";
16
16
  label?: string;
@@ -44,14 +44,6 @@ export declare type EpieColumn = EpieSchema<"table"> & {
44
44
  detailExpand?: boolean;
45
45
  };
46
46
  export declare namespace EpieTable {
47
- type Dict = Array<{
48
- label: string;
49
- value?: any;
50
- type?: "success" | "warning" | "info" | "danger";
51
- size?: "medium" | "default" | "small";
52
- effect?: "dark" | "light" | "plain";
53
- color?: string;
54
- }> | VueRef<Dict>;
55
47
  interface Props {
56
48
  columns: EpieColumn[];
57
49
  contextMenu?: boolean | Array<NSEpieContextMenu.Item | ((row: any) => NSEpieContextMenu.Item) | "refresh" | "check" | "update" | "edit" | "delete" | "order-desc" | "order-asc">;
@@ -1,6 +1,7 @@
1
1
  import { EpieForm, fun, EpieCrud } from ".";
2
2
  export declare namespace EpieUpsert {
3
3
  interface Props {
4
+ baseSpan?: number;
4
5
  items: EpieForm.Item[];
5
6
  props?: EpieForm.Options["props"];
6
7
  sync?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epie/bi-crud",
3
3
  "simpleName": "bi-crud",
4
- "version": "2.0.5",
4
+ "version": "2.0.8",
5
5
  "private": false,
6
6
  "main": "lib/bi-crud.umd.js",
7
7
  "module": "lib/bi-crud.esm.js",