hy-dispatch-ui-v3 0.1.5 → 0.1.6

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.
Files changed (45) hide show
  1. package/dist/tailwind.css +59 -0
  2. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +3 -3
  3. package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +3 -3
  4. package/es/components/appConfirmDialog/appConfirmMethod.mjs +13 -13
  5. package/es/components/appCutter/appCutter.vue.mjs +285 -0
  6. package/es/components/appCutter/index.mjs +6 -0
  7. package/es/components/appCutter/style/appCutter.scss +51 -0
  8. package/es/components/appDialog/appDialog.vue.mjs +205 -0
  9. package/es/components/appDialog/index.mjs +6 -0
  10. package/es/components/appDialog/style/appDialog.scss +0 -0
  11. package/es/components/appTable/appTable.vue.mjs +1 -1
  12. package/es/components/index.mjs +2 -0
  13. package/es/hooks/useApi.mjs +6 -2
  14. package/es/hooks/useGlobalConfig.mjs +2 -2
  15. package/es/hooks/useLocale.mjs +14 -4
  16. package/es/hooks/useUserAvatarMap.mjs +6 -2
  17. package/es/index.mjs +4 -1
  18. package/es/locale/en.mjs +6 -1
  19. package/es/locale/zh_CN.mjs +8 -3
  20. package/es/utils/file.mjs +68 -0
  21. package/es/utils/index.mjs +2 -1
  22. package/es/utils/is.mjs +4 -1
  23. package/es/version.mjs +1 -1
  24. package/lib/components/appConfigProvider/appConfigProvider.vue.js +1 -1
  25. package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +3 -3
  26. package/lib/components/appConfirmDialog/appConfirmMethod.js +13 -13
  27. package/lib/components/appCutter/appCutter.vue.js +289 -0
  28. package/lib/components/appCutter/index.js +11 -0
  29. package/lib/components/appCutter/style/appCutter.scss +51 -0
  30. package/lib/components/appDialog/appDialog.vue.js +209 -0
  31. package/lib/components/appDialog/index.js +11 -0
  32. package/lib/components/appDialog/style/appDialog.scss +0 -0
  33. package/lib/components/appTable/appTable.vue.js +1 -1
  34. package/lib/components/index.js +26 -22
  35. package/lib/hooks/useApi.js +6 -2
  36. package/lib/hooks/useLocale.js +13 -3
  37. package/lib/hooks/useUserAvatarMap.js +6 -2
  38. package/lib/index.js +35 -22
  39. package/lib/locale/en.js +6 -1
  40. package/lib/locale/zh_CN.js +8 -3
  41. package/lib/utils/file.js +76 -0
  42. package/lib/utils/index.js +9 -0
  43. package/lib/utils/is.js +4 -0
  44. package/lib/version.js +1 -1
  45. package/package.json +2 -3
