@opentiny/vue-renderless 3.18.0 → 3.18.1
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/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/nav-menu/index.js +7 -3
- package/package.json +1 -1
- package/select/index.js +1 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/input.type.d.ts +1 -1
- package/types/popover.type.d.ts +1 -1
- package/types/transfer.type.d.ts +3 -3
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-4194f534.d.ts → upload-list.type-2f4ec243.d.ts} +3 -3
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
package/common/index.js
CHANGED
package/common/runtime.js
CHANGED
package/nav-menu/index.js
CHANGED
|
@@ -144,8 +144,8 @@ const mounted = ({
|
|
|
144
144
|
api.calcWidth();
|
|
145
145
|
on(window, "resize", api.calcWidth);
|
|
146
146
|
if (router) {
|
|
147
|
-
state.afterEach = () => {
|
|
148
|
-
api.setActiveMenu(api.getSelectedIndex(
|
|
147
|
+
state.afterEach = (to) => {
|
|
148
|
+
api.setActiveMenu(api.getSelectedIndex(to.path));
|
|
149
149
|
};
|
|
150
150
|
router.afterEach(state.afterEach);
|
|
151
151
|
}
|
|
@@ -160,6 +160,8 @@ const unMounted = ({ api, state, router }) => () => {
|
|
|
160
160
|
off(window, "resize", api.calcWidth);
|
|
161
161
|
};
|
|
162
162
|
const getSelectedIndex = (state) => (path) => {
|
|
163
|
+
if (!path)
|
|
164
|
+
return;
|
|
163
165
|
let length = state.data.length;
|
|
164
166
|
let index = -1;
|
|
165
167
|
if (path !== "/") {
|
|
@@ -322,6 +324,8 @@ const clickMenu = ({ api, props, state }) => (item, index, parentIndex) => {
|
|
|
322
324
|
}
|
|
323
325
|
};
|
|
324
326
|
const skip = ({ api, router, fields }) => (item, flag = false) => {
|
|
327
|
+
if (!router)
|
|
328
|
+
return;
|
|
325
329
|
if (item.isFullUrl) {
|
|
326
330
|
const { urlField = "url" } = fields || {};
|
|
327
331
|
const router2 = item[urlField] || item.route;
|
|
@@ -329,7 +333,7 @@ const skip = ({ api, router, fields }) => (item, flag = false) => {
|
|
|
329
333
|
}
|
|
330
334
|
const address = !item.route || !flag ? api.getUrl(item).replace(/^#/, "") : `/${item.route || ""}`.replace(/^\/+/, "/").replace("#/", "");
|
|
331
335
|
if (address) {
|
|
332
|
-
return router.push(address);
|
|
336
|
+
return router == null ? void 0 : router.push(address);
|
|
333
337
|
} else {
|
|
334
338
|
return "";
|
|
335
339
|
}
|
package/package.json
CHANGED
package/select/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-
|
|
2
|
+
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-2f4ec243.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/input.type.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ declare const calculateNodeStyling: () => (targetElement: HTMLElement) => {
|
|
|
241
241
|
borderSize: number;
|
|
242
242
|
boxSizing: string;
|
|
243
243
|
};
|
|
244
|
-
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state, mode, constants }: Pick<IInputRenderlessParams, "
|
|
244
|
+
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state, mode, constants }: Pick<IInputRenderlessParams, "state" | "props" | "mode" | "api" | "constants"> & {
|
|
245
245
|
hiddenTextarea: HTMLTextAreaElement | null;
|
|
246
246
|
}) => (targetElement: HTMLTextAreaElement, minRows?: number, maxRows?: null) => {
|
|
247
247
|
minHeight?: string | undefined;
|
package/types/popover.type.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ declare const popoverProps: {
|
|
|
92
92
|
*
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
|
-
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "
|
|
95
|
+
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "state" | "props" | "nextTick" | "mode" | "api"> & {
|
|
96
96
|
constants: {
|
|
97
97
|
IDPREFIX: string;
|
|
98
98
|
};
|
package/types/transfer.type.d.ts
CHANGED
|
@@ -108,14 +108,14 @@ declare const getSourceData: ({ props, Tree }: Pick<ITransferRenderlessParams, "
|
|
|
108
108
|
Tree: string;
|
|
109
109
|
}) => () => unknown[];
|
|
110
110
|
/** 返回右边的数据项 */
|
|
111
|
-
declare const getTargetData: ({ props, state, Tree, Table }: Pick<ITransferRenderlessParams, "
|
|
111
|
+
declare const getTargetData: ({ props, state, Tree, Table }: Pick<ITransferRenderlessParams, "state" | "props"> & {
|
|
112
112
|
Tree: string;
|
|
113
113
|
Table: string;
|
|
114
114
|
}) => () => unknown;
|
|
115
115
|
declare const onSourceCheckedChange: ({ emit, state }: Pick<ITransferRenderlessParams, 'emit' | 'state'>) => (val: string[], movedKeys: string[]) => void;
|
|
116
116
|
declare const onTargetCheckedChange: ({ emit, state }: Pick<ITransferRenderlessParams, 'emit' | 'state'>) => (val: string[], movedKeys: string[]) => void;
|
|
117
117
|
declare const addToLeft: ({ emit, props, state }: Pick<ITransferRenderlessParams, 'emit' | 'props' | 'state'>) => (value: undefined | 'all') => void;
|
|
118
|
-
declare const addToRight: ({ emit, refs, props, state, Tree }: Pick<ITransferRenderlessParams, "
|
|
118
|
+
declare const addToRight: ({ emit, refs, props, state, Tree }: Pick<ITransferRenderlessParams, "state" | "props" | "refs" | "emit"> & {
|
|
119
119
|
Tree: string;
|
|
120
120
|
}) => (value: undefined | 'all') => void;
|
|
121
121
|
declare const clearQuery: (refs: ITransferRenderlessParams['refs']) => (which: 'left' | 'right') => void;
|
|
@@ -126,7 +126,7 @@ declare const logicFun: ({ props, emit, state }: Pick<ITransferRenderlessParams,
|
|
|
126
126
|
pullMode?: "sort" | undefined;
|
|
127
127
|
}) => void;
|
|
128
128
|
/** 组件加载后,给左右面板初始化Sortable的功能 */
|
|
129
|
-
declare const sortableEvent: ({ api, droppanel, props, queryDom, refs }: Pick<ITransferRenderlessParams, "props" | "
|
|
129
|
+
declare const sortableEvent: ({ api, droppanel, props, queryDom, refs }: Pick<ITransferRenderlessParams, "props" | "refs" | "api"> & {
|
|
130
130
|
droppanel: string;
|
|
131
131
|
queryDom: string;
|
|
132
132
|
}) => () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
|
-
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-
|
|
3
|
+
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-2f4ec243.js';
|
|
4
4
|
|
|
5
5
|
declare const UploadDraggerProps: {
|
|
6
6
|
disabled: BooleanConstructor;
|
|
@@ -406,7 +406,7 @@ declare const beforeUpload: ({ props, api, Modal, constants, t, state }: Pick<IF
|
|
|
406
406
|
declare const startUpload: ({ state, constants, vm, Modal, api, t }: Pick<IFileUploadRenderlessParams, 'state' | 'constants' | 'vm' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile, isList: boolean) => void;
|
|
407
407
|
declare const properFileSize: ({ props, state, api, constants, Modal, t }: Pick<IFileUploadRenderlessParams, 'props' | 'state' | 'constants' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile) => boolean;
|
|
408
408
|
declare const addFileToList: ({ api, constants, emit, props, state, mode }: Pick<IFileUploadRenderlessParams, 'api' | 'constants' | 'emit' | 'props' | 'state' | 'mode'>) => (rawFile: IFileUploadFile, updateId: string, reUpload: boolean) => void;
|
|
409
|
-
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "
|
|
409
|
+
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "state" | "emit" | "t" | "constants"> & IFileUploadModalVm & {
|
|
410
410
|
CryptoJS: object;
|
|
411
411
|
}) => ({ file, chunkSize, showTips }: {
|
|
412
412
|
file: IFileUploadFile;
|
|
@@ -486,13 +486,13 @@ declare const sliceDownloadChunk: ({ state }: Pick<IFileUploadRenderlessParams,
|
|
|
486
486
|
declare const batchSegmentDownload: ({ state, api }: Pick<IFileUploadRenderlessParams, 'state' | 'api'>) => ({ batchIndex, batches, docId, isBatch, isLessThan17G }: IFileUploadBatchSegmentDownload) => void;
|
|
487
487
|
declare const downloadFileInner: ({ api, props, state }: Pick<IFileUploadRenderlessParams, 'api' | 'props' | 'state'>) => ({ batchIndex, file, range, isBatch, isChunk, isLessThan17G }: IFileUploadDownloadFileInner) => void;
|
|
488
488
|
declare const afterDownload: ({ api, state }: Pick<IFileUploadRenderlessParams, 'api' | 'state'>) => ({ batchIndex, range, data, file, isBatch, isChunk, isLessThan17G }: IFileUploadAfterDownload) => void;
|
|
489
|
-
declare const setWriterFile: ({ state, emit, Streamsaver }: Pick<IFileUploadRenderlessParams, "
|
|
489
|
+
declare const setWriterFile: ({ state, emit, Streamsaver }: Pick<IFileUploadRenderlessParams, "state" | "emit"> & {
|
|
490
490
|
Streamsaver: IFileUploadStreamsaver;
|
|
491
491
|
}) => ({ data, index, isLessThan17G, file }: IFileUploadSetWriterFile) => Function;
|
|
492
492
|
declare const getFormData$1: ({ constants, props, state }: Pick<IFileUploadRenderlessParams, 'constants' | 'props' | 'state'>) => ({ formData, file, type }: IFileUploadGetFormData) => IUploadFormData;
|
|
493
493
|
declare const largeDocumentUpload: ({ api, Modal, state, t, emit, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'state' | 't' | 'emit' | 'constants'> & IFileUploadModalVm) => (file: IFileUploadFile) => void;
|
|
494
494
|
declare const segmentUploadInit: ({ api, props, service, state, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'props' | 'service' | 'state' | 'constants'>) => (file: IFileUploadFile) => Promise<unknown>;
|
|
495
|
-
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "
|
|
495
|
+
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "state" | "props" | "emit" | "api" | "constants" | "service"> & {
|
|
496
496
|
CryptoJS: object;
|
|
497
497
|
}) => (batchIndex: number, file: IFileUploadFile, progress: {
|
|
498
498
|
file: IFileUploadFile;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-
|
|
2
|
+
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-2f4ec243.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/upload.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-
|
|
2
|
+
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-2f4ec243.js';
|
|
3
3
|
import './shared.type.js';
|