@ibiz-template/vue3-components 0.7.10 → 0.7.12
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/{chart-jfPZ04eU.js → chart-Wh3LMgZ1.js} +1 -1
- package/dist/index-3xonNDdv.js +4 -0
- package/dist/index-WP6TUdg-.js +1 -0
- package/dist/index-kgWpXafW.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-A4-TpWet.js +1 -0
- package/dist/wang-editor-PQvDXaA9.js +1 -0
- package/dist/{xlsx-util-my1qbty8.js → xlsx-util-Zf9d2PeX.js} +1 -1
- package/es/common/data-import2/data-import2.mjs +1 -1
- package/es/common/doing-notice/doing-notice.mjs +7 -5
- package/es/common/map-chart/map-chart.util.mjs +4 -1
- package/es/common/view-message/view-message.css +1 -1
- package/es/common/view-message/view-message.d.ts +848 -1
- package/es/common/view-message/view-message.mjs +52 -22
- package/es/control/app-menu/app-menu.mjs +6 -2
- package/es/control/calendar/calendar.mjs +1 -1
- package/es/control/chart/chart.mjs +1 -1
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +19002 -27
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +1 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +4 -2
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +66 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +14 -11
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +2 -2
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +3 -1
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +17 -11
- package/es/control/gantt/gantt.d.ts +1 -0
- package/es/control/gantt/gantt.mjs +15 -4
- package/es/control/gantt/index.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +3 -2
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +3 -1
- package/es/control/grid/row-edit-popover/row-edit-popover.mjs +9 -5
- package/es/control/grid/row-edit-popover/use-row-edit-popover.mjs +3 -3
- package/es/control/kanban/kanban.mjs +17 -9
- package/es/control/list/list.mjs +2 -2
- package/es/control/report-panel/report-detail/user2-report-panel/user2-report-panel.mjs +2 -2
- package/es/control/report-panel/report-panel.mjs +2 -2
- package/es/control/search-bar/filter-tree/filter-tree.mjs +7 -5
- package/es/control/search-bar/search-bar.mjs +2 -2
- package/es/control/search-bar/search-groups/edit-group-util.mjs +10 -2
- package/es/control/search-bar/search-groups/new-group-util.mjs +13 -3
- package/es/control/search-bar/search-groups/search-groups.d.ts +1 -1
- package/es/control/search-bar/search-groups/search-groups.mjs +47 -38
- package/es/control/toolbar/export-excel/export-excel.mjs +23 -21
- package/es/control/tree/el-tree-util.mjs +4 -2
- package/es/control/tree/tree.mjs +3 -1
- package/es/control/tree-grid/tree-grid.mjs +3 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.mjs +3 -1
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +6 -2
- package/es/control/tree-grid-ex/use-row-edit-popover.mjs +3 -3
- package/es/control/wizard-panel/wizard-panel.mjs +3 -3
- package/es/editor/autocomplete/autocomplete-editor.controller.mjs +4 -1
- package/es/editor/cascader/ibiz-cascader/ibiz-cascader.mjs +3 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +3 -3
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +2 -1
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +1 -1
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -1
- package/es/editor/data-picker/picker-editor.controller.mjs +12 -3
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +1 -1
- package/es/editor/html/wang-editor/ai/ai-modules.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +18 -12
- package/es/editor/list-box/list-box-picker-editor.controller.mjs +4 -1
- package/es/editor/markdown/markdown-editor.controller.mjs +2 -2
- package/es/editor/not-supported-editor/not-supported-editor.mjs +4 -2
- package/es/editor/preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.mjs +4 -2
- package/es/editor/span/span-editor.controller.mjs +4 -1
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +3 -1
- package/es/editor/text-box/text-box-editor.controller.mjs +4 -4
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +7 -3
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +1 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.d.ts +656 -42
- package/es/locale/en/index.mjs +672 -58
- package/es/locale/zh-CN/index.d.ts +654 -42
- package/es/locale/zh-CN/index.mjs +660 -48
- package/es/panel-component/auth-captcha/auth-captcha.controller.d.ts +37 -0
- package/es/panel-component/auth-captcha/auth-captcha.controller.mjs +69 -0
- package/es/panel-component/auth-captcha/auth-captcha.css +1 -0
- package/es/panel-component/auth-captcha/auth-captcha.d.ts +28 -0
- package/es/panel-component/auth-captcha/auth-captcha.mjs +63 -0
- package/es/panel-component/auth-captcha/auth-captcha.provider.d.ts +14 -0
- package/es/panel-component/auth-captcha/auth-captcha.provider.mjs +21 -0
- package/es/panel-component/auth-captcha/auth-captcha.state.d.ts +38 -0
- package/es/panel-component/auth-captcha/auth-captcha.state.mjs +44 -0
- package/es/panel-component/auth-captcha/index.d.ts +25 -0
- package/es/panel-component/auth-captcha/index.mjs +15 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +1 -1
- package/es/panel-component/index.mjs +4 -0
- package/es/panel-component/nav-pos-index/nav-pos-index.mjs +2 -2
- package/es/panel-component/nav-tabs/nav-tabs.mjs +4 -4
- package/es/panel-component/panel-remember-me/panel-remember-me.mjs +1 -1
- package/es/panel-component/panel-tab-panel/index.d.ts +4 -2
- package/es/panel-component/panel-tab-panel/panel-tab-panel.controller.d.ts +31 -0
- package/es/panel-component/panel-tab-panel/panel-tab-panel.controller.mjs +42 -0
- package/es/panel-component/panel-tab-panel/panel-tab-panel.d.ts +5 -3
- package/es/panel-component/panel-tab-panel/panel-tab-panel.mjs +14 -5
- package/es/panel-component/panel-tab-panel/panel-tab-panel.provider.d.ts +2 -1
- package/es/panel-component/panel-tab-panel/panel-tab-panel.provider.mjs +2 -2
- package/es/panel-component/panel-tab-panel/panel-tab-panel.state.d.ts +20 -0
- package/es/panel-component/panel-tab-panel/panel-tab-panel.state.mjs +24 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.controller.mjs +3 -1
- package/es/panel-component/searchform-buttons/searchform-buttons.mjs +16 -11
- package/es/panel-component/short-cut/index.d.ts +43 -0
- package/es/panel-component/short-cut/index.mjs +12 -0
- package/es/panel-component/short-cut/short-cut.css +1 -0
- package/es/panel-component/short-cut/short-cut.d.ts +46 -0
- package/es/panel-component/short-cut/short-cut.mjs +190 -0
- package/es/panel-component/short-cut/short-cut.provider.d.ts +12 -0
- package/es/panel-component/short-cut/short-cut.provider.mjs +21 -0
- package/es/panel-component/user-message/async-action/async-action-preview/async-action-preview.mjs +20 -14
- package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.mjs +5 -3
- package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.mjs +1 -1
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +3 -3
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +9 -5
- package/es/panel-component/user-message/user-message.mjs +4 -4
- package/es/panel-component/view-msg-pos/view-msg-pos.mjs +4 -1
- package/es/util/index.d.ts +1 -0
- package/es/util/index.mjs +1 -0
- package/es/util/render-util/render-util.d.ts +48 -0
- package/es/util/render-util/render-util.mjs +60 -0
- package/es/view/403-view/403-view.mjs +4 -4
- package/es/view/404-view/404-view.mjs +4 -4
- package/es/view/error-view/error-view.mjs +3 -1
- package/es/view/login-view/login-view.mjs +27 -23
- package/es/view/sub-app-ref-view/sub-app-ref-view.mjs +1 -1
- package/es/view-engine/edit-view.engine.mjs +22 -18
- package/es/view-engine/exp-view.engine.mjs +1 -1
- package/es/view-engine/login-view.engine.mjs +18 -3
- package/es/view-engine/mpickup-view-engine.mjs +1 -1
- package/es/view-engine/opt-view.engine.mjs +2 -2
- package/es/view-engine/tab-exp-view.engine.mjs +2 -2
- package/es/view-engine/wf-dyna-edit-view.engine.mjs +5 -2
- package/es/web-app/guard/auth-guard/auth-guard.mjs +8 -6
- package/es/web-app/main.mjs +2 -0
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -1
- package/lib/common/data-import2/data-import2.cjs +1 -1
- package/lib/common/doing-notice/doing-notice.cjs +6 -4
- package/lib/common/map-chart/map-chart.util.cjs +4 -1
- package/lib/common/view-message/view-message.cjs +52 -22
- package/lib/common/view-message/view-message.css +1 -1
- package/lib/control/app-menu/app-menu.cjs +6 -2
- package/lib/control/calendar/calendar.cjs +1 -1
- package/lib/control/chart/chart.cjs +1 -1
- package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +3 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +13 -10
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +3 -1
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +16 -10
- package/lib/control/gantt/gantt.cjs +14 -3
- package/lib/control/grid/grid/grid.cjs +3 -2
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +3 -1
- package/lib/control/grid/row-edit-popover/row-edit-popover.cjs +8 -4
- package/lib/control/grid/row-edit-popover/use-row-edit-popover.cjs +3 -3
- package/lib/control/kanban/kanban.cjs +16 -8
- package/lib/control/list/list.cjs +1 -1
- package/lib/control/report-panel/report-detail/user2-report-panel/user2-report-panel.cjs +1 -1
- package/lib/control/report-panel/report-panel.cjs +1 -1
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +7 -5
- package/lib/control/search-bar/search-bar.cjs +2 -2
- package/lib/control/search-bar/search-groups/edit-group-util.cjs +10 -2
- package/lib/control/search-bar/search-groups/new-group-util.cjs +13 -3
- package/lib/control/search-bar/search-groups/search-groups.cjs +46 -37
- package/lib/control/toolbar/export-excel/export-excel.cjs +23 -21
- package/lib/control/tree/el-tree-util.cjs +4 -2
- package/lib/control/tree/tree.cjs +3 -1
- package/lib/control/tree-grid/tree-grid.cjs +3 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.cjs +3 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +6 -2
- package/lib/control/tree-grid-ex/use-row-edit-popover.cjs +3 -3
- package/lib/control/wizard-panel/wizard-panel.cjs +3 -3
- package/lib/editor/autocomplete/autocomplete-editor.controller.cjs +4 -1
- package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.cjs +3 -1
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +3 -3
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +2 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +1 -1
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -1
- package/lib/editor/data-picker/picker-editor.controller.cjs +12 -3
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +1 -1
- package/lib/editor/html/wang-editor/ai/ai-modules.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +17 -11
- package/lib/editor/list-box/list-box-picker-editor.controller.cjs +4 -1
- package/lib/editor/markdown/markdown-editor.controller.cjs +2 -2
- package/lib/editor/not-supported-editor/not-supported-editor.cjs +3 -1
- package/lib/editor/preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.cjs +3 -1
- package/lib/editor/span/span-editor.controller.cjs +4 -1
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +3 -1
- package/lib/editor/text-box/text-box-editor.controller.cjs +4 -4
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +6 -2
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +1 -1
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +672 -58
- package/lib/locale/zh-CN/index.cjs +660 -48
- package/lib/panel-component/auth-captcha/auth-captcha.cjs +65 -0
- package/lib/panel-component/auth-captcha/auth-captcha.controller.cjs +71 -0
- package/lib/panel-component/auth-captcha/auth-captcha.css +1 -0
- package/lib/panel-component/auth-captcha/auth-captcha.provider.cjs +23 -0
- package/lib/panel-component/auth-captcha/auth-captcha.state.cjs +46 -0
- package/lib/panel-component/auth-captcha/index.cjs +20 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +1 -1
- package/lib/panel-component/index.cjs +4 -0
- package/lib/panel-component/nav-pos-index/nav-pos-index.cjs +1 -1
- package/lib/panel-component/nav-tabs/nav-tabs.cjs +3 -3
- package/lib/panel-component/panel-remember-me/panel-remember-me.cjs +1 -1
- package/lib/panel-component/panel-tab-panel/panel-tab-panel.cjs +14 -5
- package/lib/panel-component/panel-tab-panel/panel-tab-panel.controller.cjs +44 -0
- package/lib/panel-component/panel-tab-panel/panel-tab-panel.provider.cjs +2 -2
- package/lib/panel-component/panel-tab-panel/panel-tab-panel.state.cjs +26 -0
- package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +15 -10
- package/lib/panel-component/searchform-buttons/searchform-buttons.controller.cjs +3 -1
- package/lib/panel-component/short-cut/index.cjs +17 -0
- package/lib/panel-component/short-cut/short-cut.cjs +192 -0
- package/lib/panel-component/short-cut/short-cut.css +1 -0
- package/lib/panel-component/short-cut/short-cut.provider.cjs +23 -0
- package/lib/panel-component/user-message/async-action/async-action-preview/async-action-preview.cjs +19 -13
- package/lib/panel-component/user-message/async-action/async-action-tab/async-action-tab.cjs +4 -2
- package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.cjs +1 -1
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +2 -2
- package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +8 -4
- package/lib/panel-component/user-message/user-message.cjs +4 -4
- package/lib/panel-component/view-msg-pos/view-msg-pos.cjs +4 -1
- package/lib/util/index.cjs +2 -0
- package/lib/util/render-util/render-util.cjs +62 -0
- package/lib/view/403-view/403-view.cjs +3 -3
- package/lib/view/404-view/404-view.cjs +3 -3
- package/lib/view/error-view/error-view.cjs +3 -1
- package/lib/view/login-view/login-view.cjs +26 -22
- package/lib/view/sub-app-ref-view/sub-app-ref-view.cjs +1 -1
- package/lib/view-engine/edit-view.engine.cjs +22 -18
- package/lib/view-engine/exp-view.engine.cjs +1 -1
- package/lib/view-engine/login-view.engine.cjs +18 -3
- package/lib/view-engine/mpickup-view-engine.cjs +1 -1
- package/lib/view-engine/opt-view.engine.cjs +2 -2
- package/lib/view-engine/tab-exp-view.engine.cjs +2 -2
- package/lib/view-engine/wf-dyna-edit-view.engine.cjs +5 -2
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +8 -6
- package/lib/web-app/main.cjs +2 -0
- package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -1
- package/package.json +7 -6
- package/dist/index-GoU343c8.js +0 -4
- package/dist/index-dsmTOMa5.js +0 -1
- package/dist/index-sGpuIVYT.js +0 -1
- package/dist/map-chart-cmVrWpPw.js +0 -1
- package/dist/wang-editor-Vch7U079.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
2
|
+
import { PanelItemController, PanelNotifyState } from '@ibiz-template/runtime';
|
|
3
|
+
import { AuthCaptchaState } from './auth-captcha.state';
|
|
4
|
+
/**
|
|
5
|
+
* 人机识别控制器
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class AuthCaptchaController
|
|
9
|
+
* @extends {PanelItemController<IPanelRawItem>}
|
|
10
|
+
*/
|
|
11
|
+
export declare class AuthCaptchaController extends PanelItemController<IPanelRawItem> {
|
|
12
|
+
state: AuthCaptchaState;
|
|
13
|
+
protected createState(): AuthCaptchaState;
|
|
14
|
+
/**
|
|
15
|
+
* 面板状态变更通知
|
|
16
|
+
*
|
|
17
|
+
* @param {PanelNotifyState} _state
|
|
18
|
+
* @return {*} {Promise<void>}
|
|
19
|
+
* @memberof AuthCaptchaController
|
|
20
|
+
*/
|
|
21
|
+
panelStateNotify(_state: PanelNotifyState): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* 初始化
|
|
24
|
+
*
|
|
25
|
+
* @protected
|
|
26
|
+
* @return {*} {Promise<void>}
|
|
27
|
+
* @memberof AuthCaptchaController
|
|
28
|
+
*/
|
|
29
|
+
protected onInit(): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* 加载验证码
|
|
32
|
+
*
|
|
33
|
+
* @return {*} {Promise<void>}ss
|
|
34
|
+
* @memberof AuthCaptchaController
|
|
35
|
+
*/
|
|
36
|
+
loadCaptcha(): Promise<void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { AuthCaptchaState } from './auth-captcha.state.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class AuthCaptchaController extends PanelItemController {
|
|
7
|
+
createState() {
|
|
8
|
+
var _a;
|
|
9
|
+
return new AuthCaptchaState((_a = this.parent) == null ? void 0 : _a.state);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 面板状态变更通知
|
|
13
|
+
*
|
|
14
|
+
* @param {PanelNotifyState} _state
|
|
15
|
+
* @return {*} {Promise<void>}
|
|
16
|
+
* @memberof AuthCaptchaController
|
|
17
|
+
*/
|
|
18
|
+
async panelStateNotify(_state) {
|
|
19
|
+
super.panelStateNotify(_state);
|
|
20
|
+
const that = this;
|
|
21
|
+
Object.defineProperty(that.panel.state.data, "captcha", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
get() {
|
|
25
|
+
return {
|
|
26
|
+
captcha_state: that.state.state,
|
|
27
|
+
captcha_code: that.state.code
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 初始化
|
|
34
|
+
*
|
|
35
|
+
* @protected
|
|
36
|
+
* @return {*} {Promise<void>}
|
|
37
|
+
* @memberof AuthCaptchaController
|
|
38
|
+
*/
|
|
39
|
+
async onInit() {
|
|
40
|
+
super.onInit();
|
|
41
|
+
await this.loadCaptcha();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 加载验证码
|
|
45
|
+
*
|
|
46
|
+
* @return {*} {Promise<void>}ss
|
|
47
|
+
* @memberof AuthCaptchaController
|
|
48
|
+
*/
|
|
49
|
+
async loadCaptcha() {
|
|
50
|
+
this.state.loading = true;
|
|
51
|
+
const requestConfig = {
|
|
52
|
+
url: "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId, "/auths/captcha"),
|
|
53
|
+
method: "post",
|
|
54
|
+
headers: {
|
|
55
|
+
"Content-Type": "application/json;charset=UTF-8",
|
|
56
|
+
Accept: "application/json"
|
|
57
|
+
},
|
|
58
|
+
data: {}
|
|
59
|
+
};
|
|
60
|
+
const res = await axios(requestConfig);
|
|
61
|
+
if (res.status === 200 && res.data) {
|
|
62
|
+
this.state.state = res.data.state;
|
|
63
|
+
this.state.image = res.data.image;
|
|
64
|
+
}
|
|
65
|
+
this.state.loading = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { AuthCaptchaController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-auth-captcha{display:flex}.ibiz-auth-captcha__captcha{width:calc(100% - 120px)}.ibiz-auth-captcha__image{flex-shrink:0;width:120px;height:100%;cursor:pointer}.ibiz-auth-captcha__image--hint{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
|
+
import { AuthCaptchaController } from './auth-captcha.controller';
|
|
4
|
+
import './auth-captcha.scss';
|
|
5
|
+
export declare const AuthCaptcha: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelRawItem>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: typeof AuthCaptchaController;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
c: AuthCaptchaController;
|
|
16
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
17
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
modelData: {
|
|
21
|
+
type: PropType<IPanelRawItem>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
controller: {
|
|
25
|
+
type: typeof AuthCaptchaController;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { computed, resolveComponent, createVNode, resolveDirective, withDirectives, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { AuthCaptchaController } from './auth-captcha.controller.mjs';
|
|
4
|
+
import './auth-captcha.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const AuthCaptcha = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizAuthCaptcha",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: AuthCaptchaController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const ns = useNamespace("auth-captcha");
|
|
21
|
+
const c = props.controller;
|
|
22
|
+
const classArr = computed(() => {
|
|
23
|
+
let result = [ns.b(), ns.m(c.model.id)];
|
|
24
|
+
result = [...result, ...props.controller.containerClass, ns.is("hidden", !props.controller.state.visible)];
|
|
25
|
+
return result;
|
|
26
|
+
});
|
|
27
|
+
const onClick = () => {
|
|
28
|
+
if (!c.state.loading) {
|
|
29
|
+
c.loadCaptcha();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
c,
|
|
34
|
+
ns,
|
|
35
|
+
classArr,
|
|
36
|
+
onClick
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
render() {
|
|
40
|
+
return createVNode("div", {
|
|
41
|
+
"class": this.classArr
|
|
42
|
+
}, [createVNode(resolveComponent("el-input"), {
|
|
43
|
+
"modelValue": this.c.state.code,
|
|
44
|
+
"onUpdate:modelValue": ($event) => this.c.state.code = $event,
|
|
45
|
+
"class": this.ns.e("captcha"),
|
|
46
|
+
"placeholder": "\u9A8C\u8BC1\u7801"
|
|
47
|
+
}, null), withDirectives(createVNode(resolveComponent("el-image"), {
|
|
48
|
+
"src": this.c.state.image,
|
|
49
|
+
"class": this.ns.e("image"),
|
|
50
|
+
"onClick": this.onClick,
|
|
51
|
+
"title": "\u70B9\u51FB\u56FE\u7247\u5237\u65B0"
|
|
52
|
+
}, {
|
|
53
|
+
error: () => {
|
|
54
|
+
return createVNode("div", {
|
|
55
|
+
"onClick": this.onClick,
|
|
56
|
+
"class": [this.ns.em("image", "hint"), this.ns.is("loading", this.c.state.loading)]
|
|
57
|
+
}, [this.c.state.loading ? "\u52A0\u8F7D\u4E2D..." : "\u52A0\u8F7D\u5931\u8D25"]);
|
|
58
|
+
}
|
|
59
|
+
}), [[resolveDirective("loading"), this.c.state.loading]])]);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { AuthCaptcha };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
import { AuthCaptchaController } from './auth-captcha.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 人机识别适配器
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class AuthCaptchaProvider
|
|
9
|
+
* @implements {IPanelItemProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class AuthCaptchaProvider implements IPanelItemProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<AuthCaptchaController>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AuthCaptchaController } from './auth-captcha.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class AuthCaptchaProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizAuthCaptcha");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new AuthCaptchaController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { AuthCaptchaProvider };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 人机识别状态
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class AuthCaptchaState
|
|
7
|
+
* @extends {PanelItemState}
|
|
8
|
+
*/
|
|
9
|
+
export declare class AuthCaptchaState extends PanelItemState {
|
|
10
|
+
/**
|
|
11
|
+
* 验证码
|
|
12
|
+
*
|
|
13
|
+
* @type {string}
|
|
14
|
+
* @memberof AuthCaptchaState
|
|
15
|
+
*/
|
|
16
|
+
code: string;
|
|
17
|
+
/**
|
|
18
|
+
* 验证图片
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AuthCaptchaState
|
|
22
|
+
*/
|
|
23
|
+
image: string;
|
|
24
|
+
/**
|
|
25
|
+
* 验证UUID码
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AuthCaptchaState
|
|
29
|
+
*/
|
|
30
|
+
state: string;
|
|
31
|
+
/**
|
|
32
|
+
* 加载状态
|
|
33
|
+
*
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof AuthCaptchaState
|
|
36
|
+
*/
|
|
37
|
+
loading: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class AuthCaptchaState extends PanelItemState {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* 验证码
|
|
15
|
+
*
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof AuthCaptchaState
|
|
18
|
+
*/
|
|
19
|
+
__publicField(this, "code", "");
|
|
20
|
+
/**
|
|
21
|
+
* 验证图片
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof AuthCaptchaState
|
|
25
|
+
*/
|
|
26
|
+
__publicField(this, "image", "");
|
|
27
|
+
/**
|
|
28
|
+
* 验证UUID码
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AuthCaptchaState
|
|
32
|
+
*/
|
|
33
|
+
__publicField(this, "state", "");
|
|
34
|
+
/**
|
|
35
|
+
* 加载状态
|
|
36
|
+
*
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @memberof AuthCaptchaState
|
|
39
|
+
*/
|
|
40
|
+
__publicField(this, "loading", false);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { AuthCaptchaState };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const IBizAuthCaptcha: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: typeof import("./auth-captcha.controller").AuthCaptchaController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
c: import("./auth-captcha.controller").AuthCaptchaController;
|
|
12
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
13
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
modelData: {
|
|
17
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
controller: {
|
|
21
|
+
type: typeof import("./auth-captcha.controller").AuthCaptchaController;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>>, {}, {}>>;
|
|
25
|
+
export default IBizAuthCaptcha;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
2
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
+
import { AuthCaptcha } from './auth-captcha.mjs';
|
|
4
|
+
import { AuthCaptchaProvider } from './auth-captcha.provider.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizAuthCaptcha = withInstall(AuthCaptcha, function(v) {
|
|
8
|
+
v.component(AuthCaptcha.name, AuthCaptcha);
|
|
9
|
+
registerPanelItemProvider(
|
|
10
|
+
"RAWITEM_AUTH_CAPTCHA",
|
|
11
|
+
() => new AuthCaptchaProvider()
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { IBizAuthCaptcha, IBizAuthCaptcha as default };
|
|
@@ -22,7 +22,7 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
const ns = useNamespace("user-info");
|
|
23
23
|
const c = prop.controller;
|
|
24
24
|
const {
|
|
25
|
-
srfusername = "
|
|
25
|
+
srfusername = ibiz.i18n.t("panelComponent.authUserinfo.visitor"),
|
|
26
26
|
srfpersonname
|
|
27
27
|
} = ((_a = ibiz.appData) == null ? void 0 : _a.context) || {};
|
|
28
28
|
const router = useRouter();
|
|
@@ -22,6 +22,8 @@ import { IBizCoopPos } from './coop-pos/index.mjs';
|
|
|
22
22
|
import { IBizViewMsgPos } from './view-msg-pos/index.mjs';
|
|
23
23
|
import { IBizUserAction } from './user-action/index.mjs';
|
|
24
24
|
import { IBizDataImport } from './data-import/index.mjs';
|
|
25
|
+
import { IBizShortCut } from './short-cut/index.mjs';
|
|
26
|
+
import { IBizAuthCaptcha } from './auth-captcha/index.mjs';
|
|
25
27
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
26
28
|
export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
|
|
27
29
|
export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
|
|
@@ -69,6 +71,8 @@ const IBizPanelComponents = {
|
|
|
69
71
|
v.use(IBizViewMsgPos);
|
|
70
72
|
v.use(IBizUserAction);
|
|
71
73
|
v.use(IBizDataImport);
|
|
74
|
+
v.use(IBizShortCut);
|
|
75
|
+
v.use(IBizAuthCaptcha);
|
|
72
76
|
}
|
|
73
77
|
};
|
|
74
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, createVNode,
|
|
1
|
+
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace, onRouteChange } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { useRouter, useRoute } from 'vue-router';
|
|
4
4
|
import { NavPosIndexController } from './nav-pos-index.controller.mjs';
|
|
@@ -80,7 +80,7 @@ const NavPosIndex = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
default: () => [Component && createVNode(Component, null, null)]
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
}) : createVNode("div", null, [
|
|
83
|
+
}) : createVNode("div", null, [ibiz.i18n.t("panelComponent.navPosIndex.noSupportPrompt")])]);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, watch, resolveComponent, createVNode,
|
|
1
|
+
import { isVNode, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './nav-tabs.css';
|
|
4
4
|
import { NavTabsController } from './nav-tabs.controller.mjs';
|
|
@@ -26,10 +26,10 @@ const NavTabs = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
state
|
|
27
27
|
} = props.controller;
|
|
28
28
|
const actions = [{
|
|
29
|
-
text: "
|
|
29
|
+
text: ibiz.i18n.t("panelComponent.navTabs.closeAll"),
|
|
30
30
|
value: "closeAll"
|
|
31
31
|
}, {
|
|
32
|
-
text: "
|
|
32
|
+
text: ibiz.i18n.t("panelComponent.navTabs.closeOther"),
|
|
33
33
|
value: "closeOther"
|
|
34
34
|
}];
|
|
35
35
|
const changePage = (pane) => {
|
|
@@ -107,7 +107,7 @@ const NavTabs = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
"size": "small",
|
|
108
108
|
"type": "primary"
|
|
109
109
|
}, {
|
|
110
|
-
default: () => [
|
|
110
|
+
default: () => [ibiz.i18n.t("app.more"), createVNode("ion-icon", {
|
|
111
111
|
"name": "arrow-down"
|
|
112
112
|
}, null)]
|
|
113
113
|
});
|
|
@@ -45,7 +45,7 @@ const PanelRememberMe = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
}, [createVNode(resolveComponent("el-checkbox"), {
|
|
46
46
|
"modelValue": this.isRemember,
|
|
47
47
|
"onUpdate:modelValue": ($event) => this.isRemember = $event,
|
|
48
|
-
"label": "
|
|
48
|
+
"label": ibiz.i18n.t("app.rememberMe")
|
|
49
49
|
}, null)]);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
@@ -4,19 +4,21 @@ export declare const IBizPanelTabPanel: import("@ibiz-template/vue3-util").TypeW
|
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
controller: {
|
|
7
|
-
type: typeof import("
|
|
7
|
+
type: typeof import("./panel-tab-panel.controller").PanelTabPanelController;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
11
|
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
state: import("./panel-tab-panel.state").PanelTabPanelState;
|
|
12
13
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
14
|
+
onTabClick: (tabIns: IData, event: MouseEvent) => void;
|
|
13
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
16
|
modelData: {
|
|
15
17
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelTabPanel>;
|
|
16
18
|
required: true;
|
|
17
19
|
};
|
|
18
20
|
controller: {
|
|
19
|
-
type: typeof import("
|
|
21
|
+
type: typeof import("./panel-tab-panel.controller").PanelTabPanelController;
|
|
20
22
|
required: true;
|
|
21
23
|
};
|
|
22
24
|
}>>, {}, {}>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelTabPanel } from '@ibiz/model-core';
|
|
3
|
+
import { PanelTabPanelState } from './panel-tab-panel.state';
|
|
4
|
+
export declare class PanelTabPanelController extends PanelItemController<IPanelTabPanel> {
|
|
5
|
+
state: PanelTabPanelState;
|
|
6
|
+
/**
|
|
7
|
+
* 新建状态
|
|
8
|
+
*
|
|
9
|
+
* @author tony001
|
|
10
|
+
* @date 2024-05-12 14:05:16
|
|
11
|
+
* @protected
|
|
12
|
+
* @return {*} {PanelTabPanelState}
|
|
13
|
+
*/
|
|
14
|
+
protected createState(): PanelTabPanelState;
|
|
15
|
+
/**
|
|
16
|
+
* 初始化
|
|
17
|
+
*
|
|
18
|
+
* @author tony001
|
|
19
|
+
* @date 2024-05-12 14:05:51
|
|
20
|
+
* @return {*} {Promise<void>}
|
|
21
|
+
*/
|
|
22
|
+
onInit(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* 分页点击切换处理
|
|
25
|
+
*
|
|
26
|
+
* @author tony001
|
|
27
|
+
* @date 2024-05-12 14:05:11
|
|
28
|
+
* @param {string} tabId
|
|
29
|
+
*/
|
|
30
|
+
onTabChange(tabId: string): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelTabPanelState } from './panel-tab-panel.state.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
class PanelTabPanelController extends PanelItemController {
|
|
6
|
+
/**
|
|
7
|
+
* 新建状态
|
|
8
|
+
*
|
|
9
|
+
* @author tony001
|
|
10
|
+
* @date 2024-05-12 14:05:16
|
|
11
|
+
* @protected
|
|
12
|
+
* @return {*} {PanelTabPanelState}
|
|
13
|
+
*/
|
|
14
|
+
createState() {
|
|
15
|
+
var _a;
|
|
16
|
+
return new PanelTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 初始化
|
|
20
|
+
*
|
|
21
|
+
* @author tony001
|
|
22
|
+
* @date 2024-05-12 14:05:51
|
|
23
|
+
* @return {*} {Promise<void>}
|
|
24
|
+
*/
|
|
25
|
+
async onInit() {
|
|
26
|
+
var _a;
|
|
27
|
+
await super.onInit();
|
|
28
|
+
this.state.activeTab = ((_a = this.model.panelTabPages) == null ? void 0 : _a[0].id) || "";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 分页点击切换处理
|
|
32
|
+
*
|
|
33
|
+
* @author tony001
|
|
34
|
+
* @date 2024-05-12 14:05:11
|
|
35
|
+
* @param {string} tabId
|
|
36
|
+
*/
|
|
37
|
+
onTabChange(tabId) {
|
|
38
|
+
this.state.activeTab = tabId;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { PanelTabPanelController };
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { IPanelTabPanel } from '@ibiz/model-core';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
3
|
import './panel-tab-panel.scss';
|
|
4
|
+
import { PanelTabPanelController } from './panel-tab-panel.controller';
|
|
5
5
|
export declare const PanelTabPanel: import("vue").DefineComponent<{
|
|
6
6
|
modelData: {
|
|
7
7
|
type: PropType<IPanelTabPanel>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
10
|
controller: {
|
|
11
|
-
type: typeof
|
|
11
|
+
type: typeof PanelTabPanelController;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
state: import("./panel-tab-panel.state").PanelTabPanelState;
|
|
16
17
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
18
|
+
onTabClick: (tabIns: IData, event: MouseEvent) => void;
|
|
17
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
20
|
modelData: {
|
|
19
21
|
type: PropType<IPanelTabPanel>;
|
|
20
22
|
required: true;
|
|
21
23
|
};
|
|
22
24
|
controller: {
|
|
23
|
-
type: typeof
|
|
25
|
+
type: typeof PanelTabPanelController;
|
|
24
26
|
required: true;
|
|
25
27
|
};
|
|
26
28
|
}>>, {}, {}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isVNode, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
3
|
import './panel-tab-panel.css';
|
|
4
|
+
import { PanelTabPanelController } from './panel-tab-panel.controller.mjs';
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
function _isSlot(s) {
|
|
@@ -15,12 +15,15 @@ const PanelTabPanel = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
required: true
|
|
16
16
|
},
|
|
17
17
|
controller: {
|
|
18
|
-
type:
|
|
18
|
+
type: PanelTabPanelController,
|
|
19
19
|
required: true
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
setup(props) {
|
|
23
23
|
const ns = useNamespace("panel-tab-panel");
|
|
24
|
+
const {
|
|
25
|
+
state
|
|
26
|
+
} = props.controller;
|
|
24
27
|
const classArr = computed(() => {
|
|
25
28
|
const {
|
|
26
29
|
id
|
|
@@ -29,13 +32,18 @@ const PanelTabPanel = /* @__PURE__ */ defineComponent({
|
|
|
29
32
|
result.push(...props.controller.containerClass);
|
|
30
33
|
return result;
|
|
31
34
|
});
|
|
35
|
+
const onTabClick = (tabIns, event) => {
|
|
36
|
+
props.controller.onTabChange(tabIns.props.name);
|
|
37
|
+
};
|
|
32
38
|
return {
|
|
33
39
|
ns,
|
|
34
|
-
|
|
40
|
+
state,
|
|
41
|
+
classArr,
|
|
42
|
+
onTabClick
|
|
35
43
|
};
|
|
36
44
|
},
|
|
37
45
|
render() {
|
|
38
|
-
var _a, _b
|
|
46
|
+
var _a, _b;
|
|
39
47
|
let _slot;
|
|
40
48
|
if (!this.controller.state.visible) {
|
|
41
49
|
return;
|
|
@@ -43,7 +51,8 @@ const PanelTabPanel = /* @__PURE__ */ defineComponent({
|
|
|
43
51
|
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
44
52
|
return createVNode(resolveComponent("el-tabs"), {
|
|
45
53
|
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), ...this.controller.containerClass],
|
|
46
|
-
"model-value":
|
|
54
|
+
"model-value": this.state.activeTab,
|
|
55
|
+
"onTabClick": this.onTabClick
|
|
47
56
|
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
48
57
|
const props = slot.props;
|
|
49
58
|
if (!props || !props.controller) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
2
|
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
import { PanelTabPanelController } from './panel-tab-panel.controller';
|
|
3
4
|
/**
|
|
4
5
|
* 面板分页面板适配器
|
|
5
6
|
*
|
|
@@ -9,5 +10,5 @@ import { IPanelItem } from '@ibiz/model-core';
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class PanelTabPanelProvider implements IPanelItemProvider {
|
|
11
12
|
component: string;
|
|
12
|
-
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<
|
|
13
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelTabPanelController>;
|
|
13
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PanelTabPanelController } from './panel-tab-panel.controller.mjs';
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -12,7 +12,7 @@ class PanelTabPanelProvider {
|
|
|
12
12
|
__publicField(this, "component", "IBizPanelTabPanel");
|
|
13
13
|
}
|
|
14
14
|
async createController(panelItem, panel, parent) {
|
|
15
|
-
const c = new
|
|
15
|
+
const c = new PanelTabPanelController(panelItem, panel, parent);
|
|
16
16
|
await c.init();
|
|
17
17
|
return c;
|
|
18
18
|
}
|