@steedos-widgets/amis-lib 6.3.2 → 6.3.4
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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +21 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +7 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -7777,7 +7777,7 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
7777
7777
|
|
|
7778
7778
|
// console.log('=======================max=========================', max)
|
|
7779
7779
|
|
|
7780
|
-
if(objectSchema.compactLayouts){
|
|
7780
|
+
if(objectSchema.compactLayouts && objectSchema.compactLayouts.length > 0){
|
|
7781
7781
|
const details = [];
|
|
7782
7782
|
_.each(_.slice(_.difference(objectSchema.compactLayouts, [objectSchema.NAME_FIELD_KEY]), 0, max), (fieldName)=>{
|
|
7783
7783
|
const field = objectSchema.fields[fieldName];
|
|
@@ -8973,18 +8973,19 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
8973
8973
|
}
|
|
8974
8974
|
let toolbarReloadButton;
|
|
8975
8975
|
const onReloadScript = `
|
|
8976
|
-
// const scope = event.context.scoped;
|
|
8977
|
-
// var listView = scope.parent.getComponents().find(function(n){
|
|
8978
|
-
// return n.props.type === "crud";
|
|
8979
|
-
// });
|
|
8980
|
-
// listView.handleChangePage(1);
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
8976
|
// 触发搜索,而不是reload,因为使用search-box可以在amissdk是3.6.3-patch.8+实现在非第一页的情况下,快速搜索输入框中过滤条件变更时再点刷新可以自动跳转翻页到第一页
|
|
8984
8977
|
const scope = event.context.scoped;
|
|
8985
8978
|
const sb = SteedosUI.getClosestAmisComponentByType(scope, "search-box");
|
|
8986
|
-
|
|
8987
|
-
|
|
8979
|
+
if (sb) {
|
|
8980
|
+
const sbValue = sb.state.value;
|
|
8981
|
+
sb.handleSearch(sbValue);
|
|
8982
|
+
}else{
|
|
8983
|
+
var listView = scope.parent.getComponents().find(function(n){
|
|
8984
|
+
return n.props.type === "crud";
|
|
8985
|
+
});
|
|
8986
|
+
listView.handleChangePage(1);
|
|
8987
|
+
}
|
|
8988
|
+
|
|
8988
8989
|
`;
|
|
8989
8990
|
toolbarReloadButton = {
|
|
8990
8991
|
// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
|
|
@@ -9675,9 +9676,10 @@ async function getFormSchemaWithDataFilter(form, options = {}){
|
|
|
9675
9676
|
async function getObjectForm(objectSchema, ctx){
|
|
9676
9677
|
const { recordId, formFactor, layout = formFactor === 'SMALL' ? 'normal' : "horizontal", labelAlign, tabId, appId, defaults, submitSuccActions = [],
|
|
9677
9678
|
formDataFilter, onFormDataFilter, amisData, env } = ctx;
|
|
9679
|
+
let enableTabs = ctx.enableTabs;
|
|
9678
9680
|
//优先识别组件上的enableTabs属性,若不存在,则识别对象上定义的
|
|
9679
|
-
if (typeof
|
|
9680
|
-
|
|
9681
|
+
if (typeof enableTabs !== 'boolean') {
|
|
9682
|
+
enableTabs = objectSchema.enable_form_tabs;
|
|
9681
9683
|
}
|
|
9682
9684
|
const fields = ___default.values(objectSchema.fields);
|
|
9683
9685
|
const formFields = getFormFields$1(objectSchema, ctx);
|
|
@@ -9721,7 +9723,7 @@ async function getObjectForm(objectSchema, ctx){
|
|
|
9721
9723
|
body: {
|
|
9722
9724
|
type: 'wrapper',
|
|
9723
9725
|
className: 'p-0 m-0',
|
|
9724
|
-
body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups, omitReadonlyFields: true})),
|
|
9726
|
+
body: await getFormBody(fields, formFields, Object.assign({}, ctx, {fieldGroups: objectSchema.field_groups, omitReadonlyFields: true, enableTabs})),
|
|
9725
9727
|
hiddenOn: "${editFormInited != true}",
|
|
9726
9728
|
},
|
|
9727
9729
|
panelClassName:'m-0 sm:rounded-lg shadow-none border-none',
|
|
@@ -9776,6 +9778,11 @@ async function getObjectDetail(objectSchema, recordId, ctx){
|
|
|
9776
9778
|
const fields = ___default.values(objectSchema.fields);
|
|
9777
9779
|
const formFields = getFormFields$1(objectSchema, ctx);
|
|
9778
9780
|
const serviceId = `service_detail_page`;
|
|
9781
|
+
let enableTabs = ctx.enableTabs;
|
|
9782
|
+
//优先识别组件上的enableTabs属性,若不存在,则识别对象上定义的
|
|
9783
|
+
if (typeof enableTabs !== 'boolean') {
|
|
9784
|
+
enableTabs = objectSchema.enable_form_tabs;
|
|
9785
|
+
}
|
|
9779
9786
|
const amisSchema = {
|
|
9780
9787
|
type: 'service',
|
|
9781
9788
|
name: `page_readonly_${recordId}`,
|
|
@@ -9802,7 +9809,7 @@ async function getObjectDetail(objectSchema, recordId, ctx){
|
|
|
9802
9809
|
body: await getFormBody(
|
|
9803
9810
|
map(fields, (field) => { field.readonly = true; return field; }),
|
|
9804
9811
|
map(formFields, (field) => { field.readonly = true; return field; }),
|
|
9805
|
-
Object.assign({}, ctx, { showSystemFields: true, fieldGroups: objectSchema.field_groups })
|
|
9812
|
+
Object.assign({}, ctx, { showSystemFields: true, fieldGroups: objectSchema.field_groups, enableTabs })
|
|
9806
9813
|
),
|
|
9807
9814
|
className: 'steedos-amis-form bg-white',
|
|
9808
9815
|
actions: [], // 不显示表单默认的提交按钮
|