@@ -0,0 +1,289 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var vueCropper = require('vue-cropper');
7
+ var elementPlus = require('element-plus');
8
+ var iconsVue = require('@element-plus/icons-vue');
9
+ var index = require('../appDialog/index.js');
10
+ var is = require('../../utils/is.js');
11
+ var file$1 = require('../../utils/file.js');
12
+ var useLocale = require('../../hooks/useLocale.js');
13
+
14
+ import "vue-cropper/dist/index.css";
15
+
16
+ import "./style/appCutter.scss";
17
+
18
+ const __default__ = vue.defineComponent({
19
+ name: "AppCutter"
20
+ });
21
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
22
+ props: /* @__PURE__ */ vue.mergeModels({
23
+ dialogWidth: { type: [String, Number], default: 1e3 },
24
+ defaultImg: { type: String },
25
+ uploadText: {
26
+ type: String,
27
+ default: () => {
28
+ const { t } = useLocale.useLocale();
29
+ return t("cutter.uploadPicture");
30
+ }
31
+ },
32
+ showUpload: { type: Boolean, default: true },
33
+ showText: { type: Boolean, default: true },
34
+ showDelete: { type: Boolean, default: true },
35
+ maxSize: { type: Number, default: 1024 * 1024 * 2 },
36
+ accept: { type: String, default: "image/png,image/jpg,image/jpeg,image/gif" },
37
+ info: { type: Boolean, default: true },
38
+ outputSize: { type: Number, default: 1 },
39
+ outputType: { type: String, default: "jpeg" },
40
+ autoCrop: { type: Boolean, default: true },
41
+ autoCropWidth: { type: Number, default: 100 },
42
+ autoCropHeight: { type: Number, default: 100 },
43
+ fixedBox: { type: Boolean, default: false },
44
+ fixed: { type: Boolean, default: true },
45
+ fixedNumber: { type: Array },
46
+ full: { type: Boolean, default: true },
47
+ canMoveBox: { type: Boolean, default: false },
48
+ original: { type: Boolean, default: false },
49
+ centerBox: { type: Boolean, default: true },
50
+ infoTrue: { type: Boolean, default: false }
51
+ }, {
52
+ "modelValue": { type: String },
53
+ "modelModifiers": {}
54
+ }),
55
+ emits: /* @__PURE__ */ vue.mergeModels(["confirm"], ["update:modelValue"]),
56
+ setup(__props, { expose: __expose, emit: __emit }) {
57
+ const props = __props;
58
+ const emits = __emit;
59
+ const { t } = useLocale.useLocale();
60
+ const modelValue = vue.useModel(__props, "modelValue");
61
+ const cropperRef = vue.useTemplateRef("cropperRef");
62
+ const uploadRef = vue.useTemplateRef("uploadRef");
63
+ const visible = vue.ref(false);
64
+ const imgSrc = vue.ref();
65
+ const fileInfo = vue.ref({
66
+ name: "",
67
+ src: ""
68
+ });
69
+ const imageSrc = vue.computed(() => imgSrc.value || props.defaultImg);
70
+ const options = vue.computed(() => ({
71
+ info: props.info,
72
+ // 裁剪框的大小信息
73
+ outputSize: props.outputSize,
74
+ // 裁剪生成图片的质量
75
+ outputType: props.outputType,
76
+ // 裁剪生成图片的格式
77
+ canScale: props.canScale,
78
+ // 图片是否允许滚轮缩放
79
+ autoCrop: props.autoCrop,
80
+ // 是否默认生成截图框
81
+ autoCropWidth: props.autoCropWidth,
82
+ // 默认生成截图框宽度
83
+ autoCropHeight: props.autoCropHeight,
84
+ // 默认生成截图框高度
85
+ fixedBox: props.fixedBox,
86
+ // 固定截图框大小 不允许改变
87
+ fixed: props.fixed,
88
+ // 是否开启截图框宽高固定比例
89
+ fixedNumber: props.fixedNumber,
90
+ // 截图框的宽高比例
91
+ full: props.full,
92
+ // 是否输出原图比例的截图
93
+ canMoveBox: props.canMoveBox,
94
+ // 截图框能否拖动
95
+ original: props.original,
96
+ // 上传图片按照原始比例渲染
97
+ centerBox: props.centerBox,
98
+ // 截图框是否被限制在图片里面
99
+ infoTrue: props.infoTrue
100
+ // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
101
+ }));
102
+ function openFilePicker(param, name = "img.png") {
103
+ if (typeof param === "string") {
104
+ openCutter(param, name);
105
+ return;
106
+ }
107
+ if (is.isFile(param)) {
108
+ beforeAvatarUpload(file);
109
+ return;
110
+ }
111
+ uploadRef.value.click();
112
+ }
113
+ async function beforeAvatarUpload(file2) {
114
+ const limit = file2.size < props.maxSize;
115
+ if (!limit) {
116
+ elementPlus.ElMessage.error(
117
+ t("cutter.uploadPictureLimit", [file$1.sizeToTextHandler(props.maxSize)])
118
+ );
119
+ return false;
120
+ }
121
+ const result = await file$1.blobToDataURL(file2);
122
+ openCutter(result, file2.name);
123
+ return false;
124
+ }
125
+ function openCutter(src, name) {
126
+ visible.value = true;
127
+ fileInfo.value.src = src;
128
+ fileInfo.value.name = name;
129
+ }
130
+ function onClearHandler() {
131
+ imgSrc.value = "";
132
+ modelValue.value = null;
133
+ fileInfo.value = {
134
+ name: "",
135
+ src: ""
136
+ };
137
+ }
138
+ async function onSubmitHandler() {
139
+ return new Promise((resolve, reject) => {
140
+ cropperRef.value.getCropBlob(async (data) => {
141
+ var _a, _b;
142
+ data.name = fileInfo.value.name;
143
+ const res = await file$1.fileUpload(data).catch((res2) => {
144
+ elementPlus.ElMessage.error(res2.msg || res2);
145
+ reject();
146
+ });
147
+ if (res.code === 200) {
148
+ imgSrc.value = await file$1.blobToDataURL(data);
149
+ modelValue.value = ((_a = res.data) == null ? void 0 : _a.key) || ((_b = res.data) == null ? void 0 : _b.url) || res.data;
150
+ emits("confirm", res);
151
+ resolve();
152
+ } else {
153
+ elementPlus.ElMessage.error(res.msg || res);
154
+ reject();
155
+ }
156
+ });
157
+ });
158
+ }
159
+ __expose({
160
+ open: openFilePicker,
161
+ clear: onClearHandler
162
+ });
163
+ return (_ctx, _cache) => {
164
+ const _component_User = vue.resolveComponent("User");
165
+ return vue.openBlock(), vue.createElementBlock("div", { class: "inline-block" }, [
166
+ vue.withDirectives(vue.createVNode(
167
+ vue.unref(elementPlus.ElUpload),
168
+ {
169
+ accept: ".png,.jpg,.gif,.jpeg",
170
+ "before-upload": beforeAvatarUpload,
171
+ action: "",
172
+ class: "upload_box",
173
+ "show-file-list": false
174
+ },
175
+ {
176
+ default: vue.withCtx(() => [
177
+ vue.createElementVNode(
178
+ "div",
179
+ {
180
+ ref_key: "uploadRef",
181
+ ref: uploadRef,
182
+ class: "app-cutter-upload-box"
183
+ },
184
+ [
185
+ vue.renderSlot(_ctx.$slots, "default", { src: imgSrc.value }, () => [
186
+ vue.createElementVNode(
187
+ "div",
188
+ {
189
+ class: "app-cutter-upload-card",
190
+ style: vue.normalizeStyle({
191
+ width: `${__props.autoCropWidth}px`,
192
+ height: `${__props.autoCropHeight}px`
193
+ })
194
+ },
195
+ [
196
+ modelValue.value && imageSrc.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElImage), {
197
+ key: 0,
198
+ src: imageSrc.value,
199
+ style: vue.normalizeStyle({
200
+ width: `${__props.autoCropWidth}px`,
201
+ height: `${__props.autoCropHeight}px`
202
+ })
203
+ }, null, 8, ["src", "style"])) : (vue.openBlock(), vue.createElementBlock(
204
+ vue.Fragment,
205
+ { key: 1 },
206
+ [
207
+ vue.createCommentVNode(' <AppIcon\n v-else\n svg-name="emptyHead"\n style="width: 70px; height: 70px"\n /> '),
208
+ vue.createVNode(vue.unref(elementPlus.ElIcon), {
209
+ color: "rgb(var(--hy-auxiliary))",
210
+ size: "64"
211
+ }, {
212
+ default: vue.withCtx(() => [
213
+ vue.createVNode(_component_User)
214
+ ]),
215
+ _: 1
216
+ /* STABLE */
217
+ })
218
+ ],
219
+ 2112
220
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
221
+ ))
222
+ ],
223
+ 4
224
+ /* STYLE */
225
+ )
226
+ ]),
227
+ __props.uploadText && __props.showText ? (vue.openBlock(), vue.createElementBlock(
228
+ "div",
229
+ {
230
+ key: 0,
231
+ class: "app-cutter-tip"
232
+ },
233
+ vue.toDisplayString(__props.uploadText),
234
+ 1
235
+ /* TEXT */
236
+ )) : vue.createCommentVNode("v-if", true),
237
+ __props.showDelete ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
238
+ key: 1,
239
+ class: "app-cutter-delete",
240
+ onClick: vue.withModifiers(($event) => onClearHandler(), ["stop"])
241
+ }, [
242
+ vue.createCommentVNode(' <AppIcon svg-name="delete" /> '),
243
+ vue.createVNode(vue.unref(elementPlus.ElIcon), { color: "rgb(var(--hy-danger-2))" }, {
244
+ default: vue.withCtx(() => [
245
+ vue.createVNode(vue.unref(iconsVue.Delete))
246
+ ]),
247
+ _: 1
248
+ /* STABLE */
249
+ })
250
+ ], 8, ["onClick"])), [
251
+ [vue.vShow, modelValue.value]
252
+ ]) : vue.createCommentVNode("v-if", true)
253
+ ],
254
+ 512
255
+ /* NEED_PATCH */
256
+ )
257
+ ]),
258
+ _: 3
259
+ /* FORWARDED */
260
+ },
261
+ 512
262
+ /* NEED_PATCH */
263
+ ), [
264
+ [vue.vShow, __props.showUpload]
265
+ ]),
266
+ vue.createVNode(vue.unref(index.AppDialog), {
267
+ modelValue: visible.value,
268
+ "onUpdate:modelValue": ($event) => visible.value = $event,
269
+ title: vue.unref(t)("cutter.imageSegmentation"),
270
+ onSubmit: onSubmitHandler
271
+ }, {
272
+ default: vue.withCtx(() => [
273
+ vue.createElementVNode("div", { class: "h-[500px]" }, [
274
+ vue.createVNode(vue.unref(vueCropper.VueCropper), vue.mergeProps({
275
+ ref_key: "cropperRef",
276
+ ref: cropperRef,
277
+ img: fileInfo.value.src
278
+ }, options.value), null, 16, ["img"])
279
+ ])
280
+ ]),
281
+ _: 1
282
+ /* STABLE */
283
+ }, 8, ["modelValue", "onUpdate:modelValue", "title"])
284
+ ]);
285
+ };
286
+ }
287
+ });
288
+
289
+ exports.default = _sfc_main;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var appCutter = require('./appCutter.vue.js');
6
+ var handler = require('../../utils/handler.js');
7
+
8
+ const AppCutter = handler.withInstall(appCutter.default);
9
+
10
+ exports.AppCutter = AppCutter;
11
+ exports.default = AppCutter;
@@ -0,0 +1,51 @@
1
+ .app-cutter-upload-box {
2
+ display: inline-block;
3
+ position: relative;
4
+ overflow: hidden;
5
+ border-radius: 4px;
6
+ .app-cutter-delete {
7
+ width: 100%;
8
+ height: 23px;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ position: absolute;
13
+ bottom: -23px;
14
+ z-index: 3;
15
+ transition: all 0.3s;
16
+ background: rgba(0, 0, 0, 0.6);
17
+ }
18
+ .app-cutter-tip {
19
+ width: 100%;
20
+ position: absolute;
21
+ left: 50%;
22
+ top: 50%;
23
+ transform: translate(-50%, -50%);
24
+ z-index: 3;
25
+ font-size: 14px;
26
+ color: rgb(var(--hy-theme));
27
+ text-align: center;
28
+ user-select: none;
29
+ opacity: 0;
30
+ transition: all 0.3s;
31
+ }
32
+ &:hover {
33
+ .app-cutter-delete {
34
+ bottom: 0;
35
+ }
36
+ .app-cutter-tip {
37
+ opacity: 1;
38
+ }
39
+ }
40
+ .app-cutter-upload-card {
41
+ width: 70px;
42
+ height: 70px;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ border: 1px solid rgb(var(--hy-border));
47
+ border-radius: 4px;
48
+ background-color: rgb(var(--hy-background-2));
49
+ position: relative;
50
+ }
51
+ }
@@ -0,0 +1,209 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var elementPlus = require('element-plus');
7
+ var iconsVue = require('@element-plus/icons-vue');
8
+ var useLocale = require('../../hooks/useLocale.js');
9
+ var index = require('../appButton/index.js');
10
+
11
+ import "./style/appDialog.scss";
12
+
13
+ const __default__ = vue.defineComponent({
14
+ name: "AppDialog"
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
17
+ props: /* @__PURE__ */ vue.mergeModels({
18
+ title: { type: String, default: "\u6807\u9898" },
19
+ titleAlign: { type: String, default: "default" },
20
+ // default、center
21
+ showClose: { type: Boolean, default: true },
22
+ showCancel: {
23
+ type: Boolean,
24
+ default: true
25
+ },
26
+ cancelType: {
27
+ type: String,
28
+ default: "default"
29
+ },
30
+ cancelText: {
31
+ type: String
32
+ },
33
+ showSubmit: {
34
+ type: Boolean,
35
+ default: true
36
+ },
37
+ submitType: {
38
+ type: String,
39
+ default: "primary"
40
+ },
41
+ submitText: {
42
+ type: String
43
+ },
44
+ onClose: Function,
45
+ onCancel: Function,
46
+ onSubmit: Function
47
+ }, {
48
+ "modelValue": { type: Boolean, default: false },
49
+ "modelModifiers": {}
50
+ }),
51
+ emits: /* @__PURE__ */ vue.mergeModels(["hide"], ["update:modelValue"]),
52
+ setup(__props, { expose: __expose, emit: __emit }) {
53
+ const props = __props;
54
+ const emits = __emit;
55
+ const { t } = useLocale.useLocale();
56
+ const visible = vue.useModel(__props, "modelValue");
57
+ const loading = vue.ref(false);
58
+ async function onSubmitHandler() {
59
+ if (loading.value) return;
60
+ loading.value = true;
61
+ if (props.onSubmit) {
62
+ try {
63
+ await props.onSubmit();
64
+ } catch (err) {
65
+ console.error(err);
66
+ loading.value = false;
67
+ return;
68
+ }
69
+ }
70
+ visible.value = false;
71
+ loading.value = false;
72
+ emits("hide");
73
+ }
74
+ async function onCancelHandler() {
75
+ if (loading.value) return;
76
+ loading.value = true;
77
+ if (props.onCancel) {
78
+ try {
79
+ await props.onCancel();
80
+ } catch (err) {
81
+ console.error(err);
82
+ loading.value = false;
83
+ return;
84
+ }
85
+ }
86
+ visible.value = false;
87
+ loading.value = false;
88
+ emits("hide");
89
+ }
90
+ async function onCloseHandler() {
91
+ if (loading.value) return;
92
+ loading.value = true;
93
+ if (props.onClose) {
94
+ try {
95
+ await props.onClose();
96
+ } catch (err) {
97
+ console.error(err);
98
+ loading.value = false;
99
+ return;
100
+ }
101
+ }
102
+ visible.value = false;
103
+ loading.value = false;
104
+ emits("hide");
105
+ }
106
+ __expose({});
107
+ return (_ctx, _cache) => {
108
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), vue.mergeProps({
109
+ modelValue: visible.value,
110
+ "onUpdate:modelValue": ($event) => visible.value = $event,
111
+ "append-to-body": true,
112
+ "close-on-click-modal": false,
113
+ "close-on-press-escape": false,
114
+ "show-close": false,
115
+ width: "37.5rem"
116
+ }, _ctx.$attrs), {
117
+ header: vue.withCtx(() => [
118
+ vue.createElementVNode(
119
+ "div",
120
+ {
121
+ class: vue.normalizeClass(["box-border w-full border-0 border-b border-solid border-background-3 px-4 py-[10px] text-main text-sm font-bold flex justify-between items-center relative", { "!justify-center": __props.titleAlign === "center" }])
122
+ },
123
+ [
124
+ vue.createElementVNode(
125
+ "span",
126
+ null,
127
+ vue.toDisplayString(__props.title),
128
+ 1
129
+ /* TEXT */
130
+ ),
131
+ __props.showClose ? (vue.openBlock(), vue.createElementBlock(
132
+ "div",
133
+ {
134
+ key: 0,
135
+ class: vue.normalizeClass(["text-lg absolute right-4 cursor-pointer text-danger-2", { "cursor-not-allowed": loading.value }]),
136
+ onClick: onCloseHandler
137
+ },
138
+ [
139
+ vue.createCommentVNode(' <AppIcon svg-name="close" class="!w-[20px] !h-[20px]" /> '),
140
+ vue.createVNode(vue.unref(elementPlus.ElIcon), {
141
+ size: "18",
142
+ color: "rgb(var(--hy-danger-2))"
143
+ }, {
144
+ default: vue.withCtx(() => [
145
+ vue.createVNode(vue.unref(iconsVue.CircleClose))
146
+ ]),
147
+ _: 1
148
+ /* STABLE */
149
+ })
150
+ ],
151
+ 2
152
+ /* CLASS */
153
+ )) : vue.createCommentVNode("v-if", true)
154
+ ],
155
+ 2
156
+ /* CLASS */
157
+ )
158
+ ]),
159
+ default: vue.withCtx(() => [
160
+ vue.createElementVNode("div", { class: "text-main" }, [
161
+ vue.createElementVNode("div", { class: "p-6 box-border" }, [
162
+ vue.renderSlot(_ctx.$slots, "default"),
163
+ vue.createElementVNode("div", { class: "flex items-center justify-between pt-5" }, [
164
+ __props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppButton), {
165
+ key: 0,
166
+ type: __props.cancelType,
167
+ disabled: loading.value,
168
+ class: "!min-w-[120px]",
169
+ onClick: onCancelHandler
170
+ }, {
171
+ default: vue.withCtx(() => [
172
+ vue.createTextVNode(
173
+ vue.toDisplayString(vue.unref(t)("dialog.cancel")),
174
+ 1
175
+ /* TEXT */
176
+ )
177
+ ]),
178
+ _: 1
179
+ /* STABLE */
180
+ }, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true),
181
+ __props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppButton), {
182
+ key: 1,
183
+ type: __props.submitType,
184
+ disabled: loading.value,
185
+ class: "!min-w-[120px]",
186
+ onClick: onSubmitHandler
187
+ }, {
188
+ default: vue.withCtx(() => [
189
+ vue.createTextVNode(
190
+ vue.toDisplayString(vue.unref(t)("dialog.confirm")),
191
+ 1
192
+ /* TEXT */
193
+ )
194
+ ]),
195
+ _: 1
196
+ /* STABLE */
197
+ }, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
198
+ ])
199
+ ])
200
+ ])
201
+ ]),
202
+ _: 3
203
+ /* FORWARDED */
204
+ }, 16, ["modelValue", "onUpdate:modelValue"]);
205
+ };
206
+ }
207
+ });
208
+
209
+ exports.default = _sfc_main;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var appDialog = require('./appDialog.vue.js');
6
+ var handler = require('../../utils/handler.js');
7
+
8
+ const AppDialog = handler.withInstall(appDialog.default);
9
+
10
+ exports.AppDialog = AppDialog;
11
+ exports.default = AppDialog;
File without changes
@@ -540,7 +540,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
540
540
  vue.createElementVNode(
541
541
  "div",
542
542
  { class: "absolute left-4 top-1/2 transform -translate-y-1/2 text-sm" },
543
- vue.toDisplayString(vue.unref(t)("table.aTotalOfPiecesOfData", [100])),
543
+ vue.toDisplayString(vue.unref(t)("table.aTotalOfPiecesOfData", [vue.unref(totalElements)])),
544
544
  1
545
545
  /* TEXT */
546
546
  ),
