@steedos-widgets/amis-lib 6.10.34-beta.3 → 6.10.34-beta.5
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 +56 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +56 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +9 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -3
package/dist/index.esm.js
CHANGED
|
@@ -14049,6 +14049,12 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
14049
14049
|
columnsTogglable: false
|
|
14050
14050
|
}
|
|
14051
14051
|
};
|
|
14052
|
+
if (readonly && !_$1.isEmpty(field.amis)){
|
|
14053
|
+
Object.assign(field.amis, {
|
|
14054
|
+
disabled: true,
|
|
14055
|
+
disabledOn: true
|
|
14056
|
+
});
|
|
14057
|
+
}
|
|
14052
14058
|
// console.log(`convertData ======>`, field, convertData)
|
|
14053
14059
|
for (const subField of field.subFields) {
|
|
14054
14060
|
if(!subField.name.endsWith(".$")){
|
|
@@ -14556,8 +14562,8 @@ function uuidv4() {
|
|
|
14556
14562
|
/*
|
|
14557
14563
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
14558
14564
|
* @Date: 2023-11-15 09:50:22
|
|
14559
|
-
* @LastEditors:
|
|
14560
|
-
* @LastEditTime: 2025-12-
|
|
14565
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
14566
|
+
* @LastEditTime: 2025-12-11 11:47:53
|
|
14561
14567
|
*/
|
|
14562
14568
|
|
|
14563
14569
|
/**
|
|
@@ -15175,6 +15181,17 @@ function getFormPaginationWrapper(props, form, mode) {
|
|
|
15175
15181
|
"value": lastestFieldValue
|
|
15176
15182
|
}
|
|
15177
15183
|
});
|
|
15184
|
+
|
|
15185
|
+
// 延时再保存一次当前页数据到子表组件中,解决新增/复制新增行后关闭弹出窗口时数据丢失造成翻页页码错误问题
|
|
15186
|
+
setTimeout(function(){
|
|
15187
|
+
doAction({
|
|
15188
|
+
"componentId": "${props.id}",
|
|
15189
|
+
"actionType": "setValue",
|
|
15190
|
+
"args": {
|
|
15191
|
+
"value": lastestFieldValue
|
|
15192
|
+
}
|
|
15193
|
+
});
|
|
15194
|
+
}, 1000);
|
|
15178
15195
|
}
|
|
15179
15196
|
event.data.__tableItems.forEach(function(n,i){
|
|
15180
15197
|
event.data.__tableItems[i] = lastestFieldValue[i];
|
|
@@ -15255,7 +15272,7 @@ async function getForm(props, mode = "edit", formId) {
|
|
|
15255
15272
|
"type": "form",
|
|
15256
15273
|
"id": formId,
|
|
15257
15274
|
"title": "表单",
|
|
15258
|
-
"debug": false,
|
|
15275
|
+
"debug": window.amis_form_debug || false,
|
|
15259
15276
|
"mode": "normal",
|
|
15260
15277
|
"body": body,
|
|
15261
15278
|
"wrapWithPanel": false,
|
|
@@ -15496,6 +15513,17 @@ async function getButtonActions(props, mode) {
|
|
|
15496
15513
|
}
|
|
15497
15514
|
// 触发翻页按钮事件,实现保存当前页数据并跳转到最后一行
|
|
15498
15515
|
scope.getComponentById(buttonNextId).props.dispatchEvent("click", event.data);
|
|
15516
|
+
|
|
15517
|
+
// 延时再保存一次当前页数据到子表组件中,解决新增/复制新增行后关闭弹出窗口时数据丢失造成翻页页码错误问题
|
|
15518
|
+
setTimeout(function(){
|
|
15519
|
+
doAction({
|
|
15520
|
+
"componentId": "${props.id}",
|
|
15521
|
+
"actionType": "setValue",
|
|
15522
|
+
"args": {
|
|
15523
|
+
"value": fieldValue
|
|
15524
|
+
}
|
|
15525
|
+
});
|
|
15526
|
+
}, 1000);
|
|
15499
15527
|
`;
|
|
15500
15528
|
let onSaveAndCopyItemScript = `
|
|
15501
15529
|
let scope = event.context.scoped;
|
|
@@ -15568,6 +15596,17 @@ async function getButtonActions(props, mode) {
|
|
|
15568
15596
|
}
|
|
15569
15597
|
// 触发翻页按钮事件,实现保存当前页数据并跳转到最后一行
|
|
15570
15598
|
scope.getComponentById(buttonNextId).props.dispatchEvent("click", event.data);
|
|
15599
|
+
|
|
15600
|
+
// 延时再保存一次当前页数据到子表组件中,解决新增/复制新增行后关闭弹出窗口时数据丢失造成翻页页码错误问题
|
|
15601
|
+
setTimeout(function(){
|
|
15602
|
+
doAction({
|
|
15603
|
+
"componentId": "${props.id}",
|
|
15604
|
+
"actionType": "setValue",
|
|
15605
|
+
"args": {
|
|
15606
|
+
"value": fieldValue
|
|
15607
|
+
}
|
|
15608
|
+
});
|
|
15609
|
+
}, 1000);
|
|
15571
15610
|
`;
|
|
15572
15611
|
let dialogButtons = [
|
|
15573
15612
|
{
|
|
@@ -18505,7 +18544,6 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
18505
18544
|
tpl.type = "steedos-input-table";
|
|
18506
18545
|
tpl.addable = field.permission === "editable";
|
|
18507
18546
|
tpl.editable = tpl.addable;
|
|
18508
|
-
tpl.copyable = tpl.addable;
|
|
18509
18547
|
tpl.removable = tpl.addable;
|
|
18510
18548
|
if(tpl.addable){
|
|
18511
18549
|
tpl.actionData = {
|
|
@@ -18608,16 +18646,23 @@ const getFieldReadonlyTpl = async (field, label)=>{
|
|
|
18608
18646
|
// tpl.format = 'YYYY-MM-DD HH:mm'
|
|
18609
18647
|
tpl.tpl = `\${${field.code}.name}`;
|
|
18610
18648
|
}else if(field.type === 'table'){
|
|
18611
|
-
tpl.type = "input-table";
|
|
18612
|
-
tpl.
|
|
18613
|
-
tpl.
|
|
18614
|
-
tpl.
|
|
18615
|
-
tpl.copyable = tpl.addable;
|
|
18616
|
-
tpl.columns = [];
|
|
18649
|
+
tpl.type = "steedos-input-table";
|
|
18650
|
+
tpl.disabled = true;
|
|
18651
|
+
tpl.autoGeneratePrimaryKeyValue = true;
|
|
18652
|
+
tpl.fields = [];
|
|
18617
18653
|
for (const sField of field.fields) {
|
|
18618
18654
|
if (sField.type != "hidden") {
|
|
18655
|
+
sField.permission = "readonly";
|
|
18619
18656
|
const column = await getTdInputTpl(sField, true);
|
|
18620
|
-
|
|
18657
|
+
// console.log('table column', column, sField);
|
|
18658
|
+
if(column.type === 'steedos-field'){
|
|
18659
|
+
if(sField.visibleOn){
|
|
18660
|
+
column.config.visibleOn = sField.visibleOn;
|
|
18661
|
+
}
|
|
18662
|
+
tpl.fields.push(column.config);
|
|
18663
|
+
}else {
|
|
18664
|
+
tpl.fields.push(column);
|
|
18665
|
+
}
|
|
18621
18666
|
}
|
|
18622
18667
|
}
|
|
18623
18668
|
}else if(field.type === 'html'){
|