@steedos-widgets/amis-lib 6.10.29 → 6.10.31

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
@@ -2439,7 +2439,7 @@ async function getMobileTableColumns(fields, options){
2439
2439
  link: url,
2440
2440
  innerClassName: {
2441
2441
  "steedos-listview-item block text-gray-500":"true",
2442
- "max-w-[360px]": "${display == 'split'}",
2442
+ "w-full": "${display == 'split'}",
2443
2443
  },
2444
2444
  body: {
2445
2445
  "type": "wrapper",
@@ -6636,7 +6636,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
6636
6636
  "className": "slds-filters__footer slds-grid slds-shrink-none flex justify-between p-0"
6637
6637
  }],
6638
6638
  "size": "xs",
6639
- "className": "slds-filters px-0"
6639
+ "className": "slds-filters px-3"
6640
6640
  },
6641
6641
  "size": "xs",
6642
6642
  "className": `p-0`,
@@ -9136,12 +9136,12 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
9136
9136
  // if(toolbarCount){
9137
9137
  // toolbars.push(toolbarCount);
9138
9138
  // }
9139
- toolbars.push(toolbarReloadButton);
9140
- toolbars.push(toolbarDQuickSearchBox);
9141
9139
  if(toolbarFilter){
9142
9140
  toolbars.push(toolbarFilter);
9143
9141
  }
9142
+ toolbars.push(toolbarReloadButton);
9144
9143
  toolbars.push(toolbarDisplayAsButton);
9144
+ toolbars.push(toolbarDQuickSearchBox);
9145
9145
  return [
9146
9146
  // "bulkActions",
9147
9147
  ...(headerToolbarItems || []),
@@ -9456,7 +9456,7 @@ async function getObjectCRUD(objectSchema, fields, options){
9456
9456
  const bodyProps = {
9457
9457
  // toolbar: getToolbar(),
9458
9458
  // headerToolbar: getObjectHeaderToolbar(objectSchema, options.formFactor, {showDisplayAs}),
9459
- headerToolbarClassName: "px-0 py-2 border-b",
9459
+ headerToolbarClassName: "px-3 py-2 border-b",
9460
9460
  footerToolbar: getObjectFooterToolbar(objectSchema, options.formFactor, {
9461
9461
  ...options,
9462
9462
  disableStatistics: options.queryCount === false
@@ -17627,7 +17627,7 @@ const getApprovalDrawerSchema = async (instance, events) => {
17627
17627
  bodyClassName: 'p-2',
17628
17628
  footerClassName: 'p-2 pt-0',
17629
17629
  drawerContainer: ()=>{
17630
- return document.body;
17630
+ return document.querySelector(".steedos-amis-instance-view");//document.body;
17631
17631
  },
17632
17632
  body: [
17633
17633
  {
@@ -17725,6 +17725,21 @@ const getApprovalDrawerSchema = async (instance, events) => {
17725
17725
  ],
17726
17726
  id: "u:approve_8861156e0b23",
17727
17727
  position: "bottom",
17728
+ "onEvent": {
17729
+ "cancel": {
17730
+ "actions": [
17731
+ {
17732
+ "actionType": "custom",
17733
+ "script": (context, doAction, event)=>{
17734
+ var instancePageContent = document.querySelector(".steedos-amis-instance-view .antd-Page-content");
17735
+ if (instancePageContent){
17736
+ $(instancePageContent).css("paddingBottom", "0px");
17737
+ }
17738
+ }
17739
+ }
17740
+ ]
17741
+ }
17742
+ },
17728
17743
  actions: [
17729
17744
  {
17730
17745
  type: "button",
@@ -17995,8 +18010,8 @@ const getInstanceApprovalHistory = async ()=>{
17995
18010
  /*
17996
18011
  * @Author: baozhoutao@steedos.com
17997
18012
  * @Date: 2022-09-07 16:20:45
17998
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
17999
- * @LastEditTime: 2025-12-04 13:47:10
18013
+ * @LastEditors: yinlianghui yinlianghui@hotoa.com
18014
+ * @LastEditTime: 2025-12-09 16:06:24
18000
18015
  * @Description:
18001
18016
  */
18002
18017
 
@@ -18932,6 +18947,23 @@ const getApproveButton = async (instance, events)=>{
18932
18947
  actionType: "drawer",
18933
18948
  drawer: await getApprovalDrawerSchema(instance, events),
18934
18949
  },
18950
+ {
18951
+ "actionType": "wait",
18952
+ "args": {
18953
+ "time": 1000 //延时等底部签批栏drawer弹出再执行下面的添加审批单内部底边距脚本,不等的话拿不到drawer高度
18954
+ }
18955
+ },
18956
+ {
18957
+ "actionType": "custom",
18958
+ "script": (context, doAction, event) => {
18959
+ // 每次点开底部签批栏添加审批单内部底边距以解决签批栏会挡住申请单内容的问题
18960
+ var instancePageContent = document.querySelector(".steedos-amis-instance-view .antd-Page-content");
18961
+ var approvalDrawerContent = document.querySelector(".approval-drawer .antd-Drawer-content");
18962
+ if (instancePageContent && approvalDrawerContent) {
18963
+ $(instancePageContent).css("paddingBottom", `${approvalDrawerContent.clientHeight + 10}px`);
18964
+ }
18965
+ }
18966
+ }
18935
18967
  ],
18936
18968
  },
18937
18969
  },
@@ -18960,6 +18992,15 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18960
18992
 
18961
18993
  var lastAtBottom = false; // 上一个scroll事件是否到底
18962
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
+
18963
19004
  function isAtBottom() {
18964
19005
  var scrollTop = bodyEl.scrollTop,
18965
19006
  scrollHeight = bodyEl.scrollHeight,
@@ -18973,6 +19014,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18973
19014
  if (atBottom && e.deltaY > 0 && !isDrawerOpen()) {
18974
19015
  // [wheel] 拖动条在底部且向下滚,弹drawer
18975
19016
  btn.click();
19017
+ scrollToBottom();
18976
19018
  }
18977
19019
  });
18978
19020
 
@@ -18982,6 +19024,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18982
19024
  if (!lastAtBottom && atBottom && !isDrawerOpen()) {
18983
19025
  // [scroll] 拖动条到底,弹drawer
18984
19026
  btn.click();
19027
+ scrollToBottom();
18985
19028
  }
18986
19029
  lastAtBottom = atBottom;
18987
19030
  });
@@ -19040,7 +19083,7 @@ const getFlowFormSchema = async (instance, box) => {
19040
19083
  "recordId": instance._id,
19041
19084
  "id": "u:e6b2adbe0e21",
19042
19085
  "showRecordTitle": false,
19043
- "className": "p-0 m-0 p0 m0 bg-gray-50 sm:rounded-tl sm:rounded-tr"
19086
+ "className": "sm:rounded-tl sm:rounded-tr"
19044
19087
  },
19045
19088
  "css": {
19046
19089
  ".steedos-amis-instance-view-body": {
@@ -19058,8 +19101,8 @@ const getFlowFormSchema = async (instance, box) => {
19058
19101
  "font-size": "14px",
19059
19102
  "font-weight": "500"
19060
19103
  },
19061
- ".steedos-object-record-detail-header .antd-Grid-col--mdAuto": {
19062
- "padding": "0px !important"
19104
+ ".steedos-amis-instance-view.steedos-instance-style-table .antd-Page-body": {
19105
+ "width": "1024px"
19063
19106
  },
19064
19107
  ".antd-List-placeholder": {
19065
19108
  "display": "none"