@ibiz-template/vue3-util 0.7.38-alpha.45 → 0.7.38-alpha.57
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/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/common/badge/badge.d.ts +9 -0
- 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 +1 -1
- 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/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/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +1 -0
- package/es/index.mjs +3 -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 +1 -1
- 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 +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/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/index.mjs +1 -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 +27 -0
- package/es/util/index.mjs +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/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +2 -0
- 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 +1 -0
- package/lib/index.cjs +5 -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/props/editor/common.cjs +2 -2
- package/lib/use/index.cjs +2 -0
- package/lib/use/view/index.cjs +2 -0
- package/lib/use/view/use-view-operation/use-view-operation.cjs +29 -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/package.json +3 -3
|
@@ -9,6 +9,10 @@ export declare const IBizBadge: import("vue").DefineComponent<{
|
|
|
9
9
|
type: PropType<"primary" | "success" | "warning" | "danger" | "info">;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
+
max: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
12
16
|
counterMode: {
|
|
13
17
|
type: NumberConstructor;
|
|
14
18
|
};
|
|
@@ -23,10 +27,15 @@ export declare const IBizBadge: import("vue").DefineComponent<{
|
|
|
23
27
|
type: PropType<"primary" | "success" | "warning" | "danger" | "info">;
|
|
24
28
|
default: string;
|
|
25
29
|
};
|
|
30
|
+
max: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
26
34
|
counterMode: {
|
|
27
35
|
type: NumberConstructor;
|
|
28
36
|
};
|
|
29
37
|
}>>, {
|
|
30
38
|
type: "primary" | "success" | "warning" | "danger" | "info";
|
|
39
|
+
max: number;
|
|
31
40
|
}, {}>;
|
|
32
41
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/common/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/common/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsCpB,CAAC"}
|
|
@@ -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,7 +43,7 @@ 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;
|
|
@@ -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
|
}
|
|
@@ -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").PublicProps, 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/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 +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,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EACR,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;
|
|
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,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EACR,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;wBA8MW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;YAiElE,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,6 +78,7 @@ 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';
|
|
@@ -88,7 +90,7 @@ export { calcResRoutePath, excludeViewTypes, generateRoutePath, generateRoutePat
|
|
|
88
90
|
export { RouteListener } from './util/route/route-listener.mjs';
|
|
89
91
|
export { withInstall } from './util/install.mjs';
|
|
90
92
|
export { prepareControl } from './util/control/prepare-control.mjs';
|
|
91
|
-
export { renderString } from './util/render/render.mjs';
|
|
93
|
+
export { hasEmptyPanelRenderer, renderString } from './util/render/render.mjs';
|
|
92
94
|
export { createOverlayView, getDrawerPlacement, openViewDrawer, openViewFloatWindow, openViewModal, openViewPopover } from './util/overlay-view-util/overlay-view-util.mjs';
|
|
93
95
|
export { useAppStore } from './util/store/app-store/app-store.mjs';
|
|
94
96
|
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,7 +13,7 @@ export declare const AuthWxmpQrcode: import("vue").DefineComponent<{
|
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
-
|
|
16
|
+
loadQrcode: () => Promise<void>;
|
|
17
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
modelData: {
|
|
19
19
|
type: PropType<IPanelRawItem>;
|
|
@@ -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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, onUnmounted, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, watch, onUnmounted, createVNode } from 'vue';
|
|
2
|
+
import { useRoute } from 'vue-router';
|
|
2
3
|
import '../../use/index.mjs';
|
|
3
4
|
import './auth-wxmp-qrcode.css';
|
|
4
5
|
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
@@ -18,15 +19,28 @@ const AuthWxmpQrcode = /* @__PURE__ */ defineComponent({
|
|
|
18
19
|
},
|
|
19
20
|
setup(props) {
|
|
20
21
|
const ns = useNamespace("auth-wxmp-qrcode");
|
|
22
|
+
const {
|
|
23
|
+
state
|
|
24
|
+
} = props.controller;
|
|
25
|
+
const route = useRoute();
|
|
26
|
+
props.controller.setRouter(route);
|
|
27
|
+
const loadQrcode = async () => {
|
|
28
|
+
await props.controller.loadQrcode();
|
|
29
|
+
};
|
|
30
|
+
watch(() => state.visible, () => {
|
|
31
|
+
var _a;
|
|
32
|
+
if (state.visible && (state.keepAlive && !((_a = state.qrcode) == null ? void 0 : _a.expirein) || !state.keepAlive)) {
|
|
33
|
+
loadQrcode();
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
immediate: true
|
|
37
|
+
});
|
|
21
38
|
onUnmounted(() => {
|
|
22
39
|
props.controller.destroy();
|
|
23
40
|
});
|
|
24
|
-
const refreshQrcode = async () => {
|
|
25
|
-
await props.controller.loadQrcode();
|
|
26
|
-
};
|
|
27
41
|
return {
|
|
28
42
|
ns,
|
|
29
|
-
|
|
43
|
+
loadQrcode
|
|
30
44
|
};
|
|
31
45
|
},
|
|
32
46
|
render() {
|
|
@@ -35,17 +49,17 @@ const AuthWxmpQrcode = /* @__PURE__ */ defineComponent({
|
|
|
35
49
|
"class": this.ns.b()
|
|
36
50
|
}, [createVNode("div", {
|
|
37
51
|
"class": this.ns.e("content")
|
|
38
|
-
}, [createVNode("img", {
|
|
52
|
+
}, [this.controller.state.qrcode && createVNode("img", {
|
|
39
53
|
"class": this.ns.e("qrcode"),
|
|
40
54
|
"src": (_a = this.controller.state.qrcode) == null ? void 0 : _a.url
|
|
41
|
-
}, null), ((_b = this.controller.state.qrcode) == null ? void 0 : _b.expirein)
|
|
55
|
+
}, null), !((_b = this.controller.state.qrcode) == null ? void 0 : _b.expirein) && createVNode("div", {
|
|
42
56
|
"class": this.ns.e("mask")
|
|
43
57
|
}, [createVNode("ion-icon", {
|
|
44
58
|
"title": ibiz.i18n.t("vue3Util.panelComponent.refresh"),
|
|
45
59
|
"name": "reload-outline",
|
|
46
|
-
"onClick": this.
|
|
60
|
+
"onClick": this.loadQrcode,
|
|
47
61
|
"class": this.ns.em("mask", "icon")
|
|
48
|
-
}, null)])
|
|
62
|
+
}, null)])]), createVNode("div", {
|
|
49
63
|
"class": this.ns.e("caption")
|
|
50
64
|
}, [this.controller.state.tips])]);
|
|
51
65
|
}
|
|
@@ -9,7 +9,7 @@ export declare const IBizAuthWxmpQrcode: import("../../util").TypeWithInstall<im
|
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
11
|
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
-
|
|
12
|
+
loadQrcode: () => Promise<void>;
|
|
13
13
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
14
|
modelData: {
|
|
15
15
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IASrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IASrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4E7D;;;;;OAKG;IACH,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAM/C;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAWtC"}
|
|
@@ -299,8 +299,10 @@ class NavPosController extends PanelItemController {
|
|
|
299
299
|
openViewMsg.params,
|
|
300
300
|
{
|
|
301
301
|
openMode: "INDEXVIEWTAB",
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
modalOption: {
|
|
303
|
+
replace: !this.state.currentKey,
|
|
304
|
+
...openViewMsg.modalOptions
|
|
305
|
+
}
|
|
304
306
|
}
|
|
305
307
|
);
|
|
306
308
|
this.state.isLoading = false;
|
|
@@ -43,7 +43,7 @@ export declare function getEditorProps<C>(): {
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function getEditorEmits<V>(): {
|
|
45
45
|
/** 值变更事件 */
|
|
46
|
-
change: (_value: V, _name?: string) => boolean;
|
|
46
|
+
change: (_value: V, _name?: string, _ignore?: boolean) => boolean;
|
|
47
47
|
/** 失焦事件 */
|
|
48
48
|
blur: (_event?: IData) => boolean;
|
|
49
49
|
/** 聚焦事件 */
|
|
@@ -64,7 +64,7 @@ export declare function getEditorEmits<V>(): {
|
|
|
64
64
|
*/
|
|
65
65
|
export declare function getGridEditorEmits<V>(): {
|
|
66
66
|
/** 值变更事件 */
|
|
67
|
-
change: (_value: V, _name?: string) => boolean;
|
|
67
|
+
change: (_value: V, _name?: string, _ignore?: boolean) => boolean;
|
|
68
68
|
/** 是否正在操作事件 */
|
|
69
69
|
rowSave: () => boolean;
|
|
70
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/props/editor/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;EAsB/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC;IAE5B,YAAY;qBACK,CAAC,UAAU,MAAM;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/props/editor/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;EAsB/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC;IAE5B,YAAY;qBACK,CAAC,UAAU,MAAM,YAAY,OAAO;IACrD,WAAW;oBACK,KAAK;IACrB,WAAW;qBACM,KAAK;IACtB,WAAW;qBACM,KAAK;IACtB,eAAe;4BACS,MAAM;EAEjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC;IAEhC,YAAY;qBACK,CAAC,UAAU,MAAM,YAAY,OAAO;IACrD,eAAe;;EAGlB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB;;;;EAMvC"}
|
|
@@ -27,7 +27,7 @@ function getEditorProps() {
|
|
|
27
27
|
function getEditorEmits() {
|
|
28
28
|
return {
|
|
29
29
|
/** 值变更事件 */
|
|
30
|
-
change: (_value, _name) => true,
|
|
30
|
+
change: (_value, _name, _ignore) => true,
|
|
31
31
|
/** 失焦事件 */
|
|
32
32
|
blur: (_event) => true,
|
|
33
33
|
/** 聚焦事件 */
|
|
@@ -41,7 +41,7 @@ function getEditorEmits() {
|
|
|
41
41
|
function getGridEditorEmits() {
|
|
42
42
|
return {
|
|
43
43
|
/** 值变更事件 */
|
|
44
|
-
change: (_value, _name) => true,
|
|
44
|
+
change: (_value, _name, _ignore) => true,
|
|
45
45
|
/** 是否正在操作事件 */
|
|
46
46
|
rowSave: () => true
|
|
47
47
|
};
|
package/es/use/index.mjs
CHANGED
|
@@ -12,5 +12,6 @@ export { useLocalCacheKey } from './storage/index.mjs';
|
|
|
12
12
|
export { useAutoFocusBlur } from './autofocus-blur/autofocus-blur.mjs';
|
|
13
13
|
export { useControlController } from './control/use-control-controller/use-control-controller.mjs';
|
|
14
14
|
export { useViewController } from './view/use-view-controller/use-view-controller.mjs';
|
|
15
|
+
export { useViewOperation } from './view/use-view-operation/use-view-operation.mjs';
|
|
15
16
|
|
|
16
17
|
"use strict";
|
package/es/use/view/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/use/view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/use/view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC"}
|
package/es/use/view/index.mjs
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ViewController } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 监听视图操作
|
|
4
|
+
*
|
|
5
|
+
* @author tony001
|
|
6
|
+
* @date 2025-01-17 18:01:18
|
|
7
|
+
* @export
|
|
8
|
+
* @param {ViewController} view
|
|
9
|
+
*/
|
|
10
|
+
export declare function useViewOperation(view: ViewController): void;
|
|
11
|
+
//# sourceMappingURL=use-view-operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-view-operation.d.ts","sourceRoot":"","sources":["../../../../src/use/view/use-view-operation/use-view-operation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAsB3D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { listenJSEvent } from '@ibiz-template/core';
|
|
2
|
+
import { onMounted, onUnmounted } from 'vue';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
function useViewOperation(view) {
|
|
6
|
+
let listenJSEventFuncs = [];
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
const viewElement = document.getElementById(view.id);
|
|
9
|
+
const listenJSEventNames = ["keydown", "click"];
|
|
10
|
+
if (!viewElement)
|
|
11
|
+
return;
|
|
12
|
+
listenJSEventFuncs = listenJSEventNames.map((eventName) => {
|
|
13
|
+
return listenJSEvent(viewElement, eventName, (event) => {
|
|
14
|
+
view.setOperateState("MANUAL");
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
onUnmounted(() => {
|
|
19
|
+
if (listenJSEventFuncs && listenJSEventFuncs.length > 0) {
|
|
20
|
+
listenJSEventFuncs.forEach((listenJSEventFunc) => {
|
|
21
|
+
listenJSEventFunc();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useViewOperation };
|
package/es/util/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ export { calcResRoutePath, excludeViewTypes, generateRoutePath, generateRoutePat
|
|
|
2
2
|
export { RouteListener } from './route/route-listener.mjs';
|
|
3
3
|
export { withInstall } from './install.mjs';
|
|
4
4
|
export { prepareControl } from './control/prepare-control.mjs';
|
|
5
|
-
export { renderString } from './render/render.mjs';
|
|
5
|
+
export { hasEmptyPanelRenderer, renderString } from './render/render.mjs';
|
|
6
6
|
export { OverlayContainer } from './overlay-container/overlay-container.mjs';
|
|
7
7
|
export { OverlayPopoverContainer } from './overlay-popover-container/overlay-popover-container.mjs';
|
|
8
8
|
export { createOverlayView, getDrawerPlacement, openViewDrawer, openViewFloatWindow, openViewModal, openViewPopover } from './overlay-view-util/overlay-view-util.mjs';
|