@nutui/nutui 3.1.18-beta.0 → 3.1.19-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +6 -0
- package/dist/nutui.d.ts +39 -36
- package/dist/nutui.es.js +13149 -11288
- package/dist/nutui.umd.js +13156 -11381
- package/dist/packages/_es/ActionSheet.js +13 -19
- package/dist/packages/_es/Address.js +70 -55
- package/dist/packages/_es/Audio.js +13 -13
- package/dist/packages/_es/AudioOperate.js +125 -0
- package/dist/packages/_es/Avatar.js +4 -4
- package/dist/packages/_es/BackTop.js +69 -108
- package/dist/packages/_es/Badge.js +4 -4
- package/dist/packages/_es/Barrage.js +63 -56
- package/dist/packages/_es/Button.js +3 -3
- package/dist/packages/_es/Calendar.js +30 -702
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +7 -6
- package/dist/packages/_es/Cascader.js +8 -8
- package/dist/packages/_es/Cell.js +27 -27
- package/dist/packages/_es/CellGroup.js +2 -2
- package/dist/packages/_es/Checkbox.js +4 -4
- package/dist/packages/_es/CheckboxGroup.js +3 -3
- package/dist/packages/_es/CircleProgress.js +150 -41
- package/dist/packages/_es/Col.js +2 -2
- package/dist/packages/_es/Collapse.js +35 -9
- package/dist/packages/_es/CollapseItem.js +79 -38
- package/dist/packages/_es/CountDown.js +8 -6
- package/dist/packages/_es/CountUp.js +31 -30
- package/dist/packages/_es/DatePicker.js +81 -44
- package/dist/packages/_es/Dialog.js +7 -83
- package/dist/packages/_es/Divider.js +5 -5
- package/dist/packages/_es/Drag.js +93 -55
- package/dist/packages/_es/Elevator.js +75 -50
- package/dist/packages/_es/Empty.js +4 -4
- package/dist/packages/_es/FixedNav.js +6 -6
- package/dist/packages/_es/Form.js +11 -9
- package/dist/packages/_es/FormItem.js +9 -6
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +9 -27
- package/dist/packages/_es/Icon.js +2 -2
- package/dist/packages/_es/ImagePreview.js +14 -83
- package/dist/packages/_es/Indicator.js +4 -4
- package/dist/packages/_es/InfiniteLoading.js +94 -108
- package/dist/packages/_es/Input.js +297 -73
- package/dist/packages/_es/InputNumber.js +24 -17
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/List.js +131 -0
- package/dist/packages/_es/Menu.js +16 -13
- package/dist/packages/_es/MenuItem.js +8 -8
- package/dist/packages/_es/Navbar.js +17 -12
- package/dist/packages/_es/NoticeBar.js +47 -39
- package/dist/packages/_es/Notify.js +28 -163
- package/dist/packages/_es/NumberKeyboard.js +4 -4
- package/dist/packages/_es/OldPicker.js +486 -0
- package/dist/packages/_es/OverLay.js +6 -26
- package/dist/packages/_es/Pagination.js +8 -8
- package/dist/packages/_es/Picker.js +192 -163
- package/dist/packages/_es/Popover.js +155 -30
- package/dist/packages/_es/Popup.js +7 -70
- package/dist/packages/_es/Price.js +18 -6
- package/dist/packages/_es/Progress.js +29 -27
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +169 -46
- package/dist/packages/_es/Rate.js +17 -20
- package/dist/packages/_es/Row.js +2 -2
- package/dist/packages/_es/SearchBar.js +9 -7
- package/dist/packages/_es/ShortPassword.js +90 -68
- package/dist/packages/_es/SideNavBar.js +6 -17
- package/dist/packages/_es/SideNavBarItem.js +2 -2
- package/dist/packages/_es/Signature.js +70 -70
- package/dist/packages/_es/Skeleton.js +9 -12
- package/dist/packages/_es/Sku.js +40 -31
- package/dist/packages/_es/Step.js +28 -12
- package/dist/packages/_es/Steps.js +8 -3
- package/dist/packages/_es/Sticky.js +29 -24
- package/dist/packages/_es/SubSideNavBar.js +2 -2
- package/dist/packages/_es/Swipe.js +40 -27
- package/dist/packages/_es/Swiper.js +32 -14
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +4 -4
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +4 -4
- package/dist/packages/_es/TabbarItem.js +28 -23
- package/dist/packages/_es/Table.js +14 -14
- package/dist/packages/_es/Tabs.js +19 -15
- package/dist/packages/_es/Tag.js +14 -8
- package/dist/packages/_es/TextArea.js +49 -15
- package/dist/packages/_es/TimeDetail.js +5 -4
- package/dist/packages/_es/TimePannel.js +4 -4
- package/dist/packages/_es/TimeSelect.js +9 -8
- package/dist/packages/_es/Toast.js +42 -171
- package/dist/packages/_es/Uploader.js +108 -139
- package/dist/packages/_es/Video.js +14 -10
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +2 -2
- package/dist/packages/_es/index.js +45 -7
- package/dist/packages/_es/index.taro.js +719 -0
- package/dist/packages/_es/index2.js +2 -2
- package/dist/packages/_es/index3.js +57 -29
- package/dist/packages/_es/index4.js +414 -57
- package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
- package/dist/packages/_es/pxCheck.js +2 -2
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +2 -2
- package/dist/packages/badge/index.scss +11 -13
- package/dist/packages/button/index.scss +1 -0
- package/dist/packages/calendar/index.scss +9 -4
- package/dist/packages/calendaritem/index.scss +0 -207
- package/dist/packages/cell/index.scss +6 -6
- package/dist/packages/checkbox/index.scss +4 -3
- package/dist/packages/collapseitem/index.scss +21 -11
- package/dist/packages/countdown/index.scss +3 -1
- package/dist/packages/divider/index.scss +8 -8
- package/dist/packages/elevator/index.scss +36 -36
- package/dist/packages/formitem/index.scss +15 -8
- package/dist/packages/indicator/index.scss +1 -1
- package/dist/packages/input/index.scss +70 -24
- package/dist/packages/inputnumber/index.scss +4 -2
- package/dist/packages/list/index.scss +24 -0
- package/dist/packages/menu/index.scss +3 -3
- package/dist/packages/navbar/index.scss +28 -8
- package/dist/packages/noticebar/index.scss +7 -8
- package/dist/packages/notify/index.scss +9 -0
- package/dist/packages/numberkeyboard/index.scss +22 -21
- package/dist/packages/oldpicker/index.scss +131 -0
- package/dist/packages/picker/index.scss +38 -32
- package/dist/packages/progress/index.scss +6 -5
- package/dist/packages/radio/index.scss +7 -6
- package/dist/packages/range/index.scss +109 -2
- package/dist/packages/searchbar/index.scss +7 -7
- package/dist/packages/sidenavbaritem/index.scss +5 -5
- package/dist/packages/step/index.scss +29 -29
- package/dist/packages/subsidenavbar/index.scss +10 -8
- package/dist/packages/tabbaritem/index.scss +15 -0
- package/dist/packages/timedetail/index.scss +13 -13
- package/dist/packages/timepannel/index.scss +7 -7
- package/dist/packages/timeselect/index.scss +3 -3
- package/dist/packages/uploader/index.scss +6 -6
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +64 -62
- package/dist/styles/themes/jdt.scss +91 -0
- package/dist/styles/variables-jdt.scss +728 -0
- package/dist/styles/variables.scss +250 -44
- package/package.json +2 -1
- package/dist/packages/_es/raf.js +0 -19
- package/dist/styles/themes/jdd.scss +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
|
|
@@ -116,5 +116,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
116
116
|
])
|
|
117
117
|
], 6);
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
export {
|
|
119
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
120
|
+
export { index_taro as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
@@ -73,5 +73,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
73
|
renderSlot(_ctx.$slots, "default")
|
|
74
74
|
], 2);
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
export {
|
|
76
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
77
|
+
export { index_taro as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import {
|
|
8
|
-
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
7
|
+
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
|
|
9
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
9
|
const { create } = createComponent("tabbar-item");
|
|
11
10
|
const _sfc_main = create({
|
|
@@ -34,6 +33,10 @@ const _sfc_main = create({
|
|
|
34
33
|
type: String,
|
|
35
34
|
default: ""
|
|
36
35
|
},
|
|
36
|
+
dot: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
37
40
|
classPrefix: {
|
|
38
41
|
type: String,
|
|
39
42
|
default: "nut-icon"
|
|
@@ -53,17 +56,16 @@ const _sfc_main = create({
|
|
|
53
56
|
active: parent.modelValue,
|
|
54
57
|
index: 0
|
|
55
58
|
});
|
|
56
|
-
const router = useRouter();
|
|
57
59
|
const relation = (child) => {
|
|
58
60
|
if (child.proxy) {
|
|
59
|
-
let
|
|
60
|
-
state.index =
|
|
61
|
+
let index = parent.children.length;
|
|
62
|
+
state.index = index;
|
|
61
63
|
parent.children.push(child.proxy);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
relation(getCurrentInstance());
|
|
65
|
-
function change(
|
|
66
|
-
parent.changeIndex(
|
|
67
|
+
function change(index) {
|
|
68
|
+
parent.changeIndex(index);
|
|
67
69
|
}
|
|
68
70
|
const choosed = computed(() => {
|
|
69
71
|
if (parent) {
|
|
@@ -77,14 +79,6 @@ const _sfc_main = create({
|
|
|
77
79
|
if (parent.children[value].href) {
|
|
78
80
|
window.location.href = parent.children[value].href;
|
|
79
81
|
}
|
|
80
|
-
if (parent.children[value].to) {
|
|
81
|
-
let to = parent.children[value].to;
|
|
82
|
-
if (to && router) {
|
|
83
|
-
router.push(to);
|
|
84
|
-
} else {
|
|
85
|
-
location.replace(to);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
82
|
});
|
|
89
83
|
});
|
|
90
84
|
return {
|
|
@@ -102,7 +96,12 @@ const _hoisted_3 = {
|
|
|
102
96
|
key: 1,
|
|
103
97
|
class: "nut-tabbar-item_icon-box_tips nut-tabbar-item_icon-box_nums"
|
|
104
98
|
};
|
|
105
|
-
const _hoisted_4 = {
|
|
99
|
+
const _hoisted_4 = {
|
|
100
|
+
key: 1,
|
|
101
|
+
class: "nut-tabbar-item_icon-box_dot"
|
|
102
|
+
};
|
|
103
|
+
const _hoisted_5 = { key: 2 };
|
|
104
|
+
const _hoisted_6 = { key: 0 };
|
|
106
105
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
107
106
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
108
107
|
return openBlock(), createElementBlock("div", {
|
|
@@ -113,8 +112,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
113
112
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change(_ctx.state.index))
|
|
114
113
|
}, [
|
|
115
114
|
createElementVNode("view", _hoisted_1, [
|
|
116
|
-
_ctx.
|
|
117
|
-
|
|
115
|
+
!_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
116
|
+
_ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num > 100 ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString("99+"))) : createCommentVNode("", true)
|
|
117
|
+
], 64)) : createCommentVNode("", true),
|
|
118
|
+
_ctx.dot ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
|
|
119
|
+
_ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
118
120
|
createVNode(_component_nut_icon, {
|
|
119
121
|
class: "nut-tabbar-item_icon-box_icon",
|
|
120
122
|
size: _ctx.state.size,
|
|
@@ -134,9 +136,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
134
136
|
}, null, 4)) : createCommentVNode("", true),
|
|
135
137
|
createElementVNode("view", {
|
|
136
138
|
class: normalizeClass(["nut-tabbar-item_icon-box_nav-word", { "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg }])
|
|
137
|
-
},
|
|
139
|
+
}, [
|
|
140
|
+
_ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true),
|
|
141
|
+
!_ctx.tabTitle ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true)
|
|
142
|
+
], 2)
|
|
138
143
|
])
|
|
139
144
|
], 6);
|
|
140
145
|
}
|
|
141
|
-
var
|
|
142
|
-
export {
|
|
146
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
147
|
+
export { index_taro as default };
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { c as createComponent } from "./component.js";
|
|
@@ -114,16 +114,17 @@ const _hoisted_1 = { class: "nut-table__main__head" };
|
|
|
114
114
|
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
115
115
|
const _hoisted_3 = ["onClick"];
|
|
116
116
|
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
117
|
-
const _hoisted_5 = {
|
|
117
|
+
const _hoisted_5 = { key: 1 };
|
|
118
|
+
const _hoisted_6 = {
|
|
118
119
|
key: 0,
|
|
119
120
|
class: "nut-table__summary"
|
|
120
121
|
};
|
|
121
|
-
const
|
|
122
|
-
const
|
|
122
|
+
const _hoisted_7 = ["innerHTML"];
|
|
123
|
+
const _hoisted_8 = {
|
|
123
124
|
key: 1,
|
|
124
125
|
class: "nut-table__nodata"
|
|
125
126
|
};
|
|
126
|
-
const
|
|
127
|
+
const _hoisted_9 = {
|
|
127
128
|
key: 0,
|
|
128
129
|
class: "nut-table__nodata__text"
|
|
129
130
|
};
|
|
@@ -166,32 +167,31 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
166
167
|
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
167
168
|
key: value
|
|
168
169
|
}, [
|
|
169
|
-
createTextVNode(toDisplayString(typeof item[value] !== "function" ? item[value] : "") + " ", 1),
|
|
170
170
|
typeof item[value] === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
171
171
|
key: 0,
|
|
172
172
|
slots: item[value]
|
|
173
|
-
}, null, 8, ["slots"])) :
|
|
173
|
+
}, null, 8, ["slots"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
|
|
174
174
|
], 2);
|
|
175
175
|
}), 128))
|
|
176
176
|
]);
|
|
177
177
|
}), 128))
|
|
178
178
|
])
|
|
179
179
|
], 2),
|
|
180
|
-
_ctx.summary ? (openBlock(), createElementBlock("view",
|
|
180
|
+
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
|
|
181
181
|
createElementVNode("span", {
|
|
182
182
|
class: "nut-table__summary__text",
|
|
183
183
|
innerHTML: _ctx.summary().value
|
|
184
|
-
}, null, 8,
|
|
184
|
+
}, null, 8, _hoisted_7)
|
|
185
185
|
])) : createCommentVNode("", true),
|
|
186
|
-
!_ctx.curData.length ? (openBlock(), createElementBlock("view",
|
|
186
|
+
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
187
187
|
createElementVNode("div", {
|
|
188
188
|
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
189
189
|
}, [
|
|
190
190
|
renderSlot(_ctx.$slots, "nodata"),
|
|
191
|
-
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div",
|
|
191
|
+
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, " \u6682\u65E0\u6570\u636E ")) : createCommentVNode("", true)
|
|
192
192
|
], 2)
|
|
193
193
|
])) : createCommentVNode("", true)
|
|
194
194
|
], 2);
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
export {
|
|
196
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
197
|
+
export { index_taro as default };
|
|
@@ -19,8 +19,8 @@ var __publicField = (obj, key, value) => {
|
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
21
|
/*!
|
|
22
|
-
* @nutui/nutui v3.1.
|
|
23
|
-
* (c)
|
|
22
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
23
|
+
* (c) 2022 @jdf2e.
|
|
24
24
|
* Released under the MIT License.
|
|
25
25
|
*/
|
|
26
26
|
import { p as pxCheck } from "./pxCheck.js";
|
|
@@ -58,6 +58,10 @@ const _sfc_main = create({
|
|
|
58
58
|
type: String,
|
|
59
59
|
default: "line"
|
|
60
60
|
},
|
|
61
|
+
lineWidth: {
|
|
62
|
+
type: [String, Number],
|
|
63
|
+
default: ""
|
|
64
|
+
},
|
|
61
65
|
titleScroll: {
|
|
62
66
|
type: Boolean,
|
|
63
67
|
default: false
|
|
@@ -86,7 +90,7 @@ const _sfc_main = create({
|
|
|
86
90
|
const titles = ref([]);
|
|
87
91
|
const currentIndex = ref(props.modelValue || 0);
|
|
88
92
|
const renderTitles = (vnodes) => {
|
|
89
|
-
vnodes.forEach((vnode,
|
|
93
|
+
vnodes.forEach((vnode, index) => {
|
|
90
94
|
var _a, _b, _c, _d, _e;
|
|
91
95
|
let type = vnode.type;
|
|
92
96
|
type = type.name || type;
|
|
@@ -94,7 +98,7 @@ const _sfc_main = create({
|
|
|
94
98
|
let title = new Title();
|
|
95
99
|
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
|
|
96
100
|
title.title = (_c = vnode.props) == null ? void 0 : _c.title;
|
|
97
|
-
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) ||
|
|
101
|
+
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index;
|
|
98
102
|
title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
|
|
99
103
|
}
|
|
100
104
|
titles.value.push(title);
|
|
@@ -113,11 +117,11 @@ const _sfc_main = create({
|
|
|
113
117
|
init(vnodes);
|
|
114
118
|
});
|
|
115
119
|
watch(() => props.modelValue, (value) => {
|
|
116
|
-
let
|
|
117
|
-
if (
|
|
120
|
+
let index = titles.value.findIndex((item) => item.paneKey == value);
|
|
121
|
+
if (index == -1) {
|
|
118
122
|
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 .");
|
|
119
123
|
} else {
|
|
120
|
-
currentIndex.value =
|
|
124
|
+
currentIndex.value = index;
|
|
121
125
|
}
|
|
122
126
|
});
|
|
123
127
|
onMounted(init);
|
|
@@ -146,12 +150,12 @@ const _sfc_main = create({
|
|
|
146
150
|
};
|
|
147
151
|
});
|
|
148
152
|
const methods = {
|
|
149
|
-
tabChange: (item,
|
|
153
|
+
tabChange: (item, index) => {
|
|
150
154
|
emit("click", item);
|
|
151
155
|
if (item.disabled) {
|
|
152
156
|
return;
|
|
153
157
|
}
|
|
154
|
-
currentIndex.value =
|
|
158
|
+
currentIndex.value = index;
|
|
155
159
|
emit("update:modelValue", item.paneKey);
|
|
156
160
|
emit("change", item);
|
|
157
161
|
}
|
|
@@ -160,8 +164,8 @@ const _sfc_main = create({
|
|
|
160
164
|
titles,
|
|
161
165
|
contentStyle,
|
|
162
166
|
tabsNavStyle,
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
titleStyle,
|
|
168
|
+
tabsActiveStyle
|
|
165
169
|
}, methods);
|
|
166
170
|
}
|
|
167
171
|
});
|
|
@@ -175,11 +179,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
175
179
|
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
176
180
|
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
177
181
|
}, [
|
|
178
|
-
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item,
|
|
182
|
+
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index) => {
|
|
179
183
|
return openBlock(), createElementBlock("view", {
|
|
180
184
|
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
181
185
|
style: normalizeStyle(_ctx.titleStyle),
|
|
182
|
-
onClick: ($event) => _ctx.tabChange(item,
|
|
186
|
+
onClick: ($event) => _ctx.tabChange(item, index),
|
|
183
187
|
key: item.paneKey
|
|
184
188
|
}, [
|
|
185
189
|
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
@@ -211,5 +215,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
211
215
|
], 4)
|
|
212
216
|
], 2);
|
|
213
217
|
}
|
|
214
|
-
var
|
|
215
|
-
export {
|
|
218
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
219
|
+
export { index_taro as default };
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
@@ -32,7 +32,7 @@ const _sfc_main = create({
|
|
|
32
32
|
default: false
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
emits: ["close"],
|
|
35
|
+
emits: ["close", "click"],
|
|
36
36
|
setup(props, { emit }) {
|
|
37
37
|
const { type, color, plain, round, mark, textColor } = toRefs(props);
|
|
38
38
|
const classes = computed(() => {
|
|
@@ -68,10 +68,15 @@ const _sfc_main = create({
|
|
|
68
68
|
event.stopPropagation();
|
|
69
69
|
emit("close", event);
|
|
70
70
|
};
|
|
71
|
+
const onClick = (event) => {
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
emit("click", event);
|
|
74
|
+
};
|
|
71
75
|
return {
|
|
72
76
|
classes,
|
|
73
77
|
getStyle,
|
|
74
|
-
onClose
|
|
78
|
+
onClose,
|
|
79
|
+
onClick
|
|
75
80
|
};
|
|
76
81
|
}
|
|
77
82
|
});
|
|
@@ -79,17 +84,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79
84
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
80
85
|
return openBlock(), createElementBlock("view", {
|
|
81
86
|
class: normalizeClass(_ctx.classes),
|
|
82
|
-
style: normalizeStyle(_ctx.getStyle())
|
|
87
|
+
style: normalizeStyle(_ctx.getStyle()),
|
|
88
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
83
89
|
}, [
|
|
84
90
|
renderSlot(_ctx.$slots, "default"),
|
|
85
91
|
_ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
|
|
86
92
|
key: 0,
|
|
87
93
|
class: "nut-tag--close",
|
|
88
94
|
name: "close",
|
|
89
|
-
size: "
|
|
95
|
+
size: "11",
|
|
90
96
|
onClick: _ctx.onClose
|
|
91
97
|
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
92
98
|
], 6);
|
|
93
99
|
}
|
|
94
|
-
var
|
|
95
|
-
export {
|
|
100
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
101
|
+
export { index_taro as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass,
|
|
6
|
+
import { computed, ref, watch, nextTick, onMounted, openBlock, createElementBlock, normalizeClass, toDisplayString, normalizeStyle, 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
9
|
const { componentName, create } = createComponent("textarea");
|
|
@@ -15,7 +15,7 @@ const _sfc_main = create({
|
|
|
15
15
|
},
|
|
16
16
|
textAlign: {
|
|
17
17
|
type: String,
|
|
18
|
-
default: "
|
|
18
|
+
default: ""
|
|
19
19
|
},
|
|
20
20
|
limitShow: {
|
|
21
21
|
type: Boolean,
|
|
@@ -61,8 +61,7 @@ const _sfc_main = create({
|
|
|
61
61
|
});
|
|
62
62
|
const styles = computed(() => {
|
|
63
63
|
return {
|
|
64
|
-
textAlign: props.textAlign
|
|
65
|
-
resize: props.autosize ? "vertical" : "none"
|
|
64
|
+
textAlign: props.textAlign
|
|
66
65
|
};
|
|
67
66
|
});
|
|
68
67
|
const emitChange = (value, event) => {
|
|
@@ -91,9 +90,38 @@ const _sfc_main = create({
|
|
|
91
90
|
const input = event.target;
|
|
92
91
|
let value = input.value;
|
|
93
92
|
emitChange(value, event);
|
|
94
|
-
emit("blur",
|
|
93
|
+
emit("blur", event);
|
|
95
94
|
};
|
|
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
|
+
});
|
|
96
123
|
return {
|
|
124
|
+
textareaRef,
|
|
97
125
|
classes,
|
|
98
126
|
styles,
|
|
99
127
|
change,
|
|
@@ -102,16 +130,22 @@ const _sfc_main = create({
|
|
|
102
130
|
};
|
|
103
131
|
}
|
|
104
132
|
});
|
|
105
|
-
const _hoisted_1 =
|
|
106
|
-
const _hoisted_2 = {
|
|
133
|
+
const _hoisted_1 = {
|
|
107
134
|
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,
|
|
108
140
|
class: "nut-textarea__limit"
|
|
109
141
|
};
|
|
110
142
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
111
143
|
return openBlock(), createElementBlock("view", {
|
|
112
144
|
class: normalizeClass(_ctx.classes)
|
|
113
145
|
}, [
|
|
114
|
-
|
|
146
|
+
_ctx.readonly ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.modelValue), 1)) : (openBlock(), createElementBlock("textarea", {
|
|
147
|
+
key: 1,
|
|
148
|
+
ref: "textareaRef",
|
|
115
149
|
class: "nut-textarea__textarea",
|
|
116
150
|
style: normalizeStyle(_ctx.styles),
|
|
117
151
|
rows: _ctx.rows,
|
|
@@ -123,10 +157,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
123
157
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
124
158
|
maxlength: _ctx.maxLength,
|
|
125
159
|
placeholder: _ctx.placeholder,
|
|
126
|
-
|
|
127
|
-
}, null, 44,
|
|
128
|
-
_ctx.limitShow ? (openBlock(), createElementBlock("view",
|
|
160
|
+
"auto-focus": _ctx.autofocus
|
|
161
|
+
}, null, 44, _hoisted_2)),
|
|
162
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
129
163
|
], 2);
|
|
130
164
|
}
|
|
131
|
-
var
|
|
132
|
-
export {
|
|
165
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
166
|
+
export { index_taro as default };
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
@@ -44,6 +44,7 @@ const _sfc_main = create({
|
|
|
44
44
|
setup: (props, context) => {
|
|
45
45
|
const currentKey = inject("currentKey");
|
|
46
46
|
const currentTime = inject("currentTime");
|
|
47
|
+
inject("muti");
|
|
47
48
|
const state = reactive({
|
|
48
49
|
currentKey,
|
|
49
50
|
currentTime
|
|
@@ -98,5 +99,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
98
99
|
])
|
|
99
100
|
], 2);
|
|
100
101
|
}
|
|
101
|
-
var
|
|
102
|
-
export {
|
|
102
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
103
|
+
export { index_taro as default };
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
|
|
@@ -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_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
70
|
+
export { index_taro as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
|
|
@@ -31,8 +31,8 @@ const _sfc_main = create({
|
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
|
|
35
|
-
type: Boolean,
|
|
34
|
+
muti: {
|
|
35
|
+
type: [Boolean],
|
|
36
36
|
default: false
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -52,12 +52,14 @@ 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);
|
|
55
56
|
const close = () => {
|
|
56
57
|
context.emit("update:visible", false);
|
|
57
58
|
context.emit("select", currentTime.value);
|
|
58
59
|
};
|
|
59
60
|
provide("currentKey", currentKey);
|
|
60
61
|
provide("currentTime", currentTime);
|
|
62
|
+
provide("muti", muti);
|
|
61
63
|
return {
|
|
62
64
|
classes,
|
|
63
65
|
popStyle,
|
|
@@ -76,7 +78,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76
78
|
position: "bottom",
|
|
77
79
|
closeable: "",
|
|
78
80
|
round: "",
|
|
79
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
80
81
|
visible: _ctx.visible,
|
|
81
82
|
style: normalizeStyle(_ctx.popStyle),
|
|
82
83
|
onClickOverlay: _ctx.close,
|
|
@@ -100,7 +101,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
101
|
], 2)
|
|
101
102
|
]),
|
|
102
103
|
_: 3
|
|
103
|
-
}, 8, ["
|
|
104
|
+
}, 8, ["visible", "style", "onClickOverlay", "onClickCloseIcon"]);
|
|
104
105
|
}
|
|
105
|
-
var
|
|
106
|
-
export {
|
|
106
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
107
|
+
export { index_taro as default };
|