@moment-design/material-library 0.1.22 → 0.1.24
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/c-right.d.ts +2 -0
- package/dist/c-upload.d.ts +1 -0
- package/dist/css/index.css +19 -19
- package/dist/index.cjs.js +36 -17
- package/dist/index.d.ts +11 -7
- package/dist/index.esm.js +37 -18
- package/dist/index.min.js +23 -15
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/c-right.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
41
41
|
reset: () => void;
|
|
42
42
|
init: (id?: string | undefined) => Promise<void>;
|
|
43
43
|
downloadTxtFile: (fileUrl: any, fileName: any) => Promise<void>;
|
|
44
|
+
handleGroupChange: (id?: string | undefined) => void;
|
|
44
45
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
46
|
config: {
|
|
46
47
|
type: ObjectConstructor;
|
|
@@ -804,6 +805,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
804
805
|
limit: import("vue").Ref<number, number>;
|
|
805
806
|
accept: import("vue").Ref<any, any>;
|
|
806
807
|
fileList: any;
|
|
808
|
+
uploadKey: import("vue").Ref<number, number>;
|
|
807
809
|
exceedLimit: () => void;
|
|
808
810
|
beforeUpload: (file: any) => Promise<unknown>;
|
|
809
811
|
fileChange: (vs: any) => any;
|
package/dist/c-upload.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
20
20
|
limit: import("vue").Ref<number, number>;
|
|
21
21
|
accept: import("vue").Ref<any, any>;
|
|
22
22
|
fileList: any;
|
|
23
|
+
uploadKey: import("vue").Ref<number, number>;
|
|
23
24
|
exceedLimit: () => void;
|
|
24
25
|
beforeUpload: (file: any) => Promise<unknown>;
|
|
25
26
|
fileChange: (vs: any) => any;
|
package/dist/css/index.css
CHANGED
|
@@ -258,71 +258,71 @@
|
|
|
258
258
|
overflow: hidden;
|
|
259
259
|
text-overflow: ellipsis;
|
|
260
260
|
}
|
|
261
|
-
.l-material-library-upload .form-item[data-v-
|
|
261
|
+
.l-material-library-upload .form-item[data-v-43f71e5d] {
|
|
262
262
|
display: flex;
|
|
263
263
|
align-items: center;
|
|
264
264
|
margin-bottom: 16px;
|
|
265
265
|
}
|
|
266
|
-
.l-material-library-upload .form-item[data-v-
|
|
266
|
+
.l-material-library-upload .form-item[data-v-43f71e5d]:not(:last-child) {
|
|
267
267
|
margin-bottom: 16px;
|
|
268
268
|
}
|
|
269
|
-
.l-material-library-upload .form-item .label[data-v-
|
|
269
|
+
.l-material-library-upload .form-item .label[data-v-43f71e5d] {
|
|
270
270
|
width: 70px;
|
|
271
271
|
margin-right: 16px;
|
|
272
272
|
}
|
|
273
|
-
.l-material-library-upload .form-item .label span[data-v-
|
|
273
|
+
.l-material-library-upload .form-item .label span[data-v-43f71e5d] {
|
|
274
274
|
color: red;
|
|
275
275
|
margin-right: 4px;
|
|
276
276
|
position: relative;
|
|
277
277
|
top: 2px;
|
|
278
278
|
}
|
|
279
|
-
.l-material-library-upload .upload[data-v-
|
|
279
|
+
.l-material-library-upload .upload[data-v-43f71e5d] {
|
|
280
280
|
margin-top: 16px;
|
|
281
281
|
}
|
|
282
|
-
.l-material-library-upload .upload .tips[data-v-
|
|
282
|
+
.l-material-library-upload .upload .tips[data-v-43f71e5d] {
|
|
283
283
|
margin-bottom: 16px;
|
|
284
284
|
color: #86909c;
|
|
285
285
|
}
|
|
286
|
-
.l-material-library-upload .upload[data-v-
|
|
286
|
+
.l-material-library-upload .upload[data-v-43f71e5d] .mo-upload-progress {
|
|
287
287
|
display: none;
|
|
288
288
|
}
|
|
289
|
-
.l-material-library-right-content[data-v-
|
|
289
|
+
.l-material-library-right-content[data-v-7628764c] {
|
|
290
290
|
flex: 1;
|
|
291
291
|
}
|
|
292
|
-
.l-material-library-right-content .header[data-v-
|
|
292
|
+
.l-material-library-right-content .header[data-v-7628764c] {
|
|
293
293
|
display: flex;
|
|
294
294
|
justify-content: space-between;
|
|
295
295
|
}
|
|
296
|
-
.l-material-library-right-content .header .left[data-v-
|
|
296
|
+
.l-material-library-right-content .header .left[data-v-7628764c] {
|
|
297
297
|
display: flex;
|
|
298
298
|
justify-content: space-between;
|
|
299
299
|
}
|
|
300
|
-
.l-material-library-right-content .header .more-icon-down[data-v-
|
|
300
|
+
.l-material-library-right-content .header .more-icon-down[data-v-7628764c] {
|
|
301
301
|
position: relative;
|
|
302
302
|
top: -1px;
|
|
303
303
|
margin-left: 6px;
|
|
304
304
|
font-size: 15px;
|
|
305
305
|
stroke-width: 5;
|
|
306
306
|
}
|
|
307
|
-
.l-material-library-right-content .toolbar[data-v-
|
|
307
|
+
.l-material-library-right-content .toolbar[data-v-7628764c] {
|
|
308
308
|
margin: 16px 0;
|
|
309
309
|
display: flex;
|
|
310
310
|
align-items: center;
|
|
311
311
|
justify-content: space-between;
|
|
312
312
|
}
|
|
313
|
-
.l-material-library-right-content .toolbar .apps[data-v-
|
|
314
|
-
.l-material-library-right-content .toolbar .menu[data-v-
|
|
313
|
+
.l-material-library-right-content .toolbar .apps[data-v-7628764c],
|
|
314
|
+
.l-material-library-right-content .toolbar .menu[data-v-7628764c] {
|
|
315
315
|
margin-left: 8px;
|
|
316
316
|
font-size: 20px;
|
|
317
317
|
stroke-width: 5;
|
|
318
318
|
}
|
|
319
|
-
.l-material-library-right-content .toolbar .apps[data-v-
|
|
320
|
-
.l-material-library-right-content .toolbar .menu[data-v-
|
|
321
|
-
.l-material-library-right-content .toolbar .apps.active[data-v-
|
|
322
|
-
.l-material-library-right-content .toolbar .menu.active[data-v-
|
|
319
|
+
.l-material-library-right-content .toolbar .apps[data-v-7628764c]:hover,
|
|
320
|
+
.l-material-library-right-content .toolbar .menu[data-v-7628764c]:hover,
|
|
321
|
+
.l-material-library-right-content .toolbar .apps.active[data-v-7628764c],
|
|
322
|
+
.l-material-library-right-content .toolbar .menu.active[data-v-7628764c] {
|
|
323
323
|
color: #1966ff;
|
|
324
324
|
cursor: pointer;
|
|
325
325
|
}
|
|
326
|
-
.l-material-library[data-v-
|
|
326
|
+
.l-material-library[data-v-5e0eeb26] {
|
|
327
327
|
display: flex;
|
|
328
328
|
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -6986,6 +6986,7 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
6986
6986
|
const limit = vue.ref(10);
|
|
6987
6987
|
const accept = vue.ref((_a = deepConfig.value) == null ? void 0 : _a.accept);
|
|
6988
6988
|
const fileList = vue.ref([]);
|
|
6989
|
+
const uploadKey = vue.ref(0);
|
|
6989
6990
|
const exceedLimit = () => {
|
|
6990
6991
|
webVue.Message.error(`\u6700\u591A\u9009\u62E9${limit.value}\u4E2A\u6587\u4EF6`);
|
|
6991
6992
|
};
|
|
@@ -7049,6 +7050,7 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
7049
7050
|
fileName.value = "";
|
|
7050
7051
|
groupId.value = id;
|
|
7051
7052
|
fileList.value = [];
|
|
7053
|
+
uploadKey.value++;
|
|
7052
7054
|
if ((_a2 = deepConfig.value) == null ? void 0 : _a2.fileType) {
|
|
7053
7055
|
fileType.value = (_b = deepConfig.value) == null ? void 0 : _b.fileType;
|
|
7054
7056
|
} else {
|
|
@@ -7094,6 +7096,7 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
7094
7096
|
limit,
|
|
7095
7097
|
accept,
|
|
7096
7098
|
fileList,
|
|
7099
|
+
uploadKey,
|
|
7097
7100
|
exceedLimit,
|
|
7098
7101
|
beforeUpload,
|
|
7099
7102
|
fileChange,
|
|
@@ -7187,7 +7190,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7187
7190
|
]),
|
|
7188
7191
|
vue.createVNode(_component_m_scrollbar, { style: { "max-height": "300px", "overflow-y": "auto", "padding-right": "24px" } }, {
|
|
7189
7192
|
default: vue.withCtx(() => [
|
|
7190
|
-
vue.
|
|
7193
|
+
(vue.openBlock(), vue.createBlock(_component_m_upload, {
|
|
7194
|
+
key: _ctx.uploadKey,
|
|
7191
7195
|
"file-list": _ctx.fileList,
|
|
7192
7196
|
"auto-upload": false,
|
|
7193
7197
|
accept: _ctx.accept,
|
|
@@ -7197,7 +7201,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7197
7201
|
onExceedLimit: _ctx.exceedLimit,
|
|
7198
7202
|
onBeforeUpload: _ctx.beforeUpload,
|
|
7199
7203
|
onChange: _ctx.fileChange
|
|
7200
|
-
}, null, 8, ["file-list", "accept", "limit", "onExceedLimit", "onBeforeUpload", "onChange"])
|
|
7204
|
+
}, null, 8, ["file-list", "accept", "limit", "onExceedLimit", "onBeforeUpload", "onChange"]))
|
|
7201
7205
|
]),
|
|
7202
7206
|
_: 1
|
|
7203
7207
|
})
|
|
@@ -7210,7 +7214,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7210
7214
|
_: 1
|
|
7211
7215
|
}, 8, ["visible", "others", "onHandle:ok"]);
|
|
7212
7216
|
}
|
|
7213
|
-
var CUpload = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
7217
|
+
var CUpload = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-43f71e5d"]]);
|
|
7214
7218
|
var cRight_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
7215
7219
|
const _sfc_main$1 = vue.defineComponent({
|
|
7216
7220
|
name: "",
|
|
@@ -7275,6 +7279,13 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
7275
7279
|
pageSize.value = v;
|
|
7276
7280
|
init(groupId.value);
|
|
7277
7281
|
};
|
|
7282
|
+
const handleGroupChange = (id) => {
|
|
7283
|
+
var _a2, _b2;
|
|
7284
|
+
pageNum.value = 1;
|
|
7285
|
+
init(id);
|
|
7286
|
+
(_a2 = refCRightMenus.value) == null ? void 0 : _a2.resetCurrent();
|
|
7287
|
+
(_b2 = refCRightApps.value) == null ? void 0 : _b2.resetCurrent();
|
|
7288
|
+
};
|
|
7278
7289
|
const handlePreview = (item) => {
|
|
7279
7290
|
if ((item == null ? void 0 : item.fileType) === 1) {
|
|
7280
7291
|
if (item == null ? void 0 : item.filePath) {
|
|
@@ -7358,21 +7369,21 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
7358
7369
|
emit("group:init");
|
|
7359
7370
|
};
|
|
7360
7371
|
const init = async (id) => {
|
|
7361
|
-
var _a2, _b2, _c
|
|
7372
|
+
var _a2, _b2, _c;
|
|
7362
7373
|
try {
|
|
7363
7374
|
groupId.value = id;
|
|
7364
7375
|
loading.value = true;
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
const res = await ((
|
|
7376
|
+
if (fileName.value) {
|
|
7377
|
+
pageNum.value = 1;
|
|
7378
|
+
}
|
|
7379
|
+
const res = await ((_b2 = (_a2 = deepConfig.value) == null ? void 0 : _a2.apis) == null ? void 0 : _b2.getFileList({
|
|
7369
7380
|
groupId: groupId.value,
|
|
7370
7381
|
fileName: fileName.value,
|
|
7371
7382
|
fileType: fileType.value,
|
|
7372
7383
|
pageNum: pageNum.value,
|
|
7373
7384
|
pageSize: pageSize.value
|
|
7374
7385
|
}));
|
|
7375
|
-
if (((
|
|
7386
|
+
if (((_c = [0, 200]) == null ? void 0 : _c.includes(+(res == null ? void 0 : res.code))) && (res == null ? void 0 : res.data)) {
|
|
7376
7387
|
datas.value = res == null ? void 0 : res.data;
|
|
7377
7388
|
refCRightApps.value.initCheckbox();
|
|
7378
7389
|
}
|
|
@@ -7424,7 +7435,8 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
7424
7435
|
handleRemoveOk,
|
|
7425
7436
|
reset,
|
|
7426
7437
|
init,
|
|
7427
|
-
downloadTxtFile
|
|
7438
|
+
downloadTxtFile,
|
|
7439
|
+
handleGroupChange
|
|
7428
7440
|
};
|
|
7429
7441
|
}
|
|
7430
7442
|
});
|
|
@@ -7625,7 +7637,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7625
7637
|
}, null, 8, ["visible", "src"])
|
|
7626
7638
|
], 64);
|
|
7627
7639
|
}
|
|
7628
|
-
var CRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7640
|
+
var CRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-7628764c"]]);
|
|
7629
7641
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
7630
7642
|
const _sfc_main = vue.defineComponent({
|
|
7631
7643
|
name: "MaterialLibrary",
|
|
@@ -7667,8 +7679,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
7667
7679
|
};
|
|
7668
7680
|
const open = () => {
|
|
7669
7681
|
visible.value = true;
|
|
7670
|
-
|
|
7671
|
-
|
|
7682
|
+
vue.nextTick(() => {
|
|
7683
|
+
refCLeft.value.init();
|
|
7684
|
+
refCRight.value.initCheckbox();
|
|
7685
|
+
});
|
|
7686
|
+
};
|
|
7687
|
+
const handleGroupChange = (id) => {
|
|
7688
|
+
var _a;
|
|
7689
|
+
(_a = refCRight.value) == null ? void 0 : _a.handleGroupChange(id);
|
|
7672
7690
|
};
|
|
7673
7691
|
vue.watch(
|
|
7674
7692
|
() => props.config,
|
|
@@ -7692,7 +7710,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
7692
7710
|
visible,
|
|
7693
7711
|
handleOk,
|
|
7694
7712
|
open,
|
|
7695
|
-
getVersion
|
|
7713
|
+
getVersion,
|
|
7714
|
+
handleGroupChange
|
|
7696
7715
|
};
|
|
7697
7716
|
}
|
|
7698
7717
|
});
|
|
@@ -7718,7 +7737,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7718
7737
|
vue.createVNode(_component_CLeft, {
|
|
7719
7738
|
ref: "refCLeft",
|
|
7720
7739
|
config: _ctx.deepConfig,
|
|
7721
|
-
"onGroup:change": _cache[0] || (_cache[0] = (v) => _ctx.
|
|
7740
|
+
"onGroup:change": _cache[0] || (_cache[0] = (v) => _ctx.handleGroupChange(v))
|
|
7722
7741
|
}, null, 8, ["config"]),
|
|
7723
7742
|
vue.createVNode(_component_CRight, {
|
|
7724
7743
|
ref: "refCRight",
|
|
@@ -7734,7 +7753,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7734
7753
|
vue.createVNode(_component_CLeft, {
|
|
7735
7754
|
ref: "refCLeft",
|
|
7736
7755
|
config: _ctx.deepConfig,
|
|
7737
|
-
"onGroup:change": _cache[3] || (_cache[3] = (v) => _ctx.
|
|
7756
|
+
"onGroup:change": _cache[3] || (_cache[3] = (v) => _ctx.handleGroupChange(v))
|
|
7738
7757
|
}, null, 8, ["config"]),
|
|
7739
7758
|
vue.createVNode(_component_CRight, {
|
|
7740
7759
|
ref: "refCRight",
|
|
@@ -7745,5 +7764,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7745
7764
|
], 2112))
|
|
7746
7765
|
], 2112);
|
|
7747
7766
|
}
|
|
7748
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
7767
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5e0eeb26"]]);
|
|
7749
7768
|
module.exports = index;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
3
|
config: {
|
|
3
4
|
type: ObjectConstructor;
|
|
@@ -11,6 +12,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
11
12
|
handleOk: () => void;
|
|
12
13
|
open: () => void;
|
|
13
14
|
getVersion: () => string;
|
|
15
|
+
handleGroupChange: (id?: string | undefined) => void;
|
|
14
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
17
|
config: {
|
|
16
18
|
type: ObjectConstructor;
|
|
@@ -146,7 +148,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
146
148
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
147
149
|
};
|
|
148
150
|
$forceUpdate: () => void;
|
|
149
|
-
$nextTick: typeof
|
|
151
|
+
$nextTick: typeof nextTick;
|
|
150
152
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
151
153
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
152
154
|
size: {
|
|
@@ -301,7 +303,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
301
303
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
302
304
|
};
|
|
303
305
|
$forceUpdate: () => void;
|
|
304
|
-
$nextTick: typeof
|
|
306
|
+
$nextTick: typeof nextTick;
|
|
305
307
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
306
308
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
307
309
|
size: {
|
|
@@ -456,7 +458,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
456
458
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
457
459
|
};
|
|
458
460
|
$forceUpdate: () => void;
|
|
459
|
-
$nextTick: typeof
|
|
461
|
+
$nextTick: typeof nextTick;
|
|
460
462
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
461
463
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
462
464
|
size: {
|
|
@@ -589,6 +591,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
589
591
|
reset: () => void;
|
|
590
592
|
init: (id?: string | undefined) => Promise<void>;
|
|
591
593
|
downloadTxtFile: (fileUrl: any, fileName: any) => Promise<void>;
|
|
594
|
+
handleGroupChange: (id?: string | undefined) => void;
|
|
592
595
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
593
596
|
config: {
|
|
594
597
|
type: ObjectConstructor;
|
|
@@ -688,7 +691,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
688
691
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
689
692
|
};
|
|
690
693
|
$forceUpdate: () => void;
|
|
691
|
-
$nextTick: typeof
|
|
694
|
+
$nextTick: typeof nextTick;
|
|
692
695
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
693
696
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
694
697
|
size: {
|
|
@@ -843,7 +846,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
843
846
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
844
847
|
};
|
|
845
848
|
$forceUpdate: () => void;
|
|
846
|
-
$nextTick: typeof
|
|
849
|
+
$nextTick: typeof nextTick;
|
|
847
850
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
848
851
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
849
852
|
size: {
|
|
@@ -998,7 +1001,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
998
1001
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
999
1002
|
};
|
|
1000
1003
|
$forceUpdate: () => void;
|
|
1001
|
-
$nextTick: typeof
|
|
1004
|
+
$nextTick: typeof nextTick;
|
|
1002
1005
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
1003
1006
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
1004
1007
|
size: {
|
|
@@ -1196,7 +1199,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1196
1199
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[] | undefined;
|
|
1197
1200
|
};
|
|
1198
1201
|
$forceUpdate: () => void;
|
|
1199
|
-
$nextTick: typeof
|
|
1202
|
+
$nextTick: typeof nextTick;
|
|
1200
1203
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
1201
1204
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
1202
1205
|
size: {
|
|
@@ -1352,6 +1355,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1352
1355
|
limit: import("vue").Ref<number, number>;
|
|
1353
1356
|
accept: import("vue").Ref<any, any>;
|
|
1354
1357
|
fileList: any;
|
|
1358
|
+
uploadKey: import("vue").Ref<number, number>;
|
|
1355
1359
|
exceedLimit: () => void;
|
|
1356
1360
|
beforeUpload: (file: any) => Promise<unknown>;
|
|
1357
1361
|
fileChange: (vs: any) => any;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, renderSlot, createElementVNode, createElementBlock, createCommentVNode, createVNode, ref, Fragment, normalizeStyle, renderList, normalizeClass, withModifiers, watch, computed, unref, reactive, onMounted } from "vue";
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, renderSlot, createElementVNode, createElementBlock, createCommentVNode, createVNode, ref, Fragment, normalizeStyle, renderList, normalizeClass, withModifiers, watch, computed, unref, reactive, onMounted, nextTick } from "vue";
|
|
2
2
|
import { Message } from "@moment-design/web-vue";
|
|
3
3
|
import { IconPlus, IconSearch, IconMore, IconDown, IconApps, IconMenu } from "@moment-design/web-vue/es/icon";
|
|
4
4
|
var _export_sfc = (sfc, props) => {
|
|
@@ -6985,6 +6985,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
6985
6985
|
const limit = ref(10);
|
|
6986
6986
|
const accept = ref((_a = deepConfig.value) == null ? void 0 : _a.accept);
|
|
6987
6987
|
const fileList = ref([]);
|
|
6988
|
+
const uploadKey = ref(0);
|
|
6988
6989
|
const exceedLimit = () => {
|
|
6989
6990
|
Message.error(`\u6700\u591A\u9009\u62E9${limit.value}\u4E2A\u6587\u4EF6`);
|
|
6990
6991
|
};
|
|
@@ -7048,6 +7049,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
7048
7049
|
fileName.value = "";
|
|
7049
7050
|
groupId.value = id;
|
|
7050
7051
|
fileList.value = [];
|
|
7052
|
+
uploadKey.value++;
|
|
7051
7053
|
if ((_a2 = deepConfig.value) == null ? void 0 : _a2.fileType) {
|
|
7052
7054
|
fileType.value = (_b = deepConfig.value) == null ? void 0 : _b.fileType;
|
|
7053
7055
|
} else {
|
|
@@ -7093,6 +7095,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
7093
7095
|
limit,
|
|
7094
7096
|
accept,
|
|
7095
7097
|
fileList,
|
|
7098
|
+
uploadKey,
|
|
7096
7099
|
exceedLimit,
|
|
7097
7100
|
beforeUpload,
|
|
7098
7101
|
fileChange,
|
|
@@ -7186,7 +7189,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7186
7189
|
]),
|
|
7187
7190
|
createVNode(_component_m_scrollbar, { style: { "max-height": "300px", "overflow-y": "auto", "padding-right": "24px" } }, {
|
|
7188
7191
|
default: withCtx(() => [
|
|
7189
|
-
|
|
7192
|
+
(openBlock(), createBlock(_component_m_upload, {
|
|
7193
|
+
key: _ctx.uploadKey,
|
|
7190
7194
|
"file-list": _ctx.fileList,
|
|
7191
7195
|
"auto-upload": false,
|
|
7192
7196
|
accept: _ctx.accept,
|
|
@@ -7196,7 +7200,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7196
7200
|
onExceedLimit: _ctx.exceedLimit,
|
|
7197
7201
|
onBeforeUpload: _ctx.beforeUpload,
|
|
7198
7202
|
onChange: _ctx.fileChange
|
|
7199
|
-
}, null, 8, ["file-list", "accept", "limit", "onExceedLimit", "onBeforeUpload", "onChange"])
|
|
7203
|
+
}, null, 8, ["file-list", "accept", "limit", "onExceedLimit", "onBeforeUpload", "onChange"]))
|
|
7200
7204
|
]),
|
|
7201
7205
|
_: 1
|
|
7202
7206
|
})
|
|
@@ -7209,7 +7213,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7209
7213
|
_: 1
|
|
7210
7214
|
}, 8, ["visible", "others", "onHandle:ok"]);
|
|
7211
7215
|
}
|
|
7212
|
-
var CUpload = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
7216
|
+
var CUpload = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-43f71e5d"]]);
|
|
7213
7217
|
var cRight_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
7214
7218
|
const _sfc_main$1 = defineComponent({
|
|
7215
7219
|
name: "",
|
|
@@ -7274,6 +7278,13 @@ const _sfc_main$1 = defineComponent({
|
|
|
7274
7278
|
pageSize.value = v;
|
|
7275
7279
|
init(groupId.value);
|
|
7276
7280
|
};
|
|
7281
|
+
const handleGroupChange = (id) => {
|
|
7282
|
+
var _a2, _b2;
|
|
7283
|
+
pageNum.value = 1;
|
|
7284
|
+
init(id);
|
|
7285
|
+
(_a2 = refCRightMenus.value) == null ? void 0 : _a2.resetCurrent();
|
|
7286
|
+
(_b2 = refCRightApps.value) == null ? void 0 : _b2.resetCurrent();
|
|
7287
|
+
};
|
|
7277
7288
|
const handlePreview = (item) => {
|
|
7278
7289
|
if ((item == null ? void 0 : item.fileType) === 1) {
|
|
7279
7290
|
if (item == null ? void 0 : item.filePath) {
|
|
@@ -7357,21 +7368,21 @@ const _sfc_main$1 = defineComponent({
|
|
|
7357
7368
|
emit("group:init");
|
|
7358
7369
|
};
|
|
7359
7370
|
const init = async (id) => {
|
|
7360
|
-
var _a2, _b2, _c
|
|
7371
|
+
var _a2, _b2, _c;
|
|
7361
7372
|
try {
|
|
7362
7373
|
groupId.value = id;
|
|
7363
7374
|
loading.value = true;
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
const res = await ((
|
|
7375
|
+
if (fileName.value) {
|
|
7376
|
+
pageNum.value = 1;
|
|
7377
|
+
}
|
|
7378
|
+
const res = await ((_b2 = (_a2 = deepConfig.value) == null ? void 0 : _a2.apis) == null ? void 0 : _b2.getFileList({
|
|
7368
7379
|
groupId: groupId.value,
|
|
7369
7380
|
fileName: fileName.value,
|
|
7370
7381
|
fileType: fileType.value,
|
|
7371
7382
|
pageNum: pageNum.value,
|
|
7372
7383
|
pageSize: pageSize.value
|
|
7373
7384
|
}));
|
|
7374
|
-
if (((
|
|
7385
|
+
if (((_c = [0, 200]) == null ? void 0 : _c.includes(+(res == null ? void 0 : res.code))) && (res == null ? void 0 : res.data)) {
|
|
7375
7386
|
datas.value = res == null ? void 0 : res.data;
|
|
7376
7387
|
refCRightApps.value.initCheckbox();
|
|
7377
7388
|
}
|
|
@@ -7423,7 +7434,8 @@ const _sfc_main$1 = defineComponent({
|
|
|
7423
7434
|
handleRemoveOk,
|
|
7424
7435
|
reset,
|
|
7425
7436
|
init,
|
|
7426
|
-
downloadTxtFile
|
|
7437
|
+
downloadTxtFile,
|
|
7438
|
+
handleGroupChange
|
|
7427
7439
|
};
|
|
7428
7440
|
}
|
|
7429
7441
|
});
|
|
@@ -7624,7 +7636,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7624
7636
|
}, null, 8, ["visible", "src"])
|
|
7625
7637
|
], 64);
|
|
7626
7638
|
}
|
|
7627
|
-
var CRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7639
|
+
var CRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-7628764c"]]);
|
|
7628
7640
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
7629
7641
|
const _sfc_main = defineComponent({
|
|
7630
7642
|
name: "MaterialLibrary",
|
|
@@ -7666,8 +7678,14 @@ const _sfc_main = defineComponent({
|
|
|
7666
7678
|
};
|
|
7667
7679
|
const open = () => {
|
|
7668
7680
|
visible.value = true;
|
|
7669
|
-
|
|
7670
|
-
|
|
7681
|
+
nextTick(() => {
|
|
7682
|
+
refCLeft.value.init();
|
|
7683
|
+
refCRight.value.initCheckbox();
|
|
7684
|
+
});
|
|
7685
|
+
};
|
|
7686
|
+
const handleGroupChange = (id) => {
|
|
7687
|
+
var _a;
|
|
7688
|
+
(_a = refCRight.value) == null ? void 0 : _a.handleGroupChange(id);
|
|
7671
7689
|
};
|
|
7672
7690
|
watch(
|
|
7673
7691
|
() => props.config,
|
|
@@ -7691,7 +7709,8 @@ const _sfc_main = defineComponent({
|
|
|
7691
7709
|
visible,
|
|
7692
7710
|
handleOk,
|
|
7693
7711
|
open,
|
|
7694
|
-
getVersion
|
|
7712
|
+
getVersion,
|
|
7713
|
+
handleGroupChange
|
|
7695
7714
|
};
|
|
7696
7715
|
}
|
|
7697
7716
|
});
|
|
@@ -7717,7 +7736,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7717
7736
|
createVNode(_component_CLeft, {
|
|
7718
7737
|
ref: "refCLeft",
|
|
7719
7738
|
config: _ctx.deepConfig,
|
|
7720
|
-
"onGroup:change": _cache[0] || (_cache[0] = (v) => _ctx.
|
|
7739
|
+
"onGroup:change": _cache[0] || (_cache[0] = (v) => _ctx.handleGroupChange(v))
|
|
7721
7740
|
}, null, 8, ["config"]),
|
|
7722
7741
|
createVNode(_component_CRight, {
|
|
7723
7742
|
ref: "refCRight",
|
|
@@ -7733,7 +7752,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7733
7752
|
createVNode(_component_CLeft, {
|
|
7734
7753
|
ref: "refCLeft",
|
|
7735
7754
|
config: _ctx.deepConfig,
|
|
7736
|
-
"onGroup:change": _cache[3] || (_cache[3] = (v) => _ctx.
|
|
7755
|
+
"onGroup:change": _cache[3] || (_cache[3] = (v) => _ctx.handleGroupChange(v))
|
|
7737
7756
|
}, null, 8, ["config"]),
|
|
7738
7757
|
createVNode(_component_CRight, {
|
|
7739
7758
|
ref: "refCRight",
|
|
@@ -7744,5 +7763,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7744
7763
|
], 2112))
|
|
7745
7764
|
], 2112);
|
|
7746
7765
|
}
|
|
7747
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
7766
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5e0eeb26"]]);
|
|
7748
7767
|
export { index as default };
|