@@ -1,39 +1,43 @@
1
1
  'use strict';
2
2
 
3
- var index$9 = require('./appOrgCascader/index.js');
3
+ var index$b = require('./appOrgCascader/index.js');
4
4
  var index$2 = require('./appConfirmDialog/index.js');
5
- var index$3 = require('./appDatePicker/index.js');
6
- var index$4 = require('./appForm/index.js');
7
- var index$5 = require('./appIcon/index.js');
8
- var index$6 = require('./appIconBox/index.js');
9
- var index$a = require('./appSearch/index.js');
10
- var index$b = require('./appTable/index.js');
11
- var index$c = require('./appTooltip/index.js');
5
+ var index$4 = require('./appDatePicker/index.js');
6
+ var index$6 = require('./appForm/index.js');
7
+ var index$7 = require('./appIcon/index.js');
8
+ var index$8 = require('./appIconBox/index.js');
9
+ var index$c = require('./appSearch/index.js');
10
+ var index$d = require('./appTable/index.js');
11
+ var index$e = require('./appTooltip/index.js');
12
12
  var index$1 = require('./appConfigProvider/index.js');
13
13
  var index = require('./appButton/index.js');
14
- var index$d = require('./appUserAvatar/index.js');
15
- var index$7 = require('./appNoPermissions/index.js');
16
- var index$8 = require('./appNoPermissionsMap/index.js');
14
+ var index$f = require('./appUserAvatar/index.js');
15
+ var index$9 = require('./appNoPermissions/index.js');
16
+ var index$a = require('./appNoPermissionsMap/index.js');
17
+ var index$3 = require('./appCutter/index.js');
18
+ var index$5 = require('./appDialog/index.js');
17
19
  var useAppForm = require('./appForm/js/useAppForm.js');
