@cniot/mdd-editor 0.2.0-beta.36 → 0.2.0-beta.38

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/build/index.es.js CHANGED
@@ -2641,7 +2641,7 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2641
2641
  },
2642
2642
  tree: false,
2643
2643
  showIndex: false,
2644
- hideCommonToolbar: false
2644
+ hideCommonToolbar: true
2645
2645
  },
2646
2646
  headerToolbar: []
2647
2647
  };
@@ -3775,7 +3775,7 @@ class TableSchema extends JSONWatch {
3775
3775
  primaryKey = "id",
3776
3776
  tree = false,
3777
3777
  showIndex = false,
3778
- hideCommonToolbar = false,
3778
+ hideCommonToolbar = true,
3779
3779
  useVirtual = true,
3780
3780
  columnsAutoWidth = true,
3781
3781
  pagination = {
@@ -23987,6 +23987,16 @@ var BlocksTable = (params) => {
23987
23987
  name: "parentDataIndex",
23988
23988
  "x-designable-id": "sxbti2p222233122mzk"
23989
23989
  },
23990
+ shouldRender: {
23991
+ title: "\u6761\u4EF6\u6E32\u67D3",
23992
+ "x-decorator": "CnFormItem",
23993
+ "x-component": "Input",
23994
+ "x-validator": [],
23995
+ "x-component-props": {
23996
+ placeholder: "\u6839\u636E\u6761\u4EF6\u5224\u65AD \u6574\u4E2A\u533A\u5757 \u662F\u5426\u6E32\u67D3"
23997
+ },
23998
+ name: "shouldRender"
23999
+ },
23990
24000
  "x-designable-id": "loa5555d8t3"
23991
24001
  }
23992
24002
  }
@@ -28203,7 +28213,18 @@ function TablePanel$1({ schema, swaggerFields = [] }) {
28203
28213
  className: "mdd-tip"
28204
28214
  }, /* @__PURE__ */ React$1.createElement(Icon, {
28205
28215
  type: "prompt"
28206
- }), " \u5982\u679C\u6709\u6027\u80FD\u95EE\u9898\u53EF\u4EE5\u5173\u95ED\u8BE5\u5C5E\u6027\uFF0C\u540C\u65F6\u624B\u52A8\u8BBE\u7F6E\u5217\u5BBD")));
28216
+ }), " \u5982\u679C\u6709\u6027\u80FD\u95EE\u9898\u53EF\u4EE5\u5173\u95ED\u8BE5\u5C5E\u6027\uFF0C\u540C\u65F6\u624B\u52A8\u8BBE\u7F6E\u5217\u5BBD")), /* @__PURE__ */ React$1.createElement("div", {
28217
+ style: { marginLeft: "10px", marginBottom: 8 }
28218
+ }, /* @__PURE__ */ React$1.createElement("label", null, "\u662F\u5426\u9690\u85CF\u901A\u7528\u9876\u90E8\u64CD\u4F5C\u533A\uFF1A"), /* @__PURE__ */ React$1.createElement(Switch, {
28219
+ autoWidth: true,
28220
+ checked: schema.get("hideCommonToolbar"),
28221
+ size: "small",
28222
+ onChange: (v2) => onBaseInfoChange("hideCommonToolbar", v2)
28223
+ }), /* @__PURE__ */ React$1.createElement("span", {
28224
+ className: "mdd-tip"
28225
+ }, /* @__PURE__ */ React$1.createElement(Icon, {
28226
+ type: "prompt"
28227
+ }), " \u662F\u5426\u9690\u85CFtable\u9876\u90E8\u64CD\u4F5C\u533A\u7684\u901A\u7528\u64CD\u4F5C\u6309\u94AE\uFF0C\u6BD4\u5982\u5168\u5C4F\u3001\u6591\u9A6C\u7EBF\u3001\u5217\u8BBE\u7F6E\u3001\u5C3A\u5BF8\u7B49")));
28207
28228
  }
28208
28229
  function HeaderToolbarPanel({ schema }) {
28209
28230
  const mddFormRef = React$1.useRef();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cniot/mdd-editor",
3
- "version": "0.2.0-beta.36",
3
+ "version": "0.2.0-beta.38",
4
4
  "description": "模型驱动编辑器",
5
5
  "scripts": {
6
6
  "build": "vite build"
@@ -9,7 +9,7 @@ export default class TableSchema extends JSONWatch {
9
9
  primaryKey = 'id',
10
10
  tree = false, // 开启树形
11
11
  showIndex = false, // 是否显示序号
12
- hideCommonToolbar = false, // 是否隐藏通用顶部操作区
12
+ hideCommonToolbar = true, // 是否隐藏通用顶部操作区
13
13
  useVirtual = true, // 开启虚拟滚动
14
14
  columnsAutoWidth = true, // 开启列宽自适应
15
15
  pagination = {
@@ -115,6 +115,18 @@ export default function TablePanel({ schema, swaggerFields = [] }) {
115
115
  <Icon type="prompt" /> 如果有性能问题可以关闭该属性,同时手动设置列宽
116
116
  </span>
117
117
  </div>
118
+ <div style={{ marginLeft: '10px', marginBottom: 8 }}>
119
+ <label>是否隐藏通用顶部操作区:</label>
120
+ <Switch
121
+ autoWidth
122
+ checked={schema.get('hideCommonToolbar')}
123
+ size="small"
124
+ onChange={(v) => onBaseInfoChange('hideCommonToolbar', v)}
125
+ />
126
+ <span className="mdd-tip">
127
+ <Icon type="prompt" /> 是否隐藏table顶部操作区的通用操作按钮,比如全屏、斑马线、列设置、尺寸等
128
+ </span>
129
+ </div>
118
130
  </div>
119
131
  );
120
132
  }
@@ -186,7 +186,7 @@ export function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSche
186
186
  },
187
187
  tree: false,
188
188
  showIndex: false,
189
- hideCommonToolbar: false,
189
+ hideCommonToolbar: true,
190
190
  },
191
191
  headerToolbar: [],
192
192
  };