@epie/bi-crud 2.0.4 → 2.0.7

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;
@@ -18641,6 +18648,10 @@ var Upsert = defineComponent({
18641
18648
  return [];
18642
18649
  }
18643
18650
  },
18651
+ // 基础span
18652
+ baseSpan: {
18653
+ type: Number
18654
+ },
18644
18655
  // el-form
18645
18656
  props: Object,
18646
18657
  // 编辑时是否同步打开
@@ -18758,6 +18769,7 @@ var Upsert = defineComponent({
18758
18769
  op: props.op,
18759
18770
  dialog: props.dialog,
18760
18771
  items: props.items,
18772
+ baseSpan: props.baseSpan,
18761
18773
  on: {
18762
18774
  open: function open(data) {
18763
18775
  if (props.onOpen) {
@@ -18936,8 +18948,8 @@ var Upsert = defineComponent({
18936
18948
  return crud.service[reqName]({
18937
18949
  id: data.id
18938
18950
  }).then(function (res) {
18939
- done(res);
18940
- resolve(res);
18951
+ done(res.data);
18952
+ resolve(res.data);
18941
18953
  }).catch(function (err) {
18942
18954
  ElMessage.error(err.message);
18943
18955
  reject(err);
@@ -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;
@@ -18644,6 +18651,10 @@
18644
18651
  return [];
18645
18652
  }
18646
18653
  },
18654
+ // 基础span
18655
+ baseSpan: {
18656
+ type: Number
18657
+ },
18647
18658
  // el-form
18648
18659
  props: Object,
18649
18660
  // 编辑时是否同步打开
@@ -18761,6 +18772,7 @@
18761
18772
  op: props.op,
18762
18773
  dialog: props.dialog,
18763
18774
  items: props.items,
18775
+ baseSpan: props.baseSpan,
18764
18776
  on: {
18765
18777
  open: function open(data) {
18766
18778
  if (props.onOpen) {
@@ -18939,8 +18951,8 @@
18939
18951
  return crud.service[reqName]({
18940
18952
  id: data.id
18941
18953
  }).then(function (res) {
18942
- done(res);
18943
- resolve(res);
18954
+ done(res.data);
18955
+ resolve(res.data);
18944
18956
  }).catch(function (err) {
18945
18957
  elementPlus.ElMessage.error(err.message);
18946
18958
  reject(err);
@@ -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<{
package/lib/index.d.ts CHANGED
@@ -7,4 +7,5 @@ declare const Crud: {
7
7
  export default Crud;
8
8
  export * from "./emitter";
9
9
  export * from "./hooks";
10
+ export * from "./types";
10
11
  export { ContextMenu } from "./components/context-menu";
@@ -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,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;
@@ -1,3 +1,2 @@
1
- import "./static/index.scss";
2
- export * from "./emitter";
1
+ import "../static/index.scss";
3
2
  export * from "./base";
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.4",
4
+ "version": "2.0.7",
5
5
  "private": false,
6
6
  "main": "lib/bi-crud.umd.js",
7
7
  "module": "lib/bi-crud.esm.js",
@@ -86,4 +86,4 @@
86
86
  "sass-loader": "^12.6.0",
87
87
  "typescript": "^4.6.2"
88
88
  }
89
- }
89
+ }