@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.esm.js CHANGED
@@ -2412,7 +2412,7 @@ async function getMobileTableColumns(fields, options){
2412
2412
  link: url,
2413
2413
  innerClassName: {
2414
2414
  "steedos-listview-item block text-gray-500":"true",
2415
- "max-w-[360px]": "${display == 'split'}",
2415
+ "w-full": "${display == 'split'}",
2416
2416
  },
2417
2417
  body: {
2418
2418
  "type": "wrapper",
@@ -6609,7 +6609,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
6609
6609
  "className": "slds-filters__footer slds-grid slds-shrink-none flex justify-between p-0"
6610
6610
  }],
6611
6611
  "size": "xs",
6612
- "className": "slds-filters px-0"
6612
+ "className": "slds-filters px-3"
6613
6613
  },
6614
6614
  "size": "xs",
6615
6615
  "className": `p-0`,
@@ -9109,12 +9109,12 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
9109
9109
  // if(toolbarCount){
9110
9110
  // toolbars.push(toolbarCount);
9111
9111
  // }
9112
- toolbars.push(toolbarReloadButton);
9113
- toolbars.push(toolbarDQuickSearchBox);
9114
9112
  if(toolbarFilter){
9115
9113
  toolbars.push(toolbarFilter);
9116
9114
  }
9115
+ toolbars.push(toolbarReloadButton);
9117
9116
  toolbars.push(toolbarDisplayAsButton);
