@epie/bi-crud 2.0.7 → 2.0.10

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.
@@ -15730,6 +15730,12 @@ function parseNode(vnode, options) {
15730
15730
  props["onUpdate:modelValue"] = function (val) {
15731
15731
  scope[prop] = val;
15732
15732
  };
15733
+ }
15734
+
15735
+ if (["el-select", "el-input"].includes(vnode.name) && props.clearable) {
15736
+ props["onClear"] = function () {
15737
+ scope[prop] = undefined;
15738
+ };
15733
15739
  } // 组件实例渲染
15734
15740
 
15735
15741
 
@@ -18387,7 +18393,7 @@ function useRender$2(_ref7) {
18387
18393
  return d.value == v;
18388
18394
  });
18389
18395
 
18390
- if (d) {
18396
+ if (d && d.type) {
18391
18397
  var ElTag = createVNode(resolveComponent("el-tag"), {
18392
18398
  "disable-transitions": true,
18393
18399
  "effect": "dark",
@@ -18399,6 +18405,8 @@ function useRender$2(_ref7) {
18399
18405
  return d.label;
18400
18406
  }
18401
18407
  });
18408
+ } else if (d) {
18409
+ return d.label;
18402
18410
  } else {
18403
18411
  return v;
18404
18412
  }
@@ -19769,7 +19777,7 @@ function useRender(_ref) {
19769
19777
  return d.value == v;
19770
19778
  });
19771
19779
 
19772
- if (d) {
19780
+ if (d && d.type) {
19773
19781
  var ElTag = createVNode(resolveComponent("el-tag"), {
19774
19782
  "disable-transitions": true,
19775
19783
  "effect": "dark",
@@ -19781,6 +19789,8 @@ function useRender(_ref) {
19781
19789
  return d.label;
19782
19790
  }
19783
19791
  });
19792
+ } else if (d) {
19793
+ return d.label;
19784
19794
  } else {
19785
19795
  return v;
19786
19796
  }
@@ -15733,6 +15733,12 @@
15733
15733
  props["onUpdate:modelValue"] = function (val) {
15734
15734
  scope[prop] = val;
15735
15735
  };
15736
+ }
15737
+
15738
+ if (["el-select", "el-input"].includes(vnode.name) && props.clearable) {
15739
+ props["onClear"] = function () {
15740
+ scope[prop] = undefined;
15741
+ };
15736
15742
  } // 组件实例渲染
15737
15743
 
15738
15744
 
@@ -18390,7 +18396,7 @@
18390
18396
  return d.value == v;
18391
18397
  });
18392
18398
 
18393
- if (d) {
18399
+ if (d && d.type) {
18394
18400
  var ElTag = vue.createVNode(vue.resolveComponent("el-tag"), {
18395
18401
  "disable-transitions": true,
18396
18402
  "effect": "dark",
@@ -18402,6 +18408,8 @@
18402
18408
  return d.label;
18403
18409
  }
18404
18410
  });
18411
+ } else if (d) {
18412
+ return d.label;
18405
18413
  } else {
18406
18414
  return v;
18407
18415
  }
@@ -19772,7 +19780,7 @@
19772
19780
  return d.value == v;
19773
19781
  });
19774
19782
 
19775
- if (d) {
19783
+ if (d && d.type) {
19776
19784
  var ElTag = vue.createVNode(vue.resolveComponent("el-tag"), {
19777
19785
  "disable-transitions": true,
19778
19786
  "effect": "dark",
@@ -19784,6 +19792,8 @@
19784
19792
  return d.label;
19785
19793
  }
19786
19794
  });
19795
+ } else if (d) {
19796
+ return d.label;
19787
19797
  } else {
19788
19798
  return v;
19789
19799
  }
@@ -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">;
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.7",
4
+ "version": "2.0.10",
5
5
  "private": false,
6
6
  "main": "lib/bi-crud.umd.js",
7
7
  "module": "lib/bi-crud.esm.js",