@oinone/kunlun-vue-admin-base 7.1.0 → 7.2.0
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/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +18 -18
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/component/action-bar/ActionBarWidget.d.ts +1 -0
- package/dist/types/src/action/component/action-bar/DefaultActionBar.vue.d.ts +12 -6
- package/dist/types/src/action/view-actions/biz-audit/BizAuditRecordDetail.vue.d.ts +1 -1
- package/dist/types/src/action/view-actions/biz-audit/BizAuditRecordDetailFieldValue.vue.d.ts +1 -1
- package/dist/types/src/action/view-actions/biz-audit/service.d.ts +1 -1
- package/dist/types/src/basic/field/complex/select/SelectFieldWidget.d.ts +1 -0
- package/dist/types/src/basic/form/DefaultForm.vue.d.ts +10 -1
- package/dist/types/src/basic/table/BaseTableWidget.d.ts +2 -2
- package/dist/types/src/basic/table-column/BaseTableColumnWidget.d.ts +5 -0
- package/dist/types/src/basic/table-column/BaseTableFieldWidget.d.ts +0 -5
- package/dist/types/src/basic/token/BaseFieldWidget.d.ts +2 -1
- package/dist/types/src/components/select/base/BaseSelect.vue.d.ts +2 -1
- package/dist/types/src/components/select/base/index.d.ts +1 -0
- package/dist/types/src/components/select/base/useSelectId.d.ts +1 -0
- package/dist/types/src/components/select/department-select/DepartmentModal.vue.d.ts +3 -3
- package/dist/types/src/components/select/department-select/DepartmentTree.vue.d.ts +1 -1
- package/dist/types/src/components/select/modal-select/ModalSelect.vue.d.ts +2 -0
- package/dist/types/src/components/select/organizational-structure-tree/OrganizationalStructureTree.vue.d.ts +5 -2
- package/dist/types/src/components/sortable-group/SortableGroup.vue.d.ts +1 -1
- package/dist/types/src/field/businees-audit/FormBizAuditField.vue.d.ts +1 -1
- package/dist/types/src/field/cascader/DefaultCascader.vue.d.ts +1 -1
- package/dist/types/src/field/detail/date/DetailWeekPickerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/date/index.d.ts +1 -0
- package/dist/types/src/field/detail/index.d.ts +1 -1
- package/dist/types/src/field/detail/m2m/table/DetailM2MTableFieldWidget.d.ts +1 -0
- package/dist/types/src/field/detail/number/DetailFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/DetailIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/DetailMoneyFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/index.d.ts +4 -0
- package/dist/types/src/field/detail/o2m/table/DetailO2MTableFieldWidget.d.ts +1 -0
- package/dist/types/src/field/form/abstract/department/AbstractFormDepartmentFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/employee/AbstractFormEmployeeFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/radio/FormRelationFieldRadioWidget.d.ts +2 -1
- package/dist/types/src/field/form/abstract/role/AbstractFormRoleFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/select/DefaultMultipleSelect.vue.d.ts +2 -1
- package/dist/types/src/field/form/abstract/select/DefaultSingleSelect.vue.d.ts +2 -1
- package/dist/types/src/field/form/date/DefaultDatePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultDateTimePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultTimePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultYearPicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultDateRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultDateTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultYearRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/select/multi/MultiEnumSelect.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/select/single/EnumSelect.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/thumbnail/FormEnumThumbnail.vue.d.ts +2 -1
- package/dist/types/src/field/form/string/expression/model-field-select/modelFieldSelectControlWidget.d.ts +2 -0
- package/dist/types/src/field/form/text/DomainExpGenerator/DomainExpGenerator.vue.d.ts +1 -1
- package/dist/types/src/field/form/text/DomainExpGenerator/ExpItem.vue.d.ts +4 -0
- package/dist/types/src/field/form/text/DomainExpGenerator/ExpRight.vue.d.ts +1 -1
- package/dist/types/src/field/gallery/number/GalleryFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/GalleryIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/GalleryMoneyFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/index.d.ts +3 -0
- package/dist/types/src/field/prop/RelationSelectProps.d.ts +1 -0
- package/dist/types/src/field/resource/language-badge/FormResourceLangBadge.vue.d.ts +2 -1
- package/dist/types/src/field/search/enum/TabSelect.vue.d.ts +1 -1
- package/dist/types/src/field/search/enum/TagSelect.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/TableWeekPickerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/date/index.d.ts +1 -0
- package/dist/types/src/field/table/date/range/editor/DefaultEditorDateRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorDateTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorYearRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/html/TableRichText.vue.d.ts +1 -1
- package/dist/types/src/field/table/number/TableFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/number/TableIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/number/index.d.ts +2 -0
- package/dist/types/src/field/table-layout-column/TableLayoutColumnWidget.d.ts +8 -5
- package/dist/types/src/field/table-operation-column/TableOperationColumn.vue.d.ts +1 -1
- package/dist/types/src/field/tree-select/DefaultTreeSelect.vue.d.ts +1 -1
- package/dist/types/src/permission/permission/field/FieldPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/permission/field/index.d.ts +0 -2
- package/dist/types/src/permission/permission/index.d.ts +0 -1
- package/dist/types/src/permission/system-permission/field/permission-field/FieldPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/system-permission/field/permission-user/UserPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/system-permission/service/index.d.ts +3 -0
- package/dist/types/src/util/jumpDesignerPage.d.ts +0 -9
- package/dist/types/src/view/application-screen/apps-business-screen/components/Card.vue.d.ts +1 -1
- package/dist/types/src/view/application-screen/apps-business-screen/components/CardList.vue.d.ts +1 -1
- package/dist/types/src/view/application-screen/gallery/AppsGalleryWidget.d.ts +0 -2
- package/dist/types/src/view/application-screen/gallery/Gallery.vue.d.ts +1 -1
- package/dist/types/src/view/detail/DefaultDetail.vue.d.ts +9 -0
- package/dist/types/src/view/detail/DetailWidget.d.ts +1 -0
- package/dist/types/src/view/gallery/GalleryWidget.d.ts +2 -2
- package/dist/types/src/view/homepage-setting/components/MultiSelect.vue.d.ts +2 -1
- package/dist/types/src/view/homepage-setting/components/SingleSelect.vue.d.ts +2 -1
- package/dist/types/src/view/homepage-setting/field/HomepageSettingFieldWidget.d.ts +1 -1
- package/dist/types/src/view/homepage-setting/view/advanced-homepage-setting/AdvancedHomepageSetting.vue.d.ts +84 -0
- package/dist/types/src/view/iframe-view/menu/Menu.vue.d.ts +73 -1
- package/dist/types/src/view/index.d.ts +0 -2
- package/dist/types/src/view/login/BaseLoginWidget.d.ts +3 -2
- package/dist/types/src/view/login/LoginWidget.d.ts +0 -1
- package/dist/types/src/view/reset-password/FirstResetPassword.vue.d.ts +1 -1
- package/dist/types/src/view/reset-password/ForgetPassword.vue.d.ts +1 -1
- package/dist/types/src/view/search/SearchPrefer.vue.d.ts +1 -1
- package/dist/types/src/view/table/DefaultTable.vue.d.ts +28 -1
- package/dist/types/src/view/table/TableWidget.d.ts +3 -1
- package/dist/types/src/view/view/DetailView.d.ts +1 -0
- package/dist/types/src/view/workbench/Workbench.vue.d.ts +1 -1
- package/package.json +22 -22
- package/src/action/client-actions/SaveDraftActionWidget.ts +42 -27
- package/src/action/component/action/ActionWidget.ts +4 -4
- package/src/action/component/action/DefaultAction.vue +6 -1
- package/src/action/component/action-bar/ActionBarWidget.ts +13 -0
- package/src/action/component/action-bar/DefaultActionBar.vue +27 -9
- package/src/action/component/action-bar/DefaultMoreActionItem.vue +2 -2
- package/src/action/component/action-bar/style/index.scss +16 -0
- package/src/action/server-actions/ServerActionWidget.ts +2 -2
- package/src/action/url-actions/UrlActionWidget.ts +1 -1
- package/src/action/view-actions/BackActionWidget.ts +2 -3
- package/src/action/view-actions/biz-audit/RegisterDetail.ts +2 -2
- package/src/action/view-actions/biz-audit/service.ts +1 -1
- package/src/action/view-actions/popup/util.ts +1 -1
- package/src/basic/element/BaseElementListViewWidget.ts +4 -1
- package/src/basic/element/BaseElementObjectViewWidget.ts +4 -1
- package/src/basic/field/complex/select/SelectFieldWidget.ts +9 -0
- package/src/basic/form/DefaultForm.vue +17 -2
- package/src/basic/form-item/DefaultFormItem.vue +4 -4
- package/src/basic/form-item/style/index.scss +2 -2
- package/src/basic/table/BaseTableWidget.ts +8 -12
- package/src/basic/table-column/BaseTableColumnWidget.ts +86 -2
- package/src/basic/table-column/BaseTableFieldWidget.ts +1 -86
- package/src/basic/table-column/DefaultGroupCell.vue +21 -31
- package/src/basic/token/BaseFieldWidget.ts +32 -1
- package/src/basic/token/BaseView.ts +1 -0
- package/src/components/index.scss +1 -0
- package/src/components/oio-manage-group/OioManageGroup.vue +3 -2
- package/src/components/select/base/BaseSelect.vue +44 -8
- package/src/components/select/base/index.ts +1 -0
- package/src/components/select/base/useSelectId.ts +7 -0
- package/src/components/select/company-select/CompanySelect.vue +1 -0
- package/src/components/select/department-select/DepartmentModal.vue +7 -5
- package/src/components/select/department-select/DepartmentTree.vue +2 -2
- package/src/components/select/employee-select/DepartmentEmployeeSelectPanel.vue +0 -1
- package/src/components/select/modal-select/ModalSelect.vue +50 -6
- package/src/components/select/modal-select/style/index.scss +5 -0
- package/src/components/select/organizational-structure-tree/OrganizationalStructureTree.vue +31 -5
- package/src/components/select/table-select/TableSelect.vue +10 -1
- package/src/components/sortable-group/SortableGroup.vue +1 -1
- package/src/components/upload/UploadDraggable.vue +1 -1
- package/src/components/user-prefer/SimpleUserPreferSetting.vue +2 -1
- package/src/container/collapse/DefaultCollapsePanel.vue +1 -0
- package/src/container/group/DefaultGroup.vue +3 -4
- package/src/container/tabs/DefaultTabWidget.ts +2 -1
- package/src/field/detail/date/DetailWeekPickerFieldWidget.ts +13 -0
- package/src/field/detail/date/index.ts +1 -0
- package/src/field/detail/date/range/use-date-time-range-picker.ts +1 -1
- package/src/field/detail/date/use-date-time-picker.ts +1 -1
- package/src/field/detail/index.ts +1 -1
- package/src/field/detail/m2m/table/DetailM2MTableFieldWidget.ts +16 -0
- package/src/field/detail/number/DetailFloatFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailIntegerFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailMoneyFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailNumberWidget.ts +0 -9
- package/src/field/detail/number/index.ts +4 -0
- package/src/field/detail/o2m/table/DetailO2MTableFieldWidget.ts +16 -0
- package/src/field/detail/string/color/DefaultColorPicker.vue +2 -3
- package/src/field/form/abstract/department/AbstractFormDepartmentFieldWidget.ts +11 -0
- package/src/field/form/abstract/employee/AbstractFormEmployeeFieldWidget.ts +11 -0
- package/src/field/form/abstract/radio/FormRelationFieldRadioWidget.ts +3 -1
- package/src/field/form/abstract/role/AbstractFormRoleFieldWidget.ts +11 -0
- package/src/field/form/abstract/select/DefaultMultipleSelect.vue +1 -0
- package/src/field/form/abstract/select/DefaultSingleSelect.vue +1 -0
- package/src/field/form/enum/thumbnail/FormEnumThumbnail.vue +15 -3
- package/src/field/form/integer/FormIntegerSliderFieldWidget.ts +1 -1
- package/src/field/form/m2m/upload/FormM2MUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/m2o/upload/FormM2OUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/o2m/upload/FormO2MUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/o2o/upload/FormO2OUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/string/color/DefaultColorPicker.vue +2 -3
- package/src/field/form/string/download/FormStringDownloadFieldWidget.ts +2 -2
- package/src/field/form/string/expression/model-field-select/modelFieldSelectControlWidget.ts +3 -0
- package/src/field/form/string/upload/FormStringUploadDraggableFieldWidget.ts +2 -2
- package/src/field/form/text/DomainExpGenerator/ExpRight.vue +2 -2
- package/src/field/gallery/number/GalleryFloatFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryIntegerFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryMoneyFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryNumberWidget.ts +0 -9
- package/src/field/gallery/number/index.ts +3 -0
- package/src/field/prop/RelationSelectProps.ts +34 -0
- package/src/field/resource/resource-date-time-format/constant.ts +4 -4
- package/src/field/resource/resource-date-time-format/resource-date-format/FormResourceDateFormat.vue +61 -1
- package/src/field/table/date/TableWeekPickerFieldWidget.ts +13 -0
- package/src/field/table/date/TableYearFieldWidget.ts +1 -1
- package/src/field/table/date/index.ts +1 -0
- package/src/field/table/date/range/TableDateTimeRangeFieldWidget.ts +1 -1
- package/src/field/table/enum/TableEnum.vue +3 -3
- package/src/field/table/number/TableFloatFieldWidget.ts +12 -0
- package/src/field/table/number/TableIntegerFieldWidget.ts +12 -0
- package/src/field/table/number/TableNumberWidget.ts +1 -9
- package/src/field/table/number/index.ts +2 -0
- package/src/field/table-layout-column/TableLayoutColumnWidget.ts +37 -17
- package/src/file/excel/service/ExcelExportService.ts +1 -1
- package/src/file/print/service/PrintService.ts +1 -1
- package/src/icon-manage/view/search/IconSearch.vue +29 -35
- package/src/icon-manage/view/search/style/IconSearch.scss +37 -33
- package/src/main-view/DefaultMetadataMainViewWidget.ts +1 -1
- package/src/permission/permission/field/FieldPermissionWidget.ts +2 -4
- package/src/permission/permission/field/index.ts +0 -2
- package/src/permission/permission/index.ts +0 -1
- package/src/permission/system-permission/PermissionWidget.ts +12 -11
- package/src/permission/system-permission/components/Config.vue +17 -7
- package/src/permission/system-permission/components/Empty.vue +1 -1
- package/src/permission/system-permission/components/RoleDialog.vue +4 -4
- package/src/permission/system-permission/service/index.ts +77 -60
- package/src/plugins/translate.ts +6 -3
- package/src/shim-translate.d.ts +4 -1
- package/src/style/antdComponents/All.scss +0 -27
- package/src/style/root.scss +1 -1
- package/src/tags/context/runtime-context-helper.ts +6 -6
- package/src/tags/resolve/internal/widget-resolve.ts +5 -1
- package/src/util/collection-actions.ts +1 -1
- package/src/util/jumpDesignerPage.ts +11 -24
- package/src/view/application-screen/apps-business-screen/components/Card.vue +2 -2
- package/src/view/application-screen/apps-business-screen/components/RelationGraph.vue +2 -2
- package/src/view/application-screen/gallery/AppsGalleryWidget.ts +108 -133
- package/src/view/application-screen/gallery/Gallery.vue +2 -2
- package/src/view/company-setting/CompanySetting.vue +16 -14
- package/src/view/detail/DefaultDetail.vue +6 -5
- package/src/view/detail/DetailWidget.ts +12 -1
- package/src/view/gallery/GalleryWidget.ts +3 -3
- package/src/view/homepage-setting/field/HomepageSettingFieldWidget.ts +5 -5
- package/src/view/homepage-setting/hook/useHomepageSetting.ts +1 -1
- package/src/view/index.ts +0 -2
- package/src/view/login/BaseLoginWidget.ts +12 -6
- package/src/view/login/LoginWidget.ts +0 -2
- package/src/view/login/SSOLoginWidget.ts +1 -3
- package/src/view/login-page-setting/LoginPageSetting.vue +6 -7
- package/src/view/paas-install/PaaSInstall.vue +2 -2
- package/src/view/paas-manager/PaaSManager.vue +2 -2
- package/src/view/popup/PopupWidget.ts +2 -2
- package/src/view/quick-fill/Excel.vue +2 -1
- package/src/view/quick-fill/QuickFill.vue +9 -10
- package/src/view/system-style/localData.ts +8 -8
- package/src/view/table/DefaultTable.vue +81 -43
- package/src/view/table/DefaultTableFooterOperator.vue +2 -2
- package/src/view/table/TableUserPrefer.vue +1 -1
- package/src/view/table/TableWidget.ts +16 -5
- package/src/view/table/style/index.scss +6 -0
- package/src/view/unauthorized/Unauthorized.vue +1 -1
- package/src/view/view/DetailView.ts +12 -0
- package/src/view/view-control/card-col-control/DefaultCardColControl.vue +2 -2
- package/src/view/view-control/group-control/DefaultGroupControl.vue +2 -2
- package/src/view/view-control/sort-control/DefaultSortControl.vue +2 -2
- package/src/view/workbench/Workbench.vue +2 -2
- package/dist/types/src/permission/permission/action/PermissionSubmitActionWidget.d.ts +0 -7
- package/dist/types/src/permission/permission/action/index.d.ts +0 -1
- package/dist/types/src/permission/permission/field/ActionPermissionWidget.d.ts +0 -65
- package/dist/types/src/permission/permission/field/DataPermissionWidget.d.ts +0 -19
- package/dist/types/src/view/paas-install/PaaSInstall.d.ts +0 -6
- package/dist/types/src/view/paas-install/PaaSInstall.vue.d.ts +0 -22
- package/dist/types/src/view/paas-install/field/custom-table/CodeFoucsTable.vue.d.ts +0 -24
- package/dist/types/src/view/paas-install/field/custom-table/CustomTable.d.ts +0 -13
- package/dist/types/src/view/paas-install/field/index.d.ts +0 -2
- package/dist/types/src/view/paas-install/field/upload-and-select/UploadAndSelect.d.ts +0 -6
- package/dist/types/src/view/paas-install/field/upload-and-select/UploadAndSelect.vue.d.ts +0 -65
- package/dist/types/src/view/paas-install/index.d.ts +0 -2
- package/dist/types/src/view/paas-install/service.d.ts +0 -2
- package/dist/types/src/view/paas-manager/PaaSManager.d.ts +0 -6
- package/dist/types/src/view/paas-manager/PaaSManager.vue.d.ts +0 -23
- package/dist/types/src/view/paas-manager/service.d.ts +0 -2
- package/src/permission/permission/action/PermissionSubmitActionWidget.ts +0 -161
- package/src/permission/permission/action/index.ts +0 -1
- package/src/permission/permission/field/ActionPermissionWidget.ts +0 -472
- package/src/permission/permission/field/DataPermissionWidget.ts +0 -135
- package/src/view/login/view.vue +0 -7
- package/src/view/paas-install/PaaSInstall.ts +0 -23
- package/src/view/paas-install/README.md +0 -1
- package/src/view/paas-install/field/custom-table/CodeFoucsTable.vue +0 -115
- package/src/view/paas-install/field/custom-table/CustomTable.ts +0 -166
- package/src/view/paas-install/field/index.ts +0 -2
- package/src/view/paas-install/field/upload-and-select/UploadAndSelect.ts +0 -29
- package/src/view/paas-install/field/upload-and-select/UploadAndSelect.vue +0 -157
- package/src/view/paas-install/index.ts +0 -2
- package/src/view/paas-install/service.ts +0 -37
- package/src/view/paas-manager/PaaSManager.ts +0 -23
- package/src/view/paas-manager/service.ts +0 -37
|
@@ -103,36 +103,51 @@ export class SaveDraftAction extends ActionWidget {
|
|
|
103
103
|
closeIcon: createVNode(OioCloseIcon),
|
|
104
104
|
title: translateValueByKey('是否加载草稿数据'),
|
|
105
105
|
closable: true,
|
|
106
|
-
|
|
106
|
+
footer: () => {
|
|
107
107
|
return createVNode(
|
|
108
|
-
|
|
108
|
+
'div',
|
|
109
109
|
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
modal.destroy();
|
|
113
|
-
resolve();
|
|
114
|
-
},
|
|
115
|
-
style: {
|
|
116
|
-
position: 'absolute',
|
|
117
|
-
bottom: 'var(--oio-margin-md)',
|
|
118
|
-
right: '28%'
|
|
119
|
-
}
|
|
110
|
+
class: 'ant-modal-confirm-btns',
|
|
111
|
+
style: { marginTop: '24px', display: 'flex', justifyContent: 'flex-end', gap: '8px' }
|
|
120
112
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
113
|
+
[
|
|
114
|
+
createVNode(
|
|
115
|
+
OioButton,
|
|
116
|
+
{
|
|
117
|
+
onClick: async () => {
|
|
118
|
+
await this.deleteDraft();
|
|
119
|
+
modal.destroy();
|
|
120
|
+
resolve();
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{ default: () => translateValueByKey('清空草稿') }
|
|
124
|
+
),
|
|
125
|
+
createVNode(
|
|
126
|
+
OioButton,
|
|
127
|
+
{
|
|
128
|
+
onClick: () => {
|
|
129
|
+
this.isLoadDraft = true;
|
|
130
|
+
modal.destroy();
|
|
131
|
+
resolve();
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{ default: () => translateValueByKey('否') }
|
|
135
|
+
),
|
|
136
|
+
createVNode(
|
|
137
|
+
OioButton,
|
|
138
|
+
{
|
|
139
|
+
type: 'primary',
|
|
140
|
+
onClick: () => {
|
|
141
|
+
this.useDraftValue([res]);
|
|
142
|
+
this.isLoadDraft = true;
|
|
143
|
+
modal.destroy();
|
|
144
|
+
resolve();
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{ default: () => translateValueByKey('是') }
|
|
148
|
+
)
|
|
149
|
+
]
|
|
124
150
|
);
|
|
125
|
-
},
|
|
126
|
-
okText: translateValueByKey('是'),
|
|
127
|
-
cancelText: translateValueByKey('否'),
|
|
128
|
-
onOk: () => {
|
|
129
|
-
this.useDraftValue([res]);
|
|
130
|
-
this.isLoadDraft = true;
|
|
131
|
-
resolve();
|
|
132
|
-
},
|
|
133
|
-
onCancel: () => {
|
|
134
|
-
this.isLoadDraft = true;
|
|
135
|
-
resolve();
|
|
136
151
|
}
|
|
137
152
|
});
|
|
138
153
|
}
|
|
@@ -252,7 +267,7 @@ export class SaveDraftAction extends ActionWidget {
|
|
|
252
267
|
protected async executeDraftOperator(fun: string, ...args: unknown[]) {
|
|
253
268
|
const functionDefinition = await FunctionCache.get(this.model.model, fun);
|
|
254
269
|
if (!functionDefinition) {
|
|
255
|
-
console.error('
|
|
270
|
+
console.error('Unable to obtain executable function', this.action);
|
|
256
271
|
OioNotification.error(translateValueByKey('错误'), translateValueByKey('无法获取可执行函数'));
|
|
257
272
|
return;
|
|
258
273
|
}
|
|
@@ -523,10 +523,10 @@ export class ActionWidget<
|
|
|
523
523
|
if (warnFields.length) {
|
|
524
524
|
debugConsole.warn(
|
|
525
525
|
[
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
`The context expression of the current action may be using a field that has not been dragged in.`,
|
|
527
|
+
`Field of the target page model where the context is located: ${key}`,
|
|
528
|
+
`Expression: ${rawExp}`,
|
|
529
|
+
`Fields in the current view not yet dragged in: ${warnFields.join(',')}`
|
|
530
530
|
].join(';')
|
|
531
531
|
);
|
|
532
532
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { translateValueByKey } from '@oinone/kunlun-engine';
|
|
2
3
|
import { DEFAULT_PREFIX } from '@oinone/kunlun-theme';
|
|
3
4
|
import { ButtonType, OioButton, OioPopconfirm, PropRecordHelper } from '@oinone/kunlun-vue-ui-antd';
|
|
4
5
|
import { MenuItem as AMenuItem } from 'ant-design-vue';
|
|
@@ -40,7 +41,11 @@ export default defineComponent({
|
|
|
40
41
|
const ButtonVNode = computed(() => {
|
|
41
42
|
let contentVNode: VNode | undefined;
|
|
42
43
|
if (!props.labelInvisible && props.label) {
|
|
43
|
-
contentVNode = createVNode(
|
|
44
|
+
contentVNode = createVNode(
|
|
45
|
+
'span',
|
|
46
|
+
{ class: `${DEFAULT_PREFIX}-action-content` },
|
|
47
|
+
translateValueByKey(props.label)
|
|
48
|
+
);
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
const attrs: Record<string, unknown> = {
|
|
@@ -5,6 +5,7 @@ import { SPI } from '@oinone/kunlun-spi';
|
|
|
5
5
|
import {
|
|
6
6
|
ButtonBizStyle,
|
|
7
7
|
ButtonType,
|
|
8
|
+
FlexDirection,
|
|
8
9
|
FlexRowJustify,
|
|
9
10
|
ListSelectMode,
|
|
10
11
|
OioDropdownTrigger
|
|
@@ -114,6 +115,18 @@ export class ActionBarWidget<
|
|
|
114
115
|
return justify;
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
@Widget.Reactive()
|
|
119
|
+
public get direction(): string | undefined {
|
|
120
|
+
const { direction } = this.getDsl();
|
|
121
|
+
if (direction) {
|
|
122
|
+
const value = FlexDirection[direction.toUpperCase()];
|
|
123
|
+
if (value) {
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return direction;
|
|
128
|
+
}
|
|
129
|
+
|
|
117
130
|
@Widget.Reactive()
|
|
118
131
|
protected get moreActionTriggers(): OioDropdownTrigger[] {
|
|
119
132
|
const moreActionTriggersStr = this.getDsl().moreActionTriggers?.();
|
|
@@ -146,6 +146,12 @@ export default defineComponent({
|
|
|
146
146
|
justify: {
|
|
147
147
|
type: String
|
|
148
148
|
},
|
|
149
|
+
direction: {
|
|
150
|
+
type: String
|
|
151
|
+
},
|
|
152
|
+
operatorColumnDirection: {
|
|
153
|
+
type: String as PropType<OperationColumnDirection | keyof typeof OperationColumnDirection>
|
|
154
|
+
},
|
|
149
155
|
isFloat: {
|
|
150
156
|
type: Boolean,
|
|
151
157
|
default: false
|
|
@@ -156,9 +162,6 @@ export default defineComponent({
|
|
|
156
162
|
buttonType: {
|
|
157
163
|
type: String
|
|
158
164
|
},
|
|
159
|
-
operatorColumnDirection: {
|
|
160
|
-
type: String as PropType<OperationColumnDirection | keyof typeof OperationColumnDirection>
|
|
161
|
-
},
|
|
162
165
|
showActionNames: {
|
|
163
166
|
type: Array as PropType<string[]>
|
|
164
167
|
},
|
|
@@ -329,6 +332,9 @@ export default defineComponent({
|
|
|
329
332
|
)
|
|
330
333
|
);
|
|
331
334
|
}
|
|
335
|
+
if (this.direction) {
|
|
336
|
+
classList.push(`${actionBarClassName}-direction-${this.direction}`);
|
|
337
|
+
}
|
|
332
338
|
if (this.justify) {
|
|
333
339
|
classList.push(`${actionBarClassName}-${this.justify}`);
|
|
334
340
|
}
|
|
@@ -343,19 +349,31 @@ export default defineComponent({
|
|
|
343
349
|
const rightVNodes = rightSlot?.();
|
|
344
350
|
let actionBarContentVNodes: VNode[] = [];
|
|
345
351
|
if (leftVNodes?.length) {
|
|
346
|
-
actionBarContentVNodes.push(
|
|
352
|
+
actionBarContentVNodes.push(
|
|
353
|
+
createVNode('div', { class: `${actionBarClassName}-left oio-scrollbar` }, leftVNodes || [])
|
|
354
|
+
);
|
|
347
355
|
if (rightVNodes?.length) {
|
|
348
356
|
classList.push(`${actionBarClassName}-between`);
|
|
349
|
-
actionBarContentVNodes.push(
|
|
350
|
-
|
|
357
|
+
actionBarContentVNodes.push(
|
|
358
|
+
createVNode('div', { class: `${actionBarClassName}-center oio-scrollbar` }, actionVNodes)
|
|
359
|
+
);
|
|
360
|
+
actionBarContentVNodes.push(
|
|
361
|
+
createVNode('div', { class: `${actionBarClassName}-right oio-scrollbar` }, rightVNodes || [])
|
|
362
|
+
);
|
|
351
363
|
} else {
|
|
352
364
|
classList.push(`${actionBarClassName}-between`);
|
|
353
|
-
actionBarContentVNodes.push(
|
|
365
|
+
actionBarContentVNodes.push(
|
|
366
|
+
createVNode('div', { class: `${actionBarClassName}-right oio-scrollbar` }, actionVNodes)
|
|
367
|
+
);
|
|
354
368
|
}
|
|
355
369
|
} else if (rightVNodes?.length) {
|
|
356
370
|
classList.push(`${actionBarClassName}-between`);
|
|
357
|
-
actionBarContentVNodes.push(
|
|
358
|
-
|
|
371
|
+
actionBarContentVNodes.push(
|
|
372
|
+
createVNode('div', { class: `${actionBarClassName}-left oio-scrollbar` }, actionVNodes)
|
|
373
|
+
);
|
|
374
|
+
actionBarContentVNodes.push(
|
|
375
|
+
createVNode('div', { class: `${actionBarClassName}-right oio-scrollbar` }, rightVNodes || [])
|
|
376
|
+
);
|
|
359
377
|
} else {
|
|
360
378
|
classList.push(`${actionBarClassName}-flatten`);
|
|
361
379
|
actionBarContentVNodes = actionVNodes;
|
|
@@ -121,7 +121,7 @@ export default defineComponent({
|
|
|
121
121
|
};
|
|
122
122
|
},
|
|
123
123
|
render() {
|
|
124
|
-
const { visibleConfirm, title, disabled, actionProps, condition, onUpdateVisibleConfirm } = this;
|
|
124
|
+
const { visibleConfirm, title, disabled, actionProps, condition, onUpdateVisibleConfirm, $translate } = this;
|
|
125
125
|
if (actionProps.invisible) {
|
|
126
126
|
return [];
|
|
127
127
|
}
|
|
@@ -130,7 +130,7 @@ export default defineComponent({
|
|
|
130
130
|
{
|
|
131
131
|
class: `${DEFAULT_PREFIX}-more-action-item`,
|
|
132
132
|
disabled,
|
|
133
|
-
title
|
|
133
|
+
title: $translate(title)
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
default: () => {
|
|
@@ -18,6 +18,22 @@
|
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
&.action-bar-direction-row {
|
|
22
|
+
flex-direction: row;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.action-bar-direction-column {
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.action-bar-direction-row-reverse {
|
|
30
|
+
flex-direction: row-reverse;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.action-bar-direction-column-reverse {
|
|
34
|
+
flex-direction: column-reverse;
|
|
35
|
+
}
|
|
36
|
+
|
|
21
37
|
.action-bar-left,
|
|
22
38
|
.action-bar-center,
|
|
23
39
|
.action-bar-right {
|
|
@@ -70,7 +70,7 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
70
70
|
protected async clickAction(): Promise<ClickResult> {
|
|
71
71
|
const { action } = this;
|
|
72
72
|
if (!action) {
|
|
73
|
-
console.error('
|
|
73
|
+
console.error('Cannot process click action without runtime action');
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
debugConsole.group(`Click serverAction. ${action.model}:${action.name}`);
|
|
@@ -310,7 +310,7 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
310
310
|
functionDefinition = await FunctionCache.get(model, fun);
|
|
311
311
|
}
|
|
312
312
|
if (!functionDefinition) {
|
|
313
|
-
console.error('
|
|
313
|
+
console.error('Unable to obtain executable function', action);
|
|
314
314
|
OioNotification.error(translateValueByKey('错误'), translateValueByKey('无法获取可执行函数'));
|
|
315
315
|
return false;
|
|
316
316
|
}
|
|
@@ -85,7 +85,7 @@ export class UrlActionWidget extends ActionWidget<RuntimeUrlAction> {
|
|
|
85
85
|
const { compute } = this.getDsl();
|
|
86
86
|
const functionDefinition = await FunctionCache.get(this.action.model, compute);
|
|
87
87
|
if (!functionDefinition) {
|
|
88
|
-
console.error('
|
|
88
|
+
console.error('Unable to obtain executable function', this.action);
|
|
89
89
|
OioNotification.error(translateValueByKey('错误'), translateValueByKey('无法获取可执行函数'));
|
|
90
90
|
return undefined;
|
|
91
91
|
}
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
Drawer,
|
|
6
6
|
executeViewAction,
|
|
7
7
|
Popup,
|
|
8
|
-
type RuntimeViewAction
|
|
9
|
-
translate
|
|
8
|
+
type RuntimeViewAction
|
|
10
9
|
} from '@oinone/kunlun-engine';
|
|
11
10
|
import { ModelDefaultActionName, ViewType } from '@oinone/kunlun-meta';
|
|
12
11
|
import { CallChaining } from '@oinone/kunlun-shared';
|
|
@@ -31,7 +30,7 @@ export class BackActionWidget extends ActionWidget {
|
|
|
31
30
|
|
|
32
31
|
@Widget.Reactive()
|
|
33
32
|
protected get label() {
|
|
34
|
-
return this.getDsl().label || this.action?.displayName ||
|
|
33
|
+
return this.getDsl().label || this.action?.displayName || '返回';
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
@Widget.Reactive()
|
|
@@ -5,7 +5,7 @@ export const install = () => {
|
|
|
5
5
|
LayoutManager.register(
|
|
6
6
|
{
|
|
7
7
|
viewType: ViewType.Detail,
|
|
8
|
-
viewName: '
|
|
8
|
+
viewName: 'DataAuditAppLogDetailAppList',
|
|
9
9
|
model: 'data.audit.OperationLog'
|
|
10
10
|
},
|
|
11
11
|
`<view type="DETAIL" width="large" footerInvisible="true">
|
|
@@ -16,7 +16,7 @@ export const install = () => {
|
|
|
16
16
|
LayoutManager.register(
|
|
17
17
|
{
|
|
18
18
|
viewType: ViewType.Detail,
|
|
19
|
-
viewName: '
|
|
19
|
+
viewName: 'DataAuditAppLogDetailAppList',
|
|
20
20
|
model: 'data.audit.DataAuditAppLog'
|
|
21
21
|
},
|
|
22
22
|
`<view type="DETAIL" width="large" footerInvisible="true">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { http } from '@oinone/kunlun-service';
|
|
2
2
|
|
|
3
3
|
export const BizAuditRecordModel = 'data.audit.OperationLog';
|
|
4
|
-
export const BizAuditRecordCommonDetailName = '
|
|
4
|
+
export const BizAuditRecordCommonDetailName = 'OperationLogDetailOp';
|
|
5
5
|
|
|
6
6
|
export async function loadBizRecord(dataId, dataModel) {
|
|
7
7
|
const body = `
|
|
@@ -317,7 +317,7 @@ export async function createPopupDslDefinition(
|
|
|
317
317
|
});
|
|
318
318
|
if (!popupLayout) {
|
|
319
319
|
popupLayout = createPopupDefaultLayout(viewType);
|
|
320
|
-
debugConsole.log('
|
|
320
|
+
debugConsole.log('Use pop-up layer default layout', popupLayout);
|
|
321
321
|
}
|
|
322
322
|
popupViewDslNode = mergeLayoutToModal(
|
|
323
323
|
(popupViewDslNode as TemplateDslDefinition) ||
|
|
@@ -645,7 +645,10 @@ export abstract class BaseElementListViewWidget<
|
|
|
645
645
|
const fieldNames = searchFields.map((field) => field?.field?.name);
|
|
646
646
|
const validFields = Object.keys(context).filter((key) => !fieldNames.includes(key) && key !== 'isKeepAlive');
|
|
647
647
|
if (validFields.length) {
|
|
648
|
-
debugConsole.warn(
|
|
648
|
+
debugConsole.warn(
|
|
649
|
+
"There may be fields in the current page's context that have not been dragged into the search criteria.",
|
|
650
|
+
validFields
|
|
651
|
+
);
|
|
649
652
|
}
|
|
650
653
|
});
|
|
651
654
|
}
|
|
@@ -335,7 +335,10 @@ export class BaseElementObjectViewWidget<
|
|
|
335
335
|
const fieldNames = requestFields.map((field) => field?.field?.name);
|
|
336
336
|
const validFields = Object.keys(context).filter((key) => !fieldNames.includes(key) && key !== 'isKeepAlive');
|
|
337
337
|
if (validFields.length) {
|
|
338
|
-
debugConsole.warn(
|
|
338
|
+
debugConsole.warn(
|
|
339
|
+
'There may be fields in the current page context that have not been dragged onto the page',
|
|
340
|
+
validFields
|
|
341
|
+
);
|
|
339
342
|
}
|
|
340
343
|
});
|
|
341
344
|
}
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
type ActiveRecord,
|
|
3
3
|
type ActiveRecords,
|
|
4
4
|
ActiveRecordsOperator,
|
|
5
|
+
isRelation2OField,
|
|
5
6
|
type Pagination,
|
|
6
7
|
type QueryContext,
|
|
7
8
|
type QueryPageResult,
|
|
@@ -38,6 +39,14 @@ export abstract class SelectFieldWidget<
|
|
|
38
39
|
return this.getDsl().bizStyle;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
@Widget.Method()
|
|
43
|
+
public change(val: Value | null | undefined) {
|
|
44
|
+
super.change(val);
|
|
45
|
+
if (isRelation2OField(this.field)) {
|
|
46
|
+
this.updateX2OValue(val as ActiveRecord);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
protected isNeedReloadOptions = false;
|
|
42
51
|
|
|
43
52
|
@Widget.Method()
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
useInjectOioDefaultFormContext,
|
|
9
9
|
useProviderOioDefaultFormContext
|
|
10
10
|
} from '@oinone/kunlun-vue-ui-common';
|
|
11
|
-
import
|
|
12
|
-
import { createVNode, defineComponent, onMounted, type PropType, ref } from 'vue';
|
|
11
|
+
import { DslRenderDefinition, useInjectMetaContext, useProviderMetaContext } from '@oinone/kunlun-vue-widget';
|
|
12
|
+
import { computed, createVNode, defineComponent, onMounted, type PropType, ref } from 'vue';
|
|
13
13
|
import { defaultFlexResolve } from '../../tags/resolve/helper';
|
|
14
14
|
import { FormBizStyle } from '../../typing';
|
|
15
15
|
import { ManualWidget } from '../mixin';
|
|
@@ -26,6 +26,10 @@ export default defineComponent({
|
|
|
26
26
|
template: {
|
|
27
27
|
type: Object as PropType<DslRenderDefinition>
|
|
28
28
|
},
|
|
29
|
+
inline: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: undefined
|
|
32
|
+
},
|
|
29
33
|
setFormInstance: {
|
|
30
34
|
type: Function as PropType<(instance: OioFormInstance | undefined) => void>
|
|
31
35
|
},
|
|
@@ -40,8 +44,19 @@ export default defineComponent({
|
|
|
40
44
|
setup(props) {
|
|
41
45
|
const origin = ref<HTMLElement>();
|
|
42
46
|
const formRef = ref<OioFormInstance>();
|
|
47
|
+
const metaContext = useInjectMetaContext();
|
|
43
48
|
const formContext = useInjectOioDefaultFormContext();
|
|
44
49
|
|
|
50
|
+
useProviderMetaContext({
|
|
51
|
+
...metaContext,
|
|
52
|
+
inline: computed(() => {
|
|
53
|
+
if (props.inline != null) {
|
|
54
|
+
return props.inline;
|
|
55
|
+
}
|
|
56
|
+
return metaContext.inline.value;
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
|
|
45
60
|
useProviderOioDefaultFormContext({
|
|
46
61
|
...formContext,
|
|
47
62
|
getTriggerContainer: (triggerNode) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { QuestionCircleOutlined } from '@ant-design/icons-vue';
|
|
3
|
-
import { translateValueByKey } from '@oinone/kunlun-engine';
|
|
4
3
|
import { BooleanHelper } from '@oinone/kunlun-shared';
|
|
5
4
|
import { OioFormItem, OioIcon, PropRecordHelper } from '@oinone/kunlun-vue-ui-antd';
|
|
6
5
|
import { Tooltip as ATooltip } from 'ant-design-vue';
|
|
@@ -69,7 +68,7 @@ export default defineComponent({
|
|
|
69
68
|
classList.push('hide-ant-form-item-label');
|
|
70
69
|
} else {
|
|
71
70
|
children.label = () => {
|
|
72
|
-
const label =
|
|
71
|
+
const label = this.$translate(this.label as string);
|
|
73
72
|
const vnodes: VNode[] = [];
|
|
74
73
|
if (this.labelIcon) {
|
|
75
74
|
vnodes.push(
|
|
@@ -88,7 +87,7 @@ export default defineComponent({
|
|
|
88
87
|
{ placement: 'top', overlayStyle: { maxWidth: '260px' } as CSSStyleDeclaration },
|
|
89
88
|
{
|
|
90
89
|
title: () => {
|
|
91
|
-
return [createVNode('span', {}, this.help)];
|
|
90
|
+
return [createVNode('span', {}, this.$translate(this.help))];
|
|
92
91
|
},
|
|
93
92
|
default: () => {
|
|
94
93
|
return [createVNode(QuestionCircleOutlined, { class: 'question-icon' })];
|
|
@@ -102,7 +101,8 @@ export default defineComponent({
|
|
|
102
101
|
}
|
|
103
102
|
if (this.hint) {
|
|
104
103
|
children.extra = () => {
|
|
105
|
-
|
|
104
|
+
const hint = this.$translate(this.hint);
|
|
105
|
+
return [createVNode('span', { title: hint }, hint)];
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
const validationMessage = this.validatorInfo?.message;
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
white-space: normal;
|
|
63
63
|
overflow: hidden;
|
|
64
64
|
text-overflow: ellipsis;
|
|
65
|
-
word-break: break-
|
|
65
|
+
word-break: break-word;
|
|
66
66
|
line-height: 1.1em;
|
|
67
67
|
font-weight: var(--oio-form-item-label-weight);
|
|
68
|
-
text-align:
|
|
68
|
+
text-align: right;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.ant-form-item-label .oio-icon + .form-field-widget-label-content {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_SLOT_NAME, type DslDefinition, DslDefinitionType } from '@oinone/kunlun-dsl';
|
|
1
|
+
import { DEFAULT_SLOT_NAME, type DslDefinition, DslDefinitionType, ElementDslDefinition } from '@oinone/kunlun-dsl';
|
|
2
2
|
import {
|
|
3
3
|
type ActiveRecord,
|
|
4
4
|
type ActiveRecords,
|
|
@@ -172,7 +172,7 @@ export class BaseTableWidget<
|
|
|
172
172
|
return {
|
|
173
173
|
dslNodeType: DslDefinitionType.ELEMENT,
|
|
174
174
|
widget: 'ViewControl',
|
|
175
|
-
widgets: this.viewControlChildren
|
|
175
|
+
widgets: this.viewControlChildren.map((v) => ({ ...v, key: v.widget }))
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -180,7 +180,7 @@ export class BaseTableWidget<
|
|
|
180
180
|
* 视图控制相关的子组件, 可能包含(排序、分组、行高切换、全屏)
|
|
181
181
|
*/
|
|
182
182
|
@Widget.Reactive()
|
|
183
|
-
protected get viewControlChildren():
|
|
183
|
+
protected get viewControlChildren(): ElementDslDefinition[] {
|
|
184
184
|
const controls: { enabled: boolean; widget: string; props?: Record<string, unknown> }[] = [
|
|
185
185
|
{
|
|
186
186
|
enabled: this.sortable,
|
|
@@ -430,14 +430,6 @@ export class BaseTableWidget<
|
|
|
430
430
|
@Widget.Method()
|
|
431
431
|
@Widget.Provide()
|
|
432
432
|
protected async rowEditorClosedBefore(context: RowContext): Promise<boolean> {
|
|
433
|
-
// 新增时有可能会多出来一些空值key。 过滤后对比
|
|
434
|
-
// const pureData = omitBy({ ...context.data }, isNil);
|
|
435
|
-
// if (isEqual(pureData, this.currentEditorContext!.row) && this.tableRowEditMode === TableRowEditMode.CREATE) {
|
|
436
|
-
// if (context?.data) {
|
|
437
|
-
// await this.removeRecordFormDataSource(context);
|
|
438
|
-
// }
|
|
439
|
-
// return false;
|
|
440
|
-
// }
|
|
441
433
|
const res = await this.rowEditorClosedForValidator(context);
|
|
442
434
|
if (!res) {
|
|
443
435
|
return false;
|
|
@@ -864,7 +856,11 @@ export class BaseTableWidget<
|
|
|
864
856
|
if (!keyboardConfig) {
|
|
865
857
|
keyboardConfig = {};
|
|
866
858
|
}
|
|
867
|
-
keyboardConfig.left = keyboardConfig.left || {
|
|
859
|
+
keyboardConfig.left = keyboardConfig.left || {
|
|
860
|
+
key: 'Tab',
|
|
861
|
+
shift: true,
|
|
862
|
+
desc: '向左移动单元格'
|
|
863
|
+
};
|
|
868
864
|
keyboardConfig.right = keyboardConfig.right || { key: 'Tab', desc: '向右移动单元格' };
|
|
869
865
|
// fixme @zbh 20251218 暂未实现
|
|
870
866
|
// keyboardConfig.up = keyboardConfig.up || { key: 'Enter', ctrl: true, shift: true, desc: '向上移动单元格' };
|
|
@@ -10,14 +10,20 @@ import {
|
|
|
10
10
|
type TableEditorMode,
|
|
11
11
|
type TableEditorTrigger
|
|
12
12
|
} from '@oinone/kunlun-vue-ui';
|
|
13
|
-
import { ConfirmType, PopconfirmPlacement } from '@oinone/kunlun-vue-ui-antd';
|
|
13
|
+
import { ConfirmType, PopconfirmPlacement, StyleHelper } from '@oinone/kunlun-vue-ui-antd';
|
|
14
14
|
import { type ActiveRecordsWidgetProps, Widget } from '@oinone/kunlun-vue-widget';
|
|
15
|
-
import { isNil, isString, toString } from 'lodash-es';
|
|
15
|
+
import { isBoolean, isFunction, isNil, isNumber, isString, toString } from 'lodash-es';
|
|
16
16
|
import { toRaw, type VNode } from 'vue';
|
|
17
17
|
import { fetchPopconfirmPlacement } from '../../typing';
|
|
18
18
|
import { executeConfirm } from '../../util';
|
|
19
19
|
import type { TableWidget } from '../../view';
|
|
20
20
|
import { BaseDataWidget } from '../common';
|
|
21
|
+
import {
|
|
22
|
+
defaultTableColumnMinWidthCompute,
|
|
23
|
+
defaultTableColumnMinWidthComputeContext,
|
|
24
|
+
getTableThemeConfig,
|
|
25
|
+
TableColumnMinWidthComputeConfigContext
|
|
26
|
+
} from '../theme';
|
|
21
27
|
import type { FieldWidgetComponentFunction } from '../types';
|
|
22
28
|
import DefaultTableColumn from './DefaultTableColumn.vue';
|
|
23
29
|
|
|
@@ -90,6 +96,84 @@ export abstract class BaseTableColumnWidget<
|
|
|
90
96
|
return this.getDsl().minWidth;
|
|
91
97
|
}
|
|
92
98
|
|
|
99
|
+
@Widget.Inject()
|
|
100
|
+
protected cellWidth: number | undefined;
|
|
101
|
+
|
|
102
|
+
@Widget.Inject()
|
|
103
|
+
protected cellMinWidth: number | undefined;
|
|
104
|
+
|
|
105
|
+
protected getTableAutoWidth() {
|
|
106
|
+
const firstWidth = this.width || this.cellWidth;
|
|
107
|
+
if (firstWidth === 'auto') {
|
|
108
|
+
const { label, sortable } = this;
|
|
109
|
+
const themeConfig = getTableThemeConfig();
|
|
110
|
+
let rest = { ...defaultTableColumnMinWidthComputeContext, sortable };
|
|
111
|
+
if (themeConfig) {
|
|
112
|
+
rest = {
|
|
113
|
+
...rest,
|
|
114
|
+
...themeConfig
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
rest.min = this.cellMinWidth || rest.min;
|
|
118
|
+
return defaultTableColumnMinWidthCompute(label, rest);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
protected getTableForCellMinWidth() {
|
|
123
|
+
const autoCellWidth = this.getTableAutoWidth();
|
|
124
|
+
if (!isNil(this.cellMinWidth) && autoCellWidth) {
|
|
125
|
+
return Math.max(this.cellMinWidth, autoCellWidth);
|
|
126
|
+
}
|
|
127
|
+
if (!isNil(this.cellMinWidth)) {
|
|
128
|
+
return this.cellMinWidth;
|
|
129
|
+
}
|
|
130
|
+
if (autoCellWidth) {
|
|
131
|
+
return autoCellWidth;
|
|
132
|
+
}
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
protected computeDefaultMinWidth(): string | number | undefined {
|
|
137
|
+
const tableForCellMinWidth = this.getTableForCellMinWidth();
|
|
138
|
+
if (tableForCellMinWidth) {
|
|
139
|
+
return tableForCellMinWidth;
|
|
140
|
+
}
|
|
141
|
+
let minWidthConfig = getTableThemeConfig()?.column?.minWidth;
|
|
142
|
+
if (minWidthConfig == null) {
|
|
143
|
+
return defaultTableColumnMinWidthComputeContext.min;
|
|
144
|
+
}
|
|
145
|
+
if (isBoolean(minWidthConfig)) {
|
|
146
|
+
if (!minWidthConfig) {
|
|
147
|
+
return defaultTableColumnMinWidthComputeContext.min;
|
|
148
|
+
}
|
|
149
|
+
minWidthConfig = undefined;
|
|
150
|
+
}
|
|
151
|
+
if (isString(minWidthConfig) || isNumber(minWidthConfig)) {
|
|
152
|
+
return StyleHelper.px(minWidthConfig);
|
|
153
|
+
}
|
|
154
|
+
const { label, sortable } = this;
|
|
155
|
+
if (isFunction(minWidthConfig)) {
|
|
156
|
+
return minWidthConfig(label, {
|
|
157
|
+
...defaultTableColumnMinWidthComputeContext,
|
|
158
|
+
sortable
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
let autoComputeMinWidthConfigContext: TableColumnMinWidthComputeConfigContext;
|
|
162
|
+
if (minWidthConfig == null) {
|
|
163
|
+
autoComputeMinWidthConfigContext = {
|
|
164
|
+
...defaultTableColumnMinWidthComputeContext,
|
|
165
|
+
sortable
|
|
166
|
+
};
|
|
167
|
+
} else {
|
|
168
|
+
autoComputeMinWidthConfigContext = {
|
|
169
|
+
...defaultTableColumnMinWidthComputeContext,
|
|
170
|
+
...minWidthConfig,
|
|
171
|
+
sortable
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return defaultTableColumnMinWidthCompute(label, autoComputeMinWidthConfigContext);
|
|
175
|
+
}
|
|
176
|
+
|
|
93
177
|
@Widget.Reactive()
|
|
94
178
|
public get label(): string {
|
|
95
179
|
return this.getDsl().label;
|