@ibiz-template/vue3-components 0.7.13-alpha.0 → 0.7.13
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-5IjaPupj.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-OSsMvylt.js → xlsx-util-8i01yifN.js} +1 -1
- package/es/control/app-menu/app-menu.mjs +1 -1
- package/es/control/context-menu/context-menu.css +1 -1
- package/es/control/context-menu/context-menu.mjs +55 -6
- package/es/control/form/form/form.css +1 -1
- package/es/control/form/form-detail/form-page/form-page.css +1 -1
- package/es/control/form/form-detail/form-page/form-page.d.ts +1 -0
- package/es/control/form/form-detail/form-page/form-page.mjs +10 -4
- package/es/control/form/form-detail/form-page/index.d.ts +1 -0
- package/es/control/toolbar/short-cut-button/short-cut-button.css +0 -0
- package/es/control/toolbar/short-cut-button/short-cut-button.d.ts +48 -0
- package/es/control/toolbar/short-cut-button/short-cut-button.mjs +71 -0
- package/es/control/toolbar/toolbar.mjs +11 -0
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -0
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +15 -3
- package/es/index.mjs +1 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +2 -7
- package/es/panel-component/auth-userinfo/index.d.ts +1 -1
- package/es/panel-component/short-cut/index.d.ts +21 -4
- package/es/panel-component/short-cut/short-cut.css +1 -1
- package/es/panel-component/short-cut/short-cut.d.ts +21 -4
- package/es/panel-component/short-cut/short-cut.mjs +45 -28
- package/es/util/app-util/app-util.d.ts +90 -0
- package/es/util/app-util/app-util.mjs +152 -0
- package/es/util/index.d.ts +1 -0
- package/es/util/index.mjs +1 -0
- package/es/web-app/main.mjs +2 -0
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/context-menu/context-menu.cjs +55 -6
- package/lib/control/context-menu/context-menu.css +1 -1
- package/lib/control/form/form/form.css +1 -1
- package/lib/control/form/form-detail/form-page/form-page.cjs +10 -4
- package/lib/control/form/form-detail/form-page/form-page.css +1 -1
- package/lib/control/toolbar/short-cut-button/short-cut-button.cjs +73 -0
- package/lib/control/toolbar/short-cut-button/short-cut-button.css +0 -0
- package/lib/control/toolbar/toolbar.cjs +11 -0
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +14 -2
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
- package/lib/index.cjs +2 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +2 -7
- package/lib/panel-component/short-cut/short-cut.cjs +44 -27
- package/lib/panel-component/short-cut/short-cut.css +1 -1
- package/lib/util/app-util/app-util.cjs +154 -0
- package/lib/util/index.cjs +2 -0
- package/lib/web-app/main.cjs +2 -0
- package/package.json +4 -4
- package/dist/index-Ky5xo5V5.js +0 -4
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./short-cut-button.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizShortCutButton = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizShortCutButton",
|
|
10
|
+
props: {
|
|
11
|
+
mode: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
item: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
controller: {
|
|
24
|
+
type: Object,
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["click"],
|
|
29
|
+
setup(props, {
|
|
30
|
+
emit
|
|
31
|
+
}) {
|
|
32
|
+
var _a;
|
|
33
|
+
const ns = vue3Util.useNamespace("short-cut-button");
|
|
34
|
+
const ns2 = vue3Util.useNamespace("toolbar-item");
|
|
35
|
+
const onClick = (e) => {
|
|
36
|
+
emit("click", e);
|
|
37
|
+
};
|
|
38
|
+
const buttonType = (_a = props.item.buttonStyle) == null ? void 0 : _a.toLowerCase();
|
|
39
|
+
const buttonState = vue.computed(() => props.controller.state.buttonsState[props.item.id]);
|
|
40
|
+
const isShortCut = vue.computed(() => props.controller.view.state.isShortCut);
|
|
41
|
+
return {
|
|
42
|
+
ns,
|
|
43
|
+
ns2,
|
|
44
|
+
buttonState,
|
|
45
|
+
buttonType,
|
|
46
|
+
isShortCut,
|
|
47
|
+
onClick
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
render() {
|
|
51
|
+
return vue.createVNode("div", {
|
|
52
|
+
"class": [this.ns.b(), this.ns.is("short-cut", this.isShortCut)]
|
|
53
|
+
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
54
|
+
"title": this.isShortCut ? "".concat(ibiz.i18n.t("app.cancel")).concat(this.item.tooltip) : this.item.tooltip,
|
|
55
|
+
"size": this.size,
|
|
56
|
+
"text": Object.is(this.buttonType, "inverse"),
|
|
57
|
+
"type": this.buttonType,
|
|
58
|
+
"loading": this.buttonState.loading,
|
|
59
|
+
"disabled": this.buttonState.disabled,
|
|
60
|
+
"onClick": this.onClick
|
|
61
|
+
}, {
|
|
62
|
+
default: () => [this.item.showIcon && this.item.sysImage && vue.createVNode("span", {
|
|
63
|
+
"class": this.ns2.b("icon")
|
|
64
|
+
}, [vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
65
|
+
"icon": this.item.sysImage
|
|
66
|
+
}, null)]), this.item.showCaption && vue.createVNode("span", {
|
|
67
|
+
"class": this.ns2.b("text")
|
|
68
|
+
}, [this.isShortCut ? "".concat(ibiz.i18n.t("app.cancel")).concat(this.item.caption) : this.item.caption])]
|
|
69
|
+
})]);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
exports.IBizShortCutButton = IBizShortCutButton;
|
|
File without changes
|
|
@@ -4,6 +4,7 @@ var vue = require('vue');
|
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
5
|
var runtime = require('@ibiz-template/runtime');
|
|
6
6
|
var exportExcel = require('./export-excel/export-excel.cjs');
|
|
7
|
+
var shortCutButton = require('./short-cut-button/short-cut-button.cjs');
|
|
7
8
|
require('./toolbar.css');
|
|
8
9
|
|
|
9
10
|
"use strict";
|
|
@@ -204,6 +205,16 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
204
205
|
}
|
|
205
206
|
}, null);
|
|
206
207
|
}
|
|
208
|
+
if (actionId === "shortcut") {
|
|
209
|
+
return vue.createVNode(shortCutButton.IBizShortCutButton, {
|
|
210
|
+
"key": itemId,
|
|
211
|
+
"class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item)],
|
|
212
|
+
"item": item,
|
|
213
|
+
"controller": c,
|
|
214
|
+
"size": btnSize.value,
|
|
215
|
+
"onClick": (e) => handleClick(item, e)
|
|
216
|
+
}, null);
|
|
217
|
+
}
|
|
207
218
|
return vue.createVNode("div", {
|
|
208
219
|
"key": itemId,
|
|
209
220
|
"class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item), ns.is("loading", c.state.buttonsState[itemId].loading)]
|
|
@@ -359,6 +359,15 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
+
const arrow = () => {
|
|
363
|
+
return vue.createVNode("svg", {
|
|
364
|
+
"viewBox": "0 0 1024 1024",
|
|
365
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
366
|
+
}, [vue.createVNode("path", {
|
|
367
|
+
"fill": "currentColor",
|
|
368
|
+
"d": "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
|
|
369
|
+
}, null)]);
|
|
370
|
+
};
|
|
362
371
|
return {
|
|
363
372
|
ns,
|
|
364
373
|
c,
|
|
@@ -390,7 +399,8 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
390
399
|
onVisibleChange,
|
|
391
400
|
showView,
|
|
392
401
|
selectedData,
|
|
393
|
-
handleDropDownKeyDown
|
|
402
|
+
handleDropDownKeyDown,
|
|
403
|
+
arrow
|
|
394
404
|
};
|
|
395
405
|
},
|
|
396
406
|
render() {
|
|
@@ -425,7 +435,9 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
425
435
|
}, null), this.c.model.linkAppViewId && vue.createVNode("ion-icon", {
|
|
426
436
|
"onClick": this.openLinkView,
|
|
427
437
|
"name": "link-arrow"
|
|
428
|
-
}, null)
|
|
438
|
+
}, null), this.c.model.showTrigger && vue.createVNode("div", {
|
|
439
|
+
"class": [this.ns.e("arrow"), this.showView ? "overturn" : ""]
|
|
440
|
+
}, [this.arrow()])];
|
|
429
441
|
}
|
|
430
442
|
}) : vue.createVNode(vue.resolveComponent("el-select"), {
|
|
431
443
|
"popper-class": this.ns.b("select-popover"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-picker-select-view{width:100%}.ibiz-picker-select-view .el-dropdown{width:100%}.ibiz-picker-select-view .el-select{width:100%}.ibiz-picker-select-view--readonly{font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper{width:100%;min-height:100px;max-height:500px;overflow:auto}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list{background:var(--ibiz-color-primary-text)}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu{background:var(--ibiz-color-primary-text)}.ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default:hover .ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default:hover .ibiz-picker-select-view-select{display:block}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-form-default-content{display:flex;align-items:center;width:100%;height:var(--ibiz-editor-default-line-height);padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color)}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-form-default-content .ibiz-picker-select-view-content-item{height:22px;padding:0 9px;margin:2px 6px 2px 0;font-size:var(--ibiz-font-size-small);line-height:22px;color:var(--ibiz-editor-default-text-color);background-color:var(--ibiz-color-fill-0);border:1px solid transparent;border-radius:var(--ibiz-border-radius-small)}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-select{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default.is-editable .ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default.is-editable .ibiz-picker-select-view-select{display:block}.ibiz-picker-select-view-select-popover{display:none}
|
|
1
|
+
.ibiz-picker-select-view{width:100%}.ibiz-picker-select-view .el-dropdown{width:100%}.ibiz-picker-select-view .el-select{width:100%}.ibiz-picker-select-view__arrow{display:flex;transition:transform .3s;transform:rotateZ(0);transform-origin:center center}.ibiz-picker-select-view__arrow>svg{width:14px;height:14px}.ibiz-picker-select-view__arrow.overturn{transform:rotateZ(-180deg)}.ibiz-picker-select-view--readonly{font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper{width:100%;min-height:100px;max-height:500px;overflow:auto}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list{background:var(--ibiz-color-primary-text)}.ibiz-picker-select-view-popper.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu{background:var(--ibiz-color-primary-text)}.ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default:hover .ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default:hover .ibiz-picker-select-view-select{display:block}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-form-default-content{display:flex;align-items:center;width:100%;height:var(--ibiz-editor-default-line-height);padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color)}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-form-default-content .ibiz-picker-select-view-content-item{height:22px;padding:0 9px;margin:2px 6px 2px 0;font-size:var(--ibiz-font-size-small);line-height:22px;color:var(--ibiz-editor-default-text-color);background-color:var(--ibiz-color-fill-0);border:1px solid transparent;border-radius:var(--ibiz-border-radius-small)}.ibiz-form-item .ibiz-picker-select-view.is-show-default .ibiz-picker-select-view-select{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default.is-editable .ibiz-picker-select-view-form-default-content{display:none}.ibiz-form-item .ibiz-picker-select-view.is-show-default.is-editable .ibiz-picker-select-view-select{display:block}.ibiz-picker-select-view-select-popover{display:none}
|
package/lib/index.cjs
CHANGED
|
@@ -123,6 +123,7 @@ var overlayController = require('./util/overlay-controller/overlay-controller.cj
|
|
|
123
123
|
var usePagination = require('./util/pagination/use-pagination.cjs');
|
|
124
124
|
var noticeUtil = require('./util/notice-util/notice-util.cjs');
|
|
125
125
|
var renderUtil = require('./util/render-util/render-util.cjs');
|
|
126
|
+
var appUtil = require('./util/app-util/app-util.cjs');
|
|
126
127
|
var authGuard = require('./web-app/guard/auth-guard/auth-guard.cjs');
|
|
127
128
|
var main = require('./web-app/main.cjs');
|
|
128
129
|
var index$17 = require('./web-app/router/index.cjs');
|
|
@@ -252,6 +253,7 @@ exports.OverlayController = overlayController.OverlayController;
|
|
|
252
253
|
exports.usePagination = usePagination.usePagination;
|
|
253
254
|
exports.NoticeUtil = noticeUtil.NoticeUtil;
|
|
254
255
|
exports.RenderUtil = renderUtil.RenderUtil;
|
|
256
|
+
exports.AppUtil = appUtil.AppUtil;
|
|
255
257
|
exports.AuthGuard = authGuard.AuthGuard;
|
|
256
258
|
exports.runApp = main.runApp;
|
|
257
259
|
exports.AppRouter = index$17.AppRouter;
|
|
@@ -35,13 +35,8 @@ const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
|
|
|
35
35
|
}
|
|
36
36
|
return "LEFT";
|
|
37
37
|
});
|
|
38
|
-
const onClick =
|
|
39
|
-
|
|
40
|
-
if (bol) {
|
|
41
|
-
await router.push("/login?ru=".concat(encodeURIComponent(window.location.hash.replace("#/", "/"))));
|
|
42
|
-
ibiz.util.showAppLoading();
|
|
43
|
-
window.location.reload();
|
|
44
|
-
}
|
|
38
|
+
const onClick = () => {
|
|
39
|
+
ibiz.hub.controller.logout();
|
|
45
40
|
};
|
|
46
41
|
const isCollapse = vue.computed(() => {
|
|
47
42
|
return c.panel.view.state.isCollapse;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var vueRouter = require('vue-router');
|
|
4
5
|
var runtime = require('@ibiz-template/runtime');
|
|
5
6
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
7
|
var draggable = require('vuedraggable');
|
|
7
|
-
require('./short-cut.css');
|
|
8
8
|
var core = require('@ibiz-template/core');
|
|
9
|
+
require('./short-cut.css');
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
11
12
|
const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -26,35 +27,47 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
26
27
|
setup(props) {
|
|
27
28
|
const ns = vue3Util.useNamespace("short-cut");
|
|
28
29
|
const vue$1 = vue.getCurrentInstance().proxy;
|
|
30
|
+
const router = vueRouter.useRouter();
|
|
29
31
|
const isShowToolbar = vue.ref(false);
|
|
30
32
|
const isShowMore = vue.ref(false);
|
|
31
|
-
const data = vue.
|
|
33
|
+
const data = vue.reactive(ibiz.util.shortCut.data);
|
|
32
34
|
const dragCache = {
|
|
33
35
|
newIndex: 0,
|
|
34
36
|
oldIndex: 0
|
|
35
37
|
};
|
|
38
|
+
const openModeMap = /* @__PURE__ */ new Map([["ROUTE_MODAL", "INDEXVIEWTAB_POPUPMODAL"], ["MODAL", "POPUPMODAL"], ["DRAWER", "DRAWER_RIGHT"]]);
|
|
39
|
+
const onShortCutChange = (items) => {
|
|
40
|
+
if (data.length === 0 && isShowMore.value) {
|
|
41
|
+
isShowMore.value = false;
|
|
42
|
+
}
|
|
43
|
+
vue$1.$forceUpdate();
|
|
44
|
+
};
|
|
45
|
+
vue.onMounted(() => {
|
|
46
|
+
ibiz.util.shortCut.onChange(onShortCutChange);
|
|
47
|
+
});
|
|
48
|
+
vue.onUnmounted(() => {
|
|
49
|
+
ibiz.util.shortCut.offChange(onShortCutChange);
|
|
50
|
+
});
|
|
36
51
|
const onShowChange = () => {
|
|
37
52
|
isShowToolbar.value = !isShowToolbar.value;
|
|
38
53
|
if (isShowToolbar.value) {
|
|
39
54
|
isShowMore.value = false;
|
|
40
55
|
}
|
|
41
56
|
};
|
|
42
|
-
const getOpenMode = (openMode) => {
|
|
43
|
-
switch (openMode) {
|
|
44
|
-
case "ROUTE_MODAL":
|
|
45
|
-
return "INDEXVIEWTAB_POPUPMODAL";
|
|
46
|
-
case "MODAL":
|
|
47
|
-
return "POPUPMODAL";
|
|
48
|
-
case "DRAWER":
|
|
49
|
-
return "DRAWER_RIGHT";
|
|
50
|
-
default:
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
57
|
const onClick = (item) => {
|
|
54
58
|
isShowMore.value = false;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
if (item.openMode === "ROUTE") {
|
|
60
|
+
const fullPath = item.fullPath.substring(1);
|
|
61
|
+
if (router.currentRoute.value.fullPath !== fullPath) {
|
|
62
|
+
router.push({
|
|
63
|
+
path: item.fullPath.substring(1)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
ibiz.commands.execute(runtime.OpenAppViewCommand.TAG, item.appViewId, core.IBizContext.create(item.context), item.params, {
|
|
68
|
+
openMode: openModeMap.get(item.openMode)
|
|
69
|
+
});
|
|
70
|
+
}
|
|
58
71
|
};
|
|
59
72
|
const onChange = (evt) => {
|
|
60
73
|
if (evt.moved) {
|
|
@@ -65,18 +78,16 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
65
78
|
dragCache.oldIndex = evt.removed.oldIndex;
|
|
66
79
|
ibiz.util.shortCut.changeIndex(dragCache.newIndex, dragCache.oldIndex);
|
|
67
80
|
}
|
|
68
|
-
vue$1.$forceUpdate();
|
|
69
81
|
};
|
|
70
82
|
const onDelete = (event, key) => {
|
|
71
83
|
event.stopPropagation();
|
|
72
84
|
ibiz.util.shortCut.removeShortCut(key);
|
|
73
|
-
vue$1.$forceUpdate();
|
|
74
85
|
};
|
|
75
86
|
const renderDraggable = (isVertical) => {
|
|
76
87
|
return vue.createVNode(draggable, {
|
|
77
88
|
"itemKey": "key",
|
|
78
89
|
"class": [ns.e("draggable"), ns.is("vertical", isVertical), ns.is("horizontal", !isVertical)],
|
|
79
|
-
"modelValue": data
|
|
90
|
+
"modelValue": data,
|
|
80
91
|
"group": props.controller.model.id,
|
|
81
92
|
"onChange": (evt) => onChange(evt)
|
|
82
93
|
}, {
|
|
@@ -87,13 +98,14 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
98
|
if (isVertical && !isShowToolbar.value || isVertical && isShowToolbar.value && index > 5 || !isVertical && index < 6) {
|
|
88
99
|
return vue.createVNode("div", {
|
|
89
100
|
"class": ns.e("item"),
|
|
101
|
+
"title": element.caption,
|
|
90
102
|
"onClick": () => onClick(element)
|
|
91
103
|
}, [vue.createVNode("svg", {
|
|
92
104
|
"viewBox": "0 0 16 16",
|
|
93
105
|
"class": ["drag-icon", "icon"],
|
|
94
106
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
95
|
-
"height": "
|
|
96
|
-
"width": "
|
|
107
|
+
"height": "16px",
|
|
108
|
+
"width": "16px",
|
|
97
109
|
"focusable": "false"
|
|
98
110
|
}, [vue.createVNode("g", {
|
|
99
111
|
"id": "drag-icon/drag--",
|
|
@@ -106,14 +118,17 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
106
118
|
}, [vue.createVNode("path", {
|
|
107
119
|
"d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z",
|
|
108
120
|
"id": "drag-icon-air"
|
|
109
|
-
}, null)])])]), vue.createVNode("
|
|
110
|
-
"class": ["icon", "
|
|
121
|
+
}, null)])])]), element.icon ? vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
122
|
+
"class": ["caption-icon", "icon"],
|
|
123
|
+
"icon": element.icon
|
|
124
|
+
}, null) : vue.createVNode("ion-icon", {
|
|
125
|
+
"class": ["caption-icon", "icon"],
|
|
111
126
|
"name": "ellipsis-horizontal-circle-outline"
|
|
112
127
|
}, null), vue.createVNode("div", {
|
|
113
128
|
"class": ns.em("item", "caption")
|
|
114
|
-
}, [element.
|
|
115
|
-
"class": ["close-icon", "icon"],
|
|
129
|
+
}, [element.caption]), vue.createVNode("ion-icon", {
|
|
116
130
|
"name": "close-outline",
|
|
131
|
+
"class": ["close-icon", "icon"],
|
|
117
132
|
"onClick": (event) => onDelete(event, element.key)
|
|
118
133
|
}, null)]);
|
|
119
134
|
}
|
|
@@ -124,6 +139,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
124
139
|
"class": [ns.e("item"), ns.e("action")],
|
|
125
140
|
"onClick": onShowChange
|
|
126
141
|
}, [vue.createVNode("ion-icon", {
|
|
142
|
+
"class": ["expand-icon", "icon"],
|
|
127
143
|
"name": "chevron-back-outline"
|
|
128
144
|
}, null), vue.createVNode("div", {
|
|
129
145
|
"class": ns.em("item", "caption")
|
|
@@ -150,7 +166,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
166
|
}, {
|
|
151
167
|
default: () => [vue.createVNode("div", null, [vue.createVNode("span", {
|
|
152
168
|
"class": ns.em("more", "caption")
|
|
153
|
-
}, [isShowToolbar.value ? "6/".concat(data.
|
|
169
|
+
}, [isShowToolbar.value ? "6/".concat(data.length) : data.length]), vue.createVNode("i", {
|
|
154
170
|
"class": ["fa", ns.em("more", "icon"), isShowMore.value ? "fa-angle-double-down" : "fa-angle-double-up"],
|
|
155
171
|
"aria-hidden": "true"
|
|
156
172
|
}, null)])]
|
|
@@ -173,7 +189,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
173
189
|
},
|
|
174
190
|
render() {
|
|
175
191
|
return vue.createVNode("div", {
|
|
176
|
-
"class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("
|
|
192
|
+
"class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("conceal", this.data.length === 0)]
|
|
177
193
|
}, [this.isShowToolbar && this.renderDraggable(false), (!this.isShowToolbar || this.data.length > 6) && this.renderMoreToolbar(), this.isShowToolbar && vue.createVNode("div", {
|
|
178
194
|
"class": this.ns.e("recover"),
|
|
179
195
|
"onClick": this.onShowChange
|
|
@@ -183,6 +199,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
|
|
|
183
199
|
"placement": "top"
|
|
184
200
|
}, {
|
|
185
201
|
default: () => [vue.createVNode("ion-icon", {
|
|
202
|
+
"class": ["recover-icon", "icon"],
|
|
186
203
|
"name": "chevron-forward-outline"
|
|
187
204
|
}, null)]
|
|
188
205
|
})])]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-short-cut{bottom:4px;right:4px;z-index:2;position:fixed;display:flex;align-items:center;border-radius:4px;box-shadow:0 0 16px rgba(0,0,0,.0784313725);border:1px solid var(--ibiz-color-border);background:var(--ibiz-color-bg-1)}.ibiz-short-cut.is-
|
|
1
|
+
.ibiz-short-cut{bottom:4px;right:4px;z-index:2;position:fixed;display:flex;align-items:center;border-radius:4px;box-shadow:0 0 16px rgba(0,0,0,.0784313725);border:1px solid var(--ibiz-color-border);background:var(--ibiz-color-bg-1)}.ibiz-short-cut.is-conceal{visibility:hidden}.ibiz-short-cut__more{padding:2px;cursor:pointer}.ibiz-short-cut__more .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__more .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__more--icon{font-size:16px;margin-left:8px}.ibiz-short-cut__recover{padding:2px;display:flex;cursor:pointer;align-items:center}.ibiz-short-cut__recover .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__recover .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__item{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start}.ibiz-short-cut__item .icon{flex-shrink:0;font-size:16px}.ibiz-short-cut__item .caption-icon,.ibiz-short-cut__item .expand-icon{margin-right:8px}.ibiz-short-cut__item .close-icon,.ibiz-short-cut__item .drag-icon{visibility:hidden}.ibiz-short-cut__item .close-icon:hover{color:var(--ibiz-color-danger-hover)}.ibiz-short-cut__item--caption{flex-grow:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ibiz-short-cut__item:hover .close-icon,.ibiz-short-cut__item:hover .drag-icon{visibility:visible}.ibiz-short-cut .is-horizontal{display:flex;padding:8px 0}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item{max-width:168px;min-width:84px;padding:0 12px;border-right:1px solid var(--ibiz-color-border)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .close-icon{right:0;position:absolute;padding-right:4px;background-color:var(--ibiz-color-white);box-shadow:-10px 0 20px 8px var(--ibiz-color-white)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .drag-icon{display:none;margin-right:8px}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item:hover .drag-icon{display:block}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item:hover .caption-icon{display:none}.ibiz-short-cut__popover.el-popover.el-popper{padding:10px 0}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item{width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item .drag-icon{left:5px;position:absolute}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item:hover{background-color:var(--ibiz-color-fill-1)}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class AppUtil {
|
|
5
|
+
/**
|
|
6
|
+
* Creates an instance of AppUtil.
|
|
7
|
+
* @author tony001
|
|
8
|
+
* @date 2024-05-14 17:05:00
|
|
9
|
+
* @param {Router} router
|
|
10
|
+
*/
|
|
11
|
+
constructor(router) {
|
|
12
|
+
this.router = router;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 登录
|
|
16
|
+
*
|
|
17
|
+
* @author tony001
|
|
18
|
+
* @date 2024-05-14 16:05:41
|
|
19
|
+
* @param {string} loginName
|
|
20
|
+
* @param {string} password
|
|
21
|
+
* @param {(boolean | undefined)} [remember]
|
|
22
|
+
* @param {(IData | undefined)} [headers]
|
|
23
|
+
* @param {(IData | undefined)} [opts]
|
|
24
|
+
* @return {*} {Promise<boolean>}
|
|
25
|
+
*/
|
|
26
|
+
async login(loginName, password, remember, headers, opts) {
|
|
27
|
+
const bol = await ibiz.auth.login(loginName, password, remember, headers);
|
|
28
|
+
if (bol === true) {
|
|
29
|
+
window.location.hash = this.router.currentRoute.value.query.ru || "/";
|
|
30
|
+
window.history.pushState({}, "");
|
|
31
|
+
window.location.reload();
|
|
32
|
+
}
|
|
33
|
+
return bol;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 登出
|
|
37
|
+
*
|
|
38
|
+
* @author tony001
|
|
39
|
+
* @date 2024-05-14 16:05:02
|
|
40
|
+
* @param {(IData | undefined)} [opts]
|
|
41
|
+
* @return {*} {Promise<boolean>}
|
|
42
|
+
*/
|
|
43
|
+
async logout(opts) {
|
|
44
|
+
const bol = await ibiz.auth.logout();
|
|
45
|
+
if (bol) {
|
|
46
|
+
const path = window.location;
|
|
47
|
+
if (path.search.indexOf("isAnonymous=true") !== -1) {
|
|
48
|
+
const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
|
|
49
|
+
window.history.replaceState({}, "", href);
|
|
50
|
+
}
|
|
51
|
+
await this.router.push(
|
|
52
|
+
"/login?ru=".concat(encodeURIComponent(
|
|
53
|
+
window.location.hash.replace("#/", "/")
|
|
54
|
+
))
|
|
55
|
+
);
|
|
56
|
+
ibiz.util.showAppLoading();
|
|
57
|
+
window.location.reload();
|
|
58
|
+
}
|
|
59
|
+
return bol;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 变更密码
|
|
63
|
+
*
|
|
64
|
+
* @author tony001
|
|
65
|
+
* @date 2024-05-14 16:05:11
|
|
66
|
+
* @param {string} oldPwd
|
|
67
|
+
* @param {string} newPwd
|
|
68
|
+
* @param {(IData | undefined)} [opts]
|
|
69
|
+
* @return {*} {Promise<boolean>}
|
|
70
|
+
*/
|
|
71
|
+
async changePwd(oldPwd, newPwd, opts) {
|
|
72
|
+
let bol = this.validatePwd(oldPwd, newPwd, opts);
|
|
73
|
+
if (bol) {
|
|
74
|
+
bol = await ibiz.auth.changePwd(oldPwd, newPwd);
|
|
75
|
+
}
|
|
76
|
+
return bol;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 切换组织
|
|
80
|
+
*
|
|
81
|
+
* @author tony001
|
|
82
|
+
* @date 2024-05-14 16:05:20
|
|
83
|
+
* @param {string} oldOrgId
|
|
84
|
+
* @param {string} newOrgId
|
|
85
|
+
* @param {(IData | undefined)} [opts]
|
|
86
|
+
* @return {*} {Promise<boolean>}
|
|
87
|
+
*/
|
|
88
|
+
switchOrg(oldOrgId, newOrgId, opts) {
|
|
89
|
+
throw new Error("Method not implemented.");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 切换主题
|
|
93
|
+
*
|
|
94
|
+
* @author tony001
|
|
95
|
+
* @date 2024-05-14 16:05:30
|
|
96
|
+
* @param {string} oldTheme
|
|
97
|
+
* @param {string} newTheme
|
|
98
|
+
* @param {(IData | undefined)} [opts]
|
|
99
|
+
* @return {*} {Promise<boolean>}
|
|
100
|
+
*/
|
|
101
|
+
switchTheme(oldTheme, newTheme, opts) {
|
|
102
|
+
throw new Error("Method not implemented.");
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 切换语言
|
|
106
|
+
*
|
|
107
|
+
* @author tony001
|
|
108
|
+
* @date 2024-05-14 16:05:42
|
|
109
|
+
* @param {string} oldLanguage
|
|
110
|
+
* @param {string} newLanguage
|
|
111
|
+
* @param {(IData | undefined)} [opts]
|
|
112
|
+
* @return {*} {Promise<boolean>}
|
|
113
|
+
*/
|
|
114
|
+
switchLanguage(oldLanguage, newLanguage, opts) {
|
|
115
|
+
throw new Error("Method not implemented.");
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 校验密码
|
|
119
|
+
*
|
|
120
|
+
* @author tony001
|
|
121
|
+
* @date 2024-05-14 17:05:31
|
|
122
|
+
* @protected
|
|
123
|
+
* @param {string} oldPwd
|
|
124
|
+
* @param {string} newPwd
|
|
125
|
+
* @param {IData} [opts={}]
|
|
126
|
+
* @return {*} {boolean}
|
|
127
|
+
*/
|
|
128
|
+
validatePwd(oldPwd, newPwd, opts = {}) {
|
|
129
|
+
const { surePwd } = opts;
|
|
130
|
+
if (!oldPwd) {
|
|
131
|
+
ibiz.message.error("\u539F\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
if (!newPwd) {
|
|
135
|
+
ibiz.message.error("\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
if (!surePwd) {
|
|
139
|
+
ibiz.message.error("\u786E\u8BA4\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
if (oldPwd === newPwd) {
|
|
143
|
+
ibiz.message.error("\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u65E7\u5BC6\u7801\u4E00\u81F4");
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
if (newPwd !== surePwd) {
|
|
147
|
+
ibiz.message.error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4");
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
exports.AppUtil = AppUtil;
|
package/lib/util/index.cjs
CHANGED
|
@@ -10,6 +10,7 @@ var overlayController = require('./overlay-controller/overlay-controller.cjs');
|
|
|
10
10
|
var usePagination = require('./pagination/use-pagination.cjs');
|
|
11
11
|
var noticeUtil = require('./notice-util/notice-util.cjs');
|
|
12
12
|
var renderUtil = require('./render-util/render-util.cjs');
|
|
13
|
+
var appUtil = require('./app-util/app-util.cjs');
|
|
13
14
|
|
|
14
15
|
"use strict";
|
|
15
16
|
|
|
@@ -23,3 +24,4 @@ exports.OverlayController = overlayController.OverlayController;
|
|
|
23
24
|
exports.usePagination = usePagination.usePagination;
|
|
24
25
|
exports.NoticeUtil = noticeUtil.NoticeUtil;
|
|
25
26
|
exports.RenderUtil = renderUtil.RenderUtil;
|
|
27
|
+
exports.AppUtil = appUtil.AppUtil;
|
package/lib/web-app/main.cjs
CHANGED
|
@@ -12,6 +12,7 @@ require('../util/index.cjs');
|
|
|
12
12
|
require('./guard/index.cjs');
|
|
13
13
|
var unauthorizedHandler = require('./util/unauthorized-handler/unauthorized-handler.cjs');
|
|
14
14
|
var dynaAuthGuard = require('./guard/auth-guard/dyna-auth-guard.cjs');
|
|
15
|
+
var appUtil = require('../util/app-util/app-util.cjs');
|
|
15
16
|
var openViewUtil = require('../util/open-view-util/open-view-util.cjs');
|
|
16
17
|
var renderUtil = require('../util/render-util/render-util.cjs');
|
|
17
18
|
var messageUtil = require('../util/message-util/message-util.cjs');
|
|
@@ -64,6 +65,7 @@ async function runApp(plugins, opts) {
|
|
|
64
65
|
}
|
|
65
66
|
index.AppRouter.setAuthGuard((notLogin) => authGuard.verify(notLogin));
|
|
66
67
|
app.use(index.AppRouter.getRouter());
|
|
68
|
+
ibiz.appUtil = new appUtil.AppUtil(index.AppRouter.getRouter());
|
|
67
69
|
ibiz.openView = new openViewUtil.OpenViewUtil(index.AppRouter.getRouter());
|
|
68
70
|
ibiz.render = new renderUtil.RenderUtil();
|
|
69
71
|
ibiz.message = new messageUtil.MessageUtil();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.13
|
|
3
|
+
"version": "0.7.13",
|
|
4
4
|
"description": "使用 rollup 编译 vue 组件或者 jsx",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@ibiz-template-plugin/gantt": "0.1.4",
|
|
33
33
|
"@ibiz-template/core": "0.7.7-dev.0",
|
|
34
34
|
"@ibiz-template/devtool": "0.0.1-dev.6",
|
|
35
|
-
"@ibiz-template/model-helper": "0.7.13
|
|
36
|
-
"@ibiz-template/runtime": "0.7.13
|
|
35
|
+
"@ibiz-template/model-helper": "0.7.13",
|
|
36
|
+
"@ibiz-template/runtime": "0.7.13",
|
|
37
37
|
"@ibiz-template/theme": "^0.7.0",
|
|
38
|
-
"@ibiz-template/vue3-util": "0.7.13
|
|
38
|
+
"@ibiz-template/vue3-util": "0.7.13",
|
|
39
39
|
"@ibiz-template/web-theme": "^1.1.16",
|
|
40
40
|
"@ibiz/model-core": "^0.1.25",
|
|
41
41
|
"@imengyu/vue3-context-menu": "^1.3.5",
|