@nutui/nutui 3.2.6-beta.1 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +18 -4
- package/dist/nutui.es.js +4461 -4135
- package/dist/nutui.umd.js +4559 -4133
- package/dist/packages/_es/ActionSheet.js +19 -18
- package/dist/packages/_es/Address.js +85 -94
- package/dist/packages/_es/AddressList.js +12 -25
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +2 -9
- package/dist/packages/_es/AudioOperate.js +1 -5
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +108 -55
- package/dist/packages/_es/Badge.js +12 -10
- package/dist/packages/_es/Barrage.js +103 -79
- package/dist/packages/_es/Button.js +3 -5
- package/dist/packages/_es/Calendar.js +23 -36
- package/dist/packages/_es/CalendarItem.js +3 -4
- package/dist/packages/_es/Card.js +5 -15
- package/dist/packages/_es/Cascader.js +11 -12
- package/dist/packages/_es/Category.js +12 -13
- package/dist/packages/_es/CategoryPane.js +13 -17
- package/dist/packages/_es/Cell.js +12 -9
- package/dist/packages/_es/CellGroup.js +2 -4
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +82 -98
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +34 -65
- package/dist/packages/_es/CollapseItem.js +60 -93
- package/dist/packages/_es/Comment.js +19 -43
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +52 -47
- package/dist/packages/_es/DatePicker.js +54 -37
- package/dist/packages/_es/Dialog.js +88 -9
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +49 -75
- package/dist/packages/_es/Ecard.js +18 -20
- package/dist/packages/_es/Elevator.js +76 -101
- package/dist/packages/_es/Ellipsis.js +100 -140
- package/dist/packages/_es/Empty.js +4 -6
- package/dist/packages/_es/FixedNav.js +6 -11
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +1 -3
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +27 -10
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +114 -13
- package/dist/packages/_es/ImagePreview.js +411 -149
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +115 -103
- package/dist/packages/_es/Input.js +32 -56
- package/dist/packages/_es/InputNumber.js +16 -25
- package/dist/packages/_es/Invoice.js +5 -6
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +34 -47
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +29 -56
- package/dist/packages/_es/Navbar.js +39 -49
- package/dist/packages/_es/NoticeBar.js +45 -54
- package/dist/packages/_es/Notify.js +162 -44
- package/dist/packages/_es/NumberKeyboard.js +20 -15
- package/dist/packages/_es/OldPicker.js +116 -130
- package/dist/packages/_es/OverLay.js +28 -5
- package/dist/packages/_es/Pagination.js +5 -8
- package/dist/packages/_es/Picker.js +74 -198
- package/dist/packages/_es/Popover.js +881 -201
- package/dist/packages/_es/Popup.js +84 -28
- package/dist/packages/_es/Price.js +6 -22
- package/dist/packages/_es/Progress.js +11 -18
- package/dist/packages/_es/PullRefresh.js +2 -4
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +34 -48
- package/dist/packages/_es/Rate.js +14 -15
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +36 -39
- package/dist/packages/_es/ShortPassword.js +66 -97
- package/dist/packages/_es/SideNavBar.js +18 -7
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +80 -113
- package/dist/packages/_es/Skeleton.js +11 -12
- package/dist/packages/_es/Sku.js +38 -63
- package/dist/packages/_es/Step.js +2 -7
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +23 -33
- package/dist/packages/_es/SubSideNavBar.js +2 -4
- package/dist/packages/_es/Swipe.js +26 -41
- package/dist/packages/_es/Swiper.js +21 -38
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +13 -15
- package/dist/packages/_es/TabbarItem.js +30 -24
- package/dist/packages/_es/Table.js +17 -22
- package/dist/packages/_es/Tabs.js +16 -49
- package/dist/packages/_es/Tag.js +5 -6
- package/dist/packages/_es/TextArea.js +49 -114
- package/dist/packages/_es/TimeDetail.js +3 -4
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +10 -12
- package/dist/packages/_es/Toast.js +164 -53
- package/dist/packages/_es/TrendArrow.js +4 -6
- package/dist/packages/_es/Uploader.js +140 -141
- package/dist/packages/_es/Video.js +18 -39
- package/dist/packages/_es/WaterMark.js +14 -22
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +6 -44
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +7 -64
- package/dist/packages/_es/index4.js +62 -424
- package/dist/packages/_es/{index.taro.js → index5.js} +154 -167
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +3 -21
- package/dist/packages/checkbox/index.scss +1 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menuitem/index.scss +12 -3
- package/dist/smartips/attributes.json +5 -1
- package/dist/smartips/tags.json +1 -0
- package/dist/smartips/web-types.json +11 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jddkh.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/types/__VUE/actionsheet/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
- package/dist/types/__VUE/address/{index.taro.vue.d.ts → index.vue.d.ts} +32 -72
- package/dist/types/__VUE/addresslist/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.taro.vue.d.ts → index.vue.d.ts} +6 -6
- package/dist/types/__VUE/avatargroup/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/backtop/{index.taro.vue.d.ts → index.vue.d.ts} +37 -15
- package/dist/types/__VUE/badge/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/barrage/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/{index.taro.vue.d.ts → index.vue.d.ts} +1 -13
- package/dist/types/__VUE/calendaritem/{index.taro.vue.d.ts → index.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/category/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.taro.vue.d.ts → index.vue.d.ts} +6 -13
- package/dist/types/__VUE/checkbox/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.taro.vue.d.ts → index.vue.d.ts} +15 -14
- package/dist/types/__VUE/collapse/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.taro.vue.d.ts → index.vue.d.ts} +10 -2
- package/dist/types/__VUE/comment/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
- package/dist/types/__VUE/configprovider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.taro.vue.d.ts → index.vue.d.ts} +7 -5
- package/dist/types/__VUE/datepicker/{index.taro.vue.d.ts → index.vue.d.ts} +5 -5
- package/dist/types/__VUE/dialog/index.d.ts +48 -0
- package/dist/types/__VUE/dialog/{index.taro.vue.d.ts → index.vue.d.ts} +12 -9
- package/dist/types/__VUE/divider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/drag/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/ecard/{index.taro.vue.d.ts → index.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.taro.vue.d.ts → index.vue.d.ts} +2 -11
- package/dist/types/__VUE/ellipsis/{index.taro.vue.d.ts → index.vue.d.ts} +0 -4
- package/dist/types/__VUE/empty/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/form/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.taro.vue.d.ts → index.vue.d.ts} +27 -2
- package/dist/types/__VUE/image/index.vue.d.ts +117 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +109 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +25 -0
- package/dist/types/__VUE/imagepreview/{index.taro.vue.d.ts → index.vue.d.ts} +44 -33
- package/dist/types/__VUE/indicator/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.taro.vue.d.ts → index.vue.d.ts} +8 -15
- package/dist/types/__VUE/input/{index.taro.vue.d.ts → index.vue.d.ts} +16 -34
- package/dist/types/__VUE/inputnumber/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
- package/dist/types/__VUE/menuitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
- package/dist/types/__VUE/noticebar/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
- package/dist/types/__VUE/notify/index.d.ts +26 -0
- package/dist/types/__VUE/notify/{index.taro.vue.d.ts → index.vue.d.ts} +18 -5
- package/dist/types/__VUE/numberkeyboard/{index.taro.vue.d.ts → index.vue.d.ts} +29 -5
- package/dist/types/__VUE/oldpicker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +17 -28
- package/dist/types/__VUE/oldpicker/{index.taro.vue.d.ts → index.vue.d.ts} +44 -64
- package/dist/types/__VUE/pagination/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +4 -16
- package/dist/types/__VUE/picker/{index.taro.vue.d.ts → index.vue.d.ts} +28 -53
- package/dist/types/__VUE/popover/{index.taro.vue.d.ts → index.vue.d.ts} +12 -14
- package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/price/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
- package/dist/types/__VUE/progress/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.taro.vue.d.ts → index.vue.d.ts} +6 -7
- package/dist/types/__VUE/rate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.taro.vue.d.ts → index.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.taro.vue.d.ts → index.vue.d.ts} +21 -6
- package/dist/types/__VUE/sidenavbar/{index.taro.vue.d.ts → index.vue.d.ts} +5 -0
- package/dist/types/__VUE/signature/{index.taro.vue.d.ts → index.vue.d.ts} +5 -8
- package/dist/types/__VUE/skeleton/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/index.vue.d.ts +310 -0
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/swiper/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/swiperitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
- package/dist/types/__VUE/tabbaritem/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
- package/dist/types/__VUE/table/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
- package/dist/types/__VUE/tag/type.d.ts +5 -0
- package/dist/types/__VUE/textarea/{index.taro.vue.d.ts → index.vue.d.ts} +3 -5
- package/dist/types/__VUE/timedetail/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.taro.vue.d.ts → index.vue.d.ts} +8 -7
- package/dist/types/__VUE/toast/index.d.ts +16 -0
- package/dist/types/__VUE/toast/{index.taro.vue.d.ts → index.vue.d.ts} +22 -44
- package/dist/types/__VUE/trendarrow/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.taro.vue.d.ts → index.vue.d.ts} +11 -20
- package/dist/types/__VUE/watermark/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +3 -2
- package/dist/packages/_es/use-lock-scroll.js +0 -23
- package/dist/types/__VUE/button/index.taro.vue.d.ts +0 -116
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +0 -74
- package/dist/types/__VUE/image/index.taro.vue.d.ts +0 -33
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +0 -85
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +0 -1728
- package/dist/types/__VUE/sku/index.taro.vue.d.ts +0 -182
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString,
|
|
7
|
+
import { openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const { componentName, create } = createComponent("categorypane");
|
|
@@ -60,14 +60,14 @@ const _hoisted_13 = {
|
|
|
60
60
|
key: 2,
|
|
61
61
|
class: "nut-categorypane__selfItemList"
|
|
62
62
|
};
|
|
63
|
+
const _hoisted_14 = ["onClick"];
|
|
63
64
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
64
65
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
65
66
|
_ctx.type == "classify" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
66
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item,
|
|
67
|
-
return openBlock(), createElementBlock("div", { key:
|
|
67
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
|
|
68
|
+
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
68
69
|
createElementVNode("div", _hoisted_3, toDisplayString(item == null ? void 0 : item.catName), 1),
|
|
69
|
-
|
|
70
|
-
item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
70
|
+
(item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
71
71
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
|
|
72
72
|
return openBlock(), createElementBlock("div", {
|
|
73
73
|
class: "nut-categorypane__childItem",
|
|
@@ -78,7 +78,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
78
|
class: "nut-categorypane__childImg",
|
|
79
79
|
src: sku.backImg
|
|
80
80
|
}, null, 8, _hoisted_6),
|
|
81
|
-
createTextVNode(),
|
|
82
81
|
createElementVNode("div", _hoisted_7, toDisplayString(sku == null ? void 0 : sku.catName), 1)
|
|
83
82
|
], 8, _hoisted_5);
|
|
84
83
|
}), 128))
|
|
@@ -86,13 +85,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
86
85
|
]);
|
|
87
86
|
}), 128))
|
|
88
87
|
])) : createCommentVNode("", true),
|
|
89
|
-
createTextVNode(),
|
|
90
88
|
_ctx.type == "text" ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
91
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item,
|
|
92
|
-
return openBlock(), createElementBlock("div", { key:
|
|
89
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.categoryChild, (item, index2) => {
|
|
90
|
+
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
93
91
|
createElementVNode("div", _hoisted_9, toDisplayString(item == null ? void 0 : item.catName), 1),
|
|
94
|
-
|
|
95
|
-
item.catType == 1 ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
92
|
+
(item == null ? void 0 : item.catType) == 1 ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
96
93
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childCateList, (sku, key) => {
|
|
97
94
|
return openBlock(), createElementBlock("div", {
|
|
98
95
|
class: "nut-categorypane__childItem",
|
|
@@ -106,17 +103,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
106
103
|
]);
|
|
107
104
|
}), 128))
|
|
108
105
|
])) : createCommentVNode("", true),
|
|
109
|
-
createTextVNode(),
|
|
110
106
|
_ctx.type == "custom" ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
111
107
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.customCategory, (sku, key) => {
|
|
112
108
|
return openBlock(), createElementBlock("div", {
|
|
113
109
|
class: "nut-categorypane__skuName",
|
|
114
110
|
key,
|
|
115
|
-
onClick:
|
|
116
|
-
}, toDisplayString(sku == null ? void 0 : sku.catName),
|
|
111
|
+
onClick: ($event) => _ctx.onChange(sku)
|
|
112
|
+
}, toDisplayString(sku == null ? void 0 : sku.catName), 9, _hoisted_14);
|
|
117
113
|
}), 128))
|
|
118
114
|
])) : createCommentVNode("", true)
|
|
119
115
|
]);
|
|
120
116
|
}
|
|
121
|
-
var
|
|
122
|
-
export {
|
|
117
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
118
|
+
export { index as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, mergeProps, createCommentVNode,
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, mergeProps, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, computed } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { u as useRouter } from "./index.js";
|
|
8
9
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
11
|
import "../locale/lang";
|
|
@@ -34,25 +35,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34
35
|
}), null, 16, ["name"])) : createCommentVNode("", true)
|
|
35
36
|
])
|
|
36
37
|
])) : createCommentVNode("", true),
|
|
37
|
-
createTextVNode(),
|
|
38
38
|
_ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
39
39
|
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
40
40
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
41
41
|
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
|
|
42
42
|
]),
|
|
43
|
-
createTextVNode(),
|
|
44
43
|
createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
|
|
45
44
|
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
|
46
45
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
47
46
|
])
|
|
48
47
|
])) : createCommentVNode("", true),
|
|
49
|
-
createTextVNode(),
|
|
50
48
|
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
51
49
|
key: 2,
|
|
52
50
|
class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
|
|
53
51
|
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
54
52
|
}, toDisplayString(_ctx.desc), 7)) : createCommentVNode("", true),
|
|
55
|
-
createTextVNode(),
|
|
56
53
|
renderSlot(_ctx.$slots, "link", {}, () => [
|
|
57
54
|
_ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, mergeProps({
|
|
58
55
|
key: 0,
|
|
@@ -70,7 +67,7 @@ const _sfc_main = create({
|
|
|
70
67
|
desc: { type: String, default: "" },
|
|
71
68
|
descTextAlign: { type: String, default: "right" },
|
|
72
69
|
isLink: { type: Boolean, default: false },
|
|
73
|
-
to:
|
|
70
|
+
to: [String, Object],
|
|
74
71
|
replace: { type: Boolean, default: false },
|
|
75
72
|
roundRadius: { type: [String, Number], default: "" },
|
|
76
73
|
url: { type: String, default: "" },
|
|
@@ -90,6 +87,7 @@ const _sfc_main = create({
|
|
|
90
87
|
[`${prefixCls}--large`]: props.size == "large"
|
|
91
88
|
};
|
|
92
89
|
});
|
|
90
|
+
const router = useRouter();
|
|
93
91
|
const baseStyle = computed(() => {
|
|
94
92
|
return {
|
|
95
93
|
borderRadius: pxCheck(props.roundRadius)
|
|
@@ -97,6 +95,11 @@ const _sfc_main = create({
|
|
|
97
95
|
});
|
|
98
96
|
const handleClick = (event) => {
|
|
99
97
|
emit("click", event);
|
|
98
|
+
if (props.to && router) {
|
|
99
|
+
router[props.replace ? "replace" : "push"](props.to);
|
|
100
|
+
} else if (props.url) {
|
|
101
|
+
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
102
|
+
}
|
|
100
103
|
};
|
|
101
104
|
return {
|
|
102
105
|
handleClick,
|
|
@@ -105,5 +108,5 @@ const _sfc_main = create({
|
|
|
105
108
|
};
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
|
-
var
|
|
109
|
-
export {
|
|
111
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
112
|
+
export { index as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode,
|
|
6
|
+
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -39,9 +39,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39
39
|
class: normalizeClass(_ctx.classes)
|
|
40
40
|
}, [
|
|
41
41
|
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
42
|
-
createTextVNode(),
|
|
43
42
|
_ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
|
|
44
|
-
createTextVNode(),
|
|
45
43
|
createElementVNode("view", _hoisted_3, [
|
|
46
44
|
renderSlot(_ctx.$slots, "default")
|
|
47
45
|
])
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, provide, computed, watch, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useExpose } from "./
|
|
8
|
+
import { u as useExpose } from "./index3.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const { create, componentName } = createComponent("checkboxgroup");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { useSlots, computed,
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
6
|
+
import { useSlots, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
|
7
|
+
import { a as isObject, c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const { componentName, create } = createComponent("circleprogress");
|
|
@@ -28,35 +28,49 @@ const _sfc_main = create({
|
|
|
28
28
|
},
|
|
29
29
|
color: {
|
|
30
30
|
type: [String, Object],
|
|
31
|
-
default: "
|
|
31
|
+
default: ""
|
|
32
32
|
},
|
|
33
33
|
pathColor: {
|
|
34
34
|
type: String,
|
|
35
|
-
default: "
|
|
35
|
+
default: ""
|
|
36
36
|
},
|
|
37
37
|
clockwise: {
|
|
38
38
|
type: Boolean,
|
|
39
39
|
default: true
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
setup(props, { emit }) {
|
|
42
|
+
setup(props) {
|
|
44
43
|
const slotDefault = !!useSlots().default;
|
|
44
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
45
45
|
const classes = computed(() => {
|
|
46
46
|
const prefixCls = componentName;
|
|
47
47
|
return {
|
|
48
48
|
[prefixCls]: true
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
const path = computed(() => {
|
|
52
|
+
const isWise = props.clockwise ? 1 : 0;
|
|
53
|
+
return `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
54
|
+
});
|
|
55
|
+
const hoverColor = computed(() => {
|
|
56
|
+
return isObject(props.color) ? `url(#${refRandomId})` : props.color;
|
|
57
|
+
});
|
|
58
|
+
const hoverStyle = computed(() => {
|
|
59
|
+
let perimeter = 283;
|
|
60
|
+
let offset = perimeter * Number(props.progress) / 100;
|
|
61
|
+
return {
|
|
62
|
+
stroke: isObject(props.color) ? `url(#${refRandomId})` : props.color,
|
|
63
|
+
strokeDasharray: `${offset}px ${perimeter}px`
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
const pathStyle = computed(() => {
|
|
67
|
+
return {
|
|
68
|
+
stroke: props.pathColor
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
const stop = computed(() => {
|
|
58
72
|
if (!isObject(props.color)) {
|
|
59
|
-
return
|
|
73
|
+
return;
|
|
60
74
|
}
|
|
61
75
|
let color = props.color;
|
|
62
76
|
const colorArr = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b));
|
|
@@ -71,101 +85,71 @@ const _sfc_main = create({
|
|
|
71
85
|
stopArr.push(obj);
|
|
72
86
|
});
|
|
73
87
|
return stopArr;
|
|
74
|
-
};
|
|
75
|
-
const style = computed(() => {
|
|
76
|
-
let { strokeWidth } = props;
|
|
77
|
-
let stopArr = stop();
|
|
78
|
-
let stopDom = [];
|
|
79
|
-
if (stopArr) {
|
|
80
|
-
stopArr.map((item) => {
|
|
81
|
-
let obj = "";
|
|
82
|
-
obj = `%3Cstop offset='${item.key}' stop-color='${transColor(item.value)}'/%3E`;
|
|
83
|
-
stopDom.push(obj);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
let perimeter = 283;
|
|
87
|
-
let progress = +currentRate.value;
|
|
88
|
-
let offset = perimeter * Number(format(parseFloat(progress.toFixed(1)))) / 100;
|
|
89
|
-
const isWise = props.clockwise ? 1 : 0;
|
|
90
|
-
const color = isObject(props.color) ? `url(%23${refRandomId})` : transColor(props.color);
|
|
91
|
-
let d = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
92
|
-
const pa = `%3Cdefs%3E%3ClinearGradient id='${refRandomId}' x1='100%25' y1='0%25' x2='0%25' y2='0%25'%3E${stopDom}%3C/linearGradient%3E%3C/defs%3E`;
|
|
93
|
-
const path = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
94
|
-
props.pathColor
|
|
95
|
-
)}' fill='none'/%3E`;
|
|
96
|
-
const path1 = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${color}' fill='none'/%3E`;
|
|
97
|
-
return {
|
|
98
|
-
background: `url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E${pa}${path}${path1}%3C/svg%3E")`,
|
|
99
|
-
width: "100%",
|
|
100
|
-
height: "100%"
|
|
101
|
-
};
|
|
102
88
|
});
|
|
103
|
-
const format = (progress) => Math.min(Math.max(+progress, 0), 100);
|
|
104
|
-
var lastTime = 0;
|
|
105
|
-
const requestAnimationFrame = function(callback) {
|
|
106
|
-
var currTime = new Date().getTime();
|
|
107
|
-
var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));
|
|
108
|
-
lastTime = currTime + timeToCall;
|
|
109
|
-
var id = setTimeout(function() {
|
|
110
|
-
callback(currTime + timeToCall, lastTime);
|
|
111
|
-
}, timeToCall);
|
|
112
|
-
lastTime = currTime + timeToCall;
|
|
113
|
-
return id;
|
|
114
|
-
};
|
|
115
|
-
const cancelAnimationFrame = function(id) {
|
|
116
|
-
clearTimeout(id);
|
|
117
|
-
};
|
|
118
|
-
watch(
|
|
119
|
-
() => props.progress,
|
|
120
|
-
(value, oldvalue) => {
|
|
121
|
-
let rafId;
|
|
122
|
-
const startTime = Date.now();
|
|
123
|
-
const startRate = Number(oldvalue);
|
|
124
|
-
const endRate = Number(value);
|
|
125
|
-
const duration = Math.abs((startRate - endRate) * 1e3 / 100);
|
|
126
|
-
const animate = () => {
|
|
127
|
-
const now = Date.now();
|
|
128
|
-
const progress = Math.min((now - startTime) / duration, 1);
|
|
129
|
-
const rate = progress * (endRate - startRate) + startRate;
|
|
130
|
-
currentRate.value = Math.min(Math.max(+rate, 0), 100);
|
|
131
|
-
emit("update:progress", format(parseFloat(rate.toFixed(1))));
|
|
132
|
-
if (endRate > startRate ? rate < endRate : rate > endRate) {
|
|
133
|
-
rafId = requestAnimationFrame(animate);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
if (rafId) {
|
|
137
|
-
cancelAnimationFrame(rafId);
|
|
138
|
-
}
|
|
139
|
-
rafId = requestAnimationFrame(animate);
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
89
|
return {
|
|
143
|
-
slotDefault,
|
|
144
|
-
style,
|
|
145
|
-
currentRate,
|
|
146
|
-
refRandomId,
|
|
147
90
|
classes,
|
|
148
|
-
|
|
91
|
+
hoverStyle,
|
|
92
|
+
pathStyle,
|
|
93
|
+
path,
|
|
94
|
+
hoverColor,
|
|
95
|
+
stop,
|
|
96
|
+
slotDefault,
|
|
97
|
+
refRandomId
|
|
149
98
|
};
|
|
150
99
|
}
|
|
151
100
|
});
|
|
152
|
-
const _hoisted_1 = {
|
|
153
|
-
const _hoisted_2 =
|
|
101
|
+
const _hoisted_1 = { viewBox: "0 0 100 100" };
|
|
102
|
+
const _hoisted_2 = ["id"];
|
|
103
|
+
const _hoisted_3 = ["offset", "stop-color"];
|
|
104
|
+
const _hoisted_4 = ["d", "stroke-width"];
|
|
105
|
+
const _hoisted_5 = ["d", "stroke", "stroke-linecap", "stroke-width"];
|
|
106
|
+
const _hoisted_6 = { class: "nut-circleprogress-text" };
|
|
107
|
+
const _hoisted_7 = { key: 0 };
|
|
154
108
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
155
109
|
return openBlock(), createElementBlock("div", {
|
|
156
110
|
class: normalizeClass(_ctx.classes),
|
|
157
111
|
style: normalizeStyle({ height: _ctx.radius * 2 + "px", width: _ctx.radius * 2 + "px" })
|
|
158
112
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
113
|
+
(openBlock(), createElementBlock("svg", _hoisted_1, [
|
|
114
|
+
createElementVNode("defs", null, [
|
|
115
|
+
createElementVNode("linearGradient", {
|
|
116
|
+
id: _ctx.refRandomId,
|
|
117
|
+
x1: "100%",
|
|
118
|
+
y1: "0%",
|
|
119
|
+
x2: "0%",
|
|
120
|
+
y2: "0%"
|
|
121
|
+
}, [
|
|
122
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stop, (item, index2) => {
|
|
123
|
+
return openBlock(), createElementBlock("stop", {
|
|
124
|
+
key: index2,
|
|
125
|
+
offset: item.key,
|
|
126
|
+
"stop-color": item.value
|
|
127
|
+
}, null, 8, _hoisted_3);
|
|
128
|
+
}), 128))
|
|
129
|
+
], 8, _hoisted_2)
|
|
130
|
+
]),
|
|
131
|
+
createElementVNode("path", {
|
|
132
|
+
class: "nut-circleprogress-path",
|
|
133
|
+
style: normalizeStyle(_ctx.pathStyle),
|
|
134
|
+
d: _ctx.path,
|
|
135
|
+
fill: "none",
|
|
136
|
+
"stroke-width": _ctx.strokeWidth
|
|
137
|
+
}, " > ", 12, _hoisted_4),
|
|
138
|
+
createElementVNode("path", {
|
|
139
|
+
class: "nut-circleprogress-hover",
|
|
140
|
+
style: normalizeStyle(_ctx.hoverStyle),
|
|
141
|
+
d: _ctx.path,
|
|
142
|
+
fill: "none",
|
|
143
|
+
stroke: _ctx.hoverColor,
|
|
144
|
+
"stroke-linecap": _ctx.strokeLinecap,
|
|
145
|
+
"stroke-width": _ctx.strokeWidth
|
|
146
|
+
}, null, 12, _hoisted_5)
|
|
147
|
+
])),
|
|
148
|
+
createElementVNode("div", _hoisted_6, [
|
|
164
149
|
renderSlot(_ctx.$slots, "default"),
|
|
165
|
-
|
|
166
|
-
!_ctx.slotDefault ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.progress) + "%", 1)) : createCommentVNode("", true)
|
|
150
|
+
!_ctx.slotDefault ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(_ctx.progress) + "%", 1)) : createCommentVNode("", true)
|
|
167
151
|
])
|
|
168
152
|
], 6);
|
|
169
153
|
}
|
|
170
|
-
var
|
|
171
|
-
export {
|
|
154
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
155
|
+
export { index as default };
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, onMounted, getCurrentInstance,
|
|
6
|
+
import { ref, watch, onMounted, getCurrentInstance, provide, openBlock, createElementBlock, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { nextTick } from "@tarojs/taro";
|
|
9
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
9
|
import "../locale/lang";
|
|
11
10
|
const { create } = createComponent("collapse");
|
|
@@ -53,19 +52,45 @@ const _sfc_main = create({
|
|
|
53
52
|
emits: ["update:active", "change"],
|
|
54
53
|
setup(props, { emit, slots }) {
|
|
55
54
|
const collapseDom = ref(null);
|
|
55
|
+
const collapseChldren = ref([]);
|
|
56
|
+
watch(
|
|
57
|
+
() => props.active,
|
|
58
|
+
(newval, oldval) => {
|
|
59
|
+
let doms = collapseChldren.value;
|
|
60
|
+
Array.from(doms).forEach((item) => {
|
|
61
|
+
if (typeof newval == "number" || typeof newval == "string") {
|
|
62
|
+
if (newval == item.name) {
|
|
63
|
+
item.changeOpen(true);
|
|
64
|
+
} else {
|
|
65
|
+
item.changeOpen(false);
|
|
66
|
+
}
|
|
67
|
+
} else if (Object.values(newval) instanceof Array) {
|
|
68
|
+
if (newval.indexOf(Number(item.name)) > -1 || newval.indexOf(String(item.name)) > -1) {
|
|
69
|
+
item.changeOpen(true);
|
|
70
|
+
} else {
|
|
71
|
+
item.changeOpen(false);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
item.animation();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
collapseChldren.value = getCurrentInstance().provides.collapseParent.children || [];
|
|
80
|
+
});
|
|
56
81
|
const changeVal = (val) => {
|
|
57
82
|
emit("update:active", val);
|
|
58
83
|
emit("change", val);
|
|
59
84
|
};
|
|
60
85
|
const changeValAry = (name) => {
|
|
61
86
|
const activeItem = props.active instanceof Object ? Object.values(props.active) : props.active;
|
|
62
|
-
let
|
|
87
|
+
let index2 = -1;
|
|
63
88
|
activeItem.forEach((item, idx) => {
|
|
64
89
|
if (String(item) == String(name)) {
|
|
65
|
-
|
|
90
|
+
index2 = idx;
|
|
66
91
|
}
|
|
67
92
|
});
|
|
68
|
-
|
|
93
|
+
index2 > -1 ? activeItem.splice(index2, 1) : activeItem.push(name);
|
|
69
94
|
changeVal(activeItem);
|
|
70
95
|
};
|
|
71
96
|
const isExpanded = (name) => {
|
|
@@ -74,68 +99,12 @@ const _sfc_main = create({
|
|
|
74
99
|
return typeof active === "number" || typeof active === "string" ? active == name : false;
|
|
75
100
|
}
|
|
76
101
|
};
|
|
77
|
-
const activeIndex = () => {
|
|
78
|
-
var _a;
|
|
79
|
-
const activeCollapse = props.active;
|
|
80
|
-
const childrenList = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
81
|
-
let act = [];
|
|
82
|
-
childrenList.forEach((item, index) => {
|
|
83
|
-
if (typeof activeCollapse == "number" || typeof activeCollapse == "string") {
|
|
84
|
-
if (item.props.name == activeCollapse) {
|
|
85
|
-
act.push(item.flag);
|
|
86
|
-
return act;
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
let ary = Array.from(activeCollapse);
|
|
90
|
-
if (ary.includes(String(item.props.name)) || ary.includes(Number(item.props.name))) {
|
|
91
|
-
act.push(item.flag);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
return act;
|
|
96
|
-
};
|
|
97
|
-
const childrenDom = ref(null);
|
|
98
|
-
onMounted(() => {
|
|
99
|
-
childrenDom.value = getCurrentInstance().provides.collapseParent.children;
|
|
100
|
-
});
|
|
101
|
-
watch(
|
|
102
|
-
() => props.active,
|
|
103
|
-
(newval, oldval) => {
|
|
104
|
-
nextTick(() => {
|
|
105
|
-
var _a;
|
|
106
|
-
let domsProps = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
|
|
107
|
-
let doms = childrenDom.value;
|
|
108
|
-
Array.from(doms).forEach((item, index) => {
|
|
109
|
-
if (typeof newval == "number" || typeof newval == "string") {
|
|
110
|
-
if (newval == domsProps[index].props.name) {
|
|
111
|
-
item.changeOpen(true);
|
|
112
|
-
} else {
|
|
113
|
-
item.changeOpen(false);
|
|
114
|
-
}
|
|
115
|
-
} else if (Object.values(newval) instanceof Array) {
|
|
116
|
-
if (newval.indexOf(Number(domsProps[index].props.name)) > -1 || newval.indexOf(String(domsProps[index].props.name)) > -1) {
|
|
117
|
-
item.changeOpen(true);
|
|
118
|
-
} else {
|
|
119
|
-
item.changeOpen(false);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
item.animation();
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
const getParentChildren = () => {
|
|
128
|
-
var _a;
|
|
129
|
-
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
130
|
-
};
|
|
131
102
|
provide("collapseParent", {
|
|
132
103
|
children: [],
|
|
133
104
|
props,
|
|
134
105
|
changeValAry,
|
|
135
106
|
changeVal,
|
|
136
|
-
isExpanded
|
|
137
|
-
activeIndex,
|
|
138
|
-
getParentChildren
|
|
107
|
+
isExpanded
|
|
139
108
|
});
|
|
140
109
|
return { collapseDom };
|
|
141
110
|
}
|
|
@@ -146,5 +115,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
146
115
|
renderSlot(_ctx.$slots, "default")
|
|
147
116
|
], 512);
|
|
148
117
|
}
|
|
149
|
-
var
|
|
150
|
-
export {
|
|
118
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
119
|
+
export { index as default };
|