@steedos-widgets/amis-object 3.6.0-beta.3 → 3.6.0-beta.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/amis-object.cjs.css +12 -14
- package/dist/amis-object.cjs.js +47 -18
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +12 -14
- package/dist/amis-object.esm.js +47 -18
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +12 -14
- package/dist/amis-object.umd.js +30 -22
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/dist/pages/PageListView.d.ts +1 -1
- package/package.json +3 -3
package/dist/amis-object.cjs.css
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--body-bg: #f9fafb;
|
|
3
3
|
--Page-main-bg: transparent;
|
|
4
|
+
--Form-mode-default-labelGap: 2px;
|
|
4
5
|
--Form-item-fontSize: 12px;
|
|
6
|
+
--Form-item-fontColor: rgb(68, 68, 68);
|
|
5
7
|
--Form-fontSize: 14px;
|
|
6
8
|
--Form-selectValue-fontSize: 14px;
|
|
7
9
|
--Form-item-gap: 0.75rem;
|
|
@@ -252,6 +254,7 @@ fieldset.antd-Collapse > legend.antd-Collapse-header > .antd-Collapse-arrow:befo
|
|
|
252
254
|
/* TODO: amis3.2.0 fieldset.antd-Collapse > legend类中多了background属性,影响分组样式 */
|
|
253
255
|
fieldset.antd-Collapse > legend{
|
|
254
256
|
height: unset;
|
|
257
|
+
width: unset;
|
|
255
258
|
}
|
|
256
259
|
|
|
257
260
|
/* crud中的快速搜索框样式改成与按钮风格统一的边框 */
|
|
@@ -476,9 +479,6 @@ fieldset.antd-Collapse > legend{
|
|
|
476
479
|
.m-0 {
|
|
477
480
|
margin: 0px
|
|
478
481
|
}
|
|
479
|
-
.m-1 {
|
|
480
|
-
margin: 0.25rem
|
|
481
|
-
}
|
|
482
482
|
.m-2 {
|
|
483
483
|
margin: 0.5rem
|
|
484
484
|
}
|
|
@@ -1159,13 +1159,6 @@ fieldset.antd-Collapse > legend{
|
|
|
1159
1159
|
.sm\:p-3 {
|
|
1160
1160
|
padding: 0.75rem
|
|
1161
1161
|
}
|
|
1162
|
-
.sm\:px-3 {
|
|
1163
|
-
padding-left: 0.75rem;
|
|
1164
|
-
padding-right: 0.75rem
|
|
1165
|
-
}
|
|
1166
|
-
.sm\:pt-3 {
|
|
1167
|
-
padding-top: 0.75rem
|
|
1168
|
-
}
|
|
1169
1162
|
.sm\:shadow {
|
|
1170
1163
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
1171
1164
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
@@ -1558,6 +1551,9 @@ fieldset.antd-Collapse > legend{
|
|
|
1558
1551
|
overflow: hidden;
|
|
1559
1552
|
text-overflow: ellipsis;
|
|
1560
1553
|
}
|
|
1554
|
+
.antd-Crud .antd-Table tbody td > .antd-Form-static {
|
|
1555
|
+
display: inline;
|
|
1556
|
+
}
|
|
1561
1557
|
|
|
1562
1558
|
|
|
1563
1559
|
.steedos-dropdown-button-overlay .ant-dropdown-menu-item {
|
|
@@ -1639,7 +1635,7 @@ body.steedos {
|
|
|
1639
1635
|
.steedos-amis-form .antd-Form--normal .antd-Tabs .antd-Tabs-content .antd-Tabs-pane .form-content {
|
|
1640
1636
|
display: grid;
|
|
1641
1637
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1642
|
-
row-gap:
|
|
1638
|
+
row-gap: 0.75rem;
|
|
1643
1639
|
-moz-column-gap: 1rem;
|
|
1644
1640
|
column-gap: 1rem;
|
|
1645
1641
|
}
|
|
@@ -1696,6 +1692,11 @@ body.steedos {
|
|
|
1696
1692
|
.steedos-object-form .steedos-input-rich-text-readonly .antd-RichTextControl {
|
|
1697
1693
|
border: 0;
|
|
1698
1694
|
}
|
|
1695
|
+
@media (max-width: 767px) {
|
|
1696
|
+
.steedos-object-form .antd-Form-item .antd-Form-label + .antd-Form-item-controlBox {
|
|
1697
|
+
max-width: unset;
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1699
1700
|
|
|
1700
1701
|
@media (max-width: 767px) {
|
|
1701
1702
|
.steedos-amis-form.antd-Form {
|
|
@@ -1896,9 +1897,6 @@ body.steedos {
|
|
|
1896
1897
|
.steedos-object-table colgroup col:nth-last-child(2) {
|
|
1897
1898
|
display: none;
|
|
1898
1899
|
}
|
|
1899
|
-
.steedos-object-table tbody td.antd-Field--quickEditable > .antd-Form-static {
|
|
1900
|
-
display: inline;
|
|
1901
|
-
}
|
|
1902
1900
|
.steedos-object-table tbody td.antd-Field--quickEditable .antd-Field-quickEditBtn {
|
|
1903
1901
|
padding-right: 13px;
|
|
1904
1902
|
}
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -3563,8 +3563,8 @@ const Router$1 = {
|
|
|
3563
3563
|
/*
|
|
3564
3564
|
* @Author: baozhoutao@steedos.com
|
|
3565
3565
|
* @Date: 2022-07-20 16:29:22
|
|
3566
|
-
* @LastEditors:
|
|
3567
|
-
* @LastEditTime: 2023-
|
|
3566
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
3567
|
+
* @LastEditTime: 2023-12-28 14:59:08
|
|
3568
3568
|
* @Description:
|
|
3569
3569
|
*/
|
|
3570
3570
|
|
|
@@ -3621,6 +3621,21 @@ function getLookupListView(refObjectConfig) {
|
|
|
3621
3621
|
return listView;
|
|
3622
3622
|
}
|
|
3623
3623
|
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* 获取可比较的amis版本号
|
|
3627
|
+
* @returns 只返回前两位版本,第三位忽略,比如3.6.3返回3.6
|
|
3628
|
+
*/
|
|
3629
|
+
function getComparableAmisVersion() {
|
|
3630
|
+
let amis = (window.amisRequire && window.amisRequire('amis')) || window.Amis;
|
|
3631
|
+
let amisVersion = amis && amis.version;
|
|
3632
|
+
if(amisVersion){
|
|
3633
|
+
let comparableVersions = amisVersion.split(".");
|
|
3634
|
+
let comparableVersion = parseFloat(comparableVersions[0].toString() + "." + comparableVersions[1].toString());
|
|
3635
|
+
return comparableVersion;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3624
3639
|
/*
|
|
3625
3640
|
* @Author: baozhoutao@steedos.com
|
|
3626
3641
|
* @Date: 2022-05-23 09:53:08
|
|
@@ -5349,8 +5364,8 @@ async function getTableColumns$1(fields, options){
|
|
|
5349
5364
|
const href = Router$1.getObjectDetailPath({
|
|
5350
5365
|
...options, formFactor: options.formFactor, appId: "${appId}", objectName: options.objectName || "${objectName}", recordId: `\${${options.idFieldName}}`
|
|
5351
5366
|
});
|
|
5352
|
-
columns[
|
|
5353
|
-
columns[
|
|
5367
|
+
columns[0].type = "tpl";
|
|
5368
|
+
columns[0].tpl = `<a href="${href}">\${${columns[0].name}}</a>`;
|
|
5354
5369
|
}
|
|
5355
5370
|
return columns;
|
|
5356
5371
|
}
|
|
@@ -14033,7 +14048,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
14033
14048
|
sendOn.push(`this.${fName}`);
|
|
14034
14049
|
});
|
|
14035
14050
|
if(depend_on.length > 0){
|
|
14036
|
-
apiInfo.url = `${apiInfo.url}
|
|
14051
|
+
apiInfo.url = `${apiInfo.url}&${depend_on.join('&')}`;
|
|
14037
14052
|
apiInfo.sendOn = `${sendOn.join(' && ')}`;
|
|
14038
14053
|
}
|
|
14039
14054
|
}
|
|
@@ -14141,6 +14156,13 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
14141
14156
|
autoComplete: apiInfo,
|
|
14142
14157
|
searchable: true,
|
|
14143
14158
|
};
|
|
14159
|
+
let amisVersion = getComparableAmisVersion();
|
|
14160
|
+
if(amisVersion >= 3.6){
|
|
14161
|
+
// amis 3.6中不加source会造成子表组件中弹出行编辑窗口的lookup字段有时不请求接口(概率现象,同一个地方反复操作有时请求有时不请求)
|
|
14162
|
+
// 但是同时配置autoComplete和source会多请求一次接口
|
|
14163
|
+
// TODO:应该想办法把是否字段在子表组件内,即ctx.isInputTable,如果不在子表组件内不需要加source
|
|
14164
|
+
data.source = apiInfo;
|
|
14165
|
+
}
|
|
14144
14166
|
//删除xlink:href中的rootUrl前缀,解决客户端svg为空的问题
|
|
14145
14167
|
const select_menuTpl = `<span class='flex items-center mt-0.5'>
|
|
14146
14168
|
<span role='img' aria-label='smile' class='anticon anticon-smile'>
|
|
@@ -14500,9 +14522,9 @@ const OMIT_FIELDS = ['created', 'created_by', 'modified', 'modified_by'];
|
|
|
14500
14522
|
// const Lookup = require('./lookup');
|
|
14501
14523
|
|
|
14502
14524
|
function getBaseFields(readonly){
|
|
14503
|
-
let
|
|
14525
|
+
let className = 'm-0';
|
|
14504
14526
|
if(readonly){
|
|
14505
|
-
|
|
14527
|
+
className = `${className}`;
|
|
14506
14528
|
}
|
|
14507
14529
|
return [
|
|
14508
14530
|
{
|
|
@@ -14510,7 +14532,7 @@ function getBaseFields(readonly){
|
|
|
14510
14532
|
label: "创建人",
|
|
14511
14533
|
type: "static",
|
|
14512
14534
|
labelClassName: 'text-left',
|
|
14513
|
-
className:
|
|
14535
|
+
className: className,
|
|
14514
14536
|
tpl: getCreatedInfoTpl()
|
|
14515
14537
|
},
|
|
14516
14538
|
{
|
|
@@ -14518,7 +14540,7 @@ function getBaseFields(readonly){
|
|
|
14518
14540
|
label: "修改人",
|
|
14519
14541
|
type: "static",
|
|
14520
14542
|
labelClassName: 'text-left',
|
|
14521
|
-
className:
|
|
14543
|
+
className: className,
|
|
14522
14544
|
tpl: getModifiedInfoTpl()
|
|
14523
14545
|
}
|
|
14524
14546
|
]
|
|
@@ -15214,9 +15236,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
15214
15236
|
}
|
|
15215
15237
|
if(!_$1__namespace.isEmpty(convertData)){
|
|
15216
15238
|
if(field.is_wide || convertData.type === 'group'){
|
|
15217
|
-
convertData.className = 'col-span-2 m-
|
|
15239
|
+
convertData.className = 'col-span-2 m-0';
|
|
15218
15240
|
}else {
|
|
15219
|
-
convertData.className = 'm-
|
|
15241
|
+
convertData.className = 'm-0';
|
|
15220
15242
|
}
|
|
15221
15243
|
if(readonly){
|
|
15222
15244
|
convertData.className = `${convertData.className} border-b`;
|
|
@@ -15622,7 +15644,7 @@ async function getFormBody(permissionFields, formFields, ctx){
|
|
|
15622
15644
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
15623
15645
|
* @Date: 2023-11-15 09:50:22
|
|
15624
15646
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
15625
|
-
* @LastEditTime: 2023-12-
|
|
15647
|
+
* @LastEditTime: 2023-12-28 15:54:36
|
|
15626
15648
|
*/
|
|
15627
15649
|
|
|
15628
15650
|
/**
|
|
@@ -16103,6 +16125,11 @@ async function getButtonActions(props, mode) {
|
|
|
16103
16125
|
let dialogId = getComponentId("dialog", props.id);
|
|
16104
16126
|
let buttonNextId = getComponentId("button_next", props.id);
|
|
16105
16127
|
let formPaginationId = getComponentId("form_pagination", props.id);
|
|
16128
|
+
let parentFormData = "${__super.__super.__super.__super || {}}";
|
|
16129
|
+
let amisVersion = getComparableAmisVersion();
|
|
16130
|
+
if(amisVersion < 3.6){
|
|
16131
|
+
parentFormData = "${__super.__super || {}}";
|
|
16132
|
+
}
|
|
16106
16133
|
if (mode == "new" || mode == "edit") {
|
|
16107
16134
|
// let actionShowNewDialog = {
|
|
16108
16135
|
// "actionType": "dialog",
|
|
@@ -16244,7 +16271,8 @@ async function getButtonActions(props, mode) {
|
|
|
16244
16271
|
// 换成从__super来映射上级表单数据是因为对象列表视图界面中每行下拉菜单中的编辑按钮弹出的表单中的子表所在作用域中没有record变量
|
|
16245
16272
|
// 映射到中间变量__parentForm而不是直接用&展开映射是为了避免表单中字段名与作用域中变量重名
|
|
16246
16273
|
// "__parentForm": "${__super.__super || {}}",
|
|
16247
|
-
"__parentForm": mode == "new" ? "$$" : "${__super.__super || {}}",
|
|
16274
|
+
// "__parentForm": mode == "new" ? "$$" : "${__super.__super || {}}",
|
|
16275
|
+
"__parentForm": mode == "new" ? "$$" : parentFormData,
|
|
16248
16276
|
"global": "${global}",
|
|
16249
16277
|
"uiSchema": "${uiSchema}",
|
|
16250
16278
|
"index": "${index}",
|
|
@@ -16337,7 +16365,7 @@ async function getButtonActions(props, mode) {
|
|
|
16337
16365
|
// 换成从__super来映射上级表单数据是因为对象列表视图界面中每行下拉菜单中的编辑按钮弹出的表单中的子表所在作用域中没有record变量
|
|
16338
16366
|
// 映射到中间变量__parentForm而不是直接用&展开映射是为了避免表单中字段名与作用域中变量重名
|
|
16339
16367
|
// "__parentForm": "${__super.__super || {}}",
|
|
16340
|
-
"__parentForm":
|
|
16368
|
+
"__parentForm": parentFormData,
|
|
16341
16369
|
"global": "${global}",
|
|
16342
16370
|
"uiSchema": "${uiSchema}",
|
|
16343
16371
|
"index": "${index}",
|
|
@@ -19539,7 +19567,8 @@ var AmisObjectButton = function (props) {
|
|
|
19539
19567
|
renderData.listViewId = data.listViewId;
|
|
19540
19568
|
}
|
|
19541
19569
|
if (schema) {
|
|
19542
|
-
|
|
19570
|
+
//3.6版本的schema.data内多了event变量,影响了组件渲染
|
|
19571
|
+
schema.data = _$1.defaultsDeep({}, { event: null }, renderData, getDefaultRenderData(), schema.data);
|
|
19543
19572
|
}
|
|
19544
19573
|
return (React__default["default"].createElement(React__default["default"].Fragment, null, button && amisSchema ? (React__default["default"].createElement(React__default["default"].Fragment, null, render('body', schema, {
|
|
19545
19574
|
// 这里的信息会作为 props 传递给子组件,一般情况下都不需要这个,
|
|
@@ -19974,7 +20003,7 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
|
|
|
19974
20003
|
type: "service",
|
|
19975
20004
|
data: serviceData,
|
|
19976
20005
|
style: style,
|
|
19977
|
-
className: "".concat(className, " sm:bg-gray-100 h-full border-gray-300 steedos-object-listview ").concat(displayAs === 'split' ? 'sm:border-r' : 'sm:
|
|
20006
|
+
className: "".concat(className, " sm:bg-gray-100 h-full border-gray-300 steedos-object-listview ").concat(displayAs === 'split' ? 'sm:border-r' : 'sm:border-r'),
|
|
19978
20007
|
body: [{
|
|
19979
20008
|
"type": "wrapper",
|
|
19980
20009
|
"size": "none",
|
|
@@ -21289,7 +21318,7 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
|
|
|
21289
21318
|
body: [
|
|
21290
21319
|
{
|
|
21291
21320
|
"type": "wrapper",
|
|
21292
|
-
"className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 border-b-[3px] border-sky-500 border-solid steedos-header-container",
|
|
21321
|
+
"className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 border-b-[3px] border-sky-500 border-solid steedos-header-container sm:shadow",
|
|
21293
21322
|
body: [
|
|
21294
21323
|
{
|
|
21295
21324
|
"type": "wrapper",
|
|
@@ -22143,7 +22172,7 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
22143
22172
|
type: 'service',
|
|
22144
22173
|
className: {
|
|
22145
22174
|
"h-full": "true",
|
|
22146
|
-
"
|
|
22175
|
+
"page-list-grid": "${display != 'split'}",
|
|
22147
22176
|
"page-list-split": "${display == 'split'}"
|
|
22148
22177
|
},
|
|
22149
22178
|
body: listSchema
|