@ibiz-template/vue3-components 0.7.14 → 0.7.16-alpha.0
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-dATrePJW.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-PQvDXaA9.js → wang-editor-XpJH4SXt.js} +1 -1
- package/dist/{xlsx-util-OfvrEAre.js → xlsx-util-MJWwC396.js} +1 -1
- package/es/common/carousel/carousel.d.ts +5 -5
- package/es/common/carousel/carousel.mjs +2 -2
- package/es/common/carousel-card/carousel-card.css +1 -1
- package/es/control/context-menu/context-menu.d.ts +0 -1
- package/es/control/context-menu/context-menu.mjs +26 -15
- package/es/control/context-menu/index.d.ts +0 -1
- package/es/control/drbar/drbar.controller.d.ts +24 -0
- package/es/control/drbar/drbar.controller.mjs +107 -13
- package/es/control/drbar/drbar.mjs +3 -2
- package/es/control/drtab/drtab.controller.d.ts +39 -0
- package/es/control/drtab/drtab.controller.mjs +112 -5
- package/es/control/drtab/drtab.mjs +3 -2
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +0 -1
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +4 -8
- package/es/control/grid/grid-column/grid-field-column/index.d.ts +0 -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.mjs +1 -2
- package/es/editor/html/wang-editor/wang-editor.css +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +2 -2
- package/es/editor/text-box/input/input.css +1 -1
- package/es/locale/index.d.ts +72 -1
- package/es/locale/index.mjs +64 -1
- package/es/panel-component/panel-static-carousel/index.d.ts +1 -1
- package/es/panel-component/panel-static-carousel/panel-static-carousel.css +1 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -1
- package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +8 -8
- package/es/panel-component/short-cut/index.d.ts +2 -2
- package/es/panel-component/short-cut/short-cut.css +1 -1
- package/es/panel-component/short-cut/short-cut.d.ts +2 -2
- package/es/panel-component/short-cut/short-cut.mjs +26 -23
- package/es/view-engine/edit-view.engine.mjs +5 -1
- package/es/view-engine/opt-view.engine.mjs +5 -1
- package/lib/common/carousel/carousel.cjs +2 -2
- package/lib/common/carousel-card/carousel-card.css +1 -1
- package/lib/control/context-menu/context-menu.cjs +25 -14
- package/lib/control/drbar/drbar.cjs +3 -2
- package/lib/control/drbar/drbar.controller.cjs +106 -12
- package/lib/control/drtab/drtab.cjs +3 -2
- package/lib/control/drtab/drtab.controller.cjs +111 -4
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +4 -8
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +1 -2
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +2 -2
- package/lib/editor/html/wang-editor/wang-editor.css +1 -1
- package/lib/editor/text-box/input/input.css +1 -1
- package/lib/locale/index.cjs +64 -1
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +8 -8
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.css +1 -0
- package/lib/panel-component/short-cut/short-cut.cjs +26 -23
- package/lib/panel-component/short-cut/short-cut.css +1 -1
- package/lib/view-engine/edit-view.engine.cjs +5 -1
- package/lib/view-engine/opt-view.engine.cjs +5 -1
- package/package.json +7 -7
- package/dist/index-8tvyarHw.js +0 -4
|
@@ -150,13 +150,14 @@ const DRBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
150
|
const {
|
|
151
151
|
isCreated,
|
|
152
152
|
drBarItems,
|
|
153
|
-
selectedItem
|
|
153
|
+
selectedItem,
|
|
154
|
+
isCalculatedPermission
|
|
154
155
|
} = this.c.state;
|
|
155
156
|
return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
156
157
|
"controller": this.c,
|
|
157
158
|
"class": this.ns.b()
|
|
158
159
|
}, {
|
|
159
|
-
default: () => [isCreated && vue.createVNode(vue.resolveComponent("el-menu"), {
|
|
160
|
+
default: () => [isCreated && isCalculatedPermission && vue.createVNode(vue.resolveComponent("el-menu"), {
|
|
160
161
|
"class": this.ns.e("menu"),
|
|
161
162
|
"mode": this.showMode,
|
|
162
163
|
"default-active": selectedItem,
|
|
@@ -119,6 +119,78 @@ class DRBarController extends runtime.ControlController {
|
|
|
119
119
|
this.initDRBarItems();
|
|
120
120
|
await this.initCounter();
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* 通过计数器数据,计算项状态
|
|
124
|
+
*
|
|
125
|
+
* @author zhanghengfeng
|
|
126
|
+
* @date 2024-05-16 18:05:14
|
|
127
|
+
* @param {IData} [_data]
|
|
128
|
+
* @param {boolean} [reset=true]
|
|
129
|
+
*/
|
|
130
|
+
calcItemStateByCounter(_data, reset = true) {
|
|
131
|
+
this.state.drBarItems.forEach((item) => {
|
|
132
|
+
var _a;
|
|
133
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
134
|
+
item.children.forEach((childItem) => {
|
|
135
|
+
const visible = runtime.calcItemVisibleByCounter(childItem, this.counter);
|
|
136
|
+
if (visible !== void 0) {
|
|
137
|
+
childItem.visible = visible;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
item.visible = item.children.some((childItem) => childItem.visible);
|
|
141
|
+
} else {
|
|
142
|
+
const visible = runtime.calcItemVisibleByCounter(item, this.counter);
|
|
143
|
+
if (visible !== void 0) {
|
|
144
|
+
item.visible = visible;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
if (this.state.selectedItem && reset) {
|
|
149
|
+
const { visible, defaultVisibleItem } = this.getItemVisibleState(
|
|
150
|
+
this.state.selectedItem
|
|
151
|
+
);
|
|
152
|
+
if (!visible && defaultVisibleItem) {
|
|
153
|
+
this.handleSelectChange(defaultVisibleItem.tag);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* 获取对应项的显示状态
|
|
159
|
+
*
|
|
160
|
+
* @author zhanghengfeng
|
|
161
|
+
* @date 2024-05-16 17:05:15
|
|
162
|
+
* @param {string} key
|
|
163
|
+
* @return {*} {{
|
|
164
|
+
* visible: boolean;
|
|
165
|
+
* defaultVisibleItem?: IDRBarItemsState;
|
|
166
|
+
* }}
|
|
167
|
+
*/
|
|
168
|
+
getItemVisibleState(key) {
|
|
169
|
+
let visible = true;
|
|
170
|
+
let defaultVisibleItem;
|
|
171
|
+
this.state.drBarItems.forEach((item) => {
|
|
172
|
+
if (item.children) {
|
|
173
|
+
if (!defaultVisibleItem) {
|
|
174
|
+
defaultVisibleItem = item.children.find((child) => child.visible);
|
|
175
|
+
}
|
|
176
|
+
const drBarItem = item.children.find((child) => child.tag === key);
|
|
177
|
+
if (drBarItem) {
|
|
178
|
+
visible = !!drBarItem.visible;
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
if (!defaultVisibleItem && item.visible) {
|
|
182
|
+
defaultVisibleItem = item;
|
|
183
|
+
}
|
|
184
|
+
if (item.tag === key) {
|
|
185
|
+
visible = !!item.visible;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
visible,
|
|
191
|
+
defaultVisibleItem
|
|
192
|
+
};
|
|
193
|
+
}
|
|
122
194
|
/**
|
|
123
195
|
* 计算关系界面组权限
|
|
124
196
|
*
|
|
@@ -126,16 +198,19 @@ class DRBarController extends runtime.ControlController {
|
|
|
126
198
|
* @memberof DRBarController
|
|
127
199
|
*/
|
|
128
200
|
async calcPermitted(item) {
|
|
201
|
+
var _a;
|
|
129
202
|
let permitted = true;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
203
|
+
const data = ((_a = this.getData()) == null ? void 0 : _a.length) ? this.getData()[0] : void 0;
|
|
204
|
+
const visible = await runtime.calcItemVisible(
|
|
205
|
+
item,
|
|
206
|
+
this.context,
|
|
207
|
+
this.params,
|
|
208
|
+
this.model.appDataEntityId,
|
|
209
|
+
this.model.appId,
|
|
210
|
+
data
|
|
211
|
+
);
|
|
212
|
+
if (visible !== void 0) {
|
|
213
|
+
permitted = visible;
|
|
139
214
|
}
|
|
140
215
|
item.visible = permitted;
|
|
141
216
|
}
|
|
@@ -161,6 +236,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
161
236
|
}
|
|
162
237
|
})
|
|
163
238
|
);
|
|
239
|
+
this.calcItemStateByCounter({}, false);
|
|
240
|
+
this.state.isCalculatedPermission = true;
|
|
164
241
|
}
|
|
165
242
|
/**
|
|
166
243
|
* 加载完成
|
|
@@ -172,7 +249,11 @@ class DRBarController extends runtime.ControlController {
|
|
|
172
249
|
await super.onMounted();
|
|
173
250
|
if (this.form) {
|
|
174
251
|
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
175
|
-
|
|
252
|
+
const data = event.data[0];
|
|
253
|
+
this.view.state.srfactiveviewdata = data;
|
|
254
|
+
if (data.srfreadonly) {
|
|
255
|
+
this.view.context.srfreadonly = true;
|
|
256
|
+
}
|
|
176
257
|
await this.calcDrBarItemsState();
|
|
177
258
|
this.handleFormChange();
|
|
178
259
|
this.doDefaultSelect();
|
|
@@ -252,6 +333,7 @@ class DRBarController extends runtime.ControlController {
|
|
|
252
333
|
if (item.capLanguageRes) {
|
|
253
334
|
itemCaption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
254
335
|
}
|
|
336
|
+
const { enableMode, testAppDELogicId, testScriptCode } = item;
|
|
255
337
|
return {
|
|
256
338
|
tag: item.id,
|
|
257
339
|
caption: itemCaption,
|
|
@@ -260,7 +342,10 @@ class DRBarController extends runtime.ControlController {
|
|
|
260
342
|
counterId: item.counterId,
|
|
261
343
|
visible: false,
|
|
262
344
|
// 默认不显示
|
|
263
|
-
dataAccessAction: item.dataAccessAction || void 0
|
|
345
|
+
dataAccessAction: item.dataAccessAction || void 0,
|
|
346
|
+
enableMode,
|
|
347
|
+
testAppDELogicId,
|
|
348
|
+
testScriptCode
|
|
264
349
|
};
|
|
265
350
|
};
|
|
266
351
|
if (dedrbarGroups && dedrctrlItems) {
|
|
@@ -423,7 +508,13 @@ class DRBarController extends runtime.ControlController {
|
|
|
423
508
|
}
|
|
424
509
|
if (key) {
|
|
425
510
|
const isRoutePushed = !!this.routeDepth && runtime.hasSubRoute(this.routeDepth);
|
|
426
|
-
this.
|
|
511
|
+
const { visible, defaultVisibleItem } = this.getItemVisibleState(key);
|
|
512
|
+
if (!visible && defaultVisibleItem) {
|
|
513
|
+
key = defaultVisibleItem.tag;
|
|
514
|
+
this.handleSelectChange(key);
|
|
515
|
+
} else {
|
|
516
|
+
this.handleSelectChange(key, isRoutePushed);
|
|
517
|
+
}
|
|
427
518
|
this.state.defaultItem = key;
|
|
428
519
|
}
|
|
429
520
|
}
|
|
@@ -443,6 +534,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
443
534
|
this.context,
|
|
444
535
|
{ ...this.params }
|
|
445
536
|
);
|
|
537
|
+
this.calcItemStateByCounter = this.calcItemStateByCounter.bind(this);
|
|
538
|
+
this.counter.onChange(this.calcItemStateByCounter);
|
|
446
539
|
}
|
|
447
540
|
}
|
|
448
541
|
/**
|
|
@@ -456,6 +549,7 @@ class DRBarController extends runtime.ControlController {
|
|
|
456
549
|
async onDestroyed() {
|
|
457
550
|
await super.onDestroyed();
|
|
458
551
|
if (this.counter) {
|
|
552
|
+
this.counter.offChange(this.calcItemStateByCounter);
|
|
459
553
|
this.counter.destroy();
|
|
460
554
|
}
|
|
461
555
|
}
|
|
@@ -96,13 +96,14 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
96
|
let _slot;
|
|
97
97
|
const {
|
|
98
98
|
isCreated,
|
|
99
|
-
drTabPages
|
|
99
|
+
drTabPages,
|
|
100
|
+
isCalculatedPermission
|
|
100
101
|
} = this.c.state;
|
|
101
102
|
return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
102
103
|
"controller": this.c,
|
|
103
104
|
"class": this.ns.b()
|
|
104
105
|
}, {
|
|
105
|
-
default: () => [isCreated && vue.createVNode(vue.resolveComponent("el-tabs"), {
|
|
106
|
+
default: () => [isCreated && isCalculatedPermission && vue.createVNode(vue.resolveComponent("el-tabs"), {
|
|
106
107
|
"modelValue": this.c.state.activeName,
|
|
107
108
|
"onUpdate:modelValue": ($event) => this.c.state.activeName = $event,
|
|
108
109
|
"onTabChange": this.handleTabChange
|
|
@@ -97,6 +97,97 @@ class DRTabController extends runtime.ControlController {
|
|
|
97
97
|
await super.onCreated();
|
|
98
98
|
await this.initCounter();
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* 通过计数器数据,计算项状态
|
|
102
|
+
*
|
|
103
|
+
* @author zhanghengfeng
|
|
104
|
+
* @date 2024-05-16 17:05:01
|
|
105
|
+
*/
|
|
106
|
+
calcItemStateByCounter() {
|
|
107
|
+
this.state.drTabPages.forEach((item) => {
|
|
108
|
+
const visible = runtime.calcItemVisibleByCounter(item, this.counter);
|
|
109
|
+
if (visible !== void 0) {
|
|
110
|
+
item.hidden = !visible;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
if (this.state.activeName) {
|
|
114
|
+
const { visible, defaultVisibleItem } = this.getItemVisibleState(
|
|
115
|
+
this.state.activeName
|
|
116
|
+
);
|
|
117
|
+
if (!visible && defaultVisibleItem) {
|
|
118
|
+
this.state.activeName = defaultVisibleItem.tag;
|
|
119
|
+
this.handleTabChange();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 获取对应项的显示状态
|
|
125
|
+
*
|
|
126
|
+
* @author zhanghengfeng
|
|
127
|
+
* @date 2024-05-16 17:05:18
|
|
128
|
+
* @param {string} key
|
|
129
|
+
* @return {*} {{
|
|
130
|
+
* visible: boolean;
|
|
131
|
+
* defaultVisibleItem?: IDRTabPagesState;
|
|
132
|
+
* }}
|
|
133
|
+
*/
|
|
134
|
+
getItemVisibleState(key) {
|
|
135
|
+
let visible = true;
|
|
136
|
+
let defaultVisibleItem;
|
|
137
|
+
this.state.drTabPages.forEach((item) => {
|
|
138
|
+
if (!defaultVisibleItem && !item.hidden) {
|
|
139
|
+
defaultVisibleItem = item;
|
|
140
|
+
}
|
|
141
|
+
if (item.tag === key) {
|
|
142
|
+
visible = !item.hidden;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
return {
|
|
146
|
+
visible,
|
|
147
|
+
defaultVisibleItem
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* 计算项权限
|
|
152
|
+
*
|
|
153
|
+
* @author zhanghengfeng
|
|
154
|
+
* @date 2024-05-16 17:05:40
|
|
155
|
+
* @param {IDRTabPagesState} item
|
|
156
|
+
* @return {*} {Promise<void>}
|
|
157
|
+
*/
|
|
158
|
+
async calcPermitted(item) {
|
|
159
|
+
var _a;
|
|
160
|
+
let permitted = true;
|
|
161
|
+
const data = ((_a = this.getData()) == null ? void 0 : _a.length) ? this.getData()[0] : void 0;
|
|
162
|
+
const visible = await runtime.calcItemVisible(
|
|
163
|
+
item,
|
|
164
|
+
this.context,
|
|
165
|
+
this.params,
|
|
166
|
+
this.model.appDataEntityId,
|
|
167
|
+
this.model.appId,
|
|
168
|
+
data
|
|
169
|
+
);
|
|
170
|
+
if (visible !== void 0) {
|
|
171
|
+
permitted = visible;
|
|
172
|
+
}
|
|
173
|
+
item.hidden = !permitted;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* 计算项状态
|
|
177
|
+
*
|
|
178
|
+
* @author zhanghengfeng
|
|
179
|
+
* @date 2024-05-16 17:05:05
|
|
180
|
+
* @return {*} {Promise<void>}
|
|
181
|
+
*/
|
|
182
|
+
async calcDrTabPagesState() {
|
|
183
|
+
await Promise.all(
|
|
184
|
+
this.state.drTabPages.map(async (item) => {
|
|
185
|
+
await this.calcPermitted(item);
|
|
186
|
+
})
|
|
187
|
+
);
|
|
188
|
+
this.calcItemStateByCounter();
|
|
189
|
+
this.state.isCalculatedPermission = true;
|
|
190
|
+
}
|
|
100
191
|
/**
|
|
101
192
|
* 加载完成
|
|
102
193
|
*
|
|
@@ -106,8 +197,13 @@ class DRTabController extends runtime.ControlController {
|
|
|
106
197
|
async onMounted() {
|
|
107
198
|
await super.onMounted();
|
|
108
199
|
if (this.form) {
|
|
109
|
-
this.form.evt.on("onLoadSuccess", (event) => {
|
|
110
|
-
|
|
200
|
+
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
201
|
+
const data = event.data[0];
|
|
202
|
+
this.view.state.srfactiveviewdata = data;
|
|
203
|
+
if (data.srfreadonly) {
|
|
204
|
+
this.view.context.srfreadonly = true;
|
|
205
|
+
}
|
|
206
|
+
await this.calcDrTabPagesState();
|
|
111
207
|
this.handleFormChange();
|
|
112
208
|
});
|
|
113
209
|
this.form.evt.on("onLoadDraftSuccess", () => {
|
|
@@ -118,6 +214,9 @@ class DRTabController extends runtime.ControlController {
|
|
|
118
214
|
});
|
|
119
215
|
}
|
|
120
216
|
this.initDRTabPages();
|
|
217
|
+
if (!this.form) {
|
|
218
|
+
await this.calcDrTabPagesState();
|
|
219
|
+
}
|
|
121
220
|
}
|
|
122
221
|
/**
|
|
123
222
|
* 处理表单数据变更
|
|
@@ -179,13 +278,18 @@ class DRTabController extends runtime.ControlController {
|
|
|
179
278
|
if (item.capLanguageRes) {
|
|
180
279
|
itemCaption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
181
280
|
}
|
|
281
|
+
const { enableMode, dataAccessAction, testAppDELogicId, testScriptCode } = item;
|
|
182
282
|
drTabPages.push({
|
|
183
283
|
tag: item.id,
|
|
184
284
|
caption: itemCaption,
|
|
185
285
|
sysImage: item.sysImage,
|
|
186
286
|
hidden: false,
|
|
187
287
|
disabled: false,
|
|
188
|
-
counterId: item.counterId
|
|
288
|
+
counterId: item.counterId,
|
|
289
|
+
dataAccessAction,
|
|
290
|
+
enableMode,
|
|
291
|
+
testAppDELogicId,
|
|
292
|
+
testScriptCode
|
|
189
293
|
});
|
|
190
294
|
});
|
|
191
295
|
this.state.drTabPages = drTabPages;
|
|
@@ -215,7 +319,7 @@ class DRTabController extends runtime.ControlController {
|
|
|
215
319
|
this.openNavPosView(drBarItem, isRoutePushed);
|
|
216
320
|
} else {
|
|
217
321
|
this.setVisible("form");
|
|
218
|
-
if (this.routeDepth) {
|
|
322
|
+
if (this.routeDepth && this.state.drTabPages[0]) {
|
|
219
323
|
this.router.push(this.state.drTabPages[0].fullPath);
|
|
220
324
|
}
|
|
221
325
|
}
|
|
@@ -310,6 +414,8 @@ class DRTabController extends runtime.ControlController {
|
|
|
310
414
|
this.context,
|
|
311
415
|
{ ...this.params }
|
|
312
416
|
);
|
|
417
|
+
this.calcItemStateByCounter = this.calcItemStateByCounter.bind(this);
|
|
418
|
+
this.counter.onChange(this.calcItemStateByCounter);
|
|
313
419
|
}
|
|
314
420
|
}
|
|
315
421
|
/**
|
|
@@ -323,6 +429,7 @@ class DRTabController extends runtime.ControlController {
|
|
|
323
429
|
async onDestroyed() {
|
|
324
430
|
await super.onDestroyed();
|
|
325
431
|
if (this.counter) {
|
|
432
|
+
this.counter.offChange(this.calcItemStateByCounter);
|
|
326
433
|
this.counter.destroy();
|
|
327
434
|
}
|
|
328
435
|
}
|
|
@@ -23,6 +23,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
23
|
},
|
|
24
24
|
setup(props) {
|
|
25
25
|
const ns = vue3Util.useNamespace("grid-field-column");
|
|
26
|
+
const c = props.controller;
|
|
26
27
|
const zIndex = props.controller.grid.state.zIndex;
|
|
27
28
|
const onCellClick = (event) => {
|
|
28
29
|
if (props.controller.hasAction) {
|
|
@@ -55,13 +56,9 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
56
|
const onActionClick = async (detail, event) => {
|
|
56
57
|
await props.controller.onActionClick(detail, props.row, event);
|
|
57
58
|
};
|
|
58
|
-
const items = vue.ref([]);
|
|
59
|
-
if (props.controller.codeList) {
|
|
60
|
-
items.value = props.controller.codeListItems;
|
|
61
|
-
}
|
|
62
59
|
const fn = (data) => {
|
|
63
60
|
if (data) {
|
|
64
|
-
|
|
61
|
+
c.codeListItems = data;
|
|
65
62
|
}
|
|
66
63
|
};
|
|
67
64
|
vue3Util.useCodeListListen(props.controller.model.appCodeListId, props.controller.context.srfappid, fn);
|
|
@@ -76,8 +73,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
76
73
|
formatValue,
|
|
77
74
|
codeListValue,
|
|
78
75
|
tooltip,
|
|
79
|
-
zIndex
|
|
80
|
-
items
|
|
76
|
+
zIndex
|
|
81
77
|
};
|
|
82
78
|
},
|
|
83
79
|
render() {
|
|
@@ -100,7 +96,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
100
96
|
} else if (c.codeList) {
|
|
101
97
|
content = vue.createVNode(vue.resolveComponent("iBizCodeList"), {
|
|
102
98
|
"class": this.ns.e("text"),
|
|
103
|
-
"codeListItems":
|
|
99
|
+
"codeListItems": c.codeListItems,
|
|
104
100
|
"codeList": c.codeList,
|
|
105
101
|
"value": this.codeListValue,
|
|
106
102
|
"onClick": this.onTextClick,
|
|
@@ -150,7 +150,7 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
150
|
});
|
|
151
151
|
vue.onMounted(() => {
|
|
152
152
|
if (editorRef.value) {
|
|
153
|
-
pickViewWidth.value = "".concat(editorRef.value.offsetWidth, "px");
|
|
153
|
+
pickViewWidth.value = "".concat(editorRef.value.$parent.$el.offsetWidth, "px");
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
const onClear = () => {
|
|
@@ -407,7 +407,6 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
407
407
|
const editContent = vue.createVNode(vue.resolveComponent("el-dropdown"), {
|
|
408
408
|
"ref": "editorRef",
|
|
409
409
|
"trigger": "click",
|
|
410
|
-
"teleported": false,
|
|
411
410
|
"class": this.ns.b("select"),
|
|
412
411
|
"popper-class": this.ns.b("popper"),
|
|
413
412
|
"onVisibleChange": this.onVisibleChange,
|
|
@@ -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__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{
|
|
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{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}
|
|
@@ -321,7 +321,7 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
321
321
|
const height = entries[0].contentRect.height;
|
|
322
322
|
if (height !== lastToolbarHeight) {
|
|
323
323
|
const tempCssVars = {
|
|
324
|
-
height: "".concat(htmlContentHeight - entries[0].contentRect.height, "px")
|
|
324
|
+
height: "".concat(htmlContentHeight - entries[0].contentRect.height + (height !== 0 ? 300 : 0), "px")
|
|
325
325
|
};
|
|
326
326
|
cssVars.value = ns.cssVarBlock(tempCssVars);
|
|
327
327
|
lastToolbarHeight = height;
|
|
@@ -458,7 +458,7 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
458
458
|
"mode": "default",
|
|
459
459
|
"class": ns.b("toolbar")
|
|
460
460
|
}, null), vue.createVNode(editorForVue.Editor, {
|
|
461
|
-
"class": ns.b("editor"),
|
|
461
|
+
"class": [ns.b("editor"), ns.is("readonly", readonlyState.value)],
|
|
462
462
|
"modelValue": valueHtml.value,
|
|
463
463
|
"onUpdate:modelValue": ($event) => valueHtml.value = $event,
|
|
464
464
|
"default-config": editorConfig,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-1);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:49px;min-height:49px;padding:8px;background-color:#f3f3f3;border:1px solid #d3d3d3}.ibiz-html .ibiz-html-editor table td{height:49px;min-height:49px;padding:8px;empty-cells:show;border:1px solid #d3d3d3}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-0)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:12px;margin-right:8px}.ibiz-html-footer>*+*{margin-left:16px}.ibiz-html-footer__cancel{height:36px;line-height:36px;color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{width:96px;height:36px;line-height:36px;color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:5px}.ibiz-html-footer__save:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-primary)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:32px;padding-right:16px;font-size:16px}.ibiz-html-custom-toolbar>*+*{margin-left:20px}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 32px;--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}
|
|
1
|
+
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-1);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor.is-readonly{height:auto!important}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:49px;min-height:49px;padding:8px;background-color:#f3f3f3;border:1px solid #d3d3d3}.ibiz-html .ibiz-html-editor table td{height:49px;min-height:49px;padding:8px;empty-cells:show;border:1px solid #d3d3d3}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-0)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:12px;margin-right:8px}.ibiz-html-footer>*+*{margin-left:16px}.ibiz-html-footer__cancel{height:36px;line-height:36px;color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{width:96px;height:36px;line-height:36px;color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:5px}.ibiz-html-footer__save:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-primary)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:32px;padding-right:16px;font-size:16px}.ibiz-html-custom-toolbar>*+*{margin-left:20px}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 32px;--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-input{width:100%;height:100%;font-size:var(--ibiz-form-item-font-size);font-weight:var(--ibiz-form-item-regular);--ibiz-input-min-height:var(--ibiz-editor-default-line-height)}.ibiz-input__ai-chat{position:absolute;right:10px;bottom:10px;width:36px;height:36px;padding:8px;font-size:18px;color:var(--ibiz-color-primary-text);cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:15px}.ibiz-input__ai-chat:hover{color:var(--ibiz-color-primary-hover-text);background-color:var(--ibiz-color-primary-hover)}.ibiz-input .el-input .el-input__inner{height:100%}.ibiz-input .el-input .el-input__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-input .el-input__inner::placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-textarea .el-textarea__inner{height:100%}.ibiz-input .el-textarea .el-textarea__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-textarea .el-textarea__inner::placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .ibiz-input-input{height:100%}.ibiz-input .ibiz-input-input .el-input__wrapper{width:100%;min-height:var(--ibiz-input-min-height)}.ibiz-input--readonly{height:auto;line-height:var(--ibiz-input-min-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-input .el-input__suffix .ibiz-input__unit{font-style:normal}.ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-textarea{padding:var(--ibiz-form-item-hover-edit-padding);overflow:hidden}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-form-default-content{display:block}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-input{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-input{display:inline-flex}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-form-default-content{display:flex;align-items:center;width:100%;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);word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input{display:none;font-family:Arial,sans-serif}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input.el-textarea .el-textarea__inner{word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-input{display:inline-flex}
|
|
1
|
+
.ibiz-input{width:100%;height:100%;font-size:var(--ibiz-form-item-font-size);font-weight:var(--ibiz-form-item-regular);--ibiz-input-min-height:var(--ibiz-editor-default-line-height)}.ibiz-input__ai-chat{position:absolute;right:10px;bottom:10px;width:36px;height:36px;padding:8px;font-size:18px;color:var(--ibiz-color-primary-text);cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:15px}.ibiz-input__ai-chat:hover{color:var(--ibiz-color-primary-hover-text);background-color:var(--ibiz-color-primary-hover)}.ibiz-input .el-input .el-input__inner{height:100%}.ibiz-input .el-input .el-input__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-input .el-input__inner::placeholder{color:var(--ibiz-form-item-placeholder-color)}.ibiz-input .el-textarea .el-textarea__inner{height:100%}.ibiz-input .el-textarea .el-textarea__inner::-moz-placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .el-textarea .el-textarea__inner::placeholder{color:var(--ibiz-form-item-placeholder-color);word-break:break-word;white-space:pre-wrap}.ibiz-input .ibiz-input-input{height:100%}.ibiz-input .ibiz-input-input .el-input__wrapper{width:100%;min-height:var(--ibiz-input-min-height)}.ibiz-input--readonly{height:auto;overflow:auto;line-height:var(--ibiz-input-min-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-input .el-input__suffix .ibiz-input__unit{font-style:normal}.ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-textarea{padding:var(--ibiz-form-item-hover-edit-padding);overflow:hidden}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-form-default-content{display:block}.ibiz-form-item .ibiz-input.is-show-default.is-textarea .ibiz-input-input{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default:hover .ibiz-input-input{display:inline-flex}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-form-default-content{display:flex;align-items:center;width:100%;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);word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input{display:none;font-family:Arial,sans-serif}.ibiz-form-item .ibiz-input.is-show-default .ibiz-input-input.el-textarea .el-textarea__inner{word-wrap:break-word;white-space:pre-wrap}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-form-default-content{display:none}.ibiz-form-item .ibiz-input.is-show-default.is-editable .ibiz-input-input{display:inline-flex}
|
package/lib/locale/index.cjs
CHANGED
|
@@ -14,9 +14,37 @@ const i18n = vueI18n.createI18n({
|
|
|
14
14
|
locale: "zh-CN"
|
|
15
15
|
});
|
|
16
16
|
class IBizI18n {
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of IBizI18n.
|
|
19
|
+
* @author tony001
|
|
20
|
+
* @date 2024-05-20 22:05:50
|
|
21
|
+
*/
|
|
17
22
|
constructor() {
|
|
23
|
+
/**
|
|
24
|
+
* html元素
|
|
25
|
+
*
|
|
26
|
+
* @author tony001
|
|
27
|
+
* @date 2024-05-20 22:05:58
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {HTMLElement}
|
|
30
|
+
*/
|
|
18
31
|
__publicField(this, "html");
|
|
32
|
+
/**
|
|
33
|
+
* 默认语言
|
|
34
|
+
*
|
|
35
|
+
* @author tony001
|
|
36
|
+
* @date 2024-05-20 22:05:13
|
|
37
|
+
* @protected
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
19
40
|
__publicField(this, "defaultLang");
|
|
41
|
+
/**
|
|
42
|
+
* 语言资源映射表
|
|
43
|
+
*
|
|
44
|
+
* @author tony001
|
|
45
|
+
* @date 2024-05-20 22:05:38
|
|
46
|
+
* @protected
|
|
47
|
+
*/
|
|
20
48
|
__publicField(this, "langMap", /* @__PURE__ */ new Map());
|
|
21
49
|
this.defaultLang = "zh-CN";
|
|
22
50
|
this.html = document.querySelector("html");
|
|
@@ -58,7 +86,7 @@ class IBizI18n {
|
|
|
58
86
|
});
|
|
59
87
|
}
|
|
60
88
|
/**
|
|
61
|
-
*
|
|
89
|
+
* 设置语言
|
|
62
90
|
*
|
|
63
91
|
* @author chitanda
|
|
64
92
|
* @date 2023-08-24 16:08:42
|
|
@@ -75,9 +103,26 @@ class IBizI18n {
|
|
|
75
103
|
}
|
|
76
104
|
});
|
|
77
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* 获取语言
|
|
108
|
+
*
|
|
109
|
+
* @author tony001
|
|
110
|
+
* @date 2024-05-20 22:05:05
|
|
111
|
+
* @return {*} {string}
|
|
112
|
+
*/
|
|
78
113
|
getLang() {
|
|
79
114
|
return this.html.getAttribute("lang") || this.defaultLang;
|
|
80
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* 格式化
|
|
118
|
+
*
|
|
119
|
+
* @author tony001
|
|
120
|
+
* @date 2024-05-20 22:05:44
|
|
121
|
+
* @param {unknown} tag
|
|
122
|
+
* @param {unknown} [defaultMsg]
|
|
123
|
+
* @param {unknown} [options]
|
|
124
|
+
* @return {*} {string}
|
|
125
|
+
*/
|
|
81
126
|
t(tag, defaultMsg, options) {
|
|
82
127
|
return i18n.global.t(
|
|
83
128
|
tag,
|
|
@@ -85,6 +130,24 @@ class IBizI18n {
|
|
|
85
130
|
options
|
|
86
131
|
);
|
|
87
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* 合并语言资源
|
|
135
|
+
* @param lang
|
|
136
|
+
* @param data
|
|
137
|
+
*/
|
|
138
|
+
mergeLocaleMessage(dataOrLang, data) {
|
|
139
|
+
if (typeof dataOrLang === "string") {
|
|
140
|
+
const lang = dataOrLang;
|
|
141
|
+
i18n.global.mergeLocaleMessage(lang, data);
|
|
142
|
+
} else {
|
|
143
|
+
const langData = dataOrLang;
|
|
144
|
+
if (langData && Object.keys(langData).length > 0) {
|
|
145
|
+
Object.keys(langData).forEach((key) => {
|
|
146
|
+
i18n.global.mergeLocaleMessage(key, langData[key]);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
88
151
|
}
|
|
89
152
|
const iBizI18n = new IBizI18n();
|
|
90
153
|
|
|
@@ -25,7 +25,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
const carouselData = vue.ref([]);
|
|
26
26
|
const isAuto = vue.ref(true);
|
|
27
27
|
const timeSpan = vue.ref(3e3);
|
|
28
|
-
const
|
|
28
|
+
const showMode = vue.ref("DEFAULT");
|
|
29
29
|
const getSwipeConfig = (swipeData) => {
|
|
30
30
|
const autoPlay = swipeData.find((item) => Object.is(item.key, "autoplay"));
|
|
31
31
|
if (autoPlay) {
|
|
@@ -35,9 +35,9 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
35
35
|
if (span) {
|
|
36
36
|
timeSpan.value = Number(span.value) || 0;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
|
|
38
|
+
const showModeItem = swipeData.find((item) => Object.is(item.key, "showMode"));
|
|
39
|
+
if (showModeItem && showModeItem.value) {
|
|
40
|
+
showMode.value = showModeItem.value;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
|
|
@@ -45,7 +45,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
45
|
const imgData = model.rawItem.rawItemParams;
|
|
46
46
|
const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
|
|
47
47
|
const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
|
|
48
|
-
const
|
|
48
|
+
const showModeIndex = imgData.findIndex((item) => Object.is(item.key, "showMode"));
|
|
49
49
|
let number = 0;
|
|
50
50
|
if (autoplayIndex >= 0) {
|
|
51
51
|
number += 1;
|
|
@@ -53,7 +53,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
53
|
if (timespanIndex >= 0) {
|
|
54
54
|
number += 1;
|
|
55
55
|
}
|
|
56
|
-
if (
|
|
56
|
+
if (showModeIndex >= 0) {
|
|
57
57
|
number += 1;
|
|
58
58
|
}
|
|
59
59
|
if (number > 0) {
|
|
@@ -83,7 +83,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
83
83
|
carouselData,
|
|
84
84
|
isAuto,
|
|
85
85
|
timeSpan,
|
|
86
|
-
|
|
86
|
+
showMode
|
|
87
87
|
};
|
|
88
88
|
},
|
|
89
89
|
render() {
|
|
@@ -93,7 +93,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
|
93
93
|
"carouselData": this.carouselData,
|
|
94
94
|
"isAuto": this.isAuto,
|
|
95
95
|
"timeSpan": this.timeSpan,
|
|
96
|
-
"
|
|
96
|
+
"showMode": this.showMode
|
|
97
97
|
}, null)]);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-panel-static-carousel{width:100%;height:100%}
|