@steedos-widgets/amis-object 1.2.6-beta.13 → 1.2.6-beta.14

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.
@@ -1232,11 +1232,13 @@ body {
1232
1232
  flex-direction: unset !important;
1233
1233
  }
1234
1234
  .steedos-global-footer-popup {
1235
- height: calc(100vh - 125px);
1236
1235
  width: 100%;
1236
+ top: 54px !important;
1237
+ bottom: 64px;
1238
+ position: fixed;
1237
1239
  }
1238
1240
  .steedos-global-footer-popup .antd-Nav-Menu {
1239
- height: 101.1%;
1241
+ height: 100%;
1240
1242
  overflow: auto;
1241
1243
  box-shadow: none;
1242
1244
  }
@@ -1261,18 +1263,30 @@ body {
1261
1263
  .steedos-object-listview .antd-Table-content {
1262
1264
  max-height: calc(100vh - 263px);
1263
1265
  }
1266
+ .steedos-global-footer-root .antd-Nav-Menu-horizontal:after {
1267
+ /*手机端底部导航左右间隔不平衡*/
1268
+ content: unset;
1269
+ }
1264
1270
  }
1265
1271
  .steedos-global-footer ul {
1266
1272
  order: unset !important;
1267
1273
  }
1268
1274
 
1269
1275
  .sidebar-wrapper {
1270
- transition: 0.5s ease translate;
1271
- translate: -100% 0;
1276
+ transition: 0.5s ease transform;
1272
1277
  will-change: transform;
1278
+ transform: translate(-100%, 0);
1279
+ -webkit-transform: translate(-100%, 0);
1280
+ -moz-transform: translate(-100%, 0);
1281
+ -ms-transform: translate(-100%, 0);
1282
+ -o-transform: translate(-100%, 0);
1273
1283
  }
1274
1284
  body.sidebar-open .sidebar-wrapper {
1275
- translate: 0 0;
1285
+ transform: translate(0, 0);
1286
+ -webkit-transform: translate(0, 0);
1287
+ -moz-transform: translate(0, 0);
1288
+ -ms-transform: translate(0, 0);
1289
+ -o-transform: translate(0, 0);
1276
1290
  }
1277
1291
  body.sidebar #sidebar {
1278
1292
  margin-top: 50px;
@@ -3292,8 +3292,8 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
3292
3292
  },
3293
3293
  {
3294
3294
  "type": "dropdown-button",
3295
- "className": "",
3296
- "label": "\${uiSchema.list_views[listName].label}",
3295
+ "className": "",
3296
+ "label": "\${listName ? uiSchema.list_views[listName].label : uiSchema.list_views[defaultListName].label}",
3297
3297
  "rightIcon": "fa fa-caret-down",
3298
3298
  "size": "sm",
3299
3299
  "hideCaret": true,
@@ -3701,7 +3701,7 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
3701
3701
  "icon": "fa fa-table-columns",
3702
3702
  "btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
3703
3703
  "align": "right",
3704
- "visibleOn": "${window:innerWidth > 768}",
3704
+ "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
3705
3705
  "buttons": [
3706
3706
  {
3707
3707
  "label": "显示为",
@@ -5042,6 +5042,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
5042
5042
  ...ctx
5043
5043
  });
5044
5044
 
5045
+ pickerSchema.affixHeader = false;
5046
+
5045
5047
  var headerToolbarItems = [];
5046
5048
  const isMobile = window.innerWidth < 768;
5047
5049
  if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && !isMobile){
@@ -5059,14 +5061,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
5059
5061
  pickerSchema.headerToolbar.push(new_button);
5060
5062
  }
5061
5063
  pickerSchema.footerToolbar = refObjectConfig.enable_tree ? [] : getObjectFooterToolbar();
