@nutui/nutui 3.1.19-beta.1 → 3.1.19-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/README.md +9 -8
- package/dist/nutui.es.js +3044 -3533
- package/dist/nutui.umd.js +3135 -3536
- package/dist/packages/_es/ActionSheet.js +64 -42
- package/dist/packages/_es/Address.js +69 -78
- package/dist/packages/_es/Audio.js +12 -12
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +3 -3
- package/dist/packages/_es/BackTop.js +110 -68
- package/dist/packages/_es/Badge.js +3 -3
- package/dist/packages/_es/Barrage.js +55 -62
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +27 -32
- package/dist/packages/_es/CalendarItem.js +3 -3
- package/dist/packages/_es/Card.js +5 -6
- package/dist/packages/_es/Cascader.js +9 -9
- package/dist/packages/_es/Cell.js +11 -4
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +13 -3
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +40 -149
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +8 -34
- package/dist/packages/_es/CollapseItem.js +59 -90
- package/dist/packages/_es/CountDown.js +11 -10
- package/dist/packages/_es/CountUp.js +51 -43
- package/dist/packages/_es/DatePicker.js +22 -23
- package/dist/packages/_es/Dialog.js +91 -12
- package/dist/packages/_es/Divider.js +4 -4
- package/dist/packages/_es/Drag.js +54 -92
- package/dist/packages/_es/Ecard.js +153 -0
- package/dist/packages/_es/Elevator.js +50 -75
- package/dist/packages/_es/Empty.js +8 -7
- package/dist/packages/_es/FixedNav.js +10 -11
- package/dist/packages/_es/Form.js +5 -9
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +26 -8
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +83 -14
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +107 -93
- package/dist/packages/_es/Input.js +21 -20
- package/dist/packages/_es/InputNumber.js +16 -23
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +34 -41
- package/dist/packages/_es/Menu.js +12 -15
- package/dist/packages/_es/MenuItem.js +7 -7
- package/dist/packages/_es/Navbar.js +5 -4
- package/dist/packages/_es/NoticeBar.js +40 -47
- package/dist/packages/_es/Notify.js +166 -27
- package/dist/packages/_es/NumberKeyboard.js +22 -11
- package/dist/packages/_es/OldPicker.js +120 -122
- package/dist/packages/_es/OverLay.js +25 -5
- package/dist/packages/_es/Pagination.js +14 -13
- package/dist/packages/_es/Picker.js +23 -45
- package/dist/packages/_es/Popover.js +29 -154
- package/dist/packages/_es/Popup.js +69 -6
- package/dist/packages/_es/Price.js +5 -17
- package/dist/packages/_es/Progress.js +23 -19
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +14 -4
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +33 -46
- package/dist/packages/_es/Rate.js +19 -16
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +11 -12
- package/dist/packages/_es/ShortPassword.js +75 -96
- package/dist/packages/_es/SideNavBar.js +16 -5
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +88 -69
- package/dist/packages/_es/Skeleton.js +11 -8
- package/dist/packages/_es/Sku.js +57 -49
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +23 -28
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +26 -39
- package/dist/packages/_es/Swiper.js +14 -32
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +3 -3
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +3 -3
- package/dist/packages/_es/TabbarItem.js +21 -11
- package/dist/packages/_es/Table.js +18 -17
- package/dist/packages/_es/Tabs.js +20 -21
- package/dist/packages/_es/Tag.js +4 -4
- package/dist/packages/_es/TextArea.js +47 -48
- package/dist/packages/_es/TimeDetail.js +3 -4
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +7 -8
- package/dist/packages/_es/Toast.js +170 -41
- package/dist/packages/_es/Uploader.js +145 -116
- package/dist/packages/_es/Video.js +9 -8
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +165 -3
- package/dist/packages/_es/index.js +6 -44
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +7 -58
- package/dist/packages/_es/index4.js +56 -413
- package/dist/packages/_es/{index.taro.js → index5.js} +113 -140
- 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 +19 -0
- package/dist/packages/actionsheet/index.scss +8 -0
- package/dist/packages/ecard/index.scss +83 -0
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -47
- package/dist/styles/themes/jdt.scss +48 -47
- package/dist/styles/variables-jdt.scss +3 -0
- package/dist/styles/variables.scss +3 -0
- package/dist/types/__VUE/actionsheet/index.d.ts +280 -0
- package/dist/types/__VUE/address/index.d.ts +386 -0
- package/dist/types/__VUE/audio/index.d.ts +92 -0
- package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
- package/dist/types/__VUE/avatar/index.d.ts +66 -0
- package/dist/types/__VUE/backtop/index.d.ts +105 -0
- package/dist/types/__VUE/badge/index.d.ts +94 -0
- package/dist/types/__VUE/barrage/index.d.ts +80 -0
- package/dist/types/__VUE/button/index.d.ts +116 -0
- package/dist/types/__VUE/calendar/index.d.ts +155 -0
- package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
- package/dist/types/__VUE/card/index.d.ts +81 -0
- package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
- package/dist/types/__VUE/cascader/helper.d.ts +8 -0
- package/dist/types/__VUE/cascader/index.d.ts +76 -0
- package/dist/types/__VUE/cascader/tree.d.ts +17 -0
- package/dist/types/__VUE/cascader/types.d.ts +30 -0
- package/dist/types/__VUE/cell/index.d.ts +109 -0
- package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
- package/dist/types/__VUE/checkbox/index.d.ts +102 -0
- package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
- package/dist/types/__VUE/col/index.d.ts +42 -0
- package/dist/types/__VUE/collapse/index.d.ts +104 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
- package/dist/types/__VUE/countdown/index.d.ts +91 -0
- package/dist/types/__VUE/countup/index.d.ts +216 -0
- package/dist/types/__VUE/datepicker/index.d.ts +347 -0
- package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
- package/dist/types/__VUE/dialog/index.d.ts +306 -0
- package/dist/types/__VUE/divider/index.d.ts +47 -0
- package/dist/types/__VUE/drag/index.d.ts +61 -0
- package/dist/types/__VUE/ecard/index.d.ts +123 -0
- package/dist/types/__VUE/elevator/index.d.ts +71 -0
- package/dist/types/__VUE/empty/index.d.ts +47 -0
- package/dist/types/__VUE/fixednav/index.d.ts +96 -0
- package/dist/types/__VUE/form/common.d.ts +20 -0
- package/dist/types/__VUE/form/index.d.ts +32 -0
- package/dist/types/__VUE/form/types.d.ts +13 -0
- package/dist/types/__VUE/formitem/index.d.ts +120 -0
- package/dist/types/__VUE/formitem/types.d.ts +10 -0
- package/dist/types/__VUE/grid/common.d.ts +91 -0
- package/dist/types/__VUE/grid/index.d.ts +100 -0
- package/dist/types/__VUE/griditem/index.d.ts +80 -0
- package/dist/types/__VUE/icon/index.d.ts +74 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
- package/dist/types/__VUE/indicator/index.d.ts +70 -0
- package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
- package/dist/types/__VUE/input/index.d.ts +337 -0
- package/dist/types/__VUE/input/util.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
- package/dist/types/__VUE/layout/index.d.ts +13 -0
- package/dist/types/__VUE/list/index.d.ts +48 -0
- package/dist/types/__VUE/menu/index.d.ts +51 -0
- package/dist/types/__VUE/menuitem/index.d.ts +77 -0
- package/dist/types/__VUE/navbar/index.d.ts +83 -0
- package/dist/types/__VUE/noticebar/index.d.ts +209 -0
- package/dist/types/__VUE/notify/index.d.ts +103 -0
- package/dist/types/__VUE/numberkeyboard/index.d.ts +124 -0
- package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
- package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
- package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
- package/dist/types/__VUE/overlay/index.d.ts +1614 -0
- package/dist/types/__VUE/pagination/index.d.ts +112 -0
- package/dist/types/__VUE/picker/Column.d.ts +90 -0
- package/dist/types/__VUE/picker/index.d.ts +343 -0
- package/dist/types/__VUE/picker/types.d.ts +26 -0
- package/dist/types/__VUE/popover/index.d.ts +233 -0
- package/dist/types/__VUE/popup/index.d.ts +1734 -0
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
- package/dist/types/__VUE/price/index.d.ts +87 -0
- package/dist/types/__VUE/progress/index.d.ts +138 -0
- package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
- package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
- package/dist/types/__VUE/radio/index.d.ts +90 -0
- package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
- package/dist/types/__VUE/range/index.d.ts +156 -0
- package/dist/types/__VUE/rate/index.d.ts +142 -0
- package/dist/types/__VUE/row/index.d.ts +63 -0
- package/dist/types/__VUE/searchbar/index.d.ts +100 -0
- package/dist/types/__VUE/shortpassword/index.d.ts +137 -0
- package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
- package/dist/types/__VUE/signature/index.d.ts +73 -0
- package/dist/types/__VUE/skeleton/common.d.ts +63 -0
- package/dist/types/__VUE/skeleton/index.d.ts +117 -0
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
- package/dist/types/__VUE/sku/index.d.ts +300 -0
- package/dist/types/__VUE/step/index.d.ts +70 -0
- package/dist/types/__VUE/steps/index.d.ts +47 -0
- package/dist/types/__VUE/sticky/index.d.ts +63 -0
- package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
- package/dist/types/__VUE/swipe/index.d.ts +69 -0
- package/dist/types/__VUE/swiper/index.d.ts +163 -0
- package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
- package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
- package/dist/types/__VUE/switch/index.d.ts +136 -0
- package/dist/types/__VUE/tabbar/index.d.ts +84 -0
- package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
- package/dist/types/__VUE/table/common.d.ts +55 -0
- package/dist/types/__VUE/table/index.d.ts +76 -0
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
- package/dist/types/__VUE/table/types.d.ts +19 -0
- package/dist/types/__VUE/tabpane/index.d.ts +47 -0
- package/dist/types/__VUE/tabs/index.d.ts +128 -0
- package/dist/types/__VUE/tag/index.d.ts +89 -0
- package/dist/types/__VUE/textarea/index.d.ts +121 -0
- package/dist/types/__VUE/timedetail/index.d.ts +48 -0
- package/dist/types/__VUE/timepannel/index.d.ts +43 -0
- package/dist/types/__VUE/timeselect/index.d.ts +82 -0
- package/dist/types/__VUE/toast/index.d.ts +149 -0
- package/dist/types/__VUE/uploader/index.d.ts +258 -0
- package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
- package/dist/types/__VUE/video/index.d.ts +123 -0
- package/dist/{index.d.ts → types/index.d.ts} +0 -0
- package/dist/types/nutui.d.ts +93 -0
- package/package.json +14 -5
- package/dist/nutui.d.ts +0 -104
- package/dist/packages/_es/use-lock-scroll.js +0 -23
- package/dist/packages/_es/util.js +0 -47
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 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 { u as useRouter } from "./index.js";
|
|
7
8
|
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { create } = createComponent("tabbar-item");
|
|
@@ -33,14 +34,14 @@ const _sfc_main = create({
|
|
|
33
34
|
type: String,
|
|
34
35
|
default: ""
|
|
35
36
|
},
|
|
36
|
-
dot: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
37
|
classPrefix: {
|
|
41
38
|
type: String,
|
|
42
39
|
default: "nut-icon"
|
|
43
40
|
},
|
|
41
|
+
dot: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
44
45
|
fontClassName: {
|
|
45
46
|
type: String,
|
|
46
47
|
default: "nutui-iconfont"
|
|
@@ -56,16 +57,17 @@ const _sfc_main = create({
|
|
|
56
57
|
active: parent.modelValue,
|
|
57
58
|
index: 0
|
|
58
59
|
});
|
|
60
|
+
const router = useRouter();
|
|
59
61
|
const relation = (child) => {
|
|
60
62
|
if (child.proxy) {
|
|
61
|
-
let
|
|
62
|
-
state.index =
|
|
63
|
+
let index2 = parent.children.length;
|
|
64
|
+
state.index = index2;
|
|
63
65
|
parent.children.push(child.proxy);
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
relation(getCurrentInstance());
|
|
67
|
-
function change(
|
|
68
|
-
parent.changeIndex(
|
|
69
|
+
function change(index2) {
|
|
70
|
+
parent.changeIndex(index2);
|
|
69
71
|
}
|
|
70
72
|
const choosed = computed(() => {
|
|
71
73
|
if (parent) {
|
|
@@ -79,6 +81,14 @@ const _sfc_main = create({
|
|
|
79
81
|
if (parent.children[value].href) {
|
|
80
82
|
window.location.href = parent.children[value].href;
|
|
81
83
|
}
|
|
84
|
+
if (parent.children[value].to) {
|
|
85
|
+
let to = parent.children[value].to;
|
|
86
|
+
if (to && router) {
|
|
87
|
+
router.push(to);
|
|
88
|
+
} else {
|
|
89
|
+
location.replace(to);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
82
92
|
});
|
|
83
93
|
});
|
|
84
94
|
return {
|
|
@@ -143,5 +153,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
143
153
|
])
|
|
144
154
|
], 6);
|
|
145
155
|
}
|
|
146
|
-
var
|
|
147
|
-
export {
|
|
156
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
157
|
+
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -33,7 +33,7 @@ var RenderColumn = {
|
|
|
33
33
|
slots: Function
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const component = (componentName2) => {
|
|
36
|
+
const component = (componentName2, translate2) => {
|
|
37
37
|
return {
|
|
38
38
|
components: {
|
|
39
39
|
RenderColumn
|
|
@@ -103,28 +103,28 @@ const component = (componentName2) => {
|
|
|
103
103
|
cellClasses,
|
|
104
104
|
getColumnItem,
|
|
105
105
|
handleSorterClick,
|
|
106
|
-
sortDataItem
|
|
106
|
+
sortDataItem,
|
|
107
|
+
translate: translate2
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
|
-
const { componentName, create } = createComponent("table");
|
|
112
|
-
const _sfc_main = create(component(componentName));
|
|
112
|
+
const { componentName, create, translate } = createComponent("table");
|
|
113
|
+
const _sfc_main = create(component(componentName, translate));
|
|
113
114
|
const _hoisted_1 = { class: "nut-table__main__head" };
|
|
114
115
|
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
115
116
|
const _hoisted_3 = ["onClick"];
|
|
116
117
|
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
117
|
-
const _hoisted_5 = {
|
|
118
|
-
const _hoisted_6 = {
|
|
118
|
+
const _hoisted_5 = {
|
|
119
119
|
key: 0,
|
|
120
120
|
class: "nut-table__summary"
|
|
121
121
|
};
|
|
122
|
-
const
|
|
123
|
-
const
|
|
122
|
+
const _hoisted_6 = ["innerHTML"];
|
|
123
|
+
const _hoisted_7 = {
|
|
124
124
|
key: 1,
|
|
125
125
|
class: "nut-table__nodata"
|
|
126
126
|
};
|
|
127
|
-
const
|
|
127
|
+
const _hoisted_8 = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "nut-table__nodata__text"
|
|
130
130
|
};
|
|
@@ -167,31 +167,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
167
|
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
168
168
|
key: value
|
|
169
169
|
}, [
|
|
170
|
+
createTextVNode(toDisplayString(typeof item[value] !== "function" ? item[value] : "") + " ", 1),
|
|
170
171
|
typeof item[value] === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
171
172
|
key: 0,
|
|
172
173
|
slots: item[value]
|
|
173
|
-
}, null, 8, ["slots"])) : (
|
|
174
|
+
}, null, 8, ["slots"])) : createCommentVNode("", true)
|
|
174
175
|
], 2);
|
|
175
176
|
}), 128))
|
|
176
177
|
]);
|
|
177
178
|
}), 128))
|
|
178
179
|
])
|
|
179
180
|
], 2),
|
|
180
|
-
_ctx.summary ? (openBlock(), createElementBlock("view",
|
|
181
|
+
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
181
182
|
createElementVNode("span", {
|
|
182
183
|
class: "nut-table__summary__text",
|
|
183
184
|
innerHTML: _ctx.summary().value
|
|
184
|
-
}, null, 8,
|
|
185
|
+
}, null, 8, _hoisted_6)
|
|
185
186
|
])) : createCommentVNode("", true),
|
|
186
|
-
!_ctx.curData.length ? (openBlock(), createElementBlock("view",
|
|
187
|
+
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
187
188
|
createElementVNode("div", {
|
|
188
189
|
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
189
190
|
}, [
|
|
190
191
|
renderSlot(_ctx.$slots, "nodata"),
|
|
191
|
-
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div",
|
|
192
|
+
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
|
|
192
193
|
], 2)
|
|
193
194
|
])) : createCommentVNode("", true)
|
|
194
195
|
], 2);
|
|
195
196
|
}
|
|
196
|
-
var
|
|
197
|
-
export {
|
|
197
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
198
|
+
export { index as default };
|
|
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
21
|
/*!
|
|
22
|
-
* @nutui/nutui v3.1.19-beta.
|
|
22
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
23
23
|
* (c) 2022 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
|
@@ -58,10 +58,6 @@ const _sfc_main = create({
|
|
|
58
58
|
type: String,
|
|
59
59
|
default: "line"
|
|
60
60
|
},
|
|
61
|
-
lineWidth: {
|
|
62
|
-
type: [String, Number],
|
|
63
|
-
default: ""
|
|
64
|
-
},
|
|
65
61
|
titleScroll: {
|
|
66
62
|
type: Boolean,
|
|
67
63
|
default: false
|
|
@@ -90,7 +86,7 @@ const _sfc_main = create({
|
|
|
90
86
|
const titles = ref([]);
|
|
91
87
|
const currentIndex = ref(props.modelValue || 0);
|
|
92
88
|
const renderTitles = (vnodes) => {
|
|
93
|
-
vnodes.forEach((vnode,
|
|
89
|
+
vnodes.forEach((vnode, index2) => {
|
|
94
90
|
var _a, _b, _c, _d, _e;
|
|
95
91
|
let type = vnode.type;
|
|
96
92
|
type = type.name || type;
|
|
@@ -98,7 +94,7 @@ const _sfc_main = create({
|
|
|
98
94
|
let title = new Title();
|
|
99
95
|
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
|
|
100
96
|
title.title = (_c = vnode.props) == null ? void 0 : _c.title;
|
|
101
|
-
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) ||
|
|
97
|
+
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index2;
|
|
102
98
|
title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
|
|
103
99
|
}
|
|
104
100
|
titles.value.push(title);
|
|
@@ -107,21 +103,24 @@ const _sfc_main = create({
|
|
|
107
103
|
}
|
|
108
104
|
});
|
|
109
105
|
};
|
|
110
|
-
const init = (vnodes = slots.default()) => {
|
|
106
|
+
const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
|
|
111
107
|
titles.value = [];
|
|
112
|
-
if (vnodes.length) {
|
|
108
|
+
if (vnodes && vnodes.length) {
|
|
113
109
|
renderTitles(vnodes);
|
|
114
110
|
}
|
|
115
111
|
};
|
|
116
|
-
watch(() =>
|
|
112
|
+
watch(() => {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
115
|
+
}, (vnodes) => {
|
|
117
116
|
init(vnodes);
|
|
118
117
|
});
|
|
119
118
|
watch(() => props.modelValue, (value) => {
|
|
120
|
-
let
|
|
121
|
-
if (
|
|
119
|
+
let index2 = titles.value.findIndex((item) => item.paneKey == value);
|
|
120
|
+
if (index2 == -1) {
|
|
122
121
|
console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
|
|
123
122
|
} else {
|
|
124
|
-
currentIndex.value =
|
|
123
|
+
currentIndex.value = index2;
|
|
125
124
|
}
|
|
126
125
|
});
|
|
127
126
|
onMounted(init);
|
|
@@ -150,12 +149,12 @@ const _sfc_main = create({
|
|
|
150
149
|
};
|
|
151
150
|
});
|
|
152
151
|
const methods = {
|
|
153
|
-
tabChange: (item,
|
|
152
|
+
tabChange: (item, index2) => {
|
|
154
153
|
emit("click", item);
|
|
155
154
|
if (item.disabled) {
|
|
156
155
|
return;
|
|
157
156
|
}
|
|
158
|
-
currentIndex.value =
|
|
157
|
+
currentIndex.value = index2;
|
|
159
158
|
emit("update:modelValue", item.paneKey);
|
|
160
159
|
emit("change", item);
|
|
161
160
|
}
|
|
@@ -164,8 +163,8 @@ const _sfc_main = create({
|
|
|
164
163
|
titles,
|
|
165
164
|
contentStyle,
|
|
166
165
|
tabsNavStyle,
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
tabsActiveStyle,
|
|
167
|
+
titleStyle
|
|
169
168
|
}, methods);
|
|
170
169
|
}
|
|
171
170
|
});
|
|
@@ -179,11 +178,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
179
178
|
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
180
179
|
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
181
180
|
}, [
|
|
182
|
-
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item,
|
|
181
|
+
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
|
|
183
182
|
return openBlock(), createElementBlock("view", {
|
|
184
183
|
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
185
184
|
style: normalizeStyle(_ctx.titleStyle),
|
|
186
|
-
onClick: ($event) => _ctx.tabChange(item,
|
|
185
|
+
onClick: ($event) => _ctx.tabChange(item, index2),
|
|
187
186
|
key: item.paneKey
|
|
188
187
|
}, [
|
|
189
188
|
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
@@ -215,5 +214,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
215
214
|
], 4)
|
|
216
215
|
], 2);
|
|
217
216
|
}
|
|
218
|
-
var
|
|
219
|
-
export {
|
|
217
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
218
|
+
export { index as default };
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -92,10 +92,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
92
92
|
key: 0,
|
|
93
93
|
class: "nut-tag--close",
|
|
94
94
|
name: "close",
|
|
95
|
-
size: "
|
|
95
|
+
size: "12",
|
|
96
96
|
onClick: _ctx.onClose
|
|
97
97
|
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
98
98
|
], 6);
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
export {
|
|
100
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
101
|
+
export { index as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
-
const { componentName, create } = createComponent("textarea");
|
|
9
|
+
const { componentName, create, translate } = createComponent("textarea");
|
|
10
10
|
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: {
|
|
@@ -31,7 +31,7 @@ const _sfc_main = create({
|
|
|
31
31
|
},
|
|
32
32
|
placeholder: {
|
|
33
33
|
type: String,
|
|
34
|
-
default: "
|
|
34
|
+
default: ""
|
|
35
35
|
},
|
|
36
36
|
readonly: {
|
|
37
37
|
type: Boolean,
|
|
@@ -52,6 +52,7 @@ const _sfc_main = create({
|
|
|
52
52
|
},
|
|
53
53
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
54
54
|
setup(props, { emit }) {
|
|
55
|
+
const textareaRef = ref();
|
|
55
56
|
const classes = computed(() => {
|
|
56
57
|
const prefixCls = componentName;
|
|
57
58
|
return {
|
|
@@ -59,11 +60,41 @@ const _sfc_main = create({
|
|
|
59
60
|
[`${prefixCls}--disabled`]: props.disabled
|
|
60
61
|
};
|
|
61
62
|
});
|
|
63
|
+
onMounted(() => {
|
|
64
|
+
if (props.modelValue) {
|
|
65
|
+
emitChange(String(props.modelValue));
|
|
66
|
+
}
|
|
67
|
+
if (props.autosize) {
|
|
68
|
+
nextTick(getContentHeight);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
62
71
|
const styles = computed(() => {
|
|
63
72
|
return {
|
|
64
73
|
textAlign: props.textAlign
|
|
65
74
|
};
|
|
66
75
|
});
|
|
76
|
+
const getContentHeight = () => {
|
|
77
|
+
let textarea = textareaRef.value;
|
|
78
|
+
textarea.style.height = "auto";
|
|
79
|
+
let height = textarea.scrollHeight;
|
|
80
|
+
if (typeof props.autosize === "object") {
|
|
81
|
+
const { maxHeight, minHeight } = props.autosize;
|
|
82
|
+
if (maxHeight !== void 0) {
|
|
83
|
+
height = Math.min(height, maxHeight);
|
|
84
|
+
}
|
|
85
|
+
if (minHeight !== void 0) {
|
|
86
|
+
height = Math.max(height, minHeight);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (height) {
|
|
90
|
+
textarea.style.height = height + "px";
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
watch(() => props.modelValue, () => {
|
|
94
|
+
if (props.autosize) {
|
|
95
|
+
nextTick(getContentHeight);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
67
98
|
const emitChange = (value, event) => {
|
|
68
99
|
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
69
100
|
value = value.substring(0, Number(props.maxLength));
|
|
@@ -90,61 +121,29 @@ const _sfc_main = create({
|
|
|
90
121
|
const input = event.target;
|
|
91
122
|
let value = input.value;
|
|
92
123
|
emitChange(value, event);
|
|
93
|
-
emit("blur", event);
|
|
124
|
+
emit("blur", { value, event });
|
|
94
125
|
};
|
|
95
|
-
const textareaRef = ref();
|
|
96
|
-
const getContentHeight = () => {
|
|
97
|
-
let textarea = textareaRef.value;
|
|
98
|
-
textarea.style.height = "auto";
|
|
99
|
-
let height = textarea.scrollHeight;
|
|
100
|
-
if (typeof props.autosize === "object") {
|
|
101
|
-
const { maxHeight, minHeight } = props.autosize;
|
|
102
|
-
if (maxHeight !== void 0) {
|
|
103
|
-
height = Math.min(height, maxHeight);
|
|
104
|
-
}
|
|
105
|
-
if (minHeight !== void 0) {
|
|
106
|
-
height = Math.max(height, minHeight);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (height) {
|
|
110
|
-
textarea.style.height = height + "px";
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
watch(() => props.modelValue, () => {
|
|
114
|
-
if (props.autosize) {
|
|
115
|
-
nextTick(getContentHeight);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
onMounted(() => {
|
|
119
|
-
if (props.autosize) {
|
|
120
|
-
nextTick(getContentHeight);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
126
|
return {
|
|
124
127
|
textareaRef,
|
|
125
128
|
classes,
|
|
126
129
|
styles,
|
|
127
130
|
change,
|
|
128
131
|
focus,
|
|
129
|
-
blur
|
|
132
|
+
blur,
|
|
133
|
+
translate
|
|
130
134
|
};
|
|
131
135
|
}
|
|
132
136
|
});
|
|
133
|
-
const _hoisted_1 =
|
|
137
|
+
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
|
|
138
|
+
const _hoisted_2 = {
|
|
134
139
|
key: 0,
|
|
135
|
-
class: "nut-textarea__textarea"
|
|
136
|
-
};
|
|
137
|
-
const _hoisted_2 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "auto-focus"];
|
|
138
|
-
const _hoisted_3 = {
|
|
139
|
-
key: 2,
|
|
140
140
|
class: "nut-textarea__limit"
|
|
141
141
|
};
|
|
142
142
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
143
|
return openBlock(), createElementBlock("view", {
|
|
144
144
|
class: normalizeClass(_ctx.classes)
|
|
145
145
|
}, [
|
|
146
|
-
|
|
147
|
-
key: 1,
|
|
146
|
+
createElementVNode("textarea", {
|
|
148
147
|
ref: "textareaRef",
|
|
149
148
|
class: "nut-textarea__textarea",
|
|
150
149
|
style: normalizeStyle(_ctx.styles),
|
|
@@ -156,11 +155,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
156
155
|
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
157
156
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
158
157
|
maxlength: _ctx.maxLength,
|
|
159
|
-
placeholder: _ctx.placeholder,
|
|
160
|
-
|
|
161
|
-
}, null, 44,
|
|
162
|
-
_ctx.limitShow ? (openBlock(), createElementBlock("view",
|
|
158
|
+
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
159
|
+
autofocus: _ctx.autofocus
|
|
160
|
+
}, null, 44, _hoisted_1),
|
|
161
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
163
162
|
], 2);
|
|
164
163
|
}
|
|
165
|
-
var
|
|
166
|
-
export {
|
|
164
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
165
|
+
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -44,7 +44,6 @@ const _sfc_main = create({
|
|
|
44
44
|
setup: (props, context) => {
|
|
45
45
|
const currentKey = inject("currentKey");
|
|
46
46
|
const currentTime = inject("currentTime");
|
|
47
|
-
inject("muti");
|
|
48
47
|
const state = reactive({
|
|
49
48
|
currentKey,
|
|
50
49
|
currentTime
|
|
@@ -99,5 +98,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
98
|
])
|
|
100
99
|
], 2);
|
|
101
100
|
}
|
|
102
|
-
var
|
|
103
|
-
export {
|
|
101
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
102
|
+
export { index as default };
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -66,5 +66,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
66
66
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
|
|
67
67
|
}, toDisplayString(_ctx.name), 3);
|
|
68
68
|
}
|
|
69
|
-
var
|
|
70
|
-
export {
|
|
69
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
70
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -31,8 +31,8 @@ const _sfc_main = create({
|
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
|
|
35
|
-
type:
|
|
34
|
+
isWrapTeleport: {
|
|
35
|
+
type: Boolean,
|
|
36
36
|
default: false
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -52,14 +52,12 @@ const _sfc_main = create({
|
|
|
52
52
|
});
|
|
53
53
|
const currentKey = computed(() => props.currentKey);
|
|
54
54
|
const currentTime = computed(() => props.currentTime);
|
|
55
|
-
const muti = computed(() => props.muti);
|
|
56
55
|
const close = () => {
|
|
57
56
|
context.emit("update:visible", false);
|
|
58
57
|
context.emit("select", currentTime.value);
|
|
59
58
|
};
|
|
60
59
|
provide("currentKey", currentKey);
|
|
61
60
|
provide("currentTime", currentTime);
|
|
62
|
-
provide("muti", muti);
|
|
63
61
|
return {
|
|
64
62
|
classes,
|
|
65
63
|
popStyle,
|
|
@@ -78,6 +76,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
76
|
position: "bottom",
|
|
79
77
|
closeable: "",
|
|
80
78
|
round: "",
|
|
79
|
+
isWrapTeleport: _ctx.isWrapTeleport,
|
|
81
80
|
visible: _ctx.visible,
|
|
82
81
|
style: normalizeStyle(_ctx.popStyle),
|
|
83
82
|
onClickOverlay: _ctx.close,
|
|
@@ -101,7 +100,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
101
100
|
], 2)
|
|
102
101
|
]),
|
|
103
102
|
_: 3
|
|
104
|
-
}, 8, ["visible", "style", "onClickOverlay", "onClickCloseIcon"]);
|
|
103
|
+
}, 8, ["isWrapTeleport", "visible", "style", "onClickOverlay", "onClickCloseIcon"]);
|
|
105
104
|
}
|
|
106
|
-
var
|
|
107
|
-
export {
|
|
105
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
106
|
+
export { index as default };
|