@steedos/service-plugin-amis 2.4.0-beta.18 → 2.4.0-beta.19

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.
@@ -178,22 +178,13 @@
178
178
  },
179
179
  {
180
180
  "type": "service",
181
- "body": [
182
- {
183
- "type": "steedos-field",
184
- "name": "literal_value",
185
- "clearValueOnHidden": true,
186
- "fieldName": "literal_value",
187
- "field": "${literal_value_schema}",
188
- "visibleOn": "this.operation === 'literal' && !!this.literal_value_schema"
189
- }
190
- ],
191
181
  "id": "u:d201a629c160",
182
+ "body": [],
192
183
  "messages": {},
193
- "api": {
184
+ "schemaApi": {
194
185
  "method": "get",
195
186
  "url": "${context.rootUrl}/service/api/@${object_name}/uiSchema?field_name=${field_name}&operation=${operation}",
196
- "adaptor": "const formData = api.body;\nconst target_field_name = formData.field_name;\nconst target_object_uiSchema = payload;\nconst target_fields = target_object_uiSchema && target_object_uiSchema.fields;\nconst target_field_type = target_fields && target_fields[target_field_name].type;\nlet literal_value_schema = {\n \"type\": \"text\",\n \"name\": \"literal_value\",\n \"label\": \"指定新字段值\",\n \"required\": false,\n \"is_wide\": true,\n \"labelClassName\": \"text-left\"\n}\nif (target_field_type) {\n literal_value_schema = Object.assign({}, target_object_uiSchema.fields[target_field_name], {\n name: \"literal_value\",\n label: \"指定新字段值\",\n disabled: false,\n readonly: false,\n is_wide: true\n });\n}\npayload = {};\npayload.data = {\n literal_value_schema\n}\nreturn payload;",
187
+ "adaptor": "const formData = api.body;\nconst target_field_name = formData.field_name;\nconst target_object_uiSchema = payload;\nconst target_fields = target_object_uiSchema && target_object_uiSchema.fields;\nconst target_field_type = target_fields && target_fields[target_field_name].type;\nlet literal_value_schema = {\n \"type\": \"text\",\n \"name\": \"literal_value\",\n \"label\": \"指定新字段值\",\n \"required\": false,\n \"is_wide\": true,\n \"labelClassName\": \"text-left\"\n}\nif (target_field_type) {\n literal_value_schema = Object.assign({}, target_object_uiSchema.fields[target_field_name], {\n name: \"literal_value\",\n label: \"指定新字段值\",\n disabled: false,\n readonly: false,\n is_wide: true\n });\n}\npayload = {\n \"status\": 0,\n \"msg\": \"\",\n \"data\": {\n \"body\": [\n {\n \"type\": \"steedos-field\",\n \"field\": literal_value_schema,\n \"name\": \"literal_value\",\n \"clearValueOnHidden\": true,\n \"fieldName\": \"literal_value\",\n \"visibleOn\": \"this.operation === 'literal'\"\n }\n ]\n }\n}\nreturn payload;",
197
188
  "sendOn": "!!this.object_name && !!this.field_name && this.operation === 'literal'",
198
189
  "headers": {
199
190
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
@@ -534,7 +534,16 @@
534
534
  "script": "const data = context.props.data;\nif (!data._id) { \n return;\n}\nif (data.tab_items) {\n return;\n}\n\nconst tabOptions = data.tabs_options || [];\nconst tabItems = [];\n// 把应用中原来tabs属性值添加到新的tab_items属性的默认值中\nif (data.tabs && data.tabs.length) {\n data.tabs.forEach(function (item) {\n tabItems.push({ tab_name: item });\n });\n}\nconst pushObjectsToTabItems = function (objects) {\n objects.forEach(function (item) {\n // 已经有绑定到指定对象的选项卡就不添加\n let existObjectItem = !!tabItems.find(function (tabItem) {\n return !!tabOptions.find(function (option) {\n return tabItem.tab_name === tabItem.value && option.object === item;\n });\n });\n if (existObjectItem) {\n return;\n }\n // 找到指向指定对象的选项卡\n let tempOption = tabOptions.find(function (option) {\n return option.type === \"object\" && option.object === item;\n });\n if (!tempOption) {\n return;\n }\n // 选项卡名称如果重复了就不添加\n let existTabItem = !!tabItems.find(function (tabItem) {\n return tabItem.tab_name === tempOption.value;\n });\n if (existTabItem) {\n return;\n }\n if (tempOption) {\n tabItems.push({ tab_name: tempOption.value });\n }\n });\n}\n// 把应用中原来objects属性值添加到新的tab_items属性的默认值中\nif (data.objects && data.objects.length) {\n pushObjectsToTabItems(data.objects);\n}\n// 把应用中原来mobile_objects属性值添加到新的tab_items属性的默认值中\nif (data.mobile_objects && data.mobile_objects.length) {\n pushObjectsToTabItems(data.mobile_objects);\n}\n\ndoAction({\n actionType: 'setValue',\n args: {\n \"value\": { tab_items: tabItems }\n }\n});"
535
535
  }
536
536
  ]
537
- }
537
+ },
538
+ "submitSucc": {
539
+ "weight": 0,
540
+ "actions": [
541
+ {
542
+ "componentId": "listview_apps",
543
+ "actionType": "reload"
544
+ }
545
+ ]
546
+ }
538
547
  },
539
548
  "id": "apps-form"
540
549
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-plugin-amis",
3
- "version": "2.4.0-beta.18",
3
+ "version": "2.4.0-beta.19",
4
4
  "main": "package.service.js",
5
5
  "scripts": {
6
6
  "build": "yarn build:tailwind-base && yarn build:tailwind",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@steedos-widgets/amis-lib": "^1.0.10"
18
18
  },
19
- "gitHead": "62ac67a437778039d0b498d09ffde85912e33dd9",
19
+ "gitHead": "0a5d60be217f234f44dfd83ba5886c6e1bcea082",
20
20
  "devDependencies": {
21
21
  "tailwindcss": "3.2.4"
22
22
  }
@@ -226,6 +226,10 @@ body.steedos .gap-x-3 {
226
226
  column-gap: 0.75rem
227
227
  }
228
228
 
229
+ body.steedos .overflow-hidden {
230
+ overflow: hidden
231
+ }
232
+
229
233
  body.steedos .overflow-y-auto {
230
234
  overflow-y: auto
231
235
  }