5062
- //TODO: 等待放大镜bug修复,if会去掉,始终显示放大镜
5063
- if(referenceTo.objectName != "space_users" || field.reference_to_field != "user"){
5064
- if (ctx.filterVisible !== false) {
5065
- pickerSchema.filter = await getObjectFilter(refObjectConfig, fields, {
5066
- isLookup: true,
5067
- ...ctx
5068
- });
5069
- }
5064
+ if (ctx.filterVisible !== false) {
5065
+ pickerSchema.filter = await getObjectFilter(refObjectConfig, fields, {
5066
+ isLookup: true,
5067
+ ...ctx
5068
+ });
5070
5069
  }
5071
5070
  pickerSchema.data = Object.assign({}, pickerSchema.data, {
5072
5071
  "&": "$$",
@@ -5312,8 +5311,10 @@ async function lookupToAmis(field, readonly, ctx){
5312
5311
 
5313
5312
  if(referenceTo.objectName === "space_users" && field.reference_to_field === "user"){
5314
5313
  if(ctx.idsDependOn || field.amis){
5314
+ // ids人员点选模式
5315
5315
  return await lookupToAmisIdsPicker(field, readonly, ctx);
5316
5316
  }
5317
+ // 左侧树右侧人员列表的下拉框模式,不再支持,而是执行下面的lookupToAmisPicker函数弹出选人窗口
5317
5318
  // return await lookupToAmisSelectUser(field, readonly, ctx);
5318
5319
  }
5319
5320
 
@@ -5414,6 +5415,9 @@ async function getIdsPickerSchema(field, readonly, ctx){
5414
5415
  top: top,
5415
5416
  ...ctx
5416
5417
  });
5418
+
5419
+ pickerSchema.affixHeader = false;
5420
+
5417
5421
  }
5418
5422
 
5419
5423
  const data = {
@@ -5443,7 +5447,6 @@ async function getIdsPickerSchema(field, readonly, ctx){
5443
5447
  if(readonly){
5444
5448
  data.tpl = await getLookupTpl(field, ctx);
5445
5449
  }
5446
-
5447
5450
  return data;
5448
5451
  }
5449
5452
 
@@ -7618,7 +7621,11 @@ async function getTableApi(mainObject, fields, options){
7618
7621
  filters = systemFilters;
7619
7622
  };
7620
7623
  if(api.data.$self.additionalFilters){
7621
- userFilters.push(api.data.$self.additionalFilters)
7624
+ if(_.isString(api.data.$self.additionalFilters)){
7625
+ userFilters.push(eval(api.data.$self.additionalFilters))
7626
+ }else{
7627
+ userFilters.push(api.data.$self.additionalFilters)
7628
+ }
7622
7629
  }
7623
7630
 
7624
7631
  if(api.data.$self._isRelated){
@@ -12692,8 +12699,9 @@ var AmisObjectForm = function (props) { return __awaiter(void 0, void 0, void 0,
12692
12699
 
12693
12700
  var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
12694
12701
  var $schema, top, perPage, _a, showHeader, data, defaultData, _b, className, crudClassName, _c, showDisplayAs, sideSchema, _e, filterVisible, headerToolbarItems, headerSchema, ctx, listName, defaults, objectApiName, displayAs, formFactor, isMobile, uiSchema, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, listViewSchemaProps, serviceData;
12695
- return __generator(this, function (_f) {
12696
- switch (_f.label) {
12702
+ var _f;
12703
+ return __generator(this, function (_g) {
12704
+ switch (_g.label) {
12697
12705
  case 0:
12698
12706
  // console.time('AmisObjectListView')
12699
12707
  console.log("AmisObjectListView props", props);
@@ -12726,7 +12734,7 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
12726
12734
  }
12727
12735
  return [4 /*yield*/, getUISchema(objectApiName, false)];
12728
12736
  case 1:
12729
- uiSchema = _f.sent();
12737
+ uiSchema = _g.sent();
12730
12738
  listView = ___default.find(uiSchema.list_views, function (listView, name) {
12731
12739
  // 传入listViewName空值则取第一个
12732
12740
  if (!listName) {
@@ -12790,6 +12798,7 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
12790
12798
  if (!___default.has(data, 'uiSchema')) {
12791
12799
  serviceData.uiSchema = uiSchema;
12792
12800
  }
12801
+ serviceData.defaultListName = (_f = ___default.first(___default.values(uiSchema.list_views))) === null || _f === void 0 ? void 0 : _f.name;
12793
12802
  // console.timeEnd('AmisObjectListView')
12794
12803
  // console.log('serviceData===>', serviceData)
12795
12804
  // console.log('headerSchema===>', headerSchema)