@ibiz-template/vue3-util 0.7.38-alpha.45 → 0.7.39
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/LICENSE +1 -1
- package/README.md +105 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/common/badge/badge.d.ts +10 -1
- package/es/common/badge/badge.d.ts.map +1 -1
- package/es/common/badge/badge.mjs +5 -1
- package/es/common/code-list/code-list.d.ts +2 -2
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +1 -3
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts +1 -1
- package/es/common/control-shell/control-shell.d.ts +1 -1
- package/es/common/custom-render/custom-render.css +1 -0
- package/es/common/custom-render/custom-render.d.ts +18 -0
- package/es/common/custom-render/custom-render.d.ts.map +1 -0
- package/es/common/custom-render/custom-render.mjs +85 -0
- package/es/common/icon/icon.d.ts +1 -1
- package/es/common/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/router-view/router-view.d.ts +4 -3
- package/es/common/router-view/router-view.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.d.ts +8 -2
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +11 -1
- package/es/control/panel/panel/index.d.ts +1 -1
- package/es/control/panel/panel/panel.d.ts +1 -1
- package/es/control/panel/view-layout-panel/index.d.ts +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +2 -2
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/index.mjs +4 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts +15 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.mjs +37 -20
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts +2 -2
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.mjs +23 -9
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts +2 -2
- package/es/panel-component/grid-container/grid-container.d.ts +1 -1
- package/es/panel-component/grid-container/index.d.ts +1 -1
- package/es/panel-component/multi-data-container/index.d.ts +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +2 -2
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/index.d.ts +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +2 -2
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -1
- package/es/panel-component/nav-pos/index.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +4 -2
- package/es/panel-component/nav-pos/nav-pos.d.ts +1 -1
- package/es/panel-component/panel-container/index.d.ts +1 -1
- package/es/panel-component/panel-container/panel-container.d.ts +1 -1
- package/es/panel-component/panel-container-group/index.d.ts +1 -1
- package/es/panel-component/panel-container-group/panel-container-group.d.ts +1 -1
- package/es/panel-component/panel-container-image/index.d.ts +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.d.ts +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.mjs +2 -1
- package/es/panel-component/panel-container-tabs/index.d.ts +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.d.ts +1 -1
- package/es/panel-component/panel-ctrl-pos/index.d.ts +1 -1
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/index.d.ts +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.d.ts +1 -1
- package/es/panel-component/panel-field/index.d.ts +1 -1
- package/es/panel-component/panel-field/panel-field.d.ts +1 -1
- package/es/panel-component/panel-item-render/index.d.ts +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.d.ts +1 -1
- package/es/panel-component/panel-rawitem/index.d.ts +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +1 -1
- package/es/panel-component/panel-tab-page/index.d.ts +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +1 -1
- package/es/panel-component/scroll-container/index.d.ts +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts +1 -1
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts +1 -1
- package/es/panel-component/single-data-container/index.d.ts +1 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts +2 -2
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/index.d.ts +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +1 -1
- package/es/props/editor/common.d.ts +2 -2
- package/es/props/editor/common.d.ts.map +1 -1
- package/es/props/editor/common.mjs +2 -2
- package/es/use/click-outside/click-outside.d.ts.map +1 -1
- package/es/use/index.d.ts +1 -0
- package/es/use/index.d.ts.map +1 -1
- package/es/use/index.mjs +2 -0
- package/es/use/popover/popover.d.ts +38 -0
- package/es/use/popover/popover.d.ts.map +1 -0
- package/es/use/popover/popover.mjs +92 -0
- package/es/use/view/index.d.ts +1 -0
- package/es/use/view/index.d.ts.map +1 -1
- package/es/use/view/index.mjs +1 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts +11 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts.map +1 -0
- package/es/use/view/use-view-operation/use-view-operation.mjs +32 -0
- package/es/util/index.mjs +1 -1
- package/es/util/install.d.ts.map +1 -1
- package/es/util/render/render.d.ts +10 -0
- package/es/util/render/render.d.ts.map +1 -1
- package/es/util/render/render.mjs +8 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +10 -4
- package/es/view/app-redirect-view/app-redirect-view.d.ts +1 -1
- package/es/view/app-redirect-view/app-redirect-view.d.ts.map +1 -1
- package/es/view/common/index.d.ts +1 -1
- package/es/view/common/view.d.ts +1 -1
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +2 -0
- package/es/view/de-redirect-view/de-redirect-view.d.ts +1 -1
- package/es/view/de-redirect-view/index.d.ts +1 -1
- package/es/view/html-view/html-view.d.ts +8 -8
- package/es/view/html-view/html-view.d.ts.map +1 -1
- package/es/view/html-view/html-view.mjs +6 -8
- package/es/view/html-view/index.d.ts +6 -6
- package/es/view/portal-view/index.d.ts +1 -1
- package/es/view/portal-view/portal-view.d.ts +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts.map +1 -1
- package/lib/common/badge/badge.cjs +5 -1
- package/lib/common/code-list/code-list.cjs +1 -1
- package/lib/common/control-base/control-base.cjs +1 -3
- package/lib/common/custom-render/custom-render.cjs +87 -0
- package/lib/common/custom-render/custom-render.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/view-shell/view-shell.cjs +10 -0
- package/lib/index.cjs +9 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.cjs +22 -8
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.cjs +35 -18
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +4 -2
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +2 -1
- package/lib/props/editor/common.cjs +2 -2
- package/lib/use/index.cjs +6 -0
- package/lib/use/popover/popover.cjs +96 -0
- package/lib/use/view/index.cjs +2 -0
- package/lib/use/view/use-view-operation/use-view-operation.cjs +34 -0
- package/lib/util/index.cjs +1 -0
- package/lib/util/render/render.cjs +8 -0
- package/lib/util/route/route.cjs +10 -4
- package/lib/view/common/view.cjs +2 -0
- package/lib/view/html-view/html-view.cjs +6 -8
- package/package.json +12 -14
|
@@ -15,6 +15,10 @@ const IBizBadge = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
type: String,
|
|
16
16
|
default: "danger"
|
|
17
17
|
},
|
|
18
|
+
max: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 99
|
|
21
|
+
},
|
|
18
22
|
counterMode: {
|
|
19
23
|
type: Number
|
|
20
24
|
}
|
|
@@ -34,7 +38,7 @@ const IBizBadge = /* @__PURE__ */ defineComponent({
|
|
|
34
38
|
}
|
|
35
39
|
return createVNode("div", {
|
|
36
40
|
"class": [this.ns.b(), this.ns.m(this.type)]
|
|
37
|
-
}, [this.value]);
|
|
41
|
+
}, [this.value > this.max ? "".concat(this.max, "+") : this.value]);
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
44
|
|
|
@@ -43,11 +43,11 @@ export declare const IBizCodeList: import("vue").DefineComponent<{
|
|
|
43
43
|
}, {
|
|
44
44
|
items: import("vue").Ref<IData[]>;
|
|
45
45
|
ns: import("@ibiz-template/core").Namespace;
|
|
46
|
-
emptyText: string
|
|
46
|
+
emptyText: string;
|
|
47
47
|
textSeparator: string;
|
|
48
48
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
49
|
infoTextChange: (_text: string) => true;
|
|
50
|
-
}, string, import("vue").
|
|
50
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
51
|
codeListItems: {
|
|
52
52
|
type: {
|
|
53
53
|
(arrayLength: number): CodeListItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,QAAQ,EAAwB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,QAAQ,EAAwB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6IhC,CAAC"}
|
|
@@ -123,7 +123,7 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
123
123
|
}, {
|
|
124
124
|
immediate: true
|
|
125
125
|
});
|
|
126
|
-
const emptyText = props.codeList.emptyText === ibiz.i18n.t("vue3Util.common.undefined") ?
|
|
126
|
+
const emptyText = props.codeList.emptyText === ibiz.i18n.t("vue3Util.common.undefined") || !props.codeList.emptyText ? ibiz.config.common.emptyText : props.codeList.emptyText;
|
|
127
127
|
return {
|
|
128
128
|
items,
|
|
129
129
|
ns,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,eAAe,EAAE,GA2N5B,CAAC"}
|
|
@@ -72,9 +72,7 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
};
|
|
73
73
|
const getControlRender = (data) => {
|
|
74
74
|
var _a, _b;
|
|
75
|
-
const
|
|
76
|
-
controlRenders
|
|
77
|
-
} = model;
|
|
75
|
+
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => item.id !== "emptypanel") : void 0;
|
|
78
76
|
if (!controlRenders || controlRenders.length === 0) {
|
|
79
77
|
return void 0;
|
|
80
78
|
}
|
|
@@ -12,7 +12,7 @@ export declare const ControlLoadingPlaceholder: import("vue").DefineComponent<{
|
|
|
12
12
|
type: PropType<IParams>;
|
|
13
13
|
default: () => {};
|
|
14
14
|
};
|
|
15
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
15
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
modelData: {
|
|
17
17
|
type: PropType<IData>;
|
|
18
18
|
required: true;
|
|
@@ -12,7 +12,7 @@ export declare const IBizControlShell: import("vue").DefineComponent<{
|
|
|
12
12
|
isComplete: import("vue").Ref<boolean>;
|
|
13
13
|
errMsg: import("vue").Ref<string>;
|
|
14
14
|
provider: import("vue").Ref<IControlProvider | undefined>;
|
|
15
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
modelData: {
|
|
17
17
|
type: PropType<IControl>;
|
|
18
18
|
required: true;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-custom-render{width:100%;height:100%}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { ControlController } from '@ibiz-template/runtime';
|
|
3
|
+
import './custom-render.scss';
|
|
4
|
+
export declare const IBizCustomRender: import("vue").DefineComponent<{
|
|
5
|
+
controller: {
|
|
6
|
+
type: PropType<ControlController<import("@ibiz/model-core").IControl, import("@ibiz-template/runtime").IControlState, import("@ibiz-template/runtime").IControlEvent>>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
11
|
+
getControlRender: () => VNode | undefined;
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
controller: {
|
|
14
|
+
type: PropType<ControlController<import("@ibiz/model-core").IControl, import("@ibiz-template/runtime").IControlState, import("@ibiz-template/runtime").IControlEvent>>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>>, {}, {}>;
|
|
18
|
+
//# sourceMappingURL=custom-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-render.d.ts","sourceRoot":"","sources":["../../../src/common/custom-render/custom-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAiB,MAAM,wBAAwB,CAAC;AAG1E,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,gBAAgB;;;;;;;4BAiDI,KAAK,GAAG,SAAS;;;;;;YAmDhD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { ScriptFactory } from '@ibiz-template/runtime';
|
|
3
|
+
import { fixJsonString } from '@ibiz-template/core';
|
|
4
|
+
import '../../use/index.mjs';
|
|
5
|
+
import './custom-render.css';
|
|
6
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizCustomRender = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "IBizCustomRender",
|
|
11
|
+
props: {
|
|
12
|
+
controller: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props) {
|
|
18
|
+
const ns = useNamespace("custom-render");
|
|
19
|
+
const handleHtmlEvent = async (e, eventName) => {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
const scriptCode = e.target.getAttribute(eventName);
|
|
22
|
+
const data = e.target.getAttribute("data");
|
|
23
|
+
const context = props.controller.context.clone();
|
|
24
|
+
const _context = e.target.getAttribute("context");
|
|
25
|
+
if (_context) {
|
|
26
|
+
Object.assign(context, fixJsonString(_context));
|
|
27
|
+
}
|
|
28
|
+
const params = {
|
|
29
|
+
...props.controller.params
|
|
30
|
+
};
|
|
31
|
+
const _params = e.target.getAttribute("params");
|
|
32
|
+
if (_params) {
|
|
33
|
+
Object.assign(params, fixJsonString(_params));
|
|
34
|
+
}
|
|
35
|
+
if (scriptCode) {
|
|
36
|
+
await ScriptFactory.asyncExecScriptFn({
|
|
37
|
+
...props.controller.getEventArgs(),
|
|
38
|
+
context,
|
|
39
|
+
params,
|
|
40
|
+
data: data ? fixJsonString(data) : null
|
|
41
|
+
}, scriptCode);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getControlRender = () => {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
const controlRenders = (_a = props.controller) == null ? void 0 : _a.model.controlRenders;
|
|
47
|
+
if (!controlRenders || controlRenders.length === 0) {
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
const noDataRender = controlRenders.find((item) => item.id === "emptypanel");
|
|
51
|
+
if (!noDataRender)
|
|
52
|
+
return void 0;
|
|
53
|
+
if (noDataRender.renderType === "LAYOUTPANEL_MODEL" && noDataRender.layoutPanelModel) {
|
|
54
|
+
const htmlCode = ScriptFactory.execScriptFn({
|
|
55
|
+
...props.controller.getEventArgs()
|
|
56
|
+
}, noDataRender.layoutPanelModel, {
|
|
57
|
+
isAsync: false
|
|
58
|
+
});
|
|
59
|
+
return createVNode("div", {
|
|
60
|
+
"innerHTML": htmlCode,
|
|
61
|
+
"onClick": (e) => handleHtmlEvent(e, "click"),
|
|
62
|
+
"onDblclick": (e) => handleHtmlEvent(e, "dbclick"),
|
|
63
|
+
"class": [ns.b(), ns.e((_b = noDataRender.renderName) == null ? void 0 : _b.toLowerCase())]
|
|
64
|
+
}, null);
|
|
65
|
+
}
|
|
66
|
+
if (noDataRender.renderType === "LAYOUTPANEL" && noDataRender.layoutPanel) {
|
|
67
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
68
|
+
"class": [ns.b(), ns.e((_c = noDataRender.renderName) == null ? void 0 : _c.toLowerCase())],
|
|
69
|
+
"params": props.controller.params,
|
|
70
|
+
"context": props.controller.context,
|
|
71
|
+
"modelData": noDataRender.layoutPanel
|
|
72
|
+
}, null);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
ns,
|
|
77
|
+
getControlRender
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
render() {
|
|
81
|
+
return this.getControlRender();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export { IBizCustomRender };
|
package/es/common/icon/icon.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const IBizIcon: import("vue").DefineComponent<{
|
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
-
}, () => VNode | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
16
|
+
}, () => VNode | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
icon: {
|
|
18
18
|
type: PropType<ISysImage | IIcon>;
|
|
19
19
|
};
|
package/es/common/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export * from './view-shell/view-shell';
|
|
|
6
6
|
export * from './code-list/code-list';
|
|
7
7
|
export * from './control-loading-placeholder/control-loading-placeholder';
|
|
8
8
|
export * from './badge/badge';
|
|
9
|
+
export * from './custom-render/custom-render';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/es/common/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2DAA2D,CAAC;AAC1E,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2DAA2D,CAAC;AAC1E,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC"}
|
package/es/common/index.mjs
CHANGED
|
@@ -6,5 +6,6 @@ export { IBizViewShell } from './view-shell/view-shell.mjs';
|
|
|
6
6
|
export { IBizCodeList } from './code-list/code-list.mjs';
|
|
7
7
|
export { ControlLoadingPlaceholder } from './control-loading-placeholder/control-loading-placeholder.mjs';
|
|
8
8
|
export { IBizBadge } from './badge/badge.mjs';
|
|
9
|
+
export { IBizCustomRender } from './custom-render/custom-render.mjs';
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
2
3
|
/**
|
|
3
4
|
* 只会第一次绘制的时候绘制路由相关的内容,后面路由导致的router-view的回调都屏蔽了。
|
|
4
5
|
* 通过变更manualKey,来强制刷新router-view的slot回调。并且吧manualKey传给Component的key,搭配AppKeepAlive可以缓存组件
|
|
@@ -8,18 +9,18 @@ export declare const IBizRouterView: import("vue").DefineComponent<{
|
|
|
8
9
|
type: PropType<string>;
|
|
9
10
|
default: string;
|
|
10
11
|
};
|
|
11
|
-
route: PropType<
|
|
12
|
+
route: PropType<RouteLocationNormalizedLoaded>;
|
|
12
13
|
manualKey: {
|
|
13
14
|
type: StringConstructor;
|
|
14
15
|
};
|
|
15
16
|
}, {
|
|
16
17
|
renderComp: (Component: VNode, _route: any) => VNode | undefined;
|
|
17
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
19
|
name: {
|
|
19
20
|
type: PropType<string>;
|
|
20
21
|
default: string;
|
|
21
22
|
};
|
|
22
|
-
route: PropType<
|
|
23
|
+
route: PropType<RouteLocationNormalizedLoaded>;
|
|
23
24
|
manualKey: {
|
|
24
25
|
type: StringConstructor;
|
|
25
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-view.d.ts","sourceRoot":"","sources":["../../../src/common/router-view/router-view.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,QAAQ,EAAE,KAAK,EAAS,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"router-view.d.ts","sourceRoot":"","sources":["../../../src/common/router-view/router-view.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,QAAQ,EAAE,KAAK,EAAS,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAE3D;;;GAGG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;4BA2BQ,KAAK,UAAU,GAAG,KAAG,KAAK,GAAG,SAAS;;;;;;;;;;;;MAoCvE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IViewProvider, RedrawViewEvent } from '@ibiz-template/runtime';
|
|
1
|
+
import { IViewProvider, RedrawViewEvent, CTX } from '@ibiz-template/runtime';
|
|
2
2
|
import { PropType, Ref } from 'vue';
|
|
3
3
|
import { IAppView } from '@ibiz/model-core';
|
|
4
4
|
import './view-shell.scss';
|
|
@@ -16,6 +16,9 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
|
|
|
16
16
|
viewId: {
|
|
17
17
|
type: StringConstructor;
|
|
18
18
|
};
|
|
19
|
+
ctx: {
|
|
20
|
+
type: PropType<CTX<import("@ibiz-template/runtime").IViewController<IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>>>;
|
|
21
|
+
};
|
|
19
22
|
}, {
|
|
20
23
|
ns: import("@ibiz-template/core").Namespace;
|
|
21
24
|
errMsg: Ref<string>;
|
|
@@ -26,7 +29,7 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
|
|
|
26
29
|
redrawView: (event: RedrawViewEvent) => Promise<void>;
|
|
27
30
|
curContext: Ref<IContext>;
|
|
28
31
|
curParams: Ref<IParams>;
|
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
32
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
33
|
context: {
|
|
31
34
|
type: PropType<IContext>;
|
|
32
35
|
required: true;
|
|
@@ -40,5 +43,8 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
|
|
|
40
43
|
viewId: {
|
|
41
44
|
type: StringConstructor;
|
|
42
45
|
};
|
|
46
|
+
ctx: {
|
|
47
|
+
type: PropType<CTX<import("@ibiz-template/runtime").IViewController<IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>>>;
|
|
48
|
+
};
|
|
43
49
|
}>>, {}, {}>;
|
|
44
50
|
//# sourceMappingURL=view-shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,
|
|
1
|
+
{"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,EAEf,GAAG,EACJ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EAER,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;wBAqNW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;YAiElE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, h, resolveComponent, withDirectives, createVNode, resolveDirective } from 'vue';
|
|
1
|
+
import { defineComponent, ref, provide, watch, h, resolveComponent, withDirectives, createVNode, resolveDirective } from 'vue';
|
|
2
2
|
import { calcDynaSysParams, getViewProvider, getErrorViewProvider } from '@ibiz-template/runtime';
|
|
3
3
|
import { RuntimeError } from '@ibiz-template/core';
|
|
4
4
|
import { createUUID } from 'qx-util';
|
|
@@ -23,6 +23,10 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
},
|
|
24
24
|
viewId: {
|
|
25
25
|
type: String
|
|
26
|
+
},
|
|
27
|
+
// 解决打开浮动容器(模态、抽屉、弹出框)ctx丢失问题
|
|
28
|
+
ctx: {
|
|
29
|
+
type: Object
|
|
26
30
|
}
|
|
27
31
|
},
|
|
28
32
|
setup(props, {
|
|
@@ -34,6 +38,9 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
34
38
|
const provider = ref();
|
|
35
39
|
const viewModelData = ref();
|
|
36
40
|
const hasAuthority = ref(true);
|
|
41
|
+
if (props.ctx) {
|
|
42
|
+
provide("ctx", props.ctx);
|
|
43
|
+
}
|
|
37
44
|
const context = ref(props.context);
|
|
38
45
|
const params = ref(props.params || {});
|
|
39
46
|
let dynaViewCacheKey = "";
|
|
@@ -128,6 +135,8 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
128
135
|
context.value.srfsessionid = domain.id;
|
|
129
136
|
}
|
|
130
137
|
const app = ibiz.hub.getApp(viewModel.appId);
|
|
138
|
+
if (!context.value.srfappid)
|
|
139
|
+
context.value.srfappid = viewModel.appId;
|
|
131
140
|
const service = await app.deService.getService(context.value, appDataEntityId);
|
|
132
141
|
const res = await service.get(context.value, params.value || {});
|
|
133
142
|
if (res.ok && res.data) {
|
|
@@ -150,6 +159,7 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
150
159
|
}
|
|
151
160
|
if (noSrfSessionId) {
|
|
152
161
|
ibiz.uiDomainManager.destroy(id);
|
|
162
|
+
context.value.srfsessionid = "";
|
|
153
163
|
}
|
|
154
164
|
}
|
|
155
165
|
}
|
|
@@ -25,7 +25,7 @@ export declare const IBizPanelControl: import("../../../util").TypeWithInstall<i
|
|
|
25
25
|
}, {
|
|
26
26
|
c: import("@ibiz-template/runtime").PanelController<import("@ibiz/model-core").IPanel, import("@ibiz-template/runtime").IPanelState, import("@ibiz-template/runtime").IPanelEvent>;
|
|
27
27
|
ns: import("@ibiz-template/core").Namespace;
|
|
28
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
28
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
29
|
modelData: {
|
|
30
30
|
type: import("vue").PropType<import("@ibiz/model-core").IPanel>;
|
|
31
31
|
required: true;
|
|
@@ -32,7 +32,7 @@ export declare const PanelControl: import("vue").DefineComponent<{
|
|
|
32
32
|
}, {
|
|
33
33
|
c: PanelController<IPanel, import("@ibiz-template/runtime").IPanelState, import("@ibiz-template/runtime").IPanelEvent>;
|
|
34
34
|
ns: import("@ibiz-template/core").Namespace;
|
|
35
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
35
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
36
|
modelData: {
|
|
37
37
|
type: PropType<IPanel>;
|
|
38
38
|
required: true;
|
|
@@ -31,7 +31,7 @@ export declare const IBizViewLayoutPanelControl: import("../../../util").TypeWit
|
|
|
31
31
|
} | undefined) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
}> | null;
|
|
34
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
35
|
modelData: {
|
|
36
36
|
type: import("vue").PropType<import("@ibiz/model-core").IViewLayoutPanel>;
|
|
37
37
|
required: true;
|
|
@@ -35,8 +35,8 @@ export declare const ViewLayoutPanelControl: import("vue").DefineComponent<{
|
|
|
35
35
|
panelItems: {
|
|
36
36
|
[key: string]: IPanelItemController;
|
|
37
37
|
};
|
|
38
|
-
}) => VNode | null;
|
|
39
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
38
|
+
} | undefined) => VNode | null;
|
|
39
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
40
|
modelData: {
|
|
41
41
|
type: PropType<IViewLayoutPanel>;
|
|
42
42
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iCAiDlB,UAAU,
|
|
1
|
+
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iCAiDlB,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;MAgHjB,CAAC"}
|
package/es/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ export { IBizViewShell } from './common/view-shell/view-shell.mjs';
|
|
|
18
18
|
export { IBizCodeList } from './common/code-list/code-list.mjs';
|
|
19
19
|
export { ControlLoadingPlaceholder } from './common/control-loading-placeholder/control-loading-placeholder.mjs';
|
|
20
20
|
export { IBizBadge } from './common/badge/badge.mjs';
|
|
21
|
+
export { IBizCustomRender } from './common/custom-render/custom-render.mjs';
|
|
21
22
|
export { PanelContainerState } from './panel-component/panel-container/panel-container.state.mjs';
|
|
22
23
|
export { PanelContainerController } from './panel-component/panel-container/panel-container.controller.mjs';
|
|
23
24
|
export { IBizPanelContainer } from './panel-component/panel-container/index.mjs';
|
|
@@ -77,10 +78,12 @@ export { useNamespace } from './use/namespace/namespace.mjs';
|
|
|
77
78
|
export { useRouteKey, useRouterQuery } from './use/route/route.mjs';
|
|
78
79
|
export { useCtx, useMobCtx } from './use/util/index.mjs';
|
|
79
80
|
export { useViewController } from './use/view/use-view-controller/use-view-controller.mjs';
|
|
81
|
+
export { useViewOperation } from './use/view/use-view-operation/use-view-operation.mjs';
|
|
80
82
|
export { EmptyVNode, getOrigin, isEmptyVNode, useController, useForce, useForceTogether, useProps, usePropsWatch } from './use/vue/vue.mjs';
|
|
81
83
|
export { useCodeListListen } from './use/codeList-listen/codelist-listen.mjs';
|
|
82
84
|
export { useLocalCacheKey } from './use/storage/index.mjs';
|
|
83
85
|
export { useAutoFocusBlur } from './use/autofocus-blur/autofocus-blur.mjs';
|
|
86
|
+
export { shareCommonAncestor, usePopoverVisible, usePopoverzIndex } from './use/popover/popover.mjs';
|
|
84
87
|
export { OverlayContainer } from './util/overlay-container/overlay-container.mjs';
|
|
85
88
|
export { OverlayPopoverContainer } from './util/overlay-popover-container/overlay-popover-container.mjs';
|
|
86
89
|
export { routerCallback } from './util/router-callback/router-callback.mjs';
|
|
@@ -88,7 +91,7 @@ export { calcResRoutePath, excludeViewTypes, generateRoutePath, generateRoutePat
|
|
|
88
91
|
export { RouteListener } from './util/route/route-listener.mjs';
|
|
89
92
|
export { withInstall } from './util/install.mjs';
|
|
90
93
|
export { prepareControl } from './util/control/prepare-control.mjs';
|
|
91
|
-
export { renderString } from './util/render/render.mjs';
|
|
94
|
+
export { hasEmptyPanelRenderer, renderString } from './util/render/render.mjs';
|
|
92
95
|
export { createOverlayView, getDrawerPlacement, openViewDrawer, openViewFloatWindow, openViewModal, openViewPopover } from './util/overlay-view-util/overlay-view-util.mjs';
|
|
93
96
|
export { useAppStore } from './util/store/app-store/app-store.mjs';
|
|
94
97
|
export { useUIStore } from './util/store/ui-store/ui-store.mjs';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
1
2
|
import { IPanelRawItem } from '@ibiz/model-core';
|
|
2
3
|
import { PanelItemController } from '@ibiz-template/runtime';
|
|
3
4
|
import { AuthWxmpQrcodeState } from './auth-wxmp-qrcode.state';
|
|
@@ -47,6 +48,13 @@ export declare class AuthWxmpQrcodeController extends PanelItemController<IPanel
|
|
|
47
48
|
* @memberof AuthWxmpQrcodeController
|
|
48
49
|
*/
|
|
49
50
|
rawItemParams: IData;
|
|
51
|
+
/**
|
|
52
|
+
* Route 对象
|
|
53
|
+
*
|
|
54
|
+
* @type {RouteLocationNormalizedLoaded}
|
|
55
|
+
* @memberof AuthWxmpQrcodeController
|
|
56
|
+
*/
|
|
57
|
+
route: RouteLocationNormalizedLoaded;
|
|
50
58
|
/**
|
|
51
59
|
* 创建状态对象
|
|
52
60
|
*
|
|
@@ -63,6 +71,13 @@ export declare class AuthWxmpQrcodeController extends PanelItemController<IPanel
|
|
|
63
71
|
* @memberof AuthWxmpQrcodeController
|
|
64
72
|
*/
|
|
65
73
|
protected onInit(): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* 设置 Route 对象
|
|
76
|
+
*
|
|
77
|
+
* @param {RouteLocationNormalizedLoaded} route
|
|
78
|
+
* @memberof AuthWxmpQrcodeController
|
|
79
|
+
*/
|
|
80
|
+
setRouter(route: RouteLocationNormalizedLoaded): void;
|
|
66
81
|
/**
|
|
67
82
|
* 处理自定义补充参数
|
|
68
83
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-wxmp-qrcode.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAW,MAAM,0BAA0B,CAAC;AAExE;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,mBAAmB,CAAC,aAAa,CAAC;IAC9E;;;;;OAKG;IACK,KAAK,EAAE,mBAAmB,CAAC;IAEnC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe,CAA6B;IAEpD;;;;;;OAMG;IACH,OAAO,CAAC,YAAY,CAA6B;IAEjD;;;;;;OAMG;IACH,OAAO,CAAC,WAAW,CAAa;IAEhC;;;;;OAKG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,mBAAmB;IAI5C;;;;;;OAMG;cACa,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-wxmp-qrcode.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAW,MAAM,0BAA0B,CAAC;AAExE;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,mBAAmB,CAAC,aAAa,CAAC;IAC9E;;;;;OAKG;IACK,KAAK,EAAE,mBAAmB,CAAC;IAEnC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe,CAA6B;IAEpD;;;;;;OAMG;IACH,OAAO,CAAC,YAAY,CAA6B;IAEjD;;;;;;OAMG;IACH,OAAO,CAAC,WAAW,CAAa;IAEhC;;;;;OAKG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,KAAK,EAAG,6BAA6B,CAAC;IAEtC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,mBAAmB;IAI5C;;;;;;OAMG;cACa,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMvC;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAIrD;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAYrC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;IAY5B;;;;;;OAMG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBjC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,IAAI,IAAI;IAe1B;;;;;;OAMG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA0C7C;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAW/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CoreConst } from '@ibiz-template/core';
|
|
2
|
-
import { notNilEmpty
|
|
1
|
+
import { setAppCookie, CoreConst, clearAppCookie } from '@ibiz-template/core';
|
|
2
|
+
import { notNilEmpty } from 'qx-util';
|
|
3
3
|
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
4
|
import { AuthWxmpQrcodeState } from './auth-wxmp-qrcode.state.mjs';
|
|
5
5
|
|
|
@@ -45,7 +45,15 @@ class AuthWxmpQrcodeController extends PanelItemController {
|
|
|
45
45
|
await super.onInit();
|
|
46
46
|
this.handleRawItemParams();
|
|
47
47
|
this.initParams();
|
|
48
|
-
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 设置 Route 对象
|
|
51
|
+
*
|
|
52
|
+
* @param {RouteLocationNormalizedLoaded} route
|
|
53
|
+
* @memberof AuthWxmpQrcodeController
|
|
54
|
+
*/
|
|
55
|
+
setRouter(route) {
|
|
56
|
+
this.route = route;
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* 处理自定义补充参数
|
|
@@ -128,24 +136,33 @@ class AuthWxmpQrcodeController extends PanelItemController {
|
|
|
128
136
|
async pollingLogin() {
|
|
129
137
|
try {
|
|
130
138
|
if (this.state.qrcode && this.state.qrcode.expirein > 0) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
if (this.state.visible) {
|
|
140
|
+
const res = await ibiz.net.get(
|
|
141
|
+
"/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),
|
|
142
|
+
{},
|
|
143
|
+
{ srfdcsystem: ibiz.env.dcSystem }
|
|
144
|
+
);
|
|
145
|
+
const { data, ok } = res;
|
|
146
|
+
if (ok && (data == null ? void 0 : data.token)) {
|
|
147
|
+
clearInterval(this.pollingTimer);
|
|
148
|
+
const cacheDay = 30;
|
|
149
|
+
setAppCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDay);
|
|
150
|
+
setAppCookie(CoreConst.TOKEN, data.token, cacheDay);
|
|
151
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
152
|
+
setAppCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay);
|
|
153
|
+
if (data.refresh_token) {
|
|
154
|
+
setAppCookie(
|
|
155
|
+
CoreConst.REFRESH_TOKEN,
|
|
156
|
+
data.refresh_token,
|
|
157
|
+
cacheDay
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
clearAppCookie(CoreConst.IS_ANONYMOUS);
|
|
161
|
+
const ru = this.route.query.ru || "/";
|
|
162
|
+
window.location.hash = ru || "/";
|
|
163
|
+
window.history.pushState({}, "");
|
|
164
|
+
window.location.reload();
|
|
144
165
|
}
|
|
145
|
-
clearCookie(CoreConst.IS_ANONYMOUS, true);
|
|
146
|
-
window.location.hash = "/";
|
|
147
|
-
window.history.pushState({}, "");
|
|
148
|
-
window.location.reload();
|
|
149
166
|
}
|
|
150
167
|
} else {
|
|
151
168
|
clearInterval(this.pollingTimer);
|
|
@@ -13,8 +13,8 @@ export declare const AuthWxmpQrcode: import("vue").DefineComponent<{
|
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
-
|
|
17
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
16
|
+
loadQrcode: () => Promise<void>;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
modelData: {
|
|
19
19
|
type: PropType<IPanelRawItem>;
|
|
20
20
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-wxmp-qrcode.d.ts","sourceRoot":"","sources":["../../../src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"auth-wxmp-qrcode.d.ts","sourceRoot":"","sources":["../../../src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAgC,MAAM,KAAK,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,yBAAyB,CAAC;AAEjC,eAAO,MAAM,cAAc;;;;;;;;;;;sBAuBM,QAAQ,IAAI,CAAC;;;;;;;;;;YAmD5C,CAAC"}
|