18
20
  var useAppSearch = require('./appSearch/js/useAppSearch.js');
19
21
  var useAppTable = require('./appTable/js/useAppTable.js');
20
22
 
21
23
 
22
24
 
23
- exports.AppOrgCascader = index$9.AppOrgCascader;
25
+ exports.AppOrgCascader = index$b.AppOrgCascader;
24
26
  exports.AppConfirmDialog = index$2.AppConfirmDialog;
25
- exports.AppDatePicker = index$3.AppDatePicker;
26
- exports.AppForm = index$4.AppForm;
27
- exports.AppIcon = index$5.AppIcon;
28
- exports.AppIconBox = index$6.AppIconBox;
29
- exports.AppSearch = index$a.AppSearch;
30
- exports.AppTable = index$b.AppTable;
31
- exports.AppTooltip = index$c.AppTooltip;
27
+ exports.AppDatePicker = index$4.AppDatePicker;
28
+ exports.AppForm = index$6.AppForm;
29
+ exports.AppIcon = index$7.AppIcon;
30
+ exports.AppIconBox = index$8.AppIconBox;
31
+ exports.AppSearch = index$c.AppSearch;
32
+ exports.AppTable = index$d.AppTable;
33
+ exports.AppTooltip = index$e.AppTooltip;
32
34
  exports.AppConfigProvider = index$1.AppConfigProvider;
