@steedos-widgets/amis-lib 6.10.30 → 6.10.32

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/dist/index.cjs.js CHANGED
@@ -18011,7 +18011,7 @@ const getInstanceApprovalHistory = async ()=>{
18011
18011
  * @Author: baozhoutao@steedos.com
18012
18012
  * @Date: 2022-09-07 16:20:45
18013
18013
  * @LastEditors: yinlianghui yinlianghui@hotoa.com
18014
- * @LastEditTime: 2025-12-09 15:28:25
18014
+ * @LastEditTime: 2025-12-09 17:13:13
18015
18015
  * @Description:
18016
18016
  */
18017
18017
 
@@ -18960,7 +18960,7 @@ const getApproveButton = async (instance, events)=>{
18960
18960
  var instancePageContent = document.querySelector(".steedos-amis-instance-view .antd-Page-content");
18961
18961
  var approvalDrawerContent = document.querySelector(".approval-drawer .antd-Drawer-content");
18962
18962
  if (instancePageContent && approvalDrawerContent) {
18963
- $(instancePageContent).css("paddingBottom", `${approvalDrawerContent.clientHeight + 10}px`);
18963
+ $(instancePageContent).css("paddingBottom", `${approvalDrawerContent.clientHeight + 2}px`);
18964
18964
  }
18965
18965
  }
18966
18966
  }
@@ -18992,6 +18992,15 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18992
18992
 
18993
18993
  var lastAtBottom = false; // 上一个scroll事件是否到底
18994
18994
 
18995
+ function scrollToBottom(){
18996
+ setTimeout(function(){
18997
+ var instanceViewBody = document.querySelector(".steedos-amis-instance-view .antd-Page-content .steedos-amis-instance-view-body");
18998
+ if (instanceViewBody){
18999
+ $(instanceViewBody).animate({scrollTop: $(instanceViewBody).prop("scrollHeight")});
19000
+ }
19001
+ }, 1000);
19002
+ }
19003
+
18995
19004
  function isAtBottom() {
18996
19005
  var scrollTop = bodyEl.scrollTop,
18997
19006
  scrollHeight = bodyEl.scrollHeight,
@@ -19005,6 +19014,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
19005
19014
  if (atBottom && e.deltaY > 0 && !isDrawerOpen()) {
19006
19015
  // [wheel] 拖动条在底部且向下滚,弹drawer
19007
19016
  btn.click();
19017
+ scrollToBottom();
19008
19018
  }
19009
19019
  });
19010
19020
 
@@ -19014,6 +19024,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
19014
19024
  if (!lastAtBottom && atBottom && !isDrawerOpen()) {
19015
19025
  // [scroll] 拖动条到底,弹drawer
19016
19026
  btn.click();
19027
+ scrollToBottom();
19017
19028
  }
19018
19029
  lastAtBottom = atBottom;
19019
19030
  });
@@ -19090,8 +19101,12 @@ const getFlowFormSchema = async (instance, box) => {
19090
19101
  "font-size": "14px",
19091
19102
  "font-weight": "500"
19092
19103
  },
