@nutui/nutui 4.1.0-beta.2 → 4.1.0-beta.4
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/CHANGELOG.md +80 -0
- package/README.md +10 -42
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +16174 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +23 -5
- package/dist/packages/_es/Address.js +42 -33
- package/dist/packages/_es/AddressList.js +6 -6
- package/dist/packages/_es/Animate.js +21 -2
- package/dist/packages/_es/Audio.js +22 -5
- package/dist/packages/_es/AudioOperate.js +21 -2
- package/dist/packages/_es/Avatar.js +20 -5
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/Backtop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +3 -3
- package/dist/packages/_es/CalendarItem.js +2 -2
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +125 -78
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +12 -24
- package/dist/packages/_es/Checkbox.js +5 -5
- package/dist/packages/_es/CheckboxGroup.js +16 -31
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +19 -11
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/Countdown.js +23 -5
- package/dist/packages/_es/Countup.js +22 -5
- package/dist/packages/_es/DatePicker.js +22 -4
- package/dist/packages/_es/Dialog.js +34 -11
- package/dist/packages/_es/Divider.js +9 -19
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +24 -5
- package/dist/packages/_es/Ellipsis.js +21 -2
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +55 -25
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +2 -2
- package/dist/packages/_es/Image.js +58 -8
- package/dist/packages/_es/ImagePreview.js +47 -22
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +24 -5
- package/dist/packages/_es/Input.js +24 -6
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/{Interceptor-956b24fc.js → Interceptor-5415601e.js} +1 -1
- package/dist/packages/_es/Invoice.js +24 -6
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +22 -4
- package/dist/packages/_es/Menu.js +2 -3
- package/dist/packages/_es/MenuItem.js +45 -36
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/Noticebar.js +22 -5
- package/dist/packages/_es/Notify.js +29 -10
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Overlay.js +20 -5
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +33 -20
- package/dist/packages/_es/Popover.js +2 -2
- package/dist/packages/_es/Popup.js +2 -2
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +24 -5
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +24 -5
- package/dist/packages/_es/Rate.js +24 -5
- package/dist/packages/_es/Row.js +13 -13
- package/dist/packages/_es/Searchbar.js +34 -13
- package/dist/packages/_es/ShortPassword.js +2 -2
- package/dist/packages/_es/SideNavbar.js +22 -4
- package/dist/packages/_es/SideNavbarItem.js +1 -1
- package/dist/packages/_es/Signature.js +21 -2
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +23 -5
- package/dist/packages/_es/Step.js +22 -4
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +2 -2
- package/dist/packages/_es/SubSideNavbar.js +22 -4
- package/dist/packages/_es/Swipe.js +24 -5
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +22 -4
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Table.js +22 -4
- package/dist/packages/_es/Tabs.js +50 -16
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/Textarea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +24 -5
- package/dist/packages/_es/TimePannel.js +22 -4
- package/dist/packages/_es/TimeSelect.js +2 -2
- package/dist/packages/_es/Toast.js +32 -13
- package/dist/packages/_es/Tour.js +23 -5
- package/dist/packages/_es/TrendArrow.js +21 -2
- package/dist/packages/_es/Uploader.js +2 -2
- package/dist/packages/_es/Video.js +24 -6
- package/dist/packages/_es/Watermark.js +21 -2
- package/dist/packages/_es/{common-b9a5e726.js → common-21e9de3d.js} +1 -1
- package/dist/packages/_es/{component-81a4c1d0.js → component-8f0be7eb.js} +0 -6
- package/dist/packages/_es/{index-f933fcf6.js → index-c9b21ed1.js} +24 -6
- package/dist/packages/_es/{index-c55ad69e.js → index-dc2ebe90.js} +31 -16
- package/dist/packages/_es/{index.vue_vue_type_script_lang-442e4704.js → index.vue_vue_type_script_lang-7b265520.js} +1 -2
- package/dist/packages/_es/{index.vue_vue_type_script_lang-cc5c4086.js → index.vue_vue_type_script_lang-89366761.js} +1 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-22dfc112.js → index.vue_vue_type_script_lang-dba4283d.js} +1 -1
- package/dist/packages/_es/{mountComponent-8b24c346.js → mountComponent-f2c53efb.js} +1 -1
- package/dist/packages/cell/index.scss +1 -1
- package/dist/packages/cellgroup/index.scss +1 -0
- package/dist/packages/circleprogress/index.scss +1 -1
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/imagepreview/index.scss +0 -5
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/packages/menuitem/index.scss +7 -10
- package/dist/packages/numberkeyboard/index.scss +5 -3
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/textarea/index.scss +1 -1
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +42 -159
- package/dist/style.css +1 -1
- package/dist/styles/mixins/make-animation.scss +1 -5
- package/dist/styles/themes/default.scss +158 -55
- package/dist/styles/themes/jdb.scss +158 -55
- package/dist/styles/themes/jddkh.scss +158 -55
- package/dist/styles/themes/jdt.scss +158 -55
- package/dist/styles/variables-jdb.scss +1 -0
- package/dist/styles/variables-jddkh.scss +1 -0
- package/dist/styles/variables-jdt.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +2 -2
- package/dist/types/__VUE/address/index.vue.d.ts +2 -2
- package/dist/types/__VUE/addresslist/index.vue.d.ts +3 -3
- package/dist/types/__VUE/animate/index.vue.d.ts +1 -1
- package/dist/types/__VUE/audio/index.vue.d.ts +2 -2
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/avatar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/badge/index.vue.d.ts +3 -3
- package/dist/types/__VUE/barrage/index.vue.d.ts +1 -1
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/type.d.ts +1 -0
- package/dist/types/__VUE/calendar/index.vue.d.ts +5 -5
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +4 -4
- package/dist/types/__VUE/card/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/category/index.vue.d.ts +1 -1
- package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cellgroup/index.vue.d.ts +2 -6
- package/dist/types/__VUE/checkbox/index.vue.d.ts +1 -1
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/col/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapse/index.vue.d.ts +3 -3
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +113 -6
- package/dist/types/__VUE/comment/index.vue.d.ts +5 -5
- package/dist/types/__VUE/configprovider/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countdown/index.vue.d.ts +3 -3
- package/dist/types/__VUE/countup/index.vue.d.ts +5 -5
- package/dist/types/__VUE/datepicker/index.vue.d.ts +4 -4
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +3 -2
- package/dist/types/__VUE/divider/index.vue.d.ts +12 -8
- package/dist/types/__VUE/divider/types.d.ts +2 -0
- package/dist/types/__VUE/drag/index.vue.d.ts +1 -1
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/elevator/index.vue.d.ts +1 -1
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +2 -2
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -1
- package/dist/types/__VUE/form/index.vue.d.ts +1 -1
- package/dist/types/__VUE/formitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/types.d.ts +1 -1
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/icon/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +15 -4
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +5 -5
- package/dist/types/__VUE/indicator/index.vue.d.ts +2 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +2 -2
- package/dist/types/__VUE/input/index.vue.d.ts +4 -4
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +4 -4
- package/dist/types/__VUE/invoice/index.vue.d.ts +1 -1
- package/dist/types/__VUE/layout/index.vue.d.ts +1 -1
- package/dist/types/__VUE/list/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +2 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +10 -18
- package/dist/types/__VUE/navbar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -5
- package/dist/types/__VUE/notify/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/overlay/index.vue.d.ts +1 -1
- package/dist/types/__VUE/pagination/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/common.d.ts +4 -405
- package/dist/types/__VUE/picker/index.vue.d.ts +6 -106
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/popover/index.vue.d.ts +1 -1
- package/dist/types/__VUE/popup/common.d.ts +2 -2
- package/dist/types/__VUE/popup/index.vue.d.ts +3 -3
- package/dist/types/__VUE/price/index.vue.d.ts +1 -1
- package/dist/types/__VUE/progress/index.vue.d.ts +1 -1
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +2 -2
- package/dist/types/__VUE/radio/index.vue.d.ts +1 -1
- package/dist/types/__VUE/radiogroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +5 -5
- package/dist/types/__VUE/rate/index.vue.d.ts +114 -7
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +125 -9
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/signature/index.vue.d.ts +1 -1
- package/dist/types/__VUE/skeleton/index.vue.d.ts +3 -3
- package/dist/types/__VUE/sku/index.vue.d.ts +4 -4
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sticky/index.vue.d.ts +1 -1
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swipe/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +3 -3
- package/dist/types/__VUE/table/common.d.ts +56 -3
- package/dist/types/__VUE/table/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/renderColumn.d.ts +1 -1
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabs/index.vue.d.ts +15 -3
- package/dist/types/__VUE/tag/index.vue.d.ts +1 -1
- package/dist/types/__VUE/textarea/index.vue.d.ts +4 -4
- package/dist/types/__VUE/timedetail/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timepannel/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tour/index.vue.d.ts +2 -2
- package/dist/types/__VUE/trendarrow/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/create/component.d.ts +0 -1
- package/dist/types/utils/unit.d.ts +2 -0
- package/package.json +4 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +0 -60
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +0 -23
- package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +0 -77
- package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +0 -42
- package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +0 -36
- package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +0 -59
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -117
- package/dist/types/__VUE/picker/Column.vue.d.ts +0 -114
- package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +0 -17
- package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +0 -60
- package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +0 -25
- package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +0 -56
|
@@ -1,12 +1,62 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __restKey = (key) => typeof key === "symbol" ? key : key + "";
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
3
33
|
var __publicField = (obj, key, value) => {
|
|
4
34
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
35
|
return value;
|
|
6
36
|
};
|
|
37
|
+
var __async = (__this, __arguments, generator) => {
|
|
38
|
+
return new Promise((resolve, reject) => {
|
|
39
|
+
var fulfilled = (value) => {
|
|
40
|
+
try {
|
|
41
|
+
step(generator.next(value));
|
|
42
|
+
} catch (e) {
|
|
43
|
+
reject(e);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var rejected = (value) => {
|
|
47
|
+
try {
|
|
48
|
+
step(generator.throw(value));
|
|
49
|
+
} catch (e) {
|
|
50
|
+
reject(e);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
54
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
7
57
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
8
|
-
import { P as Popup, p as popupProps } from "./index-
|
|
9
|
-
import { c as createComponent } from "./component-
|
|
58
|
+
import { P as Popup, p as popupProps } from "./index-dc2ebe90.js";
|
|
59
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
10
60
|
import { Loading, Checklist } from "@nutui/icons-vue";
|
|
11
61
|
import Tabs from "./Tabs.js";
|
|
12
62
|
import TabPane from "./TabPane.js";
|
|
@@ -16,20 +66,20 @@ import "../locale/lang";
|
|
|
16
66
|
import "./pxCheck-c6b9f6b7.js";
|
|
17
67
|
import "./index-29892cda.js";
|
|
18
68
|
import "./raf-729dad54.js";
|
|
19
|
-
import "./index.vue_vue_type_script_lang-
|
|
69
|
+
import "./index.vue_vue_type_script_lang-89366761.js";
|
|
20
70
|
import "./index-7a7385e4.js";
|
|
21
71
|
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
22
72
|
const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
|
|
23
|
-
const { [valueKey]: value, [textKey]: text, [childrenKey]: children,
|
|
24
|
-
const newNode = {
|
|
25
|
-
loading: false
|
|
26
|
-
|
|
73
|
+
const _a = node, { [valueKey]: value, [textKey]: text, [childrenKey]: children } = _a, others = __objRest(_a, [__restKey(valueKey), __restKey(textKey), __restKey(childrenKey)]);
|
|
74
|
+
const newNode = __spreadProps(__spreadValues({
|
|
75
|
+
loading: false
|
|
76
|
+
}, others), {
|
|
27
77
|
level: parent ? (parent && parent.level || 0) + 1 : 0,
|
|
28
78
|
value,
|
|
29
79
|
text,
|
|
30
80
|
children,
|
|
31
81
|
_parent: parent
|
|
32
|
-
};
|
|
82
|
+
});
|
|
33
83
|
if (newNode.children && newNode.children.length) {
|
|
34
84
|
newNode.children = formatTree(newNode.children, newNode, config);
|
|
35
85
|
}
|
|
@@ -54,15 +104,12 @@ const defaultConvertConfig = {
|
|
|
54
104
|
sortKey: ""
|
|
55
105
|
};
|
|
56
106
|
const convertListToOptions = (list, options) => {
|
|
57
|
-
const mergedOptions = {
|
|
58
|
-
...defaultConvertConfig,
|
|
59
|
-
...options || {}
|
|
60
|
-
};
|
|
107
|
+
const mergedOptions = __spreadValues(__spreadValues({}, defaultConvertConfig), options || {});
|
|
61
108
|
const { topId, idKey, pidKey, sortKey } = mergedOptions;
|
|
62
109
|
let result = [];
|
|
63
110
|
let map = {};
|
|
64
111
|
list.forEach((node) => {
|
|
65
|
-
node = {
|
|
112
|
+
node = __spreadValues({}, node);
|
|
66
113
|
const { [idKey]: id, [pidKey]: pid } = node;
|
|
67
114
|
const children = map[pid] = map[pid] || [];
|
|
68
115
|
if (!result.length && pid === topId) {
|
|
@@ -85,12 +132,11 @@ class Tree {
|
|
|
85
132
|
constructor(nodes, config) {
|
|
86
133
|
__publicField(this, "nodes");
|
|
87
134
|
__publicField(this, "config");
|
|
88
|
-
this.config = {
|
|
135
|
+
this.config = __spreadValues({
|
|
89
136
|
value: "value",
|
|
90
137
|
text: "text",
|
|
91
|
-
children: "children"
|
|
92
|
-
|
|
93
|
-
};
|
|
138
|
+
children: "children"
|
|
139
|
+
}, config || {});
|
|
94
140
|
this.nodes = formatTree(nodes, null, this.config);
|
|
95
141
|
}
|
|
96
142
|
updateChildren(nodes, parent) {
|
|
@@ -190,7 +236,7 @@ const _sfc_main$1 = create$1({
|
|
|
190
236
|
const isLazy = computed(() => configs.value.lazy && Boolean(configs.value.lazyLoad));
|
|
191
237
|
const lazyLoadMap = /* @__PURE__ */ new Map();
|
|
192
238
|
let currentProcessNode;
|
|
193
|
-
const init =
|
|
239
|
+
const init = () => __async(this, null, function* () {
|
|
194
240
|
lazyLoadMap.clear();
|
|
195
241
|
panes.value = [];
|
|
196
242
|
tabsCursor.value = 0;
|
|
@@ -206,7 +252,7 @@ const _sfc_main$1 = create$1({
|
|
|
206
252
|
children: configs.value.childrenKey
|
|
207
253
|
});
|
|
208
254
|
if (isLazy.value && !tree.value.nodes.length) {
|
|
209
|
-
|
|
255
|
+
yield invokeLazyLoad({
|
|
210
256
|
root: true,
|
|
211
257
|
loading: true,
|
|
212
258
|
text: "",
|
|
@@ -215,8 +261,8 @@ const _sfc_main$1 = create$1({
|
|
|
215
261
|
}
|
|
216
262
|
panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
|
|
217
263
|
syncValue();
|
|
218
|
-
};
|
|
219
|
-
const syncValue =
|
|
264
|
+
});
|
|
265
|
+
const syncValue = () => __async(this, null, function* () {
|
|
220
266
|
const currentValue = innerValue.value;
|
|
221
267
|
if (currentValue === void 0 || !tree.value.nodes.length) {
|
|
222
268
|
return;
|
|
@@ -233,17 +279,17 @@ const _sfc_main$1 = create$1({
|
|
|
233
279
|
if (parent) {
|
|
234
280
|
needToSync = [parent.value];
|
|
235
281
|
initLoading.value = true;
|
|
236
|
-
const last =
|
|
237
|
-
var
|
|
238
|
-
const parent2 =
|
|
239
|
-
|
|
240
|
-
const node = (
|
|
282
|
+
const last = yield currentValue.slice(1).reduce((p, value) => __async(this, null, function* () {
|
|
283
|
+
var _a2;
|
|
284
|
+
const parent2 = yield p;
|
|
285
|
+
yield invokeLazyLoad(parent2);
|
|
286
|
+
const node = (_a2 = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a2.find((item) => item.value === value);
|
|
241
287
|
if (node) {
|
|
242
288
|
needToSync.push(value);
|
|
243
289
|
}
|
|
244
290
|
return Promise.resolve(node);
|
|
245
|
-
}, Promise.resolve(parent));
|
|
246
|
-
|
|
291
|
+
}), Promise.resolve(parent));
|
|
292
|
+
yield invokeLazyLoad(last);
|
|
247
293
|
initLoading.value = false;
|
|
248
294
|
}
|
|
249
295
|
}
|
|
@@ -254,8 +300,8 @@ const _sfc_main$1 = create$1({
|
|
|
254
300
|
methods.handleNode(node, true);
|
|
255
301
|
});
|
|
256
302
|
}
|
|
257
|
-
};
|
|
258
|
-
const invokeLazyLoad =
|
|
303
|
+
});
|
|
304
|
+
const invokeLazyLoad = (node) => __async(this, null, function* () {
|
|
259
305
|
if (!node) {
|
|
260
306
|
return;
|
|
261
307
|
}
|
|
@@ -271,12 +317,12 @@ const _sfc_main$1 = create$1({
|
|
|
271
317
|
let lazyLoadPromise = lazyLoadMap.get(node);
|
|
272
318
|
if (!lazyLoadPromise) {
|
|
273
319
|
lazyLoadPromise = new Promise((resolve) => {
|
|
274
|
-
var
|
|
275
|
-
(_b = (
|
|
320
|
+
var _a2, _b;
|
|
321
|
+
(_b = (_a2 = configs.value).lazyLoad) == null ? void 0 : _b.call(_a2, node, resolve);
|
|
276
322
|
});
|
|
277
323
|
lazyLoadMap.set(node, lazyLoadPromise);
|
|
278
324
|
}
|
|
279
|
-
const nodes =
|
|
325
|
+
const nodes = yield lazyLoadPromise;
|
|
280
326
|
if (Array.isArray(nodes) && nodes.length > 0) {
|
|
281
327
|
tree.value.updateChildren(nodes, parent);
|
|
282
328
|
} else {
|
|
@@ -284,7 +330,7 @@ const _sfc_main$1 = create$1({
|
|
|
284
330
|
}
|
|
285
331
|
node.loading = false;
|
|
286
332
|
lazyLoadMap.delete(node);
|
|
287
|
-
};
|
|
333
|
+
});
|
|
288
334
|
const emitChange = (pathNodes) => {
|
|
289
335
|
const emitValue = pathNodes.map((node) => node.value);
|
|
290
336
|
innerValue.value = emitValue;
|
|
@@ -293,46 +339,48 @@ const _sfc_main$1 = create$1({
|
|
|
293
339
|
};
|
|
294
340
|
const methods = {
|
|
295
341
|
// 选中一个节点,静默模式不触发事件
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
if (tree.value.isLeaf(node, isLazy.value)) {
|
|
302
|
-
node.leaf = true;
|
|
303
|
-
panes.value[tabsCursor.value].selectedNode = node;
|
|
304
|
-
panes.value = panes.value.slice(0, node.level + 1);
|
|
305
|
-
if (!silent) {
|
|
306
|
-
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
307
|
-
emitChange(pathNodes);
|
|
308
|
-
emit("pathChange", pathNodes);
|
|
342
|
+
handleNode(node, silent) {
|
|
343
|
+
return __async(this, null, function* () {
|
|
344
|
+
const { disabled, loading } = node;
|
|
345
|
+
if (!silent && disabled || !panes.value[tabsCursor.value]) {
|
|
346
|
+
return;
|
|
309
347
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
tabsCursor.value = level;
|
|
321
|
-
if (!silent) {
|
|
322
|
-
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
323
|
-
emit("pathChange", pathNodes);
|
|
348
|
+
if (tree.value.isLeaf(node, isLazy.value)) {
|
|
349
|
+
node.leaf = true;
|
|
350
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
351
|
+
panes.value = panes.value.slice(0, node.level + 1);
|
|
352
|
+
if (!silent) {
|
|
353
|
+
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
354
|
+
emitChange(pathNodes);
|
|
355
|
+
emit("pathChange", pathNodes);
|
|
356
|
+
}
|
|
357
|
+
return;
|
|
324
358
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
359
|
+
if (tree.value.hasChildren(node, isLazy.value)) {
|
|
360
|
+
const level = node.level + 1;
|
|
361
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
362
|
+
panes.value = panes.value.slice(0, level);
|
|
363
|
+
panes.value.push({
|
|
364
|
+
nodes: node.children || [],
|
|
365
|
+
selectedNode: null
|
|
366
|
+
});
|
|
367
|
+
tabsCursor.value = level;
|
|
368
|
+
if (!silent) {
|
|
369
|
+
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
370
|
+
emit("pathChange", pathNodes);
|
|
371
|
+
}
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
currentProcessNode = node;
|
|
375
|
+
if (loading) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
yield invokeLazyLoad(node);
|
|
379
|
+
if (currentProcessNode === node) {
|
|
380
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
381
|
+
methods.handleNode(node, silent);
|
|
382
|
+
}
|
|
383
|
+
});
|
|
336
384
|
},
|
|
337
385
|
handleTabClick(tab) {
|
|
338
386
|
currentProcessNode = null;
|
|
@@ -342,8 +390,8 @@ const _sfc_main$1 = create$1({
|
|
|
342
390
|
return pane.selectedNode ? pane.selectedNode.text : translate("select");
|
|
343
391
|
},
|
|
344
392
|
isSelected(pane, node) {
|
|
345
|
-
var
|
|
346
|
-
return ((
|
|
393
|
+
var _a2;
|
|
394
|
+
return ((_a2 = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a2.value) === node.value;
|
|
347
395
|
}
|
|
348
396
|
};
|
|
349
397
|
watch(
|
|
@@ -373,7 +421,7 @@ const _sfc_main$1 = create$1({
|
|
|
373
421
|
}
|
|
374
422
|
}
|
|
375
423
|
);
|
|
376
|
-
return { panes, initLoading, tabsCursor,
|
|
424
|
+
return __spreadValues({ panes, initLoading, tabsCursor }, methods);
|
|
377
425
|
}
|
|
378
426
|
});
|
|
379
427
|
const _hoisted_1$1 = {
|
|
@@ -448,8 +496,7 @@ const _sfc_main = create({
|
|
|
448
496
|
[CascaderItem.name]: CascaderItem,
|
|
449
497
|
[Popup.name]: Popup
|
|
450
498
|
},
|
|
451
|
-
props: {
|
|
452
|
-
...popupProps,
|
|
499
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
453
500
|
modelValue: Array,
|
|
454
501
|
visible: Boolean,
|
|
455
502
|
title: String,
|
|
@@ -476,7 +523,7 @@ const _sfc_main = create({
|
|
|
476
523
|
default: true
|
|
477
524
|
},
|
|
478
525
|
convertConfig: Object
|
|
479
|
-
},
|
|
526
|
+
}),
|
|
480
527
|
emits: ["update:modelValue", "change", "pathChange", "update:visible"],
|
|
481
528
|
setup(props, { emit }) {
|
|
482
529
|
const innerValue = ref(props.modelValue);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("category");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createComponent } from "./component-
|
|
1
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
2
2
|
import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { u as useRouter } from "./index-54d03fc1.js";
|
|
4
4
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
5
5
|
import { Right } from "@nutui/icons-vue";
|
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
2
|
+
import { openBlock, createElementBlock, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const {
|
|
5
|
+
const { create } = createComponent("cell-group");
|
|
6
6
|
const _sfc_main = create({
|
|
7
7
|
props: {
|
|
8
8
|
title: { type: String, default: "" },
|
|
9
9
|
desc: { type: String, default: "" }
|
|
10
|
-
},
|
|
11
|
-
setup() {
|
|
12
|
-
const classes = computed(() => {
|
|
13
|
-
const prefixCls = componentName;
|
|
14
|
-
return {
|
|
15
|
-
[prefixCls]: true
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
return {
|
|
19
|
-
classes
|
|
20
|
-
};
|
|
21
10
|
}
|
|
22
11
|
});
|
|
23
|
-
const _hoisted_1 = {
|
|
12
|
+
const _hoisted_1 = { class: "nut-cell-group" };
|
|
13
|
+
const _hoisted_2 = {
|
|
24
14
|
key: 1,
|
|
25
15
|
class: "nut-cell-group__title"
|
|
26
16
|
};
|
|
27
|
-
const
|
|
17
|
+
const _hoisted_3 = {
|
|
28
18
|
key: 3,
|
|
29
19
|
class: "nut-cell-group__desc"
|
|
30
20
|
};
|
|
31
|
-
const
|
|
21
|
+
const _hoisted_4 = { class: "nut-cell-group__wrap" };
|
|
32
22
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33
|
-
return openBlock(), createElementBlock("view",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
38
|
-
createElementVNode("view", _hoisted_3, [
|
|
23
|
+
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
24
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
25
|
+
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
26
|
+
createElementVNode("view", _hoisted_4, [
|
|
39
27
|
renderSlot(_ctx.$slots, "default")
|
|
40
28
|
])
|
|
41
|
-
]
|
|
29
|
+
]);
|
|
42
30
|
}
|
|
43
31
|
const CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
44
32
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createComponent } from "./component-
|
|
1
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
2
2
|
import { inject, reactive, computed, watch, onMounted, getCurrentInstance, onBeforeUnmount, h } from "vue";
|
|
3
3
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
4
4
|
import { CheckNormal, Checked, CheckDisabled } from "@nutui/icons-vue";
|
|
@@ -56,7 +56,7 @@ const component = (componentName2, components) => {
|
|
|
56
56
|
});
|
|
57
57
|
const checked = computed(() => !!props.modelValue);
|
|
58
58
|
const color = computed(() => {
|
|
59
|
-
return !pDisabled.value ?
|
|
59
|
+
return !pDisabled.value ? state.partialSelect ? "nut-checkbox__icon--indeterminate" : !pValue.value ? "nut-checkbox__icon--unchecked" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
|
|
60
60
|
});
|
|
61
61
|
let updateType = "";
|
|
62
62
|
const emitChange = (value, label) => {
|
|
@@ -81,7 +81,7 @@ const component = (componentName2, components) => {
|
|
|
81
81
|
Checked: slots.checkedIcon ? slots.checkedIcon : components.Checked,
|
|
82
82
|
CheckDisabled: slots.indeterminate ? slots.indeterminate : components.CheckDisabled
|
|
83
83
|
};
|
|
84
|
-
const iconNode =
|
|
84
|
+
const iconNode = state.partialSelect ? iconNodeMap.CheckDisabled : !pValue.value ? iconNodeMap.CheckNormal : iconNodeMap.Checked;
|
|
85
85
|
const size = pxCheck(iconSize);
|
|
86
86
|
return h(iconNode, {
|
|
87
87
|
width: size,
|
|
@@ -134,10 +134,10 @@ const component = (componentName2, components) => {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
onMounted(() => {
|
|
137
|
-
hasParent.value && parent
|
|
137
|
+
hasParent.value && parent.link(getCurrentInstance());
|
|
138
138
|
});
|
|
139
139
|
onBeforeUnmount(() => {
|
|
140
|
-
hasParent.value && parent
|
|
140
|
+
hasParent.value && parent.unlink(getCurrentInstance());
|
|
141
141
|
});
|
|
142
142
|
watch(
|
|
143
143
|
() => props.indeterminate,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, provide, computed, watch, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { create, componentName } = createComponent("checkbox-group");
|
|
@@ -23,31 +23,19 @@ const _sfc_main = create({
|
|
|
23
23
|
const state = reactive({
|
|
24
24
|
children: []
|
|
25
25
|
});
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} else {
|
|
32
|
-
let key_1 = state.children.indexOf(child.proxy);
|
|
33
|
-
if (key_1 > -1) {
|
|
34
|
-
state.children.splice(key_1, 1);
|
|
35
|
-
}
|
|
36
|
-
let key_2 = props.modelValue.indexOf((_a = child.proxy) == null ? void 0 : _a.label);
|
|
37
|
-
if (key_2 > -1) {
|
|
38
|
-
const value = props.modelValue.filter((_, index) => index !== key_2);
|
|
39
|
-
emit("update:modelValue", value);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
26
|
+
const link = (child) => {
|
|
27
|
+
child.proxy && state.children.push(child.proxy);
|
|
28
|
+
};
|
|
29
|
+
const unlink = (child) => {
|
|
30
|
+
child.proxy && (state.children = state.children.filter((p) => p !== child.proxy));
|
|
43
31
|
};
|
|
44
32
|
const updateValue = (value) => {
|
|
45
33
|
emit("update:modelValue", value);
|
|
46
34
|
emit("change", value);
|
|
47
35
|
};
|
|
48
36
|
const toggleAll = (checked) => {
|
|
49
|
-
|
|
50
|
-
if (
|
|
37
|
+
const values = [];
|
|
38
|
+
if (checked) {
|
|
51
39
|
state.children.forEach((item) => {
|
|
52
40
|
if (!(item == null ? void 0 : item.disabled)) {
|
|
53
41
|
values.push(item == null ? void 0 : item.label);
|
|
@@ -57,25 +45,22 @@ const _sfc_main = create({
|
|
|
57
45
|
emit("update:modelValue", values);
|
|
58
46
|
};
|
|
59
47
|
const toggleReverse = () => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (findIndex > -1) {
|
|
64
|
-
values.splice(findIndex, 1);
|
|
48
|
+
const value = state.children.filter((item) => {
|
|
49
|
+
if (item == null ? void 0 : item.disabled) {
|
|
50
|
+
return false;
|
|
65
51
|
} else {
|
|
66
|
-
|
|
67
|
-
values.push(item == null ? void 0 : item.label);
|
|
68
|
-
}
|
|
52
|
+
return !props.modelValue.includes(item.label);
|
|
69
53
|
}
|
|
70
|
-
});
|
|
71
|
-
emit("update:modelValue",
|
|
54
|
+
}).map((item) => item.label);
|
|
55
|
+
emit("update:modelValue", value);
|
|
72
56
|
};
|
|
73
57
|
provide("parent", {
|
|
74
58
|
value: computed(() => props.modelValue),
|
|
75
59
|
disabled: computed(() => props.disabled),
|
|
76
60
|
max: computed(() => props.max),
|
|
77
61
|
updateValue,
|
|
78
|
-
|
|
62
|
+
link,
|
|
63
|
+
unlink
|
|
79
64
|
});
|
|
80
65
|
watch(
|
|
81
66
|
() => props.modelValue,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSlots, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { g as isObject, c as createComponent } from "./component-
|
|
2
|
+
import { g as isObject, c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("circle-progress");
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("col");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref, computed, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
1
|
+
import { ref, computed, watch, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { create, componentName } = createComponent("collapse");
|
|
@@ -7,7 +7,7 @@ const _sfc_main = create({
|
|
|
7
7
|
props: {
|
|
8
8
|
modelValue: {
|
|
9
9
|
type: [String, Number, Array],
|
|
10
|
-
default:
|
|
10
|
+
default: ""
|
|
11
11
|
},
|
|
12
12
|
accordion: {
|
|
13
13
|
type: Boolean,
|
|
@@ -17,30 +17,38 @@ const _sfc_main = create({
|
|
|
17
17
|
emits: ["update:modelValue", "change"],
|
|
18
18
|
setup(props, { emit }) {
|
|
19
19
|
const collapseDom = ref(null);
|
|
20
|
+
const innerValue = ref(props.modelValue || (props.accordion ? "" : []));
|
|
20
21
|
const classes = computed(() => {
|
|
21
22
|
const prefixCls = componentName;
|
|
22
23
|
return {
|
|
23
24
|
[prefixCls]: true
|
|
24
25
|
};
|
|
25
26
|
});
|
|
27
|
+
watch(
|
|
28
|
+
() => props.modelValue,
|
|
29
|
+
(val) => {
|
|
30
|
+
innerValue.value = val;
|
|
31
|
+
}
|
|
32
|
+
);
|
|
26
33
|
const changeVal = (val, name, status = true) => {
|
|
34
|
+
innerValue.value = val;
|
|
27
35
|
emit("update:modelValue", val);
|
|
28
36
|
emit("change", val, name, status);
|
|
29
37
|
};
|
|
30
38
|
const updateVal = (name) => {
|
|
31
39
|
if (props.accordion) {
|
|
32
|
-
if (
|
|
40
|
+
if (innerValue.value === name) {
|
|
33
41
|
changeVal("", name, false);
|
|
34
42
|
} else {
|
|
35
43
|
changeVal(name, name, true);
|
|
36
44
|
}
|
|
37
45
|
} else {
|
|
38
|
-
if (Array.isArray(
|
|
39
|
-
if (
|
|
40
|
-
const newValue =
|
|
46
|
+
if (Array.isArray(innerValue.value)) {
|
|
47
|
+
if (innerValue.value.includes(name)) {
|
|
48
|
+
const newValue = innerValue.value.filter((v) => v !== name);
|
|
41
49
|
changeVal(newValue, name, false);
|
|
42
50
|
} else {
|
|
43
|
-
const newValue =
|
|
51
|
+
const newValue = innerValue.value.concat([name]);
|
|
44
52
|
changeVal(newValue, name, true);
|
|
45
53
|
}
|
|
46
54
|
} else {
|
|
@@ -50,9 +58,9 @@ const _sfc_main = create({
|
|
|
50
58
|
};
|
|
51
59
|
const isExpanded = (name) => {
|
|
52
60
|
if (props.accordion) {
|
|
53
|
-
return
|
|
54
|
-
} else if (Array.isArray(
|
|
55
|
-
return
|
|
61
|
+
return innerValue.value === name;
|
|
62
|
+
} else if (Array.isArray(innerValue.value)) {
|
|
63
|
+
return innerValue.value.includes(name);
|
|
56
64
|
}
|
|
57
65
|
return false;
|
|
58
66
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, inject, reactive, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, toDisplayString, createCommentVNode, normalizeStyle, createBlock, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { DownArrow } from "@nutui/icons-vue";
|
|
3
|
-
import { c as createComponent } from "./component-
|
|
3
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
4
4
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
6
|
import "../locale/lang";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, createBlock, computed, withCtx, normalizeStyle, createTextVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
3
|
import { Right, Fabulous, Comment, MoreX } from "@nutui/icons-vue";
|
|
4
4
|
import Rate from "./Rate.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|