33
35
  exports.AppButton = index.AppButton;
34
- exports.AppUserAvatar = index$d.AppUserAvatar;
35
- exports.AppNoPermissions = index$7.AppNoPermissions;
36
- exports.AppNoPermissionsMap = index$8.AppNoPermissionsMap;
36
+ exports.AppUserAvatar = index$f.AppUserAvatar;
37
+ exports.AppNoPermissions = index$9.AppNoPermissions;
38
+ exports.AppNoPermissionsMap = index$a.AppNoPermissionsMap;
39
+ exports.AppCutter = index$3.AppCutter;
40
+ exports.AppDialog = index$5.AppDialog;
37
41
  exports.useAppForm = useAppForm.useAppForm;
38
42
  exports.useAppSearch = useAppSearch.useAppSearch;
39
43
  exports.useAppTable = useAppTable.useAppTable;
@@ -2,10 +2,12 @@
2
2
 
3
3
  var axios = require('axios');
4
4
  var vue = require('vue');
5
+ var useGlobalConfig = require('./useGlobalConfig.js');
5
6
 
6
7
  const localApiKey = /* @__PURE__ */ Symbol("localApiKey");
7
8
  const defaultAxios = vue.ref(
8
9
  axios.create({
10
+ baseURL: "/api/admin",
9
11
  withCredentials: false,
10
12
  timeout: 6e4
11
13
  })
@@ -20,8 +22,10 @@ defaultAxios.value.interceptors.response.use(
20
22
  }
21
23
  );
22
24
  const useApi = () => {
23
- const api = vue.inject(localApiKey, defaultAxios);
24
- return { api: vue.unref(api) ? api : defaultAxios };
25
+ var _a;
26
+ const api = vue.inject(localApiKey, vue.ref());
27
+ const globalConfig = useGlobalConfig.useGlobalConfig();
28
+ return { api: vue.unref(api) ? api : ((_a = vue.unref(globalConfig)) == null ? void 0 : _a.api) || defaultAxios };
25
29
  };
26
30
 
27
31
  exports.defaultAxios = defaultAxios;