cloud-web-corejs 1.0.280 → 1.1.0-dev.10
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/package.json +6 -2
- package/src/components/VabUpload/image-viewer.vue +442 -442
- package/src/components/VabUpload/index.vue +45 -3
- package/src/components/VabUpload/mixins.js +174 -34
- package/src/components/VabUpload/previewGroup.js +128 -0
- package/src/components/VabUpload/view.vue +248 -209
- package/src/components/baseTabs/mixins.js +181 -181
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +705 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +23 -12
- package/src/components/excelExport/exportItemConfigUtil.js +30 -0
- package/src/components/excelExport/mixins.js +3 -3
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/jsonImport/index.vue +1 -1
- package/src/components/langImport/index.vue +1 -1
- package/src/components/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +1705 -1556
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/mobile/wf/selectUserDialog.vue +122 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/obsUpload/index.vue +1 -1
- package/src/components/table/config.js +78 -78
- package/src/components/table/index.js +1276 -1276
- package/src/components/table/plugins/cell-area/index.js +1055 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/table/tableForm.vue +330 -330
- package/src/components/table/tableFormMixin.js +318 -318
- package/src/components/table/vxeFilter/index.js +163 -163
- package/src/components/table/vxeFilter/mixin.js +316 -316
- package/src/components/wf/content.vue +1188 -1188
- package/src/components/wf/wf.js +40 -20
- package/src/components/wf/wfActionDropdown.vue +1 -1
- package/src/components/wf/wfActionItems.js +1 -1
- package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
- package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
- package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
- package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
- package/src/components/xform/form-designer/designer.js +51 -52
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
- package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
- package/src/components/xform/form-designer/indexMixin.js +35 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
- package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
- package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +35 -3
- package/src/components/xform/lang/en-US.js +14 -0
- package/src/components/xform/lang/zh-CN.js +17 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +2238 -0
- package/src/components/xform/utils/textMaskUtil.js +182 -179
- package/src/components/xform/utils/treeTableUtil.js +1292 -1265
- package/src/components/xform/utils/util.js +56 -11
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +13 -4
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +48 -27
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/assetUrl.js +19 -0
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- package/src/utils/vab.js +1283 -1279
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +31 -0
- package/src/views/bd/project/branch/form_template/list.vue +30 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +225 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +85 -0
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/bd/setting/table_model/edit.vue +1066 -1066
- package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
- package/src/views/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/default2.vue +1 -1
- package/src/views/user/home/index.vue +103 -101
- package/src/views/user/home/wjl/content.vue +1569 -0
- package/src/views/user/notify_message/dialog.vue +139 -137
- package/src/views/user/outLink/cc_form_view.vue +188 -0
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/outLink/view.vue +3 -3
- package/src/views/user/role/edit.vue +632 -632
- package/src/views/user/role/list.vue +260 -260
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +871 -875
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
- package/src/utils/wf.js +0 -766
|
@@ -509,6 +509,13 @@ function handleWidgetForTraverse(
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
+
/**
|
|
513
|
+
* 容器 → 子节点所在字段名。
|
|
514
|
+
*
|
|
515
|
+
* 注意:全库同一语义的映射有多份(designer.js 的局部表、indexMixin 的
|
|
516
|
+
* getTableFiledMap / getFormTemplateTableDTOs 两张局部表),改这里时请一并核对,
|
|
517
|
+
* 漏一份的后果参见 loopHandleWidgetItem 里关于 H5 容器的注释。
|
|
518
|
+
*/
|
|
512
519
|
export const itemFieldMap = {
|
|
513
520
|
grid: "cols",
|
|
514
521
|
table: "rows",
|
|
@@ -521,6 +528,7 @@ export const itemFieldMap = {
|
|
|
521
528
|
"vf-box": "widgetList",
|
|
522
529
|
card: "widgetList",
|
|
523
530
|
detail: "panes",
|
|
531
|
+
"detail-plain": "panes", // 与 indexMixin 的两张表对齐,此前这张漏了
|
|
524
532
|
"detail-pane": "widgetList",
|
|
525
533
|
"detail-h5": "panes",
|
|
526
534
|
"h5-card": "panes",
|
|
@@ -724,16 +732,22 @@ export function traverseWidgetsOfContainer(
|
|
|
724
732
|
});
|
|
725
733
|
} else if (con.category === "container") {
|
|
726
734
|
//自定义容器
|
|
735
|
+
/* 容器类型不在 itemFieldMap 里时 key 是 undefined,con[undefined] 也是 undefined,
|
|
736
|
+
直接 .forEach 会抛 TypeError —— 表里没覆盖到的容器(list-h5、detail-tabs、
|
|
737
|
+
tree-pane…)都会中招,故取值后判空再遍历。 */
|
|
727
738
|
let key = itemFieldMap[con.type];
|
|
728
|
-
con[key]
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
739
|
+
let childList = key ? con[key] : null;
|
|
740
|
+
if (childList && childList.length > 0) {
|
|
741
|
+
childList.forEach((cw) => {
|
|
742
|
+
handleContainerTraverse(
|
|
743
|
+
cw,
|
|
744
|
+
fieldHandler,
|
|
745
|
+
containerHandler,
|
|
746
|
+
internalContainerCallFlag,
|
|
747
|
+
staticWidgetsIncluded
|
|
748
|
+
);
|
|
749
|
+
});
|
|
750
|
+
}
|
|
737
751
|
}
|
|
738
752
|
}
|
|
739
753
|
|
|
@@ -1554,6 +1568,16 @@ export function loopHandleWidget(widgetList, callback) {
|
|
|
1554
1568
|
});
|
|
1555
1569
|
}
|
|
1556
1570
|
|
|
1571
|
+
/* 子节点挂在 panes 上的容器(detail-h5 另有 widgetList 承载底部动作栏按钮) */
|
|
1572
|
+
const PANES_CONTAINER_TYPES = [
|
|
1573
|
+
"detail",
|
|
1574
|
+
"detail-plain",
|
|
1575
|
+
"detail-h5",
|
|
1576
|
+
"h5-card",
|
|
1577
|
+
];
|
|
1578
|
+
/* 内容在 widgetList、按钮在 buttonWidgetList 的分组容器 */
|
|
1579
|
+
const PANE_CONTAINER_TYPES = ["detail-pane", "h5-card-pane"];
|
|
1580
|
+
|
|
1557
1581
|
function loopHandleWidgetItem(e, p, callback) {
|
|
1558
1582
|
if ("container" === e.category) {
|
|
1559
1583
|
callback(e, p);
|
|
@@ -1575,6 +1599,18 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1575
1599
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1576
1600
|
});
|
|
1577
1601
|
}
|
|
1602
|
+
/* 行按钮与顶部查询按钮,与 data-table 的 buttons 同一性质,
|
|
1603
|
+
不遍历的话它们的 wf 联动与显隐规则同样不生效 */
|
|
1604
|
+
if (!!e.lineButtons && e.lineButtons.length > 0) {
|
|
1605
|
+
e.lineButtons.forEach((childItem) => {
|
|
1606
|
+
loopHandleWidgetItem(childItem, e, callback);
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
if (!!e.buttons && e.buttons.length > 0) {
|
|
1610
|
+
e.buttons.forEach((childItem) => {
|
|
1611
|
+
loopHandleWidgetItem(childItem, e, callback);
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1578
1614
|
} else if ("grid" === e.type) {
|
|
1579
1615
|
e.cols &&
|
|
1580
1616
|
e.cols.length > 0 &&
|
|
@@ -1611,7 +1647,14 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1611
1647
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1612
1648
|
});
|
|
1613
1649
|
});
|
|
1614
|
-
|
|
1650
|
+
/* 子节点放在 panes 里的容器。detail-h5 / h5-card 是 H5 版式的两个,
|
|
1651
|
+
此前它们没有分支、落到最后的兜底 else,而兜底只遍历 widgetList ——
|
|
1652
|
+
等于 H5 表单的字段和按钮一个都进不了 traverseAllWidgets* 的回调,
|
|
1653
|
+
wf 联动(hiddenByWf/enabledByWf/wfEdit)、组件显隐规则等全部失效。
|
|
1654
|
+
设计器侧的 designer.js 早有正确映射("detail-h5"/"h5-card" → panes),
|
|
1655
|
+
这里是运行时遍历器没跟上。
|
|
1656
|
+
(detail-h5 的 widgetList 是底部动作栏按钮,也要一起遍历) */
|
|
1657
|
+
} else if (PANES_CONTAINER_TYPES.indexOf(e.type) > -1) {
|
|
1615
1658
|
if (e.panes) {
|
|
1616
1659
|
e.panes.forEach(function (childItem) {
|
|
1617
1660
|
loopHandleWidgetItem(childItem, e, callback);
|
|
@@ -1622,7 +1665,9 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1622
1665
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1623
1666
|
});
|
|
1624
1667
|
}
|
|
1625
|
-
|
|
1668
|
+
/* h5-card-pane 与 detail-pane 同构:内容在 widgetList、分组按钮在 buttonWidgetList。
|
|
1669
|
+
兜底 else 只认 widgetList,会漏掉分组按钮(如自动骨架里的「新增」)。 */
|
|
1670
|
+
} else if (PANE_CONTAINER_TYPES.indexOf(e.type) > -1) {
|
|
1626
1671
|
if (e.widgetList) {
|
|
1627
1672
|
e.widgetList.forEach(function (childItem) {
|
|
1628
1673
|
loopHandleWidgetItem(childItem, e, callback);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
/**
|
|
3
|
+
* v-append-to-body —— 把元素搬到 document.body 下,脱离宿主子树。
|
|
4
|
+
*
|
|
5
|
+
* 用途:那些视觉上是全屏浮层、但写死在业务模板里的 div(如移动版流程的
|
|
6
|
+
* 通过/驳回/中断/转办/加签确认框)。它们靠 `position:fixed` 定位,一旦祖先出现
|
|
7
|
+
* transform / filter / display:none 就会失效或被裁掉。搬到 body 下即可根治,
|
|
8
|
+
* 且不必把它们改造成 el-dialog(造型差太远,改了样式量不减反增)。
|
|
9
|
+
*
|
|
10
|
+
* ★ 必须配 v-show 用,不能配 v-if。
|
|
11
|
+
* Vue 2 的 patch 在插入节点时要拿兄弟节点当参照物:
|
|
12
|
+
* function insert (parent, elm, ref) {
|
|
13
|
+
* if (isDef(ref)) { if (nodeOps.parentNode(ref) === parent) { ... } }
|
|
14
|
+
* }
|
|
15
|
+
* 本指令把节点搬走后,它的 parentNode 变成了 body、不再等于宿主元素,于是
|
|
16
|
+
* 以它为参照物的那次插入会被这个判断**静默跳过**(不报错,但节点没插进去),
|
|
17
|
+
* 兄弟节点的顺序随之错乱。v-show 不产生插入/移除,节点从头到尾只搬一次,
|
|
18
|
+
* 没有这个问题 —— element-ui 自己的 append-to-body 弹框也是用 v-show,
|
|
19
|
+
* 不是 v-if,同一个原因。
|
|
20
|
+
*
|
|
21
|
+
* ★ 元素上原有的 `display` 内联值要保留。
|
|
22
|
+
* v-show 记的 originalDisplay 取自 `el.style.display`;如果元素本身靠内联
|
|
23
|
+
* `style="display: block;"` 顶掉某条 `.xxx{display:none}` 的全局规则,把内联值
|
|
24
|
+
* 删了会让「显示」态退回 display:none,表现为点了没反应。
|
|
25
|
+
*/
|
|
26
|
+
let modules = {};
|
|
27
|
+
|
|
28
|
+
modules = {
|
|
29
|
+
install: function (Vue) {
|
|
30
|
+
Vue.directive("append-to-body", {
|
|
31
|
+
inserted(el) {
|
|
32
|
+
if (el.parentNode !== document.body) {
|
|
33
|
+
document.body.appendChild(el);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
unbind(el) {
|
|
37
|
+
// 配 v-show 时切换显隐不会走到这里,只有宿主组件销毁才会。
|
|
38
|
+
// 那时节点在 body 下、已不在宿主子树里,宿主自身的 DOM 移除够不着它——
|
|
39
|
+
// 不在这里摘掉就会永久留在 body 上(每进出一次详情页泄漏一份)。
|
|
40
|
+
if (el.parentNode) {
|
|
41
|
+
el.parentNode.removeChild(el);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default modules;
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import store from "@base/store";
|
|
|
12
12
|
import router, { resetRouter } from "@base/router";
|
|
13
13
|
import settings from "@/settings";
|
|
14
14
|
import { setToken as setAuthToken } from "@base/utils/auth";
|
|
15
|
-
import {
|
|
15
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
16
16
|
|
|
17
17
|
import "@/icons"; // icon
|
|
18
18
|
import "@base/permission"; // permission control
|
|
@@ -28,7 +28,12 @@ Vue.component("BaseKeepAlive", BaseKeepAlive);
|
|
|
28
28
|
import VXETable from "vxe-table";
|
|
29
29
|
import "vxe-table/lib/style.css";
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// 区域选取/复制粘贴:自研实现,通过 window.VXETableMixin 挂载,
|
|
32
|
+
// 必须在下面的 Vue.use(VXETable) 之前求值(core 在 install 时读取一次并 delete)
|
|
33
|
+
import "@base/components/table/plugins/cell-area/index.js";
|
|
34
|
+
import "@base/components/table/plugins/cell-area/index.scss";
|
|
35
|
+
|
|
36
|
+
// 引入扩展插件(官方付费插件,已由上面的自研 cell-area 替代,保留仅作回退参考)
|
|
32
37
|
// import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js";
|
|
33
38
|
// import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css";
|
|
34
39
|
|
|
@@ -167,6 +172,10 @@ import elReadonly from "@base/directive/el-readonly/index.js";
|
|
|
167
172
|
|
|
168
173
|
Vue.use(elReadonly);
|
|
169
174
|
|
|
175
|
+
import appendToBody from "@base/directive/append-to-body/index.js";
|
|
176
|
+
|
|
177
|
+
Vue.use(appendToBody.install);
|
|
178
|
+
|
|
170
179
|
/*import cnPrint from "@base/components/cnPrint/index.js"
|
|
171
180
|
|
|
172
181
|
Vue.use(cnPrint);*/
|
|
@@ -306,7 +315,7 @@ function render(props = {}) {
|
|
|
306
315
|
* 仅 $baseReload / _handleCallback 覆盖为回主应用的动作。个别详情页若有更深的 $parent 依赖,
|
|
307
316
|
* 按对接清单 §5.6 做最小改造。
|
|
308
317
|
*/
|
|
309
|
-
function mountDetailHost(props = {}) {
|
|
318
|
+
async function mountDetailHost(props = {}) {
|
|
310
319
|
if (props.appCode) settings.appCode = props.appCode;
|
|
311
320
|
if (props.token) {
|
|
312
321
|
setAuthToken(props.token);
|
|
@@ -315,7 +324,7 @@ function mountDetailHost(props = {}) {
|
|
|
315
324
|
if (props.lang) i18n.locale = props.lang;
|
|
316
325
|
|
|
317
326
|
const appCode = props.appCode || settings.appCode;
|
|
318
|
-
const resolved =
|
|
327
|
+
const resolved = await loadViewComponentAsync(props.targetPath, { appCode });
|
|
319
328
|
const target = resolved.component;
|
|
320
329
|
const bizParams = props.bizParams || {};
|
|
321
330
|
const viewMeta = props.viewMeta || {};
|