naive-ui 2.41.0 → 2.42.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.js +930 -428
- package/dist/index.mjs +927 -430
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/_internal/icon/src/styles/index.cssr.mjs +0 -1
- package/es/_internal/selection/src/Selection.d.ts +1 -1
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_utils/dom/download.d.ts +1 -0
- package/es/_utils/dom/download.mjs +3 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.mjs +1 -1
- package/es/_utils/naive/index.d.ts +1 -0
- package/es/_utils/naive/index.mjs +1 -0
- package/es/_utils/naive/value.d.ts +1 -0
- package/es/_utils/naive/value.mjs +13 -0
- package/es/anchor/index.d.ts +1 -0
- package/es/anchor/src/Link.d.ts +3 -2
- package/es/anchor/src/Link.mjs +5 -2
- package/es/anchor/src/public-types.d.ts +5 -0
- package/es/anchor/src/public-types.mjs +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +1 -1
- package/es/components.d.ts +1 -0
- package/es/components.mjs +1 -0
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +6 -6
- package/es/data-table/src/DataTable.mjs +6 -6
- package/es/data-table/src/styles/index.cssr.mjs +1 -0
- package/es/date-picker/src/DatePicker.d.ts +5 -5
- package/es/date-picker/src/DatePicker.mjs +1 -1
- package/es/date-picker/src/panel/date.d.ts +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +3 -3
- package/es/date-picker/src/panel/datetime.d.ts +2 -2
- package/es/date-picker/src/panel/datetime.mjs +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +3 -3
- package/es/date-picker/src/panel/datetimerange.mjs +2 -2
- package/es/date-picker/src/panel/month.d.ts +2 -2
- package/es/date-picker/src/panel/monthrange.d.ts +3 -3
- package/es/date-picker/src/panel/panelHeader.d.ts +4 -4
- package/es/date-picker/src/panel/use-calendar.d.ts +1 -1
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.mjs +3 -3
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -1
- package/es/date-picker/src/panel/use-panel-common.mjs +1 -1
- package/es/date-picker/src/props.d.ts +2 -2
- package/es/date-picker/src/props.mjs +1 -1
- package/es/descriptions/src/Descriptions.d.ts +1 -1
- package/es/form/index.d.ts +1 -0
- package/es/form/src/FormItem.d.ts +1 -1
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/interface.d.ts +0 -1
- package/es/form/src/public-types.d.ts +1 -0
- package/es/form/src/public-types.mjs +1 -0
- package/es/icon/src/styles/index.cssr.mjs +0 -1
- package/es/input/src/Input.d.ts +1 -1
- package/es/input/src/Input.mjs +1 -8
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/input-otp/index.d.ts +3 -0
- package/es/input-otp/index.mjs +1 -0
- package/es/input-otp/src/InputOtp.d.ts +875 -0
- package/es/input-otp/src/InputOtp.mjs +322 -0
- package/es/input-otp/src/public-types.d.ts +24 -0
- package/es/input-otp/src/public-types.mjs +1 -0
- package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/index.cssr.mjs +20 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.mjs +5 -0
- package/es/input-otp/styles/dark.d.ts +3 -0
- package/es/input-otp/styles/dark.mjs +12 -0
- package/es/input-otp/styles/index.d.ts +4 -0
- package/es/input-otp/styles/index.mjs +3 -0
- package/es/input-otp/styles/light.d.ts +81 -0
- package/es/input-otp/styles/light.mjs +22 -0
- package/es/input-otp/styles/rtl.d.ts +2 -0
- package/es/input-otp/styles/rtl.mjs +5 -0
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/MultipleCircle.d.ts +1 -1
- package/es/progress/src/Progress.d.ts +2 -2
- package/es/radio/src/Radio.mjs +5 -5
- package/es/radio/src/styles/radio.cssr.mjs +3 -7
- package/es/select/src/Select.d.ts +1 -1
- package/es/styles.d.ts +1 -0
- package/es/styles.mjs +1 -0
- package/es/tabs/src/TabPane.d.ts +1 -0
- package/es/themes/dark.mjs +2 -1
- package/es/themes/light.mjs +2 -0
- package/es/time-picker/src/TimePicker.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +21 -17
- package/es/tree/src/Tree.mjs +4 -4
- package/es/tree/src/styles/index.cssr.mjs +0 -1
- package/es/tree-select/src/TreeSelect.d.ts +14 -1
- package/es/tree-select/src/TreeSelect.mjs +1 -0
- package/es/typography/src/text.d.ts +1 -1
- package/es/upload/index.d.ts +1 -0
- package/es/upload/index.mjs +1 -0
- package/es/upload/src/Upload.d.ts +11 -8
- package/es/upload/src/Upload.mjs +2 -0
- package/es/upload/src/UploadFile.mjs +8 -1
- package/es/upload/src/interface.d.ts +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/watermark/src/Watermark.d.ts +1 -1
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -1
- package/lib/_internal/selection/src/Selection.d.ts +1 -1
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_utils/dom/download.d.ts +1 -0
- package/lib/_utils/dom/download.js +4 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/naive/index.d.ts +1 -0
- package/lib/_utils/naive/index.js +3 -1
- package/lib/_utils/naive/value.d.ts +1 -0
- package/lib/_utils/naive/value.js +18 -0
- package/lib/anchor/index.d.ts +1 -0
- package/lib/anchor/src/Link.d.ts +3 -2
- package/lib/anchor/src/Link.js +4 -1
- package/lib/anchor/src/public-types.d.ts +5 -0
- package/lib/anchor/src/public-types.js +2 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +6 -6
- package/lib/data-table/src/DataTable.js +6 -6
- package/lib/data-table/src/styles/index.cssr.js +1 -0
- package/lib/date-picker/src/DatePicker.d.ts +5 -5
- package/lib/date-picker/src/DatePicker.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +2 -2
- package/lib/date-picker/src/panel/daterange.d.ts +3 -3
- package/lib/date-picker/src/panel/datetime.d.ts +2 -2
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +3 -3
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +2 -2
- package/lib/date-picker/src/panel/monthrange.d.ts +3 -3
- package/lib/date-picker/src/panel/panelHeader.d.ts +4 -4
- package/lib/date-picker/src/panel/use-calendar.d.ts +1 -1
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.js +3 -3
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -1
- package/lib/date-picker/src/panel/use-panel-common.js +1 -1
- package/lib/date-picker/src/props.d.ts +2 -2
- package/lib/date-picker/src/props.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +1 -1
- package/lib/form/index.d.ts +1 -0
- package/lib/form/src/FormItem.d.ts +1 -1
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/interface.d.ts +0 -1
- package/lib/form/src/public-types.d.ts +1 -0
- package/lib/form/src/public-types.js +2 -0
- package/lib/icon/src/styles/index.cssr.js +0 -1
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input/src/Input.js +0 -7
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/input-otp/index.d.ts +3 -0
- package/lib/input-otp/index.js +9 -0
- package/lib/input-otp/src/InputOtp.d.ts +875 -0
- package/lib/input-otp/src/InputOtp.js +248 -0
- package/lib/input-otp/src/public-types.d.ts +24 -0
- package/lib/input-otp/src/public-types.js +2 -0
- package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/index.cssr.js +25 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
- package/lib/input-otp/styles/dark.d.ts +3 -0
- package/lib/input-otp/styles/dark.js +14 -0
- package/lib/input-otp/styles/index.d.ts +4 -0
- package/lib/input-otp/styles/index.js +12 -0
- package/lib/input-otp/styles/light.d.ts +81 -0
- package/lib/input-otp/styles/light.js +25 -0
- package/lib/input-otp/styles/rtl.d.ts +2 -0
- package/lib/input-otp/styles/rtl.js +11 -0
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/MultipleCircle.d.ts +1 -1
- package/lib/progress/src/Progress.d.ts +2 -2
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/styles/radio.cssr.js +3 -7
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +99 -96
- package/lib/tabs/src/TabPane.d.ts +1 -0
- package/lib/themes/dark.js +1 -0
- package/lib/themes/light.js +92 -90
- package/lib/time-picker/src/TimePicker.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +21 -17
- package/lib/tree/src/Tree.js +5 -4
- package/lib/tree/src/styles/index.cssr.js +0 -1
- package/lib/tree-select/src/TreeSelect.d.ts +14 -1
- package/lib/tree-select/src/TreeSelect.js +1 -1
- package/lib/typography/src/text.d.ts +1 -1
- package/lib/upload/index.d.ts +1 -0
- package/lib/upload/index.js +3 -1
- package/lib/upload/src/Upload.d.ts +11 -8
- package/lib/upload/src/Upload.js +2 -1
- package/lib/upload/src/UploadFile.js +7 -2
- package/lib/upload/src/interface.d.ts +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/src/Watermark.d.ts +1 -1
- package/package.json +1 -1
- package/volar.d.ts +3 -2
- package/web-types.json +139 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FormValidationStatus } from '../../form/src/
|
|
1
|
+
import type { FormValidationStatus } from '../../form/src/public-types';
|
|
2
2
|
import type { PopoverProps } from '../../popover';
|
|
3
3
|
import type { SelectBaseOption, SelectOption } from '../../select/src/interface';
|
|
4
4
|
import type { GetChildren, InternalTreeInst, Key, TreeOption, TreeOverrideNodeClickBehaviorReturn } from '../../tree/src/interface';
|
|
@@ -51,6 +51,10 @@ export declare const treeSelectProps: {
|
|
|
51
51
|
readonly type: PropType<Key[]>;
|
|
52
52
|
readonly default: () => never[];
|
|
53
53
|
};
|
|
54
|
+
readonly indent: {
|
|
55
|
+
readonly type: NumberConstructor;
|
|
56
|
+
readonly default: 24;
|
|
57
|
+
};
|
|
54
58
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
55
59
|
readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
|
|
56
60
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
|
|
@@ -691,6 +695,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
691
695
|
readonly type: PropType<Key[]>;
|
|
692
696
|
readonly default: () => never[];
|
|
693
697
|
};
|
|
698
|
+
readonly indent: {
|
|
699
|
+
readonly type: NumberConstructor;
|
|
700
|
+
readonly default: 24;
|
|
701
|
+
};
|
|
694
702
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
695
703
|
readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
|
|
696
704
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
|
|
@@ -1695,6 +1703,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1695
1703
|
readonly type: PropType<Key[]>;
|
|
1696
1704
|
readonly default: () => never[];
|
|
1697
1705
|
};
|
|
1706
|
+
readonly indent: {
|
|
1707
|
+
readonly type: NumberConstructor;
|
|
1708
|
+
readonly default: 24;
|
|
1709
|
+
};
|
|
1698
1710
|
readonly indeterminateKeys: PropType<Key[]>;
|
|
1699
1711
|
readonly renderSwitcherIcon: PropType<import("../../tree/src/interface").RenderSwitcherIcon>;
|
|
1700
1712
|
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<import("../../tree/src/Tree").OnUpdateIndeterminateKeys>>;
|
|
@@ -2309,6 +2321,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2309
2321
|
readonly defaultExpandAll: boolean;
|
|
2310
2322
|
readonly allowCheckingNotLoaded: boolean;
|
|
2311
2323
|
readonly cascade: boolean;
|
|
2324
|
+
readonly indent: number;
|
|
2312
2325
|
readonly checkStrategy: CheckStrategy;
|
|
2313
2326
|
readonly disabledField: string;
|
|
2314
2327
|
readonly leafOnly: boolean;
|
|
@@ -603,7 +603,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
603
603
|
(0, _utils_1.resolveWrappedSlot)($slots.header, (children) => {
|
|
604
604
|
return children ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__header`, "data-header": true }, children)) : null;
|
|
605
605
|
}),
|
|
606
|
-
(0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, allowCheckingNotLoaded: this.allowCheckingNotLoaded, showIrrelevantNodes: false, animated: false, pattern: this.pattern, getChildren: this.getChildren, filter: this.mergedFilter, data: options, cancelable: multiple, labelField: this.labelField, keyField: this.keyField, disabledField: this.disabledField, childrenField: this.childrenField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable, checkStrategy: this.checkStrategy, cascade: this.mergedCascade, leafOnly: this.leafOnly, multiple: this.multiple, renderLabel: this.renderLabel, renderPrefix: this.renderPrefix, renderSuffix: this.renderSuffix, renderSwitcherIcon: this.renderSwitcherIcon, nodeProps: this.nodeProps, watchProps: this.watchProps, virtualScroll: this.consistentMenuWidth && this.virtualScroll, overrideDefaultNodeClickBehavior: this.overrideDefaultNodeClickBehavior, internalTreeSelect: true, internalUnifySelectCheck: true, internalScrollable: true, internalScrollablePadding: this.menuPadding, internalFocusable: false, internalCheckboxFocusable: false, internalRenderEmpty: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__empty` }, (0, _utils_1.resolveSlot)($slots.empty, () => [
|
|
606
|
+
(0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, allowCheckingNotLoaded: this.allowCheckingNotLoaded, showIrrelevantNodes: false, animated: false, pattern: this.pattern, getChildren: this.getChildren, filter: this.mergedFilter, data: options, cancelable: multiple, labelField: this.labelField, keyField: this.keyField, disabledField: this.disabledField, childrenField: this.childrenField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, indent: this.indent, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable, checkStrategy: this.checkStrategy, cascade: this.mergedCascade, leafOnly: this.leafOnly, multiple: this.multiple, renderLabel: this.renderLabel, renderPrefix: this.renderPrefix, renderSuffix: this.renderSuffix, renderSwitcherIcon: this.renderSwitcherIcon, nodeProps: this.nodeProps, watchProps: this.watchProps, virtualScroll: this.consistentMenuWidth && this.virtualScroll, overrideDefaultNodeClickBehavior: this.overrideDefaultNodeClickBehavior, internalTreeSelect: true, internalUnifySelectCheck: true, internalScrollable: true, internalScrollablePadding: this.menuPadding, internalFocusable: false, internalCheckboxFocusable: false, internalRenderEmpty: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__empty` }, (0, _utils_1.resolveSlot)($slots.empty, () => [
|
|
607
607
|
(0, vue_1.h)(empty_1.NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty })
|
|
608
608
|
]))), onLoad: this.onLoad, onUpdateCheckedKeys: this.handleUpdateCheckedKeys, onUpdateIndeterminateKeys: this.handleUpdateIndeterminateKeys, onUpdateExpandedKeys: this.doUpdateExpandedKeys }),
|
|
609
609
|
(0, _utils_1.resolveWrappedSlot)($slots.action, (children) => {
|
|
@@ -663,8 +663,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
663
663
|
ulPadding: string;
|
|
664
664
|
}, any>>>;
|
|
665
665
|
}>> & Readonly<{}>, {
|
|
666
|
-
readonly delete: boolean;
|
|
667
666
|
readonly type: string;
|
|
667
|
+
readonly delete: boolean;
|
|
668
668
|
readonly code: boolean;
|
|
669
669
|
readonly strong: boolean;
|
|
670
670
|
readonly italic: boolean;
|
package/lib/upload/index.d.ts
CHANGED
package/lib/upload/index.js
CHANGED
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NUploadTrigger = exports.NUploadFileList = exports.NUploadDragger = exports.uploadProps = exports.NUpload = void 0;
|
|
6
|
+
exports.NUploadTrigger = exports.NUploadFileList = exports.NUploadDragger = exports.uploadProps = exports.NUpload = exports.uploadDownload = void 0;
|
|
7
|
+
var download_1 = require("../_utils/dom/download");
|
|
8
|
+
Object.defineProperty(exports, "uploadDownload", { enumerable: true, get: function () { return download_1.publicDownload; } });
|
|
7
9
|
var Upload_1 = require("./src/Upload");
|
|
8
10
|
Object.defineProperty(exports, "NUpload", { enumerable: true, get: function () { return __importDefault(Upload_1).default; } });
|
|
9
11
|
Object.defineProperty(exports, "uploadProps", { enumerable: true, get: function () { return Upload_1.uploadProps; } });
|
|
@@ -45,6 +45,7 @@ export declare const uploadProps: {
|
|
|
45
45
|
readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
|
|
46
46
|
/** currently not used */
|
|
47
47
|
readonly onDownload: PropType<UploadOnDownload>;
|
|
48
|
+
readonly customDownload: PropType<UploadOnDownload>;
|
|
48
49
|
readonly defaultUpload: {
|
|
49
50
|
readonly type: BooleanConstructor;
|
|
50
51
|
readonly default: true;
|
|
@@ -875,6 +876,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
875
876
|
readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
|
|
876
877
|
/** currently not used */
|
|
877
878
|
readonly onDownload: PropType<UploadOnDownload>;
|
|
879
|
+
readonly customDownload: PropType<UploadOnDownload>;
|
|
878
880
|
readonly defaultUpload: {
|
|
879
881
|
readonly type: BooleanConstructor;
|
|
880
882
|
readonly default: true;
|
|
@@ -1979,6 +1981,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1979
1981
|
readonly isErrorState: PropType<(xhr: XMLHttpRequest) => boolean>;
|
|
1980
1982
|
/** currently not used */
|
|
1981
1983
|
readonly onDownload: PropType<UploadOnDownload>;
|
|
1984
|
+
readonly customDownload: PropType<UploadOnDownload>;
|
|
1982
1985
|
readonly defaultUpload: {
|
|
1983
1986
|
readonly type: BooleanConstructor;
|
|
1984
1987
|
readonly default: true;
|
|
@@ -2772,19 +2775,19 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2772
2775
|
readonly disabled: boolean | undefined;
|
|
2773
2776
|
readonly multiple: boolean;
|
|
2774
2777
|
readonly showTrigger: boolean;
|
|
2775
|
-
readonly
|
|
2778
|
+
readonly directory: boolean;
|
|
2779
|
+
readonly directoryDnd: boolean;
|
|
2780
|
+
readonly showFileList: boolean;
|
|
2781
|
+
readonly withCredentials: boolean;
|
|
2782
|
+
readonly responseType: XMLHttpRequestResponseType;
|
|
2783
|
+
readonly defaultUpload: boolean;
|
|
2784
|
+
readonly defaultFileList: UploadFileInfo[];
|
|
2776
2785
|
readonly showCancelButton: boolean;
|
|
2777
2786
|
readonly showRemoveButton: boolean;
|
|
2778
2787
|
readonly showDownloadButton: boolean;
|
|
2779
2788
|
readonly showRetryButton: boolean;
|
|
2780
2789
|
readonly showPreviewButton: boolean;
|
|
2790
|
+
readonly listType: ListType;
|
|
2781
2791
|
readonly shouldUseThumbnailUrl: ShouldUseThumbnailUrl;
|
|
2782
|
-
readonly withCredentials: boolean;
|
|
2783
|
-
readonly responseType: XMLHttpRequestResponseType;
|
|
2784
|
-
readonly directory: boolean;
|
|
2785
|
-
readonly directoryDnd: boolean;
|
|
2786
|
-
readonly showFileList: boolean;
|
|
2787
|
-
readonly defaultUpload: boolean;
|
|
2788
|
-
readonly defaultFileList: UploadFileInfo[];
|
|
2789
2792
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2790
2793
|
export default _default;
|
package/lib/upload/src/Upload.js
CHANGED
|
@@ -198,7 +198,7 @@ exports.uploadProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
|
|
|
198
198
|
default: undefined
|
|
199
199
|
}, onChange: Function, onRemove: Function, onFinish: Function, onError: Function, onRetry: Function, onBeforeUpload: Function, isErrorState: Function,
|
|
200
200
|
/** currently not used */
|
|
201
|
-
onDownload: Function, defaultUpload: {
|
|
201
|
+
onDownload: Function, customDownload: Function, defaultUpload: {
|
|
202
202
|
type: Boolean,
|
|
203
203
|
default: true
|
|
204
204
|
}, fileList: Array, 'onUpdate:fileList': [Function, Array], onUpdateFileList: [Function, Array], fileListClass: String, fileListStyle: [String, Object], defaultFileList: {
|
|
@@ -468,6 +468,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
468
468
|
showRetryButtonRef: (0, vue_1.toRef)(props, 'showRetryButton'),
|
|
469
469
|
onRemoveRef: (0, vue_1.toRef)(props, 'onRemove'),
|
|
470
470
|
onDownloadRef: (0, vue_1.toRef)(props, 'onDownload'),
|
|
471
|
+
customDownloadRef: (0, vue_1.toRef)(props, 'customDownload'),
|
|
471
472
|
mergedFileListRef,
|
|
472
473
|
triggerClassRef: (0, vue_1.toRef)(props, 'triggerClass'),
|
|
473
474
|
triggerStyleRef: (0, vue_1.toRef)(props, 'triggerStyle'),
|
|
@@ -155,10 +155,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
function handleDownload(file) {
|
|
158
|
-
const { onDownloadRef: { value: onDownload } } = NUpload;
|
|
158
|
+
const { onDownloadRef: { value: onDownload }, customDownloadRef: { value: customDownload } } = NUpload;
|
|
159
159
|
void Promise.resolve(onDownload ? onDownload(Object.assign({}, file)) : true).then((res) => {
|
|
160
160
|
if (res !== false) {
|
|
161
|
-
(
|
|
161
|
+
if (customDownload) {
|
|
162
|
+
customDownload(Object.assign({}, file));
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
(0, _utils_1.download)(file.url, file.name);
|
|
166
|
+
}
|
|
162
167
|
}
|
|
163
168
|
});
|
|
164
169
|
}
|
|
@@ -31,6 +31,7 @@ export interface UploadInjection {
|
|
|
31
31
|
mergedFileListRef: Ref<UploadSettledFileInfo[]>;
|
|
32
32
|
onRemoveRef: Ref<UploadOnRemove | undefined>;
|
|
33
33
|
onDownloadRef: Ref<UploadOnDownload | undefined>;
|
|
34
|
+
customDownloadRef: Ref<UploadOnDownload | undefined>;
|
|
34
35
|
xhrMap: Map<string, XMLHttpRequest>;
|
|
35
36
|
showPreviewButtonRef: Ref<boolean>;
|
|
36
37
|
onPreviewRef: Ref<OnPreview | undefined>;
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.
|
|
1
|
+
declare const _default: "2.42.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
|
@@ -300,8 +300,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
300
300
|
readonly xGap: number;
|
|
301
301
|
readonly yGap: number;
|
|
302
302
|
readonly selectable: boolean;
|
|
303
|
-
readonly fullscreen: boolean;
|
|
304
303
|
readonly debug: boolean;
|
|
304
|
+
readonly fullscreen: boolean;
|
|
305
305
|
readonly yOffset: number;
|
|
306
306
|
readonly xOffset: number;
|
|
307
307
|
readonly imageOpacity: number;
|
package/package.json
CHANGED
package/volar.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ declare module 'vue' {
|
|
|
68
68
|
NH4: (typeof import('naive-ui'))['NH4']
|
|
69
69
|
NH5: (typeof import('naive-ui'))['NH5']
|
|
70
70
|
NH6: (typeof import('naive-ui'))['NH6']
|
|
71
|
+
NHighlight: (typeof import('naive-ui'))['NHighlight']
|
|
71
72
|
NHr: (typeof import('naive-ui'))['NHr']
|
|
72
73
|
NIcon: (typeof import('naive-ui'))['NIcon']
|
|
73
74
|
NIconWrapper: (typeof import('naive-ui'))['NIconWrapper']
|
|
@@ -78,6 +79,7 @@ declare module 'vue' {
|
|
|
78
79
|
NInputGroup: (typeof import('naive-ui'))['NInputGroup']
|
|
79
80
|
NInputGroupLabel: (typeof import('naive-ui'))['NInputGroupLabel']
|
|
80
81
|
NInputNumber: (typeof import('naive-ui'))['NInputNumber']
|
|
82
|
+
NInputOtp: (typeof import('naive-ui'))['NInputOtp']
|
|
81
83
|
NLayout: (typeof import('naive-ui'))['NLayout']
|
|
82
84
|
NLayoutContent: (typeof import('naive-ui'))['NLayoutContent']
|
|
83
85
|
NLayoutFooter: (typeof import('naive-ui'))['NLayoutFooter']
|
|
@@ -89,6 +91,7 @@ declare module 'vue' {
|
|
|
89
91
|
NListItem: (typeof import('naive-ui'))['NListItem']
|
|
90
92
|
NLoadingBarProvider: (typeof import('naive-ui'))['NLoadingBarProvider']
|
|
91
93
|
NLog: (typeof import('naive-ui'))['NLog']
|
|
94
|
+
NMarquee: (typeof import('naive-ui'))['NMarquee']
|
|
92
95
|
NMention: (typeof import('naive-ui'))['NMention']
|
|
93
96
|
NMenu: (typeof import('naive-ui'))['NMenu']
|
|
94
97
|
NMessageProvider: (typeof import('naive-ui'))['NMessageProvider']
|
|
@@ -150,8 +153,6 @@ declare module 'vue' {
|
|
|
150
153
|
NUploadTrigger: (typeof import('naive-ui'))['NUploadTrigger']
|
|
151
154
|
NVirtualList: (typeof import('naive-ui'))['NVirtualList']
|
|
152
155
|
NWatermark: (typeof import('naive-ui'))['NWatermark']
|
|
153
|
-
NHighlight: (typeof import('naive-ui'))['NHighlight']
|
|
154
|
-
NMarquee: (typeof import('naive-ui'))['NMarquee']
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
export {}
|
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "naive-ui",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.42.0",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -282,13 +282,22 @@
|
|
|
282
282
|
"source": {
|
|
283
283
|
"symbol": "NAnchorLink"
|
|
284
284
|
},
|
|
285
|
-
"slots": [
|
|
285
|
+
"slots": [
|
|
286
|
+
{
|
|
287
|
+
"name": "title",
|
|
288
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/anchor",
|
|
289
|
+
"description": "The title of the link.",
|
|
290
|
+
"description-sections": {
|
|
291
|
+
"since": "2.42.0"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
],
|
|
286
295
|
"attributes": [],
|
|
287
296
|
"props": [
|
|
288
297
|
{
|
|
289
298
|
"name": "title",
|
|
290
299
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/anchor",
|
|
291
|
-
"type": "
|
|
300
|
+
"type": "string",
|
|
292
301
|
"description": "The content of link",
|
|
293
302
|
"default": "undefined"
|
|
294
303
|
},
|
|
@@ -3889,7 +3898,7 @@
|
|
|
3889
3898
|
"type": "string"
|
|
3890
3899
|
},
|
|
3891
3900
|
{
|
|
3892
|
-
"name": "
|
|
3901
|
+
"name": "time-picker-format",
|
|
3893
3902
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/date-picker",
|
|
3894
3903
|
"type": "string"
|
|
3895
3904
|
},
|
|
@@ -8560,6 +8569,101 @@
|
|
|
8560
8569
|
]
|
|
8561
8570
|
}
|
|
8562
8571
|
},
|
|
8572
|
+
{
|
|
8573
|
+
"name": "NInputOtp",
|
|
8574
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8575
|
+
"source": {
|
|
8576
|
+
"symbol": "NInputOtp"
|
|
8577
|
+
},
|
|
8578
|
+
"slots": [],
|
|
8579
|
+
"attributes": [],
|
|
8580
|
+
"props": [
|
|
8581
|
+
{
|
|
8582
|
+
"name": "default-value",
|
|
8583
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8584
|
+
"type": "Array"
|
|
8585
|
+
},
|
|
8586
|
+
{
|
|
8587
|
+
"name": "value",
|
|
8588
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8589
|
+
"type": "Array"
|
|
8590
|
+
},
|
|
8591
|
+
{
|
|
8592
|
+
"name": "length",
|
|
8593
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8594
|
+
"type": "number"
|
|
8595
|
+
},
|
|
8596
|
+
{
|
|
8597
|
+
"name": "block",
|
|
8598
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8599
|
+
"type": "boolean"
|
|
8600
|
+
},
|
|
8601
|
+
{
|
|
8602
|
+
"name": "size",
|
|
8603
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8604
|
+
"type": "string"
|
|
8605
|
+
},
|
|
8606
|
+
{
|
|
8607
|
+
"name": "disabled",
|
|
8608
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8609
|
+
"type": "boolean"
|
|
8610
|
+
},
|
|
8611
|
+
{
|
|
8612
|
+
"name": "mask",
|
|
8613
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8614
|
+
"type": "boolean"
|
|
8615
|
+
},
|
|
8616
|
+
{
|
|
8617
|
+
"name": "readonly",
|
|
8618
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8619
|
+
"type": "boolean"
|
|
8620
|
+
},
|
|
8621
|
+
{
|
|
8622
|
+
"name": "status",
|
|
8623
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8624
|
+
"type": "string"
|
|
8625
|
+
},
|
|
8626
|
+
{
|
|
8627
|
+
"name": "gap",
|
|
8628
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8629
|
+
"type": "string | number"
|
|
8630
|
+
},
|
|
8631
|
+
{
|
|
8632
|
+
"name": "placeholder",
|
|
8633
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8634
|
+
"type": "string"
|
|
8635
|
+
},
|
|
8636
|
+
{
|
|
8637
|
+
"name": "allow-input",
|
|
8638
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp",
|
|
8639
|
+
"type": "Function"
|
|
8640
|
+
}
|
|
8641
|
+
],
|
|
8642
|
+
"js": {
|
|
8643
|
+
"events": [
|
|
8644
|
+
{
|
|
8645
|
+
"name": "blur",
|
|
8646
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
|
|
8647
|
+
},
|
|
8648
|
+
{
|
|
8649
|
+
"name": "focus",
|
|
8650
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
|
|
8651
|
+
},
|
|
8652
|
+
{
|
|
8653
|
+
"name": "update-value",
|
|
8654
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
|
|
8655
|
+
},
|
|
8656
|
+
{
|
|
8657
|
+
"name": "update-value",
|
|
8658
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
|
|
8659
|
+
},
|
|
8660
|
+
{
|
|
8661
|
+
"name": "finish",
|
|
8662
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/input-otp"
|
|
8663
|
+
}
|
|
8664
|
+
]
|
|
8665
|
+
}
|
|
8666
|
+
},
|
|
8563
8667
|
{
|
|
8564
8668
|
"name": "NLayout",
|
|
8565
8669
|
"description": "<!--single-column-->\n\nLayout is for layout.\n\nThe component is a bit complicated to use. But like a manual gear car, it worths a shot.\n\nIf you are use version before v2.3.0, you may want to know about <n-a href=\"#Changes-After-v2.3.0\">Changes After v2.3.0</n-a>.",
|
|
@@ -13311,7 +13415,7 @@
|
|
|
13311
13415
|
},
|
|
13312
13416
|
{
|
|
13313
13417
|
"name": "NSpace",
|
|
13314
|
-
"description": "A great invention (which is not invented by me).\n\nIf you don't have
|
|
13418
|
+
"description": "A great invention (which is not invented by me).\n\nIf you don't have compatibility issues for `gap` CSS property, it's suggested to use [Flex](flex).",
|
|
13315
13419
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/space",
|
|
13316
13420
|
"source": {
|
|
13317
13421
|
"symbol": "NSpace"
|
|
@@ -16022,11 +16126,6 @@
|
|
|
16022
16126
|
"description": "See [Scrollbar props](scrollbar#Scrollbar-Props)",
|
|
16023
16127
|
"default": "undefined"
|
|
16024
16128
|
},
|
|
16025
|
-
{
|
|
16026
|
-
"name": "indent",
|
|
16027
|
-
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
|
|
16028
|
-
"type": "number"
|
|
16029
|
-
},
|
|
16030
16129
|
{
|
|
16031
16130
|
"name": "allow-drop",
|
|
16032
16131
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
|
|
@@ -16188,6 +16287,16 @@
|
|
|
16188
16287
|
"description": "Expanded items by default.",
|
|
16189
16288
|
"default": "[]"
|
|
16190
16289
|
},
|
|
16290
|
+
{
|
|
16291
|
+
"name": "indent",
|
|
16292
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
|
|
16293
|
+
"type": "number",
|
|
16294
|
+
"description": "Indent of per level of the tree.",
|
|
16295
|
+
"default": "24",
|
|
16296
|
+
"description-sections": {
|
|
16297
|
+
"since": "2.9.0"
|
|
16298
|
+
}
|
|
16299
|
+
},
|
|
16191
16300
|
{
|
|
16192
16301
|
"name": "indeterminate-keys",
|
|
16193
16302
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree",
|
|
@@ -16673,6 +16782,16 @@
|
|
|
16673
16782
|
"description": "Expand specific keys by default.",
|
|
16674
16783
|
"default": "[]"
|
|
16675
16784
|
},
|
|
16785
|
+
{
|
|
16786
|
+
"name": "indent",
|
|
16787
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree-select",
|
|
16788
|
+
"type": "number",
|
|
16789
|
+
"description": "Indent of per level of the tree.",
|
|
16790
|
+
"default": "24",
|
|
16791
|
+
"description-sections": {
|
|
16792
|
+
"since": "2.41.1"
|
|
16793
|
+
}
|
|
16794
|
+
},
|
|
16676
16795
|
{
|
|
16677
16796
|
"name": "indeterminate-keys",
|
|
16678
16797
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/tree-select",
|
|
@@ -17392,6 +17511,16 @@
|
|
|
17392
17511
|
"since": "2.29.1"
|
|
17393
17512
|
}
|
|
17394
17513
|
},
|
|
17514
|
+
{
|
|
17515
|
+
"name": "custom-download",
|
|
17516
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/upload",
|
|
17517
|
+
"type": "(file: FileInfo) => void",
|
|
17518
|
+
"description": "Customize download request",
|
|
17519
|
+
"default": "undefined",
|
|
17520
|
+
"description-sections": {
|
|
17521
|
+
"since": "2.41.1"
|
|
17522
|
+
}
|
|
17523
|
+
},
|
|
17395
17524
|
{
|
|
17396
17525
|
"name": "default-upload",
|
|
17397
17526
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/upload",
|