@ibiz-template/vue3-components 0.7.13-alpha.0 → 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-OSsMvylt.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/app-menu/app-menu.mjs +1 -1
- package/es/control/context-menu/context-menu.css +1 -1
- package/es/control/context-menu/context-menu.d.ts +1 -0
- package/es/control/context-menu/context-menu.mjs +64 -7
- 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/form.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +74 -0
- 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/search-bar/filter-tree/filter-tree.mjs +19 -20
- 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 +38 -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.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 +25 -13
- package/es/index.mjs +1 -0
- 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/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/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/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 +62 -42
- 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/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/es/web-app/main.mjs +2 -0
- 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/app-menu/app-menu.cjs +1 -1
- package/lib/control/context-menu/context-menu.cjs +63 -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/search-bar/filter-tree/filter-tree.cjs +19 -20
- 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 +37 -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 +24 -12
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
- package/lib/index.cjs +2 -0
- 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/auth-userinfo/auth-userinfo.cjs +2 -7
- 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 +61 -41
- 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/view-engine/login-view.engine.cjs +32 -12
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +17 -3
- package/lib/web-app/main.cjs +2 -0
- package/package.json +7 -7
- package/dist/index-Ky5xo5V5.js +0 -4
|
@@ -62,6 +62,10 @@ export declare const IBizCarouselComponent: import("vue").DefineComponent<{
|
|
|
62
62
|
type: NumberConstructor;
|
|
63
63
|
default: number;
|
|
64
64
|
};
|
|
65
|
+
carouselMode: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
required: true;
|
|
68
|
+
};
|
|
65
69
|
}, {
|
|
66
70
|
ns: import("@ibiz-template/core").Namespace;
|
|
67
71
|
swipeData: Ref<IData[]>;
|
|
@@ -127,6 +131,10 @@ export declare const IBizCarouselComponent: import("vue").DefineComponent<{
|
|
|
127
131
|
type: NumberConstructor;
|
|
128
132
|
default: number;
|
|
129
133
|
};
|
|
134
|
+
carouselMode: {
|
|
135
|
+
type: StringConstructor;
|
|
136
|
+
required: true;
|
|
137
|
+
};
|
|
130
138
|
}>>, {
|
|
131
139
|
isAuto: boolean;
|
|
132
140
|
timeSpan: number;
|
|
@@ -20,6 +20,10 @@ const IBizCarouselComponent = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
timeSpan: {
|
|
21
21
|
type: Number,
|
|
22
22
|
default: 3e3
|
|
23
|
+
},
|
|
24
|
+
carouselMode: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
setup(props) {
|
|
@@ -57,7 +61,11 @@ const IBizCarouselComponent = /* @__PURE__ */ defineComponent({
|
|
|
57
61
|
}, null);
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
|
-
return createVNode("div", null, [createVNode(resolveComponent("
|
|
64
|
+
return createVNode("div", null, [this.carouselMode === "card" ? createVNode(resolveComponent("IBizCarousel-card"), {
|
|
65
|
+
"swipeData": this.swipeData,
|
|
66
|
+
"isAuto": this.isAuto,
|
|
67
|
+
"timeSpan": this.timeSpan
|
|
68
|
+
}, null) : createVNode(resolveComponent("el-carousel"), {
|
|
61
69
|
"class": this.ns.b(),
|
|
62
70
|
"autoplay": this.isAuto,
|
|
63
71
|
"interval": this.timeSpan
|
|
@@ -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}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PropType, Ref } from 'vue';
|
|
2
|
+
import './carousel-card.scss';
|
|
3
|
+
export declare const IBizCarouselCard: import("vue").DefineComponent<{
|
|
4
|
+
swipeData: {
|
|
5
|
+
type: PropType<IData[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
isAuto: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
timeSpan: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
18
|
+
btnClick: (pos: string) => void;
|
|
19
|
+
mainDom: Ref<any>;
|
|
20
|
+
listDom: Ref<any>;
|
|
21
|
+
imgWidth: Ref<number>;
|
|
22
|
+
resImgArr: import("vue").ComputedRef<IData[]>;
|
|
23
|
+
dotClick: (targetIndex: number) => void;
|
|
24
|
+
nowIndex: Ref<number>;
|
|
25
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
swipeData: {
|
|
27
|
+
type: PropType<IData[]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
isAuto: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
timeSpan: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
}>>, {
|
|
39
|
+
isAuto: boolean;
|
|
40
|
+
timeSpan: number;
|
|
41
|
+
}, {}>;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { ref, computed, onMounted, onBeforeUnmount, nextTick, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './carousel-card.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const IBizCarouselCard = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizCarouselCard",
|
|
8
|
+
props: {
|
|
9
|
+
swipeData: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
isAuto: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: true
|
|
16
|
+
},
|
|
17
|
+
timeSpan: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 3e3
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
const ns = useNamespace("carousel-card");
|
|
24
|
+
const nowIndex = ref(3);
|
|
25
|
+
const mainDom = ref();
|
|
26
|
+
const listDom = ref();
|
|
27
|
+
const gap = 0;
|
|
28
|
+
const imgWidth = ref(600);
|
|
29
|
+
const containerWidth = ref(0);
|
|
30
|
+
const diffLen = computed(() => {
|
|
31
|
+
return (containerWidth.value - imgWidth.value - gap * 2) / 2;
|
|
32
|
+
});
|
|
33
|
+
let timer = null;
|
|
34
|
+
const imgDoms = document.getElementsByClassName("swiper-slide-card");
|
|
35
|
+
const scale = 0.8;
|
|
36
|
+
const aniTime = 500;
|
|
37
|
+
const resImgArr = computed(() => {
|
|
38
|
+
if (props.swipeData.length > 2) {
|
|
39
|
+
return [...props.swipeData.slice(-2), ...props.swipeData, ...props.swipeData.slice(0, 2)];
|
|
40
|
+
}
|
|
41
|
+
return [...props.swipeData];
|
|
42
|
+
});
|
|
43
|
+
const setScale = () => {
|
|
44
|
+
for (let i = 0; i < imgDoms.length; i++) {
|
|
45
|
+
if (props.swipeData.length === 2) {
|
|
46
|
+
imgDoms[0].style.left = "".concat(containerWidth.value / 4 - imgWidth.value / 2, "px");
|
|
47
|
+
imgDoms[1].style.left = "".concat(containerWidth.value / 4 * 3 - imgWidth.value / 2, "px");
|
|
48
|
+
} else if (props.swipeData.length === 1) {
|
|
49
|
+
imgDoms[i].style.left = "".concat(containerWidth.value / 2 - imgWidth.value / 2, "px");
|
|
50
|
+
} else {
|
|
51
|
+
imgDoms[i].style.left = "".concat((i - 1) * (imgWidth.value + gap), "px");
|
|
52
|
+
}
|
|
53
|
+
if (i === nowIndex.value - 1) {
|
|
54
|
+
imgDoms[i].style.transform = "scale(1)";
|
|
55
|
+
} else {
|
|
56
|
+
imgDoms[i].style.transform = "scale(".concat(scale, ")");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const nextSlider = (anitime) => {
|
|
61
|
+
if (props.swipeData.length === 2) {
|
|
62
|
+
nowIndex.value = nowIndex.value ? 0 : 1;
|
|
63
|
+
setScale();
|
|
64
|
+
} else if (props.swipeData.length === 1) {
|
|
65
|
+
} else {
|
|
66
|
+
if (nowIndex.value >= 2) {
|
|
67
|
+
mainDom.value.style.transition = "left ".concat(anitime / 1e3, "s");
|
|
68
|
+
mainDom.value.style.left = "".concat(parseInt(mainDom.value.style.left, 10) - (gap + imgWidth.value), "px");
|
|
69
|
+
}
|
|
70
|
+
if (nowIndex.value === props.swipeData.length + 1) {
|
|
71
|
+
nowIndex.value = props.swipeData.length + 2;
|
|
72
|
+
setScale();
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
nowIndex.value = 2;
|
|
75
|
+
setScale();
|
|
76
|
+
mainDom.value.style.transitionProperty = "none";
|
|
77
|
+
mainDom.value.style.left = "".concat(-(imgWidth.value - diffLen.value), "px");
|
|
78
|
+
}, anitime);
|
|
79
|
+
} else {
|
|
80
|
+
nowIndex.value++;
|
|
81
|
+
setScale();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const prevSlider = (anitime) => {
|
|
86
|
+
if (props.swipeData.length === 2) {
|
|
87
|
+
nowIndex.value = nowIndex.value ? 0 : 1;
|
|
88
|
+
setScale();
|
|
89
|
+
} else if (props.swipeData.length === 1) {
|
|
90
|
+
} else {
|
|
91
|
+
nowIndex.value--;
|
|
92
|
+
mainDom.value.style.transition = "left ".concat(anitime / 1e3, "s");
|
|
93
|
+
mainDom.value.style.left = "".concat(parseInt(mainDom.value.style.left, 10) + (gap + imgWidth.value), "px");
|
|
94
|
+
if (nowIndex.value === 1) {
|
|
95
|
+
setScale();
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
nowIndex.value = props.swipeData.length + 1;
|
|
98
|
+
setScale();
|
|
99
|
+
mainDom.value.style.transitionProperty = "none";
|
|
100
|
+
mainDom.value.style.left = "".concat(-(parseInt(imgDoms[nowIndex.value].style.left, 10) - diffLen.value - gap), "px");
|
|
101
|
+
}, anitime);
|
|
102
|
+
} else {
|
|
103
|
+
setScale();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const startAutoplay = () => {
|
|
108
|
+
timer = window.setInterval(() => nextSlider(aniTime), props.timeSpan);
|
|
109
|
+
};
|
|
110
|
+
const stopAutoplay = () => {
|
|
111
|
+
if (timer) {
|
|
112
|
+
window.clearInterval(timer);
|
|
113
|
+
timer = null;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
setScale();
|
|
117
|
+
onMounted(() => {
|
|
118
|
+
if (props.isAuto) {
|
|
119
|
+
startAutoplay();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
onBeforeUnmount(() => {
|
|
123
|
+
stopAutoplay();
|
|
124
|
+
});
|
|
125
|
+
nextTick(() => {
|
|
126
|
+
containerWidth.value = listDom.value.clientWidth;
|
|
127
|
+
imgWidth.value = imgDoms[0].clientWidth;
|
|
128
|
+
if (mainDom.value) {
|
|
129
|
+
mainDom.value.style.left = "".concat(-(2 * imgWidth.value + gap - diffLen.value), "px");
|
|
130
|
+
mainDom.value.style.width = "".concat((props.swipeData.length + 2) * (imgWidth.value + gap / 2), "px");
|
|
131
|
+
}
|
|
132
|
+
setScale();
|
|
133
|
+
});
|
|
134
|
+
const btnClick = (pos) => {
|
|
135
|
+
if (pos === "left") {
|
|
136
|
+
prevSlider(aniTime);
|
|
137
|
+
} else if (pos === "right") {
|
|
138
|
+
nextSlider(aniTime);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
const dotClick = (targetIndex) => {
|
|
142
|
+
nowIndex.value = targetIndex + 2 + 1;
|
|
143
|
+
if (nowIndex.value === props.swipeData.length + 2) {
|
|
144
|
+
nowIndex.value = 2;
|
|
145
|
+
}
|
|
146
|
+
mainDom.value.style.transition = "left ".concat(aniTime / 1e3, "s");
|
|
147
|
+
mainDom.value.style.left = "".concat(-((nowIndex.value - 1) * imgWidth.value + gap - diffLen.value), "px");
|
|
148
|
+
setScale();
|
|
149
|
+
};
|
|
150
|
+
return {
|
|
151
|
+
ns,
|
|
152
|
+
btnClick,
|
|
153
|
+
mainDom,
|
|
154
|
+
listDom,
|
|
155
|
+
imgWidth,
|
|
156
|
+
resImgArr,
|
|
157
|
+
dotClick,
|
|
158
|
+
nowIndex
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
render() {
|
|
162
|
+
const renderPic = (item) => {
|
|
163
|
+
if (item.cssClass) {
|
|
164
|
+
if (item.cssClass.indexOf("fa-") !== -1) {
|
|
165
|
+
return createVNode("i", {
|
|
166
|
+
"class": [item.cssClas, "swiper-slide-card"]
|
|
167
|
+
}, null);
|
|
168
|
+
}
|
|
169
|
+
return createVNode("ion-icon", {
|
|
170
|
+
"class": "swiper-slide-card",
|
|
171
|
+
"name": item.cssClass
|
|
172
|
+
}, null);
|
|
173
|
+
}
|
|
174
|
+
if (item.imgUrl) {
|
|
175
|
+
return createVNode("img", {
|
|
176
|
+
"class": "swiper-slide-card",
|
|
177
|
+
"style": "width: ".concat(this.imgWidth, "px"),
|
|
178
|
+
"alt": item.name,
|
|
179
|
+
"src": item.imgUrl
|
|
180
|
+
}, null);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
let newIndex = this.nowIndex;
|
|
184
|
+
if (this.nowIndex < this.swipeData.length) {
|
|
185
|
+
newIndex = this.nowIndex + this.swipeData.length;
|
|
186
|
+
}
|
|
187
|
+
return createVNode("div", {
|
|
188
|
+
"class": this.ns.b()
|
|
189
|
+
}, [createVNode("div", {
|
|
190
|
+
"class": this.ns.e("swiper-list"),
|
|
191
|
+
"ref": "listDom"
|
|
192
|
+
}, [createVNode("div", {
|
|
193
|
+
"class": this.ns.e("swiper-main"),
|
|
194
|
+
"ref": "mainDom"
|
|
195
|
+
}, [this.resImgArr.map((item) => {
|
|
196
|
+
return renderPic(item);
|
|
197
|
+
})]), createVNode("div", {
|
|
198
|
+
"id": "prev-card",
|
|
199
|
+
"class": this.ns.e("leftBtn"),
|
|
200
|
+
"style": "width:".concat(this.imgWidth, "px"),
|
|
201
|
+
"onClick": () => this.btnClick("left")
|
|
202
|
+
}, null), createVNode("div", {
|
|
203
|
+
"id": "next-card",
|
|
204
|
+
"class": this.ns.e("rightBtn"),
|
|
205
|
+
"style": "width:".concat(this.imgWidth, "px"),
|
|
206
|
+
"onClick": () => this.btnClick("right")
|
|
207
|
+
}, null)]), createVNode("div", {
|
|
208
|
+
"class": this.ns.e("dot")
|
|
209
|
+
}, [this.swipeData.map((_item, index) => {
|
|
210
|
+
return createVNode("div", {
|
|
211
|
+
"class": [this.ns.e("dot-item"), index === newIndex - 3 ? "isActive" : ""],
|
|
212
|
+
"onClick": () => this.dotClick(index)
|
|
213
|
+
}, null);
|
|
214
|
+
})])]);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
export { IBizCarouselCard };
|
package/es/common/index.mjs
CHANGED
|
@@ -19,6 +19,7 @@ import { IBizGridSetting } from './grid-setting/grid-setting.mjs';
|
|
|
19
19
|
import { DoingNotice } from './doing-notice/doing-notice.mjs';
|
|
20
20
|
import { IBizCarouselComponent } from './carousel/carousel.mjs';
|
|
21
21
|
import { IBizCoopAlert } from './coop-alert/coop-alert.mjs';
|
|
22
|
+
import { IBizCarouselCard } from './carousel-card/carousel-card.mjs';
|
|
22
23
|
|
|
23
24
|
"use strict";
|
|
24
25
|
const IBizCommonComponents = {
|
|
@@ -55,6 +56,7 @@ const IBizCommonComponents = {
|
|
|
55
56
|
v.component(IBizBadge.name, IBizBadge);
|
|
56
57
|
v.component(IBizCarouselComponent.name, IBizCarouselComponent);
|
|
57
58
|
v.component(IBizCoopAlert.name, IBizCoopAlert);
|
|
59
|
+
v.component(IBizCarouselCard.name, IBizCarouselCard);
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
62
|
|
|
@@ -278,7 +278,7 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
278
278
|
"onSelect": this.onClick,
|
|
279
279
|
"theme": "light",
|
|
280
280
|
"mode": this.menuMode,
|
|
281
|
-
"ellipsis":
|
|
281
|
+
"ellipsis": this.menuMode === "horizontal"
|
|
282
282
|
}, _isSlot(_slot = this.menus.map((item) => {
|
|
283
283
|
var _a;
|
|
284
284
|
if (((_a = item.children) == null ? void 0 : _a.length) > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-context-menu{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0)}.ibiz-context-menu__item{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-context-menu__item+.ibiz-context-menu__item{margin:var(--ibiz-context-menu-item-margin)}.ibiz-context-menu__item .ibiz-context-menu__action-content-icon{margin-right:3px}.ibiz-context-menu__action-content{display:flex}.ibiz-context-menu__action-content-icon{display:flex;align-items:center;justify-content:center;width:20px}.ibiz-context-menu__action-content-caption{display:flex;align-items:center;justify-content:center}.ibiz-context-menu__popover{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-context-menu-popover-padding)}.ibiz-context-menu__popover .el-button{--el-button-size:40px;display:block;width:100%;padding:var(--ibiz-context-menu-popover-button-padding);margin:0;font-size:14px;color:var(--ibiz-context-menu-popover-button-color);text-align:left;border-radius:0}.ibiz-context-menu__popover .el-button:hover{background-color:var(--ibiz-context-menu-popover-button-hover-bg)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-icon{margin-right:6px}.ibiz-context-menu__separator{margin:0}.ibiz-context-menu--dropdown .ibiz-context-menu__caption{cursor:pointer}.ibiz-context-menu--dropdown .ibiz-context-menu__caption-icon{vertical-align:bottom}
|
|
1
|
+
@charset "UTF-8";.ibiz-context-menu{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0)}.ibiz-context-menu__item{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-context-menu__item+.ibiz-context-menu__item{margin:var(--ibiz-context-menu-item-margin)}.ibiz-context-menu__item .ibiz-context-menu__action-content-icon{margin-right:3px}.ibiz-context-menu__action-content{display:flex}.ibiz-context-menu__action-content-icon{display:flex;align-items:center;justify-content:center;width:20px}.ibiz-context-menu__action-content-caption{display:flex;align-items:center;justify-content:center}.ibiz-context-menu__popover{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-context-menu-popover-padding)}.ibiz-context-menu__popover .el-button{--el-button-size:40px;display:block;width:100%;padding:var(--ibiz-context-menu-popover-button-padding);margin:0;font-size:14px;color:var(--ibiz-context-menu-popover-button-color);text-align:left;border-radius:0}.ibiz-context-menu__popover .el-button:hover{background-color:var(--ibiz-context-menu-popover-button-hover-bg)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-icon{margin-right:6px}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-group-caption{margin-right:var(--ibiz-spacing-base-loose)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-group-icon{position:absolute;right:var(--ibiz-spacing-base-loose);font-size:var(--ibiz-font-size-header-6)}.ibiz-context-menu__separator{margin:0}.ibiz-context-menu__separator.el-divider--horizontal{width:calc(100% - 2 * var(--ibiz-spacing-base-loose));margin:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-base-loose)}.ibiz-context-menu--dropdown .ibiz-context-menu__caption{cursor:pointer}.ibiz-context-menu--dropdown .ibiz-context-menu__caption-icon{vertical-align:bottom}
|
|
@@ -34,6 +34,7 @@ export declare const ContextMenuControl: import("vue").DefineComponent<{
|
|
|
34
34
|
}, {
|
|
35
35
|
c: ContextMenuController;
|
|
36
36
|
ns: import("@ibiz-template/core").Namespace;
|
|
37
|
+
visible: import("vue").ComputedRef<boolean>;
|
|
37
38
|
expandDetails: Ref<IDETBUIActionItem[]>;
|
|
38
39
|
groupDetails: Ref<IDETBUIActionItem[]>;
|
|
39
40
|
groupButtonRef: Ref<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, ref, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, ref, computed, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './context-menu.css';
|
|
4
4
|
import { ContextMenuController } from '@ibiz-template/runtime';
|
|
@@ -55,17 +55,28 @@ const ContextMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
const groupButtonRef = ref();
|
|
56
56
|
const dropdownRef = ref();
|
|
57
57
|
const popoverVisible = ref(false);
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const visible = computed(() => {
|
|
59
|
+
const index = groupDetails.value.findIndex((item) => c.state.buttonsState[item.id].visible);
|
|
60
|
+
return index !== -1;
|
|
61
|
+
});
|
|
62
|
+
const transformLanguage = (items) => {
|
|
63
|
+
if (!Array.isArray(items)) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
items.forEach((detail) => {
|
|
60
67
|
if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
|
|
61
68
|
detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
|
|
62
69
|
}
|
|
63
70
|
if (detail.tooltipLanguageRes && detail.tooltipLanguageRes.lanResTag) {
|
|
64
71
|
detail.tooltip = ibiz.i18n.t(detail.tooltipLanguageRes.lanResTag, detail.tooltip);
|
|
65
72
|
}
|
|
73
|
+
transformLanguage(detail.detoolbarItems);
|
|
66
74
|
});
|
|
75
|
+
};
|
|
76
|
+
if (actionDetails) {
|
|
77
|
+
transformLanguage(actionDetails);
|
|
67
78
|
actionDetails.forEach((detail) => {
|
|
68
|
-
if (props.groupLevelKeys.findIndex((item) => item === detail.actionLevel) !== -1) {
|
|
79
|
+
if (!detail.actionLevel || props.groupLevelKeys.findIndex((item) => item === detail.actionLevel) !== -1) {
|
|
69
80
|
groupDetails.value.push(detail);
|
|
70
81
|
} else {
|
|
71
82
|
expandDetails.value.push(detail);
|
|
@@ -93,11 +104,13 @@ const ContextMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
93
104
|
dropdownRef.value.handleClose();
|
|
94
105
|
}
|
|
95
106
|
e.stopPropagation();
|
|
107
|
+
popoverVisible.value = false;
|
|
96
108
|
emit("action-click", detail, e);
|
|
97
109
|
};
|
|
98
110
|
return {
|
|
99
111
|
c,
|
|
100
112
|
ns,
|
|
113
|
+
visible,
|
|
101
114
|
expandDetails,
|
|
102
115
|
groupDetails,
|
|
103
116
|
groupButtonRef,
|
|
@@ -119,8 +132,14 @@ const ContextMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
119
132
|
};
|
|
120
133
|
const renderActions = (items, isExpand = true) => {
|
|
121
134
|
return items.map((detail) => {
|
|
122
|
-
var _a;
|
|
123
|
-
if ((_a = this.c.state.buttonsState[detail.id]) == null ? void 0 : _a.visible) {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
if (!((_a = this.c.state.buttonsState[detail.id]) == null ? void 0 : _a.visible)) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
if (detail.itemType === "SEPERATOR") {
|
|
140
|
+
return renderDivider(isExpand);
|
|
141
|
+
}
|
|
142
|
+
if (detail.itemType === "DEUIACTION" || detail.itemType === "ITEMS" && !((_b = detail.detoolbarItems) == null ? void 0 : _b.length)) {
|
|
124
143
|
return [detail.addSeparator && renderDivider(isExpand), createVNode(resolveComponent("el-button"), {
|
|
125
144
|
"text": true,
|
|
126
145
|
"size": "small",
|
|
@@ -140,9 +159,46 @@ const ContextMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
140
159
|
}, [detail.caption]) : ""])]
|
|
141
160
|
})];
|
|
142
161
|
}
|
|
162
|
+
if (detail.itemType === "ITEMS") {
|
|
163
|
+
return createVNode(resolveComponent("el-popover"), {
|
|
164
|
+
"placement": "right-start",
|
|
165
|
+
"popper-class": this.ns.e("popover"),
|
|
166
|
+
"teleported": false
|
|
167
|
+
}, {
|
|
168
|
+
reference: () => {
|
|
169
|
+
return [detail.addSeparator && renderDivider(isExpand), createVNode(resolveComponent("el-button"), {
|
|
170
|
+
"text": true,
|
|
171
|
+
"size": "small",
|
|
172
|
+
"onClick": (e) => this.handleClick(detail, e),
|
|
173
|
+
"title": detail.tooltip,
|
|
174
|
+
"disabled": this.c.state.buttonsState[detail.id].disabled,
|
|
175
|
+
"class": this.calcActionItemClass(detail)
|
|
176
|
+
}, {
|
|
177
|
+
default: () => [createVNode("div", {
|
|
178
|
+
"class": this.ns.e("action-content")
|
|
179
|
+
}, [detail.showIcon && detail.sysImage && createVNode("div", {
|
|
180
|
+
"class": this.ns.e("action-content-icon")
|
|
181
|
+
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
182
|
+
"icon": detail.sysImage
|
|
183
|
+
}, null)]), detail.showCaption ? createVNode("div", {
|
|
184
|
+
"class": [this.ns.e("action-content-caption"), this.ns.e("action-content-group-caption")]
|
|
185
|
+
}, [detail.caption]) : "", createVNode("ion-icon", {
|
|
186
|
+
"class": this.ns.e("action-content-group-icon"),
|
|
187
|
+
"name": "chevron-forward-outline"
|
|
188
|
+
}, null)])]
|
|
189
|
+
})];
|
|
190
|
+
},
|
|
191
|
+
default: () => {
|
|
192
|
+
return renderActions(detail.detoolbarItems || [], isExpand);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
143
196
|
return null;
|
|
144
197
|
});
|
|
145
198
|
};
|
|
199
|
+
if (!this.visible) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
146
202
|
if (this.mode === "buttons") {
|
|
147
203
|
let _slot;
|
|
148
204
|
return createVNode("div", {
|
|
@@ -165,7 +221,8 @@ const ContextMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
165
221
|
"visible": this.popoverVisible,
|
|
166
222
|
"onUpdate:visible": ($event) => this.popoverVisible = $event,
|
|
167
223
|
"popper-class": this.ns.e("popover"),
|
|
168
|
-
"virtual-triggering": true
|
|
224
|
+
"virtual-triggering": true,
|
|
225
|
+
"transition": "none"
|
|
169
226
|
}, _isSlot(_slot = renderActions(this.groupDetails, false)) ? _slot : {
|
|
170
227
|
default: () => [_slot]
|
|
171
228
|
})]]);
|
|
@@ -30,6 +30,7 @@ export declare const IBizContextMenuControl: import("@ibiz-template/vue3-util").
|
|
|
30
30
|
}, {
|
|
31
31
|
c: import("@ibiz-template/runtime").ContextMenuController;
|
|
32
32
|
ns: import("@ibiz-template/core").Namespace;
|
|
33
|
+
visible: import("vue").ComputedRef<boolean>;
|
|
33
34
|
expandDetails: import("vue").Ref<import("@ibiz/model-core").IDETBUIActionItem[]>;
|
|
34
35
|
groupDetails: import("vue").Ref<import("@ibiz/model-core").IDETBUIActionItem[]>;
|
|
35
36
|
groupButtonRef: import("vue").Ref<any>;
|
|
@@ -2113,6 +2113,42 @@ export declare const CustomDashboardContainer: import("vue").DefineComponent<{
|
|
|
2113
2113
|
readonly parentView: any | undefined;
|
|
2114
2114
|
readonly isActive: boolean;
|
|
2115
2115
|
layoutPanel?: {
|
|
2116
|
+
hooks: {
|
|
2117
|
+
validate: {
|
|
2118
|
+
call: (context: {
|
|
2119
|
+
result: boolean[];
|
|
2120
|
+
parentId?: string | undefined;
|
|
2121
|
+
}) => Promise<{
|
|
2122
|
+
result: boolean[];
|
|
2123
|
+
parentId?: string | undefined;
|
|
2124
|
+
}>;
|
|
2125
|
+
tapPromise: (fn: (context: {
|
|
2126
|
+
result: boolean[];
|
|
2127
|
+
parentId?: string | undefined;
|
|
2128
|
+
}) => Promise<void>) => void;
|
|
2129
|
+
removeTapPromise: (callBack: (context: {
|
|
2130
|
+
result: boolean[];
|
|
2131
|
+
parentId?: string | undefined;
|
|
2132
|
+
}) => Promise<void>) => void;
|
|
2133
|
+
readonly size: number;
|
|
2134
|
+
callSync: (context: {
|
|
2135
|
+
result: boolean[];
|
|
2136
|
+
parentId?: string | undefined;
|
|
2137
|
+
}) => {
|
|
2138
|
+
result: boolean[];
|
|
2139
|
+
parentId?: string | undefined;
|
|
2140
|
+
};
|
|
2141
|
+
tap: (fn: (context: {
|
|
2142
|
+
result: boolean[];
|
|
2143
|
+
parentId?: string | undefined;
|
|
2144
|
+
}) => void) => void;
|
|
2145
|
+
removeTap: (callBack: (context: {
|
|
2146
|
+
result: boolean[];
|
|
2147
|
+
parentId?: string | undefined;
|
|
2148
|
+
}) => void) => void;
|
|
2149
|
+
clear: () => void;
|
|
2150
|
+
};
|
|
2151
|
+
};
|
|
2116
2152
|
panelItems: {
|
|
2117
2153
|
[key: string]: import("@ibiz-template/runtime").IPanelItemController;
|
|
2118
2154
|
};
|
|
@@ -2155,6 +2191,7 @@ export declare const CustomDashboardContainer: import("vue").DefineComponent<{
|
|
|
2155
2191
|
force: (_callback?: (() => void) | undefined) => void;
|
|
2156
2192
|
} | undefined;
|
|
2157
2193
|
load: () => Promise<void>;
|
|
2194
|
+
validate: (parentId?: string | undefined) => Promise<boolean>;
|
|
2158
2195
|
setDataValue: (name: string, value: unknown) => Promise<void>;
|
|
2159
2196
|
view: any;
|
|
2160
2197
|
layoutPanel?: any | undefined;
|
|
@@ -12001,6 +12038,42 @@ export declare const CustomDashboardContainer: import("vue").DefineComponent<{
|
|
|
12001
12038
|
} | undefined;
|
|
12002
12039
|
} | undefined;
|
|
12003
12040
|
layoutPanel?: {
|
|
12041
|
+
hooks: {
|
|
12042
|
+
validate: {
|
|
12043
|
+
call: (context: {
|
|
12044
|
+
result: boolean[];
|
|
12045
|
+
parentId?: string | undefined;
|
|
12046
|
+
}) => Promise<{
|
|
12047
|
+
result: boolean[];
|
|
12048
|
+
parentId?: string | undefined;
|
|
12049
|
+
}>;
|
|
12050
|
+
tapPromise: (fn: (context: {
|
|
12051
|
+
result: boolean[];
|
|
12052
|
+
parentId?: string | undefined;
|
|
12053
|
+
}) => Promise<void>) => void;
|
|
12054
|
+
removeTapPromise: (callBack: (context: {
|
|
12055
|
+
result: boolean[];
|
|
12056
|
+
parentId?: string | undefined;
|
|
12057
|
+
}) => Promise<void>) => void;
|
|
12058
|
+
readonly size: number;
|
|
12059
|
+
callSync: (context: {
|
|
12060
|
+
result: boolean[];
|
|
12061
|
+
parentId?: string | undefined;
|
|
12062
|
+
}) => {
|
|
12063
|
+
result: boolean[];
|
|
12064
|
+
parentId?: string | undefined;
|
|
12065
|
+
};
|
|
12066
|
+
tap: (fn: (context: {
|
|
12067
|
+
result: boolean[];
|
|
12068
|
+
parentId?: string | undefined;
|
|
12069
|
+
}) => void) => void;
|
|
12070
|
+
removeTap: (callBack: (context: {
|
|
12071
|
+
result: boolean[];
|
|
12072
|
+
parentId?: string | undefined;
|
|
12073
|
+
}) => void) => void;
|
|
12074
|
+
clear: () => void;
|
|
12075
|
+
};
|
|
12076
|
+
};
|
|
12004
12077
|
panelItems: {
|
|
12005
12078
|
[key: string]: import("@ibiz-template/runtime").IPanelItemController;
|
|
12006
12079
|
};
|
|
@@ -12043,6 +12116,7 @@ export declare const CustomDashboardContainer: import("vue").DefineComponent<{
|
|
|
12043
12116
|
force: (_callback?: (() => void) | undefined) => void;
|
|
12044
12117
|
} | undefined;
|
|
12045
12118
|
load: () => Promise<void>;
|
|
12119
|
+
validate: (parentId?: string | undefined) => Promise<boolean>;
|
|
12046
12120
|
setDataValue: (name: string, value: unknown) => Promise<void>;
|
|
12047
12121
|
view: {
|
|
12048
12122
|
evt: {
|
|
@@ -21027,9 +21101,10 @@ export declare const CustomDashboardContainer: import("vue").DefineComponent<{
|
|
|
21027
21101
|
srfpaginationviewid?: string | undefined;
|
|
21028
21102
|
};
|
|
21029
21103
|
params: IParams;
|
|
21030
|
-
type: "data" | "public" | "personal";
|
|
21104
|
+
type: "data" | "public" | "personal" | "dynamic";
|
|
21031
21105
|
ownerType: string;
|
|
21032
21106
|
ownerId: string;
|
|
21107
|
+
multiMode: boolean;
|
|
21033
21108
|
loadCustomModelData: () => Promise<IData>;
|
|
21034
21109
|
resetCustomModelData: () => Promise<IData>;
|
|
21035
21110
|
saveCustomModelData: (model: IData[], opts?: IData | undefined) => Promise<IData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-form{width:100%;padding-bottom:var(--ibiz-spacing-tight)}
|
|
1
|
+
.ibiz-control-form{width:100%;height:100%;padding-bottom:var(--ibiz-spacing-tight)}
|