@ibiz-template/vue3-components 0.7.13 → 0.7.14
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-WP6TUdg-.js → index-8Lu2Ax-_.js} +1 -1
- package/dist/index-8tvyarHw.js +4 -0
- package/dist/{index-kgWpXafW.js → index-Hg_8xCYx.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-8i01yifN.js → xlsx-util-OfvrEAre.js} +1 -1
- package/es/common/carousel/carousel.d.ts +8 -0
- package/es/common/carousel/carousel.mjs +9 -1
- package/es/common/carousel-card/carousel-card.css +1 -0
- package/es/common/carousel-card/carousel-card.d.ts +41 -0
- package/es/common/carousel-card/carousel-card.mjs +218 -0
- package/es/common/index.mjs +2 -0
- package/es/control/context-menu/context-menu.d.ts +1 -0
- package/es/control/context-menu/context-menu.mjs +9 -1
- package/es/control/context-menu/index.d.ts +1 -0
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +76 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +74 -0
- package/es/control/search-bar/filter-tree/filter-tree.mjs +19 -20
- package/es/control/toolbar/toolbar.mjs +27 -2
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.mjs +2 -1
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +10 -10
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/panel-component/auth-captcha/auth-captcha.controller.d.ts +13 -0
- package/es/panel-component/auth-captcha/auth-captcha.controller.mjs +15 -11
- package/es/panel-component/panel-button/panel-button.controller.d.ts +1 -1
- package/es/panel-component/panel-button/panel-button.controller.mjs +6 -9
- package/es/panel-component/panel-static-carousel/index.d.ts +1 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -2
- package/es/panel-component/short-cut/short-cut.css +1 -1
- package/es/panel-component/short-cut/short-cut.mjs +19 -16
- package/es/view-engine/login-view.engine.d.ts +31 -3
- package/es/view-engine/login-view.engine.mjs +32 -12
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +19 -5
- package/lib/common/carousel/carousel.cjs +9 -1
- package/lib/common/carousel-card/carousel-card.cjs +220 -0
- package/lib/common/carousel-card/carousel-card.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/context-menu/context-menu.cjs +8 -0
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +19 -20
- package/lib/control/toolbar/toolbar.cjs +26 -1
- package/lib/control/tree/tree.cjs +2 -1
- package/lib/control/tree/tree.css +1 -1
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +10 -10
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/panel-component/auth-captcha/auth-captcha.controller.cjs +15 -11
- package/lib/panel-component/panel-button/panel-button.controller.cjs +6 -9
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -2
- package/lib/panel-component/short-cut/short-cut.cjs +19 -16
- package/lib/panel-component/short-cut/short-cut.css +1 -1
- package/lib/view-engine/login-view.engine.cjs +32 -12
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +17 -3
- package/package.json +7 -7
- package/dist/index-5IjaPupj.js +0 -4
|
@@ -12,14 +12,21 @@ var __publicField = (obj, key, value) => {
|
|
|
12
12
|
class LoginViewEngine extends ViewEngineBase {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
+
/**
|
|
16
|
+
* 路由对象
|
|
17
|
+
*
|
|
18
|
+
* @type {RouteLocationNormalizedLoaded}
|
|
19
|
+
* @memberof LoginViewEngine
|
|
20
|
+
*/
|
|
15
21
|
__publicField(this, "route", useRoute());
|
|
16
22
|
__publicField(this, "enterKeyListener", async (event) => {
|
|
17
|
-
if (event.key === "Enter" && this.
|
|
23
|
+
if (event.key === "Enter" && this.view.layoutPanel) {
|
|
18
24
|
const args = {
|
|
19
25
|
data: [
|
|
20
26
|
{
|
|
21
|
-
username: this.
|
|
22
|
-
password: this.
|
|
27
|
+
username: this.view.layoutPanel.data.username,
|
|
28
|
+
password: this.view.layoutPanel.data.password,
|
|
29
|
+
captcha: this.view.layoutPanel.data.captcha
|
|
23
30
|
}
|
|
24
31
|
]
|
|
25
32
|
};
|
|
@@ -27,13 +34,22 @@ class LoginViewEngine extends ViewEngineBase {
|
|
|
27
34
|
}
|
|
28
35
|
});
|
|
29
36
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
/**
|
|
38
|
+
* 视图mounted生命周期执行逻辑
|
|
39
|
+
*
|
|
40
|
+
* @return {*} {Promise<void>}
|
|
41
|
+
* @memberof LoginViewEngine
|
|
42
|
+
*/
|
|
33
43
|
async onMounted() {
|
|
34
44
|
super.onMounted();
|
|
35
45
|
document.addEventListener("keydown", this.enterKeyListener);
|
|
36
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* 视图destroyed生命周期执行逻辑
|
|
49
|
+
*
|
|
50
|
+
* @return {*} {Promise<void>}
|
|
51
|
+
* @memberof LoginViewEngine
|
|
52
|
+
*/
|
|
37
53
|
async onDestroyed() {
|
|
38
54
|
super.onDestroyed();
|
|
39
55
|
document.removeEventListener("keydown", this.enterKeyListener);
|
|
@@ -51,8 +67,12 @@ class LoginViewEngine extends ViewEngineBase {
|
|
|
51
67
|
let rememberme;
|
|
52
68
|
const headers = {};
|
|
53
69
|
const data = args.data[0] || {};
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
const panelDataParent = args.params.panelDataParent;
|
|
71
|
+
if (this.view.layoutPanel) {
|
|
72
|
+
if (!await this.view.layoutPanel.validate(panelDataParent)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const panelData = this.view.layoutPanel.data;
|
|
56
76
|
if (typeof panelData.isRemember === "boolean") {
|
|
57
77
|
rememberme = panelData.isRemember;
|
|
58
78
|
}
|
|
@@ -73,16 +93,16 @@ class LoginViewEngine extends ViewEngineBase {
|
|
|
73
93
|
rememberme,
|
|
74
94
|
headers
|
|
75
95
|
);
|
|
76
|
-
this.view.
|
|
96
|
+
this.view.evt.emit("onAfterLogin", { ok: bol, panelDataParent });
|
|
77
97
|
if (bol === true) {
|
|
78
98
|
window.location.hash = this.route.query.ru || "/";
|
|
79
99
|
window.location.reload();
|
|
80
100
|
}
|
|
81
101
|
}
|
|
82
102
|
async cancelChanges() {
|
|
83
|
-
if (this.
|
|
84
|
-
Object.keys(this.
|
|
85
|
-
const controller = this.
|
|
103
|
+
if (this.view.layoutPanel) {
|
|
104
|
+
Object.keys(this.view.layoutPanel.panelItems).forEach((key) => {
|
|
105
|
+
const controller = this.view.layoutPanel.panelItems[key];
|
|
86
106
|
const { viewFieldName } = controller.model;
|
|
87
107
|
if (viewFieldName) {
|
|
88
108
|
controller.setDataValue("", viewFieldName);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, toRaw, onUnmounted, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { parseRouteViewData, createOverlayView, routerCallback } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { useRoute, useRouter } from 'vue-router';
|
|
2
|
+
import { parseRouteViewData, createOverlayView, routerCallback, route2routePath } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
|
|
4
4
|
import { IBizContext } from '@ibiz-template/core';
|
|
5
5
|
import { RouteConst } from '@ibiz-template/runtime';
|
|
6
6
|
import { isEmpty } from 'ramda';
|
|
@@ -18,10 +18,11 @@ const ModalRouterShell = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
setup(props) {
|
|
21
|
-
const
|
|
21
|
+
const routeObj = useRoute();
|
|
22
22
|
const router = useRouter();
|
|
23
23
|
const isDestroyed = ref(false);
|
|
24
24
|
const viewData = ref({});
|
|
25
|
+
const pathHistory = [];
|
|
25
26
|
const destroyContext = () => {
|
|
26
27
|
if (viewData.value.context) {
|
|
27
28
|
const {
|
|
@@ -41,9 +42,12 @@ const ModalRouterShell = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
}
|
|
42
43
|
destroyContext();
|
|
43
44
|
});
|
|
44
|
-
const openView = async () => {
|
|
45
|
+
const openView = async (route) => {
|
|
45
46
|
var _a;
|
|
46
47
|
viewData.value = await parseRouteViewData(route, routeDepth, true);
|
|
48
|
+
if (isDestroyed.value) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
47
51
|
if (!(viewData.value.context instanceof IBizContext)) {
|
|
48
52
|
viewData.value.context = IBizContext.create(viewData.value.context);
|
|
49
53
|
}
|
|
@@ -97,6 +101,7 @@ const ModalRouterShell = /* @__PURE__ */ defineComponent({
|
|
|
97
101
|
};
|
|
98
102
|
overlay = ibiz.overlay.createModal(component, void 0, opts);
|
|
99
103
|
overlay.present();
|
|
104
|
+
pathHistory.push(route.fullPath);
|
|
100
105
|
const result = await overlay.onWillDismiss();
|
|
101
106
|
overlay = null;
|
|
102
107
|
if (isDestroyed.value === false) {
|
|
@@ -112,7 +117,16 @@ const ModalRouterShell = /* @__PURE__ */ defineComponent({
|
|
|
112
117
|
});
|
|
113
118
|
}
|
|
114
119
|
};
|
|
115
|
-
|
|
120
|
+
onBeforeRouteUpdate((to, from) => {
|
|
121
|
+
if (!isDestroyed.value && pathHistory.length > 0 && pathHistory.indexOf(from.fullPath) !== -1 && pathHistory.indexOf(to.fullPath) === -1) {
|
|
122
|
+
const pathNodes = route2routePath(to).pathNodes;
|
|
123
|
+
const lastNode = pathNodes[pathNodes.length - 1];
|
|
124
|
+
if (lastNode && lastNode.viewName === RouteConst.ROUTE_MODAL_TAG) {
|
|
125
|
+
openView(to);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
openView(routeObj);
|
|
116
130
|
return {};
|
|
117
131
|
},
|
|
118
132
|
render() {
|
|
@@ -22,6 +22,10 @@ const IBizCarouselComponent = /* @__PURE__ */ vue.defineComponent({
|
|
|
22
22
|
timeSpan: {
|
|
23
23
|
type: Number,
|
|
24
24
|
default: 3e3
|
|
25
|
+
},
|
|
26
|
+
carouselMode: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
setup(props) {
|
|
@@ -59,7 +63,11 @@ const IBizCarouselComponent = /* @__PURE__ */ vue.defineComponent({
|
|
|
59
63
|
}, null);
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
|
-
return vue.createVNode("div", null, [vue.createVNode(vue.resolveComponent("
|
|
66
|
+
return vue.createVNode("div", null, [this.carouselMode === "card" ? vue.createVNode(vue.resolveComponent("IBizCarousel-card"), {
|
|
67
|
+
"swipeData": this.swipeData,
|
|
68
|
+
"isAuto": this.isAuto,
|
|
69
|
+
"timeSpan": this.timeSpan
|
|
70
|
+
}, null) : vue.createVNode(vue.resolveComponent("el-carousel"), {
|
|
63
71
|
"class": this.ns.b(),
|
|
64
72
|
"autoplay": this.isAuto,
|
|
65
73
|
"interval": this.timeSpan
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./carousel-card.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizCarouselCard = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizCarouselCard",
|
|
10
|
+
props: {
|
|
11
|
+
swipeData: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
isAuto: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
timeSpan: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 3e3
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props) {
|
|
25
|
+
const ns = vue3Util.useNamespace("carousel-card");
|
|
26
|
+
const nowIndex = vue.ref(3);
|
|
27
|
+
const mainDom = vue.ref();
|
|
28
|
+
const listDom = vue.ref();
|
|
29
|
+
const gap = 0;
|
|
30
|
+
const imgWidth = vue.ref(600);
|
|
31
|
+
const containerWidth = vue.ref(0);
|
|
32
|
+
const diffLen = vue.computed(() => {
|
|
33
|
+
return (containerWidth.value - imgWidth.value - gap * 2) / 2;
|
|
34
|
+
});
|
|
35
|
+
let timer = null;
|
|
36
|
+
const imgDoms = document.getElementsByClassName("swiper-slide-card");
|
|
37
|
+
const scale = 0.8;
|
|
38
|
+
const aniTime = 500;
|
|
39
|
+
const resImgArr = vue.computed(() => {
|
|
40
|
+
if (props.swipeData.length > 2) {
|
|
41
|
+
return [...props.swipeData.slice(-2), ...props.swipeData, ...props.swipeData.slice(0, 2)];
|
|
42
|
+
}
|
|
43
|
+
return [...props.swipeData];
|
|
44
|
+
});
|
|
45
|
+
const setScale = () => {
|
|
46
|
+
for (let i = 0; i < imgDoms.length; i++) {
|
|
47
|
+
if (props.swipeData.length === 2) {
|
|
48
|
+
imgDoms[0].style.left = "".concat(containerWidth.value / 4 - imgWidth.value / 2, "px");
|
|
49
|
+
imgDoms[1].style.left = "".concat(containerWidth.value / 4 * 3 - imgWidth.value / 2, "px");
|
|
50
|
+
} else if (props.swipeData.length === 1) {
|
|
51
|
+
imgDoms[i].style.left = "".concat(containerWidth.value / 2 - imgWidth.value / 2, "px");
|
|
52
|
+
} else {
|
|
53
|
+
imgDoms[i].style.left = "".concat((i - 1) * (imgWidth.value + gap), "px");
|
|
54
|
+
}
|
|
55
|
+
if (i === nowIndex.value - 1) {
|
|
56
|
+
imgDoms[i].style.transform = "scale(1)";
|
|
57
|
+
} else {
|
|
58
|
+
imgDoms[i].style.transform = "scale(".concat(scale, ")");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const nextSlider = (anitime) => {
|
|
63
|
+
if (props.swipeData.length === 2) {
|
|
64
|
+
nowIndex.value = nowIndex.value ? 0 : 1;
|
|
65
|
+
setScale();
|
|
66
|
+
} else if (props.swipeData.length === 1) {
|
|
67
|
+
} else {
|
|
68
|
+
if (nowIndex.value >= 2) {
|
|
69
|
+
mainDom.value.style.transition = "left ".concat(anitime / 1e3, "s");
|
|
70
|
+
mainDom.value.style.left = "".concat(parseInt(mainDom.value.style.left, 10) - (gap + imgWidth.value), "px");
|
|
71
|
+
}
|
|
72
|
+
if (nowIndex.value === props.swipeData.length + 1) {
|
|
73
|
+
nowIndex.value = props.swipeData.length + 2;
|
|
74
|
+
setScale();
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
nowIndex.value = 2;
|
|
77
|
+
setScale();
|
|
78
|
+
mainDom.value.style.transitionProperty = "none";
|
|
79
|
+
mainDom.value.style.left = "".concat(-(imgWidth.value - diffLen.value), "px");
|
|
80
|
+
}, anitime);
|
|
81
|
+
} else {
|
|
82
|
+
nowIndex.value++;
|
|
83
|
+
setScale();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const prevSlider = (anitime) => {
|
|
88
|
+
if (props.swipeData.length === 2) {
|
|
89
|
+
nowIndex.value = nowIndex.value ? 0 : 1;
|
|
90
|
+
setScale();
|
|
91
|
+
} else if (props.swipeData.length === 1) {
|
|
92
|
+
} else {
|
|
93
|
+
nowIndex.value--;
|
|
94
|
+
mainDom.value.style.transition = "left ".concat(anitime / 1e3, "s");
|
|
95
|
+
mainDom.value.style.left = "".concat(parseInt(mainDom.value.style.left, 10) + (gap + imgWidth.value), "px");
|
|
96
|
+
if (nowIndex.value === 1) {
|
|
97
|
+
setScale();
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
nowIndex.value = props.swipeData.length + 1;
|
|
100
|
+
setScale();
|
|
101
|
+
mainDom.value.style.transitionProperty = "none";
|
|
102
|
+
mainDom.value.style.left = "".concat(-(parseInt(imgDoms[nowIndex.value].style.left, 10) - diffLen.value - gap), "px");
|
|
103
|
+
}, anitime);
|
|
104
|
+
} else {
|
|
105
|
+
setScale();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const startAutoplay = () => {
|
|
110
|
+
timer = window.setInterval(() => nextSlider(aniTime), props.timeSpan);
|
|
111
|
+
};
|
|
112
|
+
const stopAutoplay = () => {
|
|
113
|
+
if (timer) {
|
|
114
|
+
window.clearInterval(timer);
|
|
115
|
+
timer = null;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
setScale();
|
|
119
|
+
vue.onMounted(() => {
|
|
120
|
+
if (props.isAuto) {
|
|
121
|
+
startAutoplay();
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
vue.onBeforeUnmount(() => {
|
|
125
|
+
stopAutoplay();
|
|
126
|
+
});
|
|
127
|
+
vue.nextTick(() => {
|
|
128
|
+
containerWidth.value = listDom.value.clientWidth;
|
|
129
|
+
imgWidth.value = imgDoms[0].clientWidth;
|
|
130
|
+
if (mainDom.value) {
|
|
131
|
+
mainDom.value.style.left = "".concat(-(2 * imgWidth.value + gap - diffLen.value), "px");
|
|
132
|
+
mainDom.value.style.width = "".concat((props.swipeData.length + 2) * (imgWidth.value + gap / 2), "px");
|
|
133
|
+
}
|
|
134
|
+
setScale();
|
|
135
|
+
});
|
|
136
|
+
const btnClick = (pos) => {
|
|
137
|
+
if (pos === "left") {
|
|
138
|
+
prevSlider(aniTime);
|
|
139
|
+
} else if (pos === "right") {
|
|
140
|
+
nextSlider(aniTime);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const dotClick = (targetIndex) => {
|
|
144
|
+
nowIndex.value = targetIndex + 2 + 1;
|
|
145
|
+
if (nowIndex.value === props.swipeData.length + 2) {
|
|
146
|
+
nowIndex.value = 2;
|
|
147
|
+
}
|
|
148
|
+
mainDom.value.style.transition = "left ".concat(aniTime / 1e3, "s");
|
|
149
|
+
mainDom.value.style.left = "".concat(-((nowIndex.value - 1) * imgWidth.value + gap - diffLen.value), "px");
|
|
150
|
+
setScale();
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
ns,
|
|
154
|
+
btnClick,
|
|
155
|
+
mainDom,
|
|
156
|
+
listDom,
|
|
157
|
+
imgWidth,
|
|
158
|
+
resImgArr,
|
|
159
|
+
dotClick,
|
|
160
|
+
nowIndex
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
render() {
|
|
164
|
+
const renderPic = (item) => {
|
|
165
|
+
if (item.cssClass) {
|
|
166
|
+
if (item.cssClass.indexOf("fa-") !== -1) {
|
|
167
|
+
return vue.createVNode("i", {
|
|
168
|
+
"class": [item.cssClas, "swiper-slide-card"]
|
|
169
|
+
}, null);
|
|
170
|
+
}
|
|
171
|
+
return vue.createVNode("ion-icon", {
|
|
172
|
+
"class": "swiper-slide-card",
|
|
173
|
+
"name": item.cssClass
|
|
174
|
+
}, null);
|
|
175
|
+
}
|
|
176
|
+
if (item.imgUrl) {
|
|
177
|
+
return vue.createVNode("img", {
|
|
178
|
+
"class": "swiper-slide-card",
|
|
179
|
+
"style": "width: ".concat(this.imgWidth, "px"),
|
|
180
|
+
"alt": item.name,
|
|
181
|
+
"src": item.imgUrl
|
|
182
|
+
}, null);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
let newIndex = this.nowIndex;
|
|
186
|
+
if (this.nowIndex < this.swipeData.length) {
|
|
187
|
+
newIndex = this.nowIndex + this.swipeData.length;
|
|
188
|
+
}
|
|
189
|
+
return vue.createVNode("div", {
|
|
190
|
+
"class": this.ns.b()
|
|
191
|
+
}, [vue.createVNode("div", {
|
|
192
|
+
"class": this.ns.e("swiper-list"),
|
|
193
|
+
"ref": "listDom"
|
|
194
|
+
}, [vue.createVNode("div", {
|
|
195
|
+
"class": this.ns.e("swiper-main"),
|
|
196
|
+
"ref": "mainDom"
|
|
197
|
+
}, [this.resImgArr.map((item) => {
|
|
198
|
+
return renderPic(item);
|
|
199
|
+
})]), vue.createVNode("div", {
|
|
200
|
+
"id": "prev-card",
|
|
201
|
+
"class": this.ns.e("leftBtn"),
|
|
202
|
+
"style": "width:".concat(this.imgWidth, "px"),
|
|
203
|
+
"onClick": () => this.btnClick("left")
|
|
204
|
+
}, null), vue.createVNode("div", {
|
|
205
|
+
"id": "next-card",
|
|
206
|
+
"class": this.ns.e("rightBtn"),
|
|
207
|
+
"style": "width:".concat(this.imgWidth, "px"),
|
|
208
|
+
"onClick": () => this.btnClick("right")
|
|
209
|
+
}, null)]), vue.createVNode("div", {
|
|
210
|
+
"class": this.ns.e("dot")
|
|
211
|
+
}, [this.swipeData.map((_item, index) => {
|
|
212
|
+
return vue.createVNode("div", {
|
|
213
|
+
"class": [this.ns.e("dot-item"), index === newIndex - 3 ? "isActive" : ""],
|
|
214
|
+
"onClick": () => this.dotClick(index)
|
|
215
|
+
}, null);
|
|
216
|
+
})])]);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
exports.IBizCarouselCard = IBizCarouselCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-carousel-card{position:relative;z-index:1;padding:0;margin-right:auto;margin-left:auto;overflow:hidden;list-style:none}.ibiz-carousel-card__swiper-list{position:relative;z-index:1;padding:0;margin-right:auto;margin-left:auto;overflow:hidden;list-style:none}.ibiz-carousel-card__swiper-main{position:relative;z-index:1;box-sizing:content-box;display:flex;width:100%;height:100%;transition:transform .5s ease-in-out;transition-property:transform}.ibiz-carousel-card__swiper-main img{display:block;display:inline-block;flex-shrink:0;border-radius:4px;box-shadow:0 4px 8px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.ibiz-carousel-card__leftBtn{position:absolute;top:0;left:0;z-index:2;height:100%;background-image:linear-gradient(90deg,#fff 38%,rgba(255,255,255,0));transition:.4s}.ibiz-carousel-card__rightBtn{position:absolute;top:0;right:0;z-index:2;height:100%;background-image:linear-gradient(270deg,#fff 38%,rgba(255,255,255,0));transition:.4s}.ibiz-carousel-card__dot{z-index:1;display:flex;justify-content:center;margin-top:20px}.ibiz-carousel-card__dot-item{width:8px;height:8px;margin-right:8px;cursor:pointer;background:#eee;border-radius:4px;transition:all .5s ease}.ibiz-carousel-card__dot-item.isActive{width:16px;background:#6698ff}
|
package/lib/common/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ var gridSetting = require('./grid-setting/grid-setting.cjs');
|
|
|
23
23
|
var doingNotice = require('./doing-notice/doing-notice.cjs');
|
|
24
24
|
var carousel = require('./carousel/carousel.cjs');
|
|
25
25
|
var coopAlert = require('./coop-alert/coop-alert.cjs');
|
|
26
|
+
var carouselCard = require('./carousel-card/carousel-card.cjs');
|
|
26
27
|
|
|
27
28
|
"use strict";
|
|
28
29
|
const IBizCommonComponents = {
|
|
@@ -59,6 +60,7 @@ const IBizCommonComponents = {
|
|
|
59
60
|
v.component(vue3Util.IBizBadge.name, vue3Util.IBizBadge);
|
|
60
61
|
v.component(carousel.IBizCarouselComponent.name, carousel.IBizCarouselComponent);
|
|
61
62
|
v.component(coopAlert.IBizCoopAlert.name, coopAlert.IBizCoopAlert);
|
|
63
|
+
v.component(carouselCard.IBizCarouselCard.name, carouselCard.IBizCarouselCard);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -57,6 +57,10 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
57
|
const groupButtonRef = vue.ref();
|
|
58
58
|
const dropdownRef = vue.ref();
|
|
59
59
|
const popoverVisible = vue.ref(false);
|
|
60
|
+
const visible = vue.computed(() => {
|
|
61
|
+
const index = groupDetails.value.findIndex((item) => c.state.buttonsState[item.id].visible);
|
|
62
|
+
return index !== -1;
|
|
63
|
+
});
|
|
60
64
|
const transformLanguage = (items) => {
|
|
61
65
|
if (!Array.isArray(items)) {
|
|
62
66
|
return;
|
|
@@ -108,6 +112,7 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
108
112
|
return {
|
|
109
113
|
c,
|
|
110
114
|
ns,
|
|
115
|
+
visible,
|
|
111
116
|
expandDetails,
|
|
112
117
|
groupDetails,
|
|
113
118
|
groupButtonRef,
|
|
@@ -193,6 +198,9 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
193
198
|
return null;
|
|
194
199
|
});
|
|
195
200
|
};
|
|
201
|
+
if (!this.visible) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
196
204
|
if (this.mode === "buttons") {
|
|
197
205
|
let _slot;
|
|
198
206
|
return vue.createVNode("div", {
|
|
@@ -56,7 +56,7 @@ const FilterModes = [{
|
|
|
56
56
|
valueOP: runtime.ValueOP.NOT_EXISTS,
|
|
57
57
|
label: "\u4E0D\u5B58\u5728(NOTEXISTS)"
|
|
58
58
|
}];
|
|
59
|
-
const ExcludeOPs = [runtime.ValueOP.IS_NULL, runtime.ValueOP.IS_NOT_NULL];
|
|
59
|
+
const ExcludeOPs = [runtime.ValueOP.IS_NULL, runtime.ValueOP.IS_NOT_NULL, runtime.ValueOP.EXISTS, runtime.ValueOP.NOT_EXISTS];
|
|
60
60
|
const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
61
61
|
name: "IBizFilterTreeControl",
|
|
62
62
|
props: {
|
|
@@ -242,7 +242,6 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
242
242
|
}, [editor]);
|
|
243
243
|
};
|
|
244
244
|
const renderFilterItem = (node, itemsC) => {
|
|
245
|
-
let _slot;
|
|
246
245
|
if (node.hidden) {
|
|
247
246
|
return;
|
|
248
247
|
}
|
|
@@ -273,14 +272,14 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
273
272
|
"onChange": (field) => {
|
|
274
273
|
onFieldSelect(node, field, fieldInfos);
|
|
275
274
|
}
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
"
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
275
|
+
}, {
|
|
276
|
+
default: () => [fieldInfos == null ? void 0 : fieldInfos.map((field) => {
|
|
277
|
+
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
278
|
+
"key": field.name,
|
|
279
|
+
"value": field.name,
|
|
280
|
+
"label": field.label
|
|
281
|
+
}, null);
|
|
282
|
+
})]
|
|
284
283
|
}), availableModes && availableModes.length > 0 && vue.createVNode(vue.resolveComponent("iBizFilterModeSelect"), {
|
|
285
284
|
"disabled": node.disabled,
|
|
286
285
|
"class": ns.e("mode-select"),
|
|
@@ -358,10 +357,10 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
358
357
|
})])]);
|
|
359
358
|
};
|
|
360
359
|
renderFilterItems = (node) => {
|
|
361
|
-
let
|
|
360
|
+
let _slot2;
|
|
362
361
|
const itemsC = findFilterController(node);
|
|
363
362
|
if (node.simple) {
|
|
364
|
-
let
|
|
363
|
+
let _slot;
|
|
365
364
|
const child = node.children[0];
|
|
366
365
|
if (!child) {
|
|
367
366
|
return;
|
|
@@ -373,14 +372,14 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
373
372
|
"onChange": (field) => {
|
|
374
373
|
onFieldSelect(node, field);
|
|
375
374
|
}
|
|
376
|
-
}, _isSlot(
|
|
375
|
+
}, _isSlot(_slot = allFields.map((field) => {
|
|
377
376
|
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
378
377
|
"key": field.name,
|
|
379
378
|
"value": field.name,
|
|
380
379
|
"label": field.label
|
|
381
380
|
}, null);
|
|
382
|
-
})) ?
|
|
383
|
-
default: () => [
|
|
381
|
+
})) ? _slot : {
|
|
382
|
+
default: () => [_slot]
|
|
384
383
|
}), vue.createVNode(vue.resolveComponent("iBizFilterModeSelect"), {
|
|
385
384
|
"disabled": true,
|
|
386
385
|
"class": ns.e("mode-select"),
|
|
@@ -397,8 +396,8 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
397
396
|
"onClick": () => {
|
|
398
397
|
addItem(node);
|
|
399
398
|
}
|
|
400
|
-
}, _isSlot(
|
|
401
|
-
default: () => [
|
|
399
|
+
}, _isSlot(_slot2 = ibiz.i18n.t("control.searchBar.filterTree.addItem")) ? _slot2 : {
|
|
400
|
+
default: () => [_slot2]
|
|
402
401
|
})]), vue.createVNode("div", {
|
|
403
402
|
"class": ns.be("group", "list")
|
|
404
403
|
}, [node.children.length > 0 && node.children.map((child, index) => {
|
|
@@ -435,7 +434,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
435
434
|
};
|
|
436
435
|
},
|
|
437
436
|
render() {
|
|
438
|
-
let
|
|
437
|
+
let _slot3;
|
|
439
438
|
return vue.createVNode("div", {
|
|
440
439
|
"class": [this.ns.b()]
|
|
441
440
|
}, [this.UiFilterNodes.length > 0 && this.UiFilterNodes.map((node) => {
|
|
@@ -455,8 +454,8 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
455
454
|
"onClick": () => {
|
|
456
455
|
this.onCancel();
|
|
457
456
|
}
|
|
458
|
-
}, _isSlot(
|
|
459
|
-
default: () => [
|
|
457
|
+
}, _isSlot(_slot3 = ibiz.i18n.t("app.reset")) ? _slot3 : {
|
|
458
|
+
default: () => [_slot3]
|
|
460
459
|
})])]);
|
|
461
460
|
}
|
|
462
461
|
});
|
|
@@ -82,6 +82,11 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
82
82
|
};
|
|
83
83
|
const renderSubmenu = (item) => {
|
|
84
84
|
const detoolbarItems = item.detoolbarItems || [];
|
|
85
|
+
const curVisible = c.state.buttonsState[item.id].visible;
|
|
86
|
+
const curDisabled = c.state.buttonsState[item.id].disabled;
|
|
87
|
+
if (!curVisible) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
85
90
|
const ploading = detoolbarItems.findIndex((item2) => c.state.buttonsState[item2.id].loading) !== -1;
|
|
86
91
|
const pvisible = detoolbarItems.findIndex((item2) => {
|
|
87
92
|
return c.state.buttonsState[item2.id].visible === true;
|
|
@@ -89,7 +94,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
89
94
|
if (!pvisible) {
|
|
90
95
|
return null;
|
|
91
96
|
}
|
|
92
|
-
const pdisabled = detoolbarItems.findIndex((item2) => {
|
|
97
|
+
const pdisabled = curDisabled || detoolbarItems.findIndex((item2) => {
|
|
93
98
|
return c.state.buttonsState[item2.id].disabled === false;
|
|
94
99
|
}) === -1;
|
|
95
100
|
const groupButtonStyle = item.buttonStyle || "";
|
|
@@ -104,9 +109,19 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
104
109
|
var _a2, _b;
|
|
105
110
|
const actionId = item2.uiactionId;
|
|
106
111
|
const visible = (_a2 = c.state.buttonsState[item2.id]) == null ? void 0 : _a2.visible;
|
|
112
|
+
const provider = c.itemProviders[item2.id];
|
|
107
113
|
if (!visible) {
|
|
108
114
|
return null;
|
|
109
115
|
}
|
|
116
|
+
if (provider) {
|
|
117
|
+
const component = vue.resolveComponent(provider.component);
|
|
118
|
+
return vue.h(component, {
|
|
119
|
+
key: item2.id,
|
|
120
|
+
class: [ns.e("item")],
|
|
121
|
+
item,
|
|
122
|
+
controller: c
|
|
123
|
+
});
|
|
124
|
+
}
|
|
110
125
|
if (item2.itemType === "SEPERATOR") {
|
|
111
126
|
return;
|
|
112
127
|
}
|
|
@@ -172,9 +187,19 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
172
187
|
var _a2, _b;
|
|
173
188
|
const itemId = item.id;
|
|
174
189
|
const visible = (_a2 = c.state.buttonsState[itemId]) == null ? void 0 : _a2.visible;
|
|
190
|
+
const provider = c.itemProviders[itemId];
|
|
175
191
|
if (!visible) {
|
|
176
192
|
return null;
|
|
177
193
|
}
|
|
194
|
+
if (provider) {
|
|
195
|
+
const component = vue.resolveComponent(provider.component);
|
|
196
|
+
return vue.h(component, {
|
|
197
|
+
key: itemId,
|
|
198
|
+
class: [ns.e("item")],
|
|
199
|
+
item,
|
|
200
|
+
controller: c
|
|
201
|
+
});
|
|
202
|
+
}
|
|
178
203
|
if (item.itemType === "SEPERATOR") {
|
|
179
204
|
return vue.createVNode("div", {
|
|
180
205
|
"key": itemId,
|
|
@@ -443,7 +443,7 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
443
443
|
}
|
|
444
444
|
return vue.createVNode(vue.resolveComponent("el-input"), {
|
|
445
445
|
"model-value": this.c.state.query,
|
|
446
|
-
"class":
|
|
446
|
+
"class": this.ns.b("quick-search"),
|
|
447
447
|
"placeholder": this.c.state.placeHolder,
|
|
448
448
|
"onInput": this.onInput
|
|
449
449
|
}, {
|
|
@@ -461,6 +461,7 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
461
461
|
if (this.c.state.isLoaded && this.treeRefreshKey) {
|
|
462
462
|
return vue.createVNode(vue.resolveComponent("el-tree"), {
|
|
463
463
|
"ref": "treeRef",
|
|
464
|
+
"class": this.ns.b("tree"),
|
|
464
465
|
"key": this.treeRefreshKey,
|
|
465
466
|
"node-key": "_id",
|
|
466
467
|
"highlight-current": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-
|
|
1
|
+
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-spacing-tight) 0}.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%}.ibiz-control-treeview-node__icon{display:inline-block;width:var(--ibiz-control-treeview-icon-width);height:var(--ibiz-control-treeview-icon-height);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__icon>svg{width:100%;height:100%}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-node--disabled{color:var(--ibiz-color-disabled-text);cursor:not-allowed}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}.ibiz-control-treeview-context-menu.mx-context-menu{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-control-treeview-context-menu.mx-context-menu .mx-context-menu-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-control-treeview-quick-search{padding:0 var(--ibiz-spacing-base) var(--ibiz-spacing-tight)}.ibiz-control-treeview-tree{padding:0 var(--ibiz-spacing-base)}
|
|
@@ -249,6 +249,16 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
249
249
|
keySet.value = items.value.map((item) => item.srfkey);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
+
if (!singleSelect.value) {
|
|
253
|
+
if (c.model.valueType === "OBJECTS") {
|
|
254
|
+
emit("change", multipleObjs.value);
|
|
255
|
+
} else {
|
|
256
|
+
if (c.valueItem) {
|
|
257
|
+
emit("change", multipleTempValue.value, c.valueItem);
|
|
258
|
+
}
|
|
259
|
+
emit("change", multipleTempText.value);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
252
262
|
};
|
|
253
263
|
const openLinkView = async (e) => {
|
|
254
264
|
e.stopPropagation();
|
|
@@ -337,16 +347,6 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
337
347
|
});
|
|
338
348
|
const onVisibleChange = (e) => {
|
|
339
349
|
showView.value = e;
|
|
340
|
-
if (!e && !singleSelect.value) {
|
|
341
|
-
if (c.model.valueType === "OBJECTS") {
|
|
342
|
-
emit("change", multipleObjs.value);
|
|
343
|
-
} else {
|
|
344
|
-
if (c.valueItem) {
|
|
345
|
-
emit("change", multipleTempValue.value, c.valueItem);
|
|
346
|
-
}
|
|
347
|
-
emit("change", multipleTempText.value);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
350
|
if (e === false) {
|
|
351
351
|
onBlur({});
|
|
352
352
|
}
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -741,7 +741,8 @@ var index = {
|
|
|
741
741
|
interfaceBehaviorMode: "Find the adapter that does not correspond to the interface behavior mode {uiactionMode}.",
|
|
742
742
|
frontEndPluginNode: "Cannot find interface logic front-end plugin node, plugin {pluginKey} corresponding adapter",
|
|
743
743
|
viewPlugin: "Cannot find the adapter corresponding to the view plugin {pluginKey}.",
|
|
744
|
-
correspondViewTypeStyle: "Cannot find an adapter for view type: [{viewType}] corresponding to view style: [{viewStyle}]."
|
|
744
|
+
correspondViewTypeStyle: "Cannot find an adapter for view type: [{viewType}] corresponding to view style: [{viewStyle}].",
|
|
745
|
+
toolbarItem: "Cannot find the adapter corresponding to the toolbar item plugin {pluginKey}."
|
|
745
746
|
}
|
|
746
747
|
},
|
|
747
748
|
service: {
|