19093
- ".steedos-amis-instance-view.steedos-instance-style-table .antd-Page-body": {
19094
- "width": "1024px"
19104
+ ".steedos-amis-instance-view.steedos-instance-style-table .antd-Page-body .steedos-amis-instance-view-content": {
19105
+ "max-width": "1024px"
19106
+ },
19107
+ ".steedos-amis-instance-view .approval-drawer.antd-Drawer .antd-Drawer-content": {
19108
+ "box-shadow": "none",
19109
+ "border-top": "1px solid rgb(209 213 219)"
19095
19110
  },
19096
19111
  ".antd-List-placeholder": {
19097
19112
  "display": "none"
@@ -19110,66 +19125,71 @@ const getFlowFormSchema = async (instance, box) => {
19110
19125
  "background": "transparent !important"
19111
19126
  }
19112
19127
  },
19113
- body: [
19114
- await getAttachments(instance),
19115
- await getRelatedInstances(),
19116
- await getRelatedRecords(instance),
19117
- {
19118
- type: "form",
19119
- debug: false,
19120
- wrapWithPanel: false,
19121
- resetAfterSubmit: true,
19122
- body: [
19123
- {
19124
- type: "tpl",
19125
- id: "u:f5bb0ad602a6",
19126
- tpl: `<div class="instance-name">${instance.title}</div>`,
19127
- inline: true,
19128
- wrapperComponent: "",
19129
- style: {
19130
- fontFamily: "",
19131
- fontSize: 12,
19132
- textAlign: "center",
19133
- },
19134
- },
19135
- formContentSchema,
19136
- await getApplicantTableView(instance),
19137
- ],
19138
- id: "instance_form",
19139
- onEvent: {
19140
- // validateError: {
19141
- // weight: 0,
19142
- // actions: [
19143
- // {
19144
- // "componentId": "",
19145
- // "args": {
19146
- // "msgType": "info",
19147
- // "position": "top-right",
19148
- // "closeButton": true,
19149
- // "showIcon": true,
19150
- // "title": i18next.t('frontend_workflow_submit_validate_error_title'),//"提交失败",
19151
- // "msg": i18next.t('frontend_workflow_submit_validate_error_msg'),//"请填写必填字段"
19152
- // },
19153
- // "actionType": "toast"
19154
- // }
19155
- // ],
19156
- // },
19157
- change: {
19158
- weight: 0,
19159
- actions: [
19160
- {
19161
- "actionType": "reload",
19162
- "componentId": "u:next_step",
19163
- "args": {}
19128
+ body: [{
19129
+ "type": "wrapper",
19130
+ "body": [
19131
+ await getAttachments(instance),
19132
+ await getRelatedInstances(),
19133
+ await getRelatedRecords(instance),
19134
+ {
19135
+ type: "form",
19136
+ debug: false,
19137
+ wrapWithPanel: false,
19138
+ resetAfterSubmit: true,
19139
+ body: [
19140
+ {
19141
+ type: "tpl",
19142
+ id: "u:f5bb0ad602a6",
19143
+ tpl: `<div class="instance-name">${instance.title}</div>`,
19144
+ inline: true,
19145
+ wrapperComponent: "",
19146
+ style: {
19147
+ fontFamily: "",
19148
+ fontSize: 12,
19149
+ textAlign: "center",
19164
19150
  },
19165
- ...changeEvents
19166
- ]
19151
+ },
19152
+ formContentSchema,
19153
+ await getApplicantTableView(instance),
19154
+ ],
19155
+ id: "instance_form",
19156
+ onEvent: {
19157
+ // validateError: {
19158
+ // weight: 0,
19159
+ // actions: [
19160
+ // {
19161
+ // "componentId": "",
19162
+ // "args": {
19163
+ // "msgType": "info",
19164
+ // "position": "top-right",
19165
+ // "closeButton": true,
19166
+ // "showIcon": true,
19167
+ // "title": i18next.t('frontend_workflow_submit_validate_error_title'),//"提交失败",
19168
+ // "msg": i18next.t('frontend_workflow_submit_validate_error_msg'),//"请填写必填字段"
19169
+ // },
19170
+ // "actionType": "toast"
19171
+ // }
19172
+ // ],
19173
+ // },
19174
+ change: {
19175
+ weight: 0,
19176
+ actions: [
19177
+ {
19178
+ "actionType": "reload",
19179
+ "componentId": "u:next_step",
19180
+ "args": {}
19181
+ },
19182
+ ...changeEvents
19183
+ ]
19184
+ }
19167
19185
  }
19168
- }
19169
- },
19170
- await getInstanceApprovalHistory(),
19171
- await getApproveButton(instance, { submitEvents , nextStepInitedEvents, nextStepChangeEvents, nextStepUserChangeEvents})
19172
- ],
19186
+ },
19187
+ await getInstanceApprovalHistory(),
19188
+ await getApproveButton(instance, { submitEvents , nextStepInitedEvents, nextStepChangeEvents, nextStepUserChangeEvents})
19189
+ ],
19190
+ "size": "none",
19191
+ "className": "steedos-amis-instance-view-content"
19192
+ }],
19173
19193
  id: "u:instancePage",
19174
19194
  messages: {},
19175
19195
  pullRefresh: {},