9117
+ toolbars.push(toolbarDQuickSearchBox);
9118
9118
  return [
9119
9119
  // "bulkActions",
9120
9120
  ...(headerToolbarItems || []),
@@ -9429,7 +9429,7 @@ async function getObjectCRUD(objectSchema, fields, options){
9429
9429
  const bodyProps = {
9430
9430
  // toolbar: getToolbar(),
9431
9431
  // headerToolbar: getObjectHeaderToolbar(objectSchema, options.formFactor, {showDisplayAs}),
9432
- headerToolbarClassName: "px-0 py-2 border-b",
9432
+ headerToolbarClassName: "px-3 py-2 border-b",
9433
9433
  footerToolbar: getObjectFooterToolbar(objectSchema, options.formFactor, {
9434
9434
  ...options,
9435
9435
  disableStatistics: options.queryCount === false
@@ -17600,7 +17600,7 @@ const getApprovalDrawerSchema = async (instance, events) => {
17600
17600
  bodyClassName: 'p-2',
17601
17601
  footerClassName: 'p-2 pt-0',
17602
17602
  drawerContainer: ()=>{
17603
- return document.body;
17603
+ return document.querySelector(".steedos-amis-instance-view");//document.body;
17604
17604
  },
17605
17605
  body: [
17606
17606
  {
@@ -17698,6 +17698,21 @@ const getApprovalDrawerSchema = async (instance, events) => {
17698
17698
  ],
17699
17699
  id: "u:approve_8861156e0b23",
17700
17700
  position: "bottom",
17701
+ "onEvent": {
17702
+ "cancel": {
17703
+ "actions": [
17704
+ {
17705
+ "actionType": "custom",
17706
+ "script": (context, doAction, event)=>{
17707
+ var instancePageContent = document.querySelector(".steedos-amis-instance-view .antd-Page-content");
17708
+ if (instancePageContent){
17709
+ $(instancePageContent).css("paddingBottom", "0px");
17710
+ }
17711
+ }
17712
+ }
17713
+ ]
17714
+ }
17715
+ },
17701
17716
  actions: [
17702
17717
  {
17703
17718
  type: "button",
@@ -17968,8 +17983,8 @@ const getInstanceApprovalHistory = async ()=>{
17968
17983
  /*
17969
17984
  * @Author: baozhoutao@steedos.com
17970
17985
  * @Date: 2022-09-07 16:20:45
17971
- * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
17972
- * @LastEditTime: 2025-12-04 13:47:10
17986
+ * @LastEditors: yinlianghui yinlianghui@hotoa.com
17987
+ * @LastEditTime: 2025-12-09 16:06:24
17973
17988
  * @Description:
17974
17989
  */
17975
17990
 
@@ -18905,6 +18920,23 @@ const getApproveButton = async (instance, events)=>{
18905
18920
  actionType: "drawer",
18906
18921
  drawer: await getApprovalDrawerSchema(instance, events),
18907
18922
  },
18923
+ {
18924
+ "actionType": "wait",
18925
+ "args": {
18926
+ "time": 1000 //延时等底部签批栏drawer弹出再执行下面的添加审批单内部底边距脚本,不等的话拿不到drawer高度
18927
+ }
18928
+ },
18929
+ {
18930
+ "actionType": "custom",
18931
+ "script": (context, doAction, event) => {
18932
+ // 每次点开底部签批栏添加审批单内部底边距以解决签批栏会挡住申请单内容的问题
18933
+ var instancePageContent = document.querySelector(".steedos-amis-instance-view .antd-Page-content");
18934
+ var approvalDrawerContent = document.querySelector(".approval-drawer .antd-Drawer-content");
18935
+ if (instancePageContent && approvalDrawerContent) {
18936
+ $(instancePageContent).css("paddingBottom", `${approvalDrawerContent.clientHeight + 10}px`);
18937
+ }
18938
+ }
18939
+ }
18908
18940
  ],
18909
18941
  },
18910
18942
  },
@@ -18933,6 +18965,15 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18933
18965
 
18934
18966
  var lastAtBottom = false; // 上一个scroll事件是否到底
18935
18967
 
18968
+ function scrollToBottom(){
18969
+ setTimeout(function(){
18970
+ var instanceViewBody = document.querySelector(".steedos-amis-instance-view .antd-Page-content .steedos-amis-instance-view-body");
18971
+ if (instanceViewBody){
18972
+ $(instanceViewBody).animate({scrollTop: $(instanceViewBody).prop("scrollHeight")});
18973
+ }
18974
+ }, 1000);
18975
+ }
18976
+
18936
18977
  function isAtBottom() {
18937
18978
  var scrollTop = bodyEl.scrollTop,
18938
18979
  scrollHeight = bodyEl.scrollHeight,
@@ -18946,6 +18987,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18946
18987
  if (atBottom && e.deltaY > 0 && !isDrawerOpen()) {
18947
18988
  // [wheel] 拖动条在底部且向下滚,弹drawer
18948
18989
  btn.click();
18990
+ scrollToBottom();
18949
18991
  }
18950
18992
  });
18951
18993
 
@@ -18955,6 +18997,7 @@ const getScrollToBottomAutoOpenApproveDrawerScript = () => {
18955
18997
  if (!lastAtBottom && atBottom && !isDrawerOpen()) {
18956
18998
  // [scroll] 拖动条到底,弹drawer
18957
18999
  btn.click();
19000
+ scrollToBottom();
18958
19001
  }
18959
19002
  lastAtBottom = atBottom;
18960
19003
  });
@@ -19013,7 +19056,7 @@ const getFlowFormSchema = async (instance, box) => {
19013
19056
  "recordId": instance._id,
19014
19057
  "id": "u:e6b2adbe0e21",
19015
19058
  "showRecordTitle": false,
19016
- "className": "p-0 m-0 p0 m0 bg-gray-50 sm:rounded-tl sm:rounded-tr"
19059
+ "className": "sm:rounded-tl sm:rounded-tr"
19017
19060
  },
19018
19061
  "css": {
19019
19062
  ".steedos-amis-instance-view-body": {
@@ -19031,8 +19074,8 @@ const getFlowFormSchema = async (instance, box) => {
19031
19074
  "font-size": "14px",
19032
19075
  "font-weight": "500"
19033
19076
  },
19034
- ".steedos-object-record-detail-header .antd-Grid-col--mdAuto": {
19035
- "padding": "0px !important"
19077
+ ".steedos-amis-instance-view.steedos-instance-style-table .antd-Page-body": {
19078
+ "width": "1024px"
19036
19079
  },
19037
19080
  ".antd-List-placeholder": {
19038
19081
  "display": "none"