@steedos/service-plugin-amis 2.4.0-beta.14 → 2.4.0-beta.16

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.
@@ -203,7 +203,7 @@
203
203
  console.error(`error`, error)
204
204
  }
205
205
  }
206
- const AmisEnv = {
206
+ AmisEnv = {
207
207
  // getModalContainer: (props)=>{
208
208
  // let div = document.querySelector("#amisModalContainer");
209
209
  // if(!div){
@@ -279,19 +279,61 @@
279
279
  return scoped = ref
280
280
  }
281
281
 
282
- React.useEffect(()=>{
282
+
283
+ let amisReact = amisRequire('react');
284
+
285
+ amisReact.useEffect(()=>{
283
286
  const amisScope = amisRequire('amis/embed').embed(`.steedos-amis-render-scope-${name}`,schema, {data, name, locale: getAmisLng()}, Object.assign({}, AmisEnv, env))
284
287
  if(window.SteedosUI && schema.name){
285
288
  SteedosUI.refs[schema.name] = amisScope;
286
289
  }
287
290
  }, [])
288
- return React.createElement("div", {
291
+ return amisReact.createElement("div", {
289
292
  className: "amis-scope"
290
- }, React.createElement("div", {
293
+ }, amisReact.createElement("div", {
291
294
  className: `steedos-amis-render-scope-${name}`
292
295
  }));
293
296
  };
294
297
 
298
+ window.renderAmis = function (root, schema, data, env) {
299
+
300
+ if(SteedosUI.refs[schema.name]){
301
+ if(SteedosUI.refs[schema.name].unmount){
302
+ SteedosUI.refs[schema.name].unmount()
303
+ }else{
304
+ console.log(`not find amis scope unmount`)
305
+ }
306
+ }
307
+
308
+ // if(props.pageType === 'form'){
309
+ // env = Object.assign({
310
+ // getModalContainer: ()=>{
311
+ // return document.querySelector('.amis-scope');
312
+ // }
313
+ // }, env);
314
+ // }
315
+ schema.scopeRef = (ref) => {
316
+ try {
317
+ if(!window.amisScopes){
318
+ window.amisScopes = {};
319
+ }
320
+ if(name){
321
+ window.amisScopes[name] = ref;
322
+ }
323
+ } catch (error) {
324
+ console.error('error', error)
325
+ }
326
+
327
+ return scoped = ref
328
+ }
329
+
330
+
331
+ const amisScope = amisRequire('amis/embed').embed(root, schema, {data, name, locale: getAmisLng()}, Object.assign({}, AmisEnv, env))
332
+ if(window.SteedosUI && schema.name){
333
+ SteedosUI.refs[schema.name] = amisScope;
334
+ }
335
+ };
336
+
295
337
  const initMonaco = ()=>{
296
338
 
297
339
  // const { detect } = require('detect-browser');
@@ -0,0 +1,308 @@
1
+ {
2
+ "type": "page",
3
+ "body": [
4
+ {
5
+ "type": "service",
6
+ "className": "p-0",
7
+ "name": "page_edit_${recordId}",
8
+ "api": {
9
+ "method": "post",
10
+ "url": "${context.rootUrl}/graphql",
11
+ "adaptor": "\n if(payload.data.data){\n var data = payload.data.data[0];\n if(data){\n \n \n //初始化接口返回的字段移除字段值为null的字段\n for (key in data){\n if(data[key] === null){\n delete data[key];\n }\n }\n };\n payload.data = data;\n delete payload.extensions;\n }\n return payload;\n ",
12
+ "data": {
13
+ "query": "{data:action_field_updates(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,name,label,object_name,target_object,field_name,operation,formula,literal_value,description,reevaluate_on_change,undirect,created,created_by,modified,modified_by,_display:_ui{object_name,target_object,field_name,operation,reevaluate_on_change,undirect,created,created_by,modified,modified_by}, \n recordPermissions: _permissions{\n allowCreate,\n allowCreateFiles,\n allowDelete,\n allowDeleteFiles,\n allowEdit,\n allowEditFiles,\n allowRead,\n allowReadFiles,\n disabled_actions,\n disabled_list_views,\n field_permissions,\n modifyAllFiles,\n modifyAllRecords,\n modifyAssignCompanysRecords,\n modifyCompanyRecords,\n uneditable_fields,\n unreadable_fields,\n unrelated_objects,\n viewAllFiles,\n viewAllRecords,\n viewAssignCompanysRecords,\n viewCompanyRecords,\n }\n }}"
14
+ },
15
+ "headers": {
16
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
17
+ },
18
+ "sendOn": "!!this.recordId",
19
+ "cache": 100
20
+ },
21
+ "initFetch": null,
22
+ "body": [
23
+ {
24
+ "type": "form",
25
+ "title": "",
26
+ "body": [
27
+ {
28
+ "type": "fieldSet",
29
+ "id": "u:3ce1d050bcac",
30
+ "title": "通用",
31
+ "collapsable": true,
32
+ "body": [
33
+ {
34
+ "name": "name",
35
+ "label": "API 名称",
36
+ "required": true,
37
+ "type": "input-text",
38
+ "className": "m-1",
39
+ "labelClassName": "text-left",
40
+ "clearValueOnHidden": true,
41
+ "fieldName": "name",
42
+ "id": "u:8ebca359c714"
43
+ },
44
+ {
45
+ "name": "label",
46
+ "label": "显示名称",
47
+ "required": true,
48
+ "type": "input-text",
49
+ "className": "m-1",
50
+ "labelClassName": "text-left",
51
+ "clearValueOnHidden": true,
52
+ "fieldName": "label",
53
+ "id": "u:124c34a09c5c"
54
+ },
55
+ {
56
+ "name": "object_name",
57
+ "label": "对象",
58
+ "required": false,
59
+ "type": "select",
60
+ "joinValues": false,
61
+ "extractValue": true,
62
+ "autoComplete": {
63
+ "method": "post",
64
+ "url": "${context.rootUrl}/graphql",
65
+ "data": {
66
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}",
67
+ "$": "$$",
68
+ "$term": "$term",
69
+ "$value": "$object_name._id",
70
+ "rfield": "${object_name}"
71
+ },
72
+ "requestAdaptor": "\n var filters = '[]';\n var top = 10;\n if(api.data.$term){\n filters = '[\"name\", \"contains\", \"'+ api.data.$term +'\"]';\n }else if(api.data.$value){\n filters = '[\"_id\", \"=\", \"'+ api.data.$value +'\"]';\n }\n api.data.query = api.data.query.replace(/{__filters}/g, filters).replace('{__top}', top);\n return api;\n ",
73
+ "adaptor": "\n payload.data.options = eval(function anonymous(\n) {\n\n return Steedos.getObjectsOptions();\n\n})(api.data);\n return payload;\n "
74
+ },
75
+ "className": "m-1",
76
+ "labelClassName": "text-left",
77
+ "clearValueOnHidden": true,
78
+ "fieldName": "object_name",
79
+ "id": "u:0f2e40f882e2"
80
+ },
81
+ {
82
+ "name": "target_object",
83
+ "label": "要更新的对象",
84
+ "required": false,
85
+ "type": "select",
86
+ "joinValues": false,
87
+ "extractValue": true,
88
+ "autoComplete": {
89
+ "method": "post",
90
+ "url": "${context.rootUrl}/graphql",
91
+ "data": {
92
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}",
93
+ "$": "$$",
94
+ "$term": "$term",
95
+ "$value": "$target_object._id",
96
+ "object_name": "$object_name",
97
+ "rfield": "${object_name}"
98
+ },
99
+ "requestAdaptor": "\n var filters = '[]';\n var top = 10;\n if(api.data.$term){\n filters = '[\"name\", \"contains\", \"'+ api.data.$term +'\"]';\n }else if(api.data.$value){\n filters = '[\"_id\", \"=\", \"'+ api.data.$value +'\"]';\n }\n api.data.query = api.data.query.replace(/{__filters}/g, filters).replace('{__top}', top);\n return api;\n ",
100
+ "adaptor": "\n payload.data.options = eval(function anonymous(doc\n) {\n\n var object = Creator.objectsByName[doc.object_name];\n if(object){\n var _options = [{label: object.label, value: object.name}];\n _.forEach(object.fields, function (field, fname) {\n if(field && field.type === 'master_detail' && _.isString(field.reference_to)){\n var referenceToObject = Creator.objectsByName[field.reference_to];\n if(referenceToObject){\n _options.push({\n label: referenceToObject.label,\n value: field.name,\n });\n }\n }\n });\n return _options;\n }\n return [];\n\n})(api.data);\n return payload;\n "
101
+ },
102
+ "className": "m-1",
103
+ "labelClassName": "text-left",
104
+ "clearValueOnHidden": true,
105
+ "fieldName": "target_object",
106
+ "id": "u:dd1c95753238"
107
+ },
108
+ {
109
+ "name": "field_name",
110
+ "label": "要更新的字段",
111
+ "required": false,
112
+ "type": "select",
113
+ "joinValues": false,
114
+ "extractValue": true,
115
+ "autoComplete": {
116
+ "method": "post",
117
+ "url": "${context.rootUrl}/graphql",
118
+ "data": {
119
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}",
120
+ "$": "$$",
121
+ "$term": "$term",
122
+ "$value": "$field_name._id",
123
+ "object_name": "$object_name",
124
+ "target_object": "$target_object",
125
+ "rfield": "${object_name}"
126
+ },
127
+ "requestAdaptor": "\n var filters = '[]';\n var top = 10;\n if(api.data.$term){\n filters = '[\"name\", \"contains\", \"'+ api.data.$term +'\"]';\n }else if(api.data.$value){\n filters = '[\"_id\", \"=\", \"'+ api.data.$value +'\"]';\n }\n api.data.query = api.data.query.replace(/{__filters}/g, filters).replace('{__top}', top);\n return api;\n ",
128
+ "adaptor": "\n payload.data.options = eval(function anonymous(doc\n) {\n\n var mainObjectName = null;\n if(doc.target_object && doc.target_object != doc.object_name){\n mainObjectName = Creator.objectsByName[doc.object_name].fields[doc.target_object].reference_to;\n }else{\n mainObjectName = doc.object_name;\n }\n var object = Creator.objectsByName[mainObjectName];\n if(object){\n var _options = [];\n _.forEach(object.fields, function (field, fname) {\n if([\"formula\", \"summary\", \"autonumber\"].indexOf(field.type) < 0){\n /*公式、累计汇总、自动编号三种字段类型是只读的,不允许字段更新来变更其值*/\n _options.push({\n label: field.label,\n value: field.name,\n });\n }\n });\n return _options;\n }\n return [];\n\n})(api.data);\n return payload;\n "
129
+ },
130
+ "className": "m-1",
131
+ "labelClassName": "text-left",
132
+ "clearValueOnHidden": true,
133
+ "fieldName": "field_name",
134
+ "id": "u:204fadb7cef0"
135
+ },
136
+ {
137
+ "name": "operation",
138
+ "label": "新字段值类型",
139
+ "required": false,
140
+ "type": "select",
141
+ "joinValues": false,
142
+ "extractValue": true,
143
+ "autoComplete": {
144
+ "method": "post",
145
+ "url": "${context.rootUrl}/graphql",
146
+ "data": {
147
+ "query": "{objects(filters: [\"_id\", \"=\", \"-1\"]){_id}}",
148
+ "$": "$$",
149
+ "$term": "$term",
150
+ "$value": "$operation._id",
151
+ "field_name": "$field_name",
152
+ "target_object": "$target_object",
153
+ "object_name": "$object_name",
154
+ "rfield": "${object_name}"
155
+ },
156
+ "requestAdaptor": "\n var filters = '[]';\n var top = 10;\n if(api.data.$term){\n filters = '[\"name\", \"contains\", \"'+ api.data.$term +'\"]';\n }else if(api.data.$value){\n filters = '[\"_id\", \"=\", \"'+ api.data.$value +'\"]';\n }\n api.data.query = api.data.query.replace(/{__filters}/g, filters).replace('{__top}', top);\n return api;\n ",
157
+ "adaptor": "\n payload.data.options = eval(function anonymous(doc\n) {\n\n var mainObjectName = null;\n if(doc.target_object && doc.target_object != doc.object_name){\n mainObjectName = Creator.objectsByName[doc.object_name].fields[doc.target_object].reference_to;\n }else{\n mainObjectName = doc.object_name;\n }\n var object = Creator.objectsByName[mainObjectName];\n if(object && doc.field_name){\n var _options = [];\n var field = object.fields[doc.field_name];\n if(field && field.type != 'boolean'){\n _options.push({\n label: TAPi18n.__(\"action_field_updates_field_operation_options_null\"),\n value: 'null',\n }) \n }\n _options.push({\n label: TAPi18n.__(\"action_field_updates_field_operation_options_formula\"),\n value: 'formula',\n });\n _options.push({\n label: TAPi18n.__(\"action_field_updates_field_operation_options_literal\"),\n value: 'literal',\n })\n return _options;\n }\n return [];\n\n})(api.data);\n return payload;\n "
158
+ },
159
+ "className": "m-1",
160
+ "labelClassName": "text-left",
161
+ "clearValueOnHidden": true,
162
+ "fieldName": "operation",
163
+ "id": "u:627e520855b5",
164
+ "onEvent": {
165
+ "change": {
166
+ "weight": 0,
167
+ "actions": [
168
+ {
169
+ "actionType": "custom",
170
+ "script": "/* 自定义JS使用说明: \n * 1.动作执行函数doAction,可以执行所有类型的动作\n * 2.通过上下文对象context可以获取当前组件实例,例如context.props可以获取该组件相关属性\n * 3.事件对象event,在doAction之后执行event.stopPropagation = true;可以阻止后续动作执行\n*/\n\nconst current_field_name = context.props.name;\nconst current_field_label = context.props.label;\nconst formData = context.props.data;\nconst current_field_value = formData[current_field_name];\n\nif (current_field_value === 'literal') {\n const target_object_name = formData.object_name;\n const target_field_name = formData.field_name;\n const target_object_uiSchema = Creator.getObject(target_object_name);\n const target_fields = target_object_uiSchema && target_object_uiSchema.fields;\n const target_field_type = target_fields && target_fields[target_field_name].type;\n let literal_value_schema = {\n \"type\": \"text\",\n \"name\": \"literal_value\",\n \"label\": \"指定新字段值\",\n \"required\": false,\n \"is_wide\": true,\n \"labelClassName\": \"text-left\"\n }\n if (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 doAction({\n actionType: 'setValue',\n componentId: 'service-action_field_updates-form-edit',\n args: {\n value: {\n literal_value_schema\n }\n }\n });\n }\n}\n\n"
171
+ }
172
+ ]
173
+ }
174
+ },
175
+ "multiple": false
176
+ },
177
+ {
178
+ "name": "formula",
179
+ "label": "公式",
180
+ "required": false,
181
+ "type": "textarea",
182
+ "tpl": "<b><%=data.formula%></b>",
183
+ "className": "col-span-2 m-1",
184
+ "labelClassName": "text-left",
185
+ "clearValueOnHidden": true,
186
+ "fieldName": "formula",
187
+ "id": "u:20766a86a9f4",
188
+ "hiddenOn": "this.operation != 'formula'"
189
+ },
190
+ {
191
+ "type": "steedos-field",
192
+ "id": "u:dca4fd13be68",
193
+ "name": "literal_value",
194
+ "clearValueOnHidden": true,
195
+ "fieldName": "literal_value",
196
+ "field": "${literal_value_schema}",
197
+ "hiddenOn": "this.operation != 'literal' "
198
+ },
199
+ {
200
+ "name": "description",
201
+ "label": "描述",
202
+ "required": false,
203
+ "type": "textarea",
204
+ "tpl": "<b><%=data.description%></b>",
205
+ "className": "col-span-2 m-1",
206
+ "labelClassName": "text-left",
207
+ "clearValueOnHidden": true,
208
+ "fieldName": "description",
209
+ "id": "u:16a7ebd835a6"
210
+ },
211
+ {
212
+ "name": "reevaluate_on_change",
213
+ "label": "字段更改后重新评估工作流规则",
214
+ "required": false,
215
+ "type": "checkbox",
216
+ "tpl": null,
217
+ "className": "m-1",
218
+ "labelClassName": "text-left",
219
+ "clearValueOnHidden": true,
220
+ "fieldName": "reevaluate_on_change",
221
+ "id": "u:b9baf683b6b0"
222
+ },
223
+ {
224
+ "name": "undirect",
225
+ "label": "触发对象触发器、工作流规则、字段验证规则",
226
+ "required": false,
227
+ "type": "checkbox",
228
+ "tpl": null,
229
+ "className": "m-1",
230
+ "labelClassName": "text-left",
231
+ "clearValueOnHidden": true,
232
+ "fieldName": "undirect",
233
+ "id": "u:b86f699bbe4f"
234
+ }
235
+ ]
236
+ }
237
+ ],
238
+ "id": "u:f57077c2a95f",
239
+ "mode": "horizontal",
240
+ "persistData": false,
241
+ "promptPageLeave": true,
242
+ "name": "form_edit_${recordId}",
243
+ "debug": false,
244
+ "submitText": "",
245
+ "api": {
246
+ "method": "post",
247
+ "url": "${context.rootUrl}/graphql",
248
+ "data": {
249
+ "objectName": "${objectName}",
250
+ "$": "$$",
251
+ "recordId": "${recordId}",
252
+ "modalName": "${modalName}"
253
+ },
254
+ "requestAdaptor": "\n \n const formData = api.data.$;\n for (key in formData){\n // image、select等字段清空值后保存的空字符串转换为null。\n if(formData[key] === ''){\n formData[key] = null;\n }\n }\n const objectName = api.data.objectName;\n const fieldsName = Object.keys(formData);\n delete formData.created;\n delete formData.created_by;\n delete formData.modified;\n delete formData.modified_by;\n delete formData._display;\n delete formData.created;\r\ndelete formData.created_by;\r\ndelete formData.modified;\r\ndelete formData.modified_by;\n \n \n let query = `mutation{record: ${objectName}__insert(doc: {__saveData}){_id}}`;\n if(formData.recordId && formData.recordId !='new'){\n query = `mutation{record: ${objectName}__update(id: \"${formData._id}\", doc: {__saveData}){_id}}`;\n };\n delete formData._id;\n let __saveData = JSON.stringify(JSON.stringify(formData));\n \n api.data = {query: query.replace('{__saveData}', __saveData)};\n return api;\n ",
255
+ "responseData": {
256
+ "recordId": "${record._id}"
257
+ },
258
+ "adaptor": "\n if(payload.errors){\n payload.status = 2;\n payload.msg = payload.errors[0].message;\n }\n return payload;\n ",
259
+ "headers": {
260
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
261
+ }
262
+ },
263
+ "initFetch": true,
264
+ "panelClassName": "m-0 sm:rounded-lg shadow-none",
265
+ "bodyClassName": "p-0",
266
+ "className": "steedos-amis-form",
267
+ "onEvent": {
268
+ "submitSucc": {
269
+ "weight": 0,
270
+ "actions": [
271
+ {
272
+ "componentId": "listview_action_field_updates",
273
+ "actionType": "reload",
274
+ "expression": "!!listViewId"
275
+ },
276
+ {
277
+ "actionType": "custom",
278
+ "script": "\n const { recordId, listViewId } = context.props.data;\n const data = event.data;\n const appId = data.appId;\n const objectName = data.objectName;\n // 在记录详细界面时isRecordDetail为true\n // TODO: isRecordDetail这个判断需要优化\n const isRecordDetail = !!data.$master && data.$master.$master?.recordId;\n if(recordId){\n // 编辑记录时,刷新主表单\n doAction({\n componentId: `detail_${recordId}`,\n actionType: \"reload\",\n expression: `!${listViewId}`\n });\n }\n else if(!isRecordDetail){\n // 在列表视图界面新建记录时跳转到详细页面\n const jumpTo = event.context.env && event.context.env.jumpTo;\n if(jumpTo){\n const newRecordId = data.result.data?.recordId;\n jumpTo(\"/app/\" + appId + \"/\" + objectName + \"/view/\" + newRecordId);\n }\n }\n "
279
+ }
280
+ ]
281
+ }
282
+ }
283
+ }
284
+ ],
285
+ "initApi": null,
286
+ "id": "service-action_field_updates-form-edit",
287
+ "data": {
288
+ "$": "$$",
289
+ "literal_value_schema": {
290
+ "type": "text",
291
+ "name": "literal_value",
292
+ "label": "指定新字段值",
293
+ "required": false,
294
+ "is_wide": true,
295
+ "labelClassName": "text-left"
296
+ }
297
+ }
298
+ }
299
+ ],
300
+ "data": {
301
+ "objectName": "action_field_updates",
302
+ "context": {}
303
+ },
304
+ "regions": [
305
+ "body"
306
+ ],
307
+ "bodyClassName": ""
308
+ }
@@ -0,0 +1,12 @@
1
+ name: action_field_updates
2
+ is_active: true
3
+ label: 字段更新表单
4
+ object_name: action_field_updates
5
+ pageAssignments:
6
+ - desktop: true
7
+ mobile: true
8
+ page: action_field_updates
9
+ type: orgDefault
10
+ render_engine: amis
11
+ type: form
12
+ widgets: []
@@ -33,7 +33,7 @@
33
33
  "sendOn": "!!this.recordId",
34
34
  "adaptor": "var data = payload.data.data[0];\nif(data){\n //初始化接口返回的字段移除字段值为null的字段\n for (key in data){\n if(data[key] === null){\n delete data[key];\n }\n }\n};\nif (data.tab_items && !_.isArray(data.tab_items)) {\n // 数据库中存储的是对象格式而不是数组,转换为数组用于界面显示\n let arrTabItems = [];\n _.each(data.tab_items, function (n, k) {\n n.tab_name = k;\n delete n.index;\n arrTabItems.push(n);\n });\n data.tab_items = arrTabItems;\n}\npayload.data = data;\ndelete payload.extensions;\nreturn payload;\n ",
35
35
  "data": {
36
- "query": "{data:apps(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,name,code,icon_slds,visible,description,tabs,tab_items,tab_groups,objects,mobile_objects,is_creator,mobile,sort,url,is_use_ie,is_use_iframe,is_new_window,on_click,auth_name,secret,is_system,from_code_id,instance_state,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},_display{visible,is_creator,mobile,is_use_ie,is_use_iframe,is_new_window,is_system,instance_state,created,modified}}}"
36
+ "query": "{data:apps(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,name,code,icon_slds,visible, showSidebar, description,tabs,tab_items,tab_groups,objects,mobile_objects,is_creator,mobile,sort,url,is_use_ie,is_use_iframe,is_new_window,on_click,auth_name,secret,is_system,from_code_id,instance_state,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},_display{visible,is_creator,mobile,is_use_ie,is_use_iframe,is_new_window,is_system,instance_state,created,modified}}}"
37
37
  },
38
38
  "headers": {
39
39
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
@@ -157,6 +157,15 @@
157
157
  "labelClassName": "text-left",
158
158
  "id": "u:07a8a4c5f875"
159
159
  },
160
+ {
161
+ "name": "showSidebar",
162
+ "label": "菜单显示在左侧",
163
+ "type": "checkbox",
164
+ "tpl": null,
165
+ "className": "m-0",
166
+ "labelClassName": "text-left",
167
+ "id": "u:07a8a4c5f877"
168
+ },
160
169
  {
161
170
  "name": "description",
162
171
  "label": "描述",
@@ -1,6 +1,4 @@
1
1
  name: apps_form
2
- __filename: >-
3
- /Users/yinlianghui/Documents/GitHub/steedos-platform2-3/services/service-plugin-amis/main/default/pages/apps_form.page.yml
4
2
  is_active: true
5
3
  label: 应用程序表单
6
4
  object_name: apps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-plugin-amis",
3
- "version": "2.4.0-beta.14",
3
+ "version": "2.4.0-beta.16",
4
4
  "main": "package.service.js",
5
5
  "scripts": {
6
6
  "build": "yarn build:tailwind-base && yarn build:tailwind",
@@ -16,5 +16,5 @@
16
16
  "dependencies": {
17
17
  "@steedos-widgets/amis-lib": "^1.0.10"
18
18
  },
19
- "gitHead": "47f3797a400790410c8f333a4dbb21c877642aa9"
19
+ "gitHead": "1a6e749338be48912c63f1019b39294267132e3b"
20
20
  }
@@ -13,10 +13,6 @@
13
13
  vertical-align: initial !important;
14
14
  } */
15
15
 
16
- body{
17
- -webkit-font-smoothing: inherit !important;
18
- }
19
-
20
16
  /* .row-main{
21
17
  border-radius: 0.25rem
22
18
  } */
@@ -52,15 +48,6 @@ body{
52
48
  min-width: 100px;
53
49
  }
54
50
 
55
- .steedos-amis-form .antd-Collapse .antd-Form--normal, .antd-Form--normal .antd-Tabs .antd-Tabs-content .antd-Tabs-pane .form-content{
56
- display: grid!important;
57
- grid-template-columns: repeat(2,minmax(0,1fr))!important;
58
- grid-row-gap: 1rem!important;
59
- row-gap: 1rem!important;
60
- grid-column-gap: 1.5rem!important;
61
- -moz-column-gap: 1.5rem!important;
62
- column-gap: 1.5rem!important;
63
- }
64
51
 
65
52
  /* fix checkbox 隐藏时导致滚动条异常 */
66
53
  .steedos-amis-form .antd-Collapse .antd-Form--normal .antd-Checkbox input{
@@ -76,10 +63,6 @@ body{
76
63
  border-bottom: none;
77
64
  }
78
65
 
79
- .steedos-amis-form .antd-Collapse .antd-Form--normal{
80
- grid-template-columns: none !important;
81
- }
82
-
83
66
  .ant-modal-root .amis-scope .antd-Panel-footerWrap{
84
67
  position: fixed;
85
68
  }
@@ -54,10 +54,6 @@ body.steedos .absolute {
54
54
  position: absolute
55
55
  }
56
56
 
57
- body.steedos .relative {
58
- position: relative
59
- }
60
-
61
57
  body.steedos .sticky {
62
58
  position: sticky
63
59
  }
@@ -85,12 +81,22 @@ body.steedos .col-span-2 {
85
81
  grid-column: span 2 / span 2
86
82
  }
87
83
 
84
+ body.steedos .m-1 {
85
+ margin: 0.25rem
86
+ }
87
+
88
88
  body.steedos .m-0 {
89
89
  margin: 0px
90
90
  }
91
91
 
92
- body.steedos .m-1 {
93
- margin: 0.25rem
92
+ body.steedos .mx-4 {
93
+ margin-left: 1rem;
94
+ margin-right: 1rem
95
+ }
96
+
97
+ body.steedos .my-2 {
98
+ margin-top: 0.5rem;
99
+ margin-bottom: 0.5rem
94
100
  }
95
101
 
96
102
  body.steedos .mr-4 {
@@ -149,10 +155,6 @@ body.steedos .h-\[50px\] {
149
155
  height: 50px
150
156
  }
151
157
 
152
- body.steedos .h-7 {
153
- height: 1.75rem
154
- }
155
-
156
158
  body.steedos .h-10 {
157
159
  height: 2.5rem
158
160
  }
@@ -302,6 +304,10 @@ body.steedos .py-2 {
302
304
  padding-bottom: 0.5rem
303
305
  }
304
306
 
307
+ body.steedos .pr-4 {
308
+ padding-right: 1rem
309
+ }
310
+
305
311
  body.steedos .pl-4 {
306
312
  padding-left: 1rem
307
313
  }
@@ -318,6 +324,10 @@ body.steedos .pb-16 {
318
324
  padding-bottom: 4rem
319
325
  }
320
326
 
327
+ body.steedos .pb-4 {
328
+ padding-bottom: 1rem
329
+ }
330
+
321
331
  body.steedos .pl-1\.5 {
322
332
  padding-left: 0.375rem
323
333
  }
@@ -359,6 +369,12 @@ body.steedos .underline {
359
369
  text-decoration-line: underline
360
370
  }
361
371
 
372
+ body.steedos .shadow-none {
373
+ --tw-shadow: 0 0 #0000;
374
+ --tw-shadow-colored: 0 0 #0000;
375
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
376
+ }
377
+
362
378
  body.steedos .filter {
363
379
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
364
380
  }
@@ -392,8 +408,8 @@ body.steedos .ease-in-out {
392
408
  margin: 0.75rem
393
409
  }
394
410
 
395
- body.steedos .sm\:flex {
396
- display: flex
411
+ body.steedos .sm\:mt-\[90px\] {
412
+ margin-top: 90px
397
413
  }
398
414
 
399
415
  body.steedos .sm\:w-\[220px\] {
@@ -404,6 +420,10 @@ body.steedos .ease-in-out {
404
420
  border-radius: 0.25rem
405
421
  }
406
422
 
423
+ body.steedos .sm\:rounded-lg {
424
+ border-radius: 0.5rem
425
+ }
426
+
407
427
  body.steedos .sm\:border {
408
428
  border-width: 1px
409
429
  }
@@ -1,11 +0,0 @@
1
- name: render_engine
2
- type: select
3
- label: 渲染器
4
- defaultValue: amis
5
- options:
6
- - label: Amis
7
- value: amis
8
- - label: Redash
9
- value: redash
10
- required: true
11
- sort_no: 125
@@ -1,2 +0,0 @@
1
- extend: pages
2
- name: pages