@nutui/nutui 3.1.12-beta.1 → 3.1.14
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 +56 -0
- package/README.md +139 -37
- package/dist/nutui.d.ts +9 -2
- package/dist/nutui.es.js +4830 -2950
- package/dist/nutui.umd.js +4910 -2953
- package/dist/packages/_es/ActionSheet.js +12 -13
- package/dist/packages/_es/Address.js +64 -77
- package/dist/packages/_es/Avatar.js +5 -4
- package/dist/packages/_es/BackTop.js +109 -72
- package/dist/packages/_es/Badge.js +5 -4
- package/dist/packages/_es/Barrage.js +57 -63
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +18 -27
- package/dist/packages/_es/Card.js +8 -7
- package/dist/packages/_es/Cascader.js +547 -0
- package/dist/packages/_es/Cell.js +13 -5
- package/dist/packages/_es/CellGroup.js +14 -7
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +4 -9
- package/dist/packages/_es/CircleProgress.js +46 -142
- package/dist/packages/_es/Col.js +5 -4
- package/dist/packages/_es/Collapse.js +10 -35
- package/dist/packages/_es/CollapseItem.js +35 -80
- package/dist/packages/_es/CountDown.js +7 -10
- package/dist/packages/_es/CountUp.js +33 -34
- package/dist/packages/_es/DatePicker.js +219 -451
- package/dist/packages/_es/Dialog.js +98 -46
- package/dist/packages/_es/Divider.js +6 -5
- package/dist/packages/_es/Drag.js +50 -76
- package/dist/packages/_es/Elevator.js +53 -81
- package/dist/packages/_es/Empty.js +74 -0
- package/dist/packages/_es/FixedNav.js +9 -8
- package/dist/packages/_es/Form.js +23 -9
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +12 -0
- package/dist/packages/_es/GridItem.js +149 -0
- package/dist/packages/_es/Icon.js +40 -6
- package/dist/packages/_es/ImagePreview.js +158 -44
- package/dist/packages/_es/Indicator.js +66 -0
- package/dist/packages/_es/InfiniteLoading.js +109 -95
- package/dist/packages/_es/Input.js +21 -22
- package/dist/packages/_es/InputNumber.js +18 -24
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +14 -16
- package/dist/packages/_es/MenuItem.js +11 -9
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +31 -46
- package/dist/packages/_es/Notify.js +166 -30
- package/dist/packages/_es/NumberKeyboard.js +7 -9
- package/dist/packages/_es/OverLay.js +29 -22
- package/dist/packages/_es/Pagination.js +9 -8
- package/dist/packages/_es/Picker.js +447 -61
- package/dist/packages/_es/Popover.js +34 -161
- package/dist/packages/_es/Popup.js +77 -17
- package/dist/packages/_es/Price.js +7 -18
- package/dist/packages/_es/Progress.js +12 -23
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +31 -38
- package/dist/packages/_es/Rate.js +35 -17
- package/dist/packages/_es/Row.js +5 -4
- package/dist/packages/_es/SearchBar.js +5 -7
- package/dist/packages/_es/ShortPassword.js +59 -89
- package/dist/packages/_es/Signature.js +71 -70
- package/dist/packages/_es/Skeleton.js +138 -0
- package/dist/packages/_es/Sku.js +43 -53
- package/dist/packages/_es/Step.js +8 -10
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +28 -43
- package/dist/packages/_es/Swiper.js +418 -17
- package/dist/packages/_es/SwiperItem.js +39 -14
- package/dist/packages/_es/Switch.js +47 -16
- package/dist/packages/_es/TabPane.js +5 -4
- package/dist/packages/_es/Tabbar.js +5 -4
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Table.js +191 -0
- package/dist/packages/_es/Tabs.js +21 -23
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +12 -16
- package/dist/packages/_es/TimeDetail.js +5 -7
- package/dist/packages/_es/TimePannel.js +5 -7
- package/dist/packages/_es/TimeSelect.js +7 -12
- package/dist/packages/_es/Toast.js +178 -46
- package/dist/packages/_es/Uploader.js +149 -109
- package/dist/packages/_es/Video.js +405 -0
- package/dist/packages/_es/common.js +136 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +7 -58
- package/dist/packages/_es/index2.js +58 -43
- package/dist/packages/_es/index3.js +28 -411
- package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/util.js +1 -1
- package/dist/packages/cascader/index.scss +81 -0
- package/dist/packages/cellgroup/index.scss +9 -0
- package/dist/packages/dialog/index.scss +17 -0
- package/dist/packages/drag/index.scss +4 -0
- package/dist/packages/empty/index.scss +33 -0
- package/dist/packages/fixednav/index.scss +6 -1
- package/dist/packages/formitem/index.scss +4 -1
- package/dist/packages/grid/index.scss +10 -0
- package/dist/packages/griditem/index.scss +92 -0
- package/dist/packages/icon/index.scss +2 -1
- package/dist/packages/indicator/index.scss +48 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/popover/index.scss +2 -2
- package/dist/packages/rate/index.scss +1 -0
- package/dist/packages/skeleton/index.scss +57 -0
- package/dist/packages/table/index.scss +81 -0
- package/dist/packages/tabs/index.scss +16 -0
- package/dist/packages/textarea/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +1 -2
- package/dist/packages/timeselect/index.scss +3 -0
- package/dist/packages/toast/index.scss +6 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +2 -1
- package/dist/styles/font/config.json +2 -1
- package/dist/styles/font/demo_index.html +26 -3
- package/dist/styles/font/iconfont.css +7 -3
- package/dist/styles/font/iconfont.js +31 -32
- package/dist/styles/font/iconfont.json +7 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +40 -33
- package/dist/styles/variables.scss +54 -1
- package/package.json +2 -3
- package/dist/packages/_es/commonProps.js +0 -30
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
- package/dist/packages/_es/use-lock-scroll.js +0 -23
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode,
|
|
6
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("switch");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
modelValue: {
|
|
12
|
-
type: Boolean,
|
|
13
|
+
type: [String, Number, Boolean],
|
|
13
14
|
default: false
|
|
14
15
|
},
|
|
15
16
|
disable: {
|
|
@@ -31,29 +32,56 @@ var _sfc_main = create({
|
|
|
31
32
|
inactiveText: {
|
|
32
33
|
type: String,
|
|
33
34
|
default: ""
|
|
35
|
+
},
|
|
36
|
+
activeValue: {
|
|
37
|
+
type: [String, Number, Boolean],
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
inactiveValue: {
|
|
41
|
+
type: [String, Number, Boolean],
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
loading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
name: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "loading1"
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
type: [String, Number],
|
|
54
|
+
default: "12px"
|
|
55
|
+
},
|
|
56
|
+
color: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ""
|
|
34
59
|
}
|
|
35
60
|
},
|
|
36
61
|
emits: ["change", "update:modelValue"],
|
|
37
62
|
setup(props, { emit }) {
|
|
63
|
+
const isActive = computed(() => props.modelValue === props.activeValue);
|
|
38
64
|
const classes = computed(() => {
|
|
39
65
|
const prefixCls = componentName;
|
|
40
66
|
return {
|
|
41
67
|
[prefixCls]: true,
|
|
42
|
-
[
|
|
68
|
+
[isActive.value ? "switch-open" : "switch-close"]: true,
|
|
43
69
|
[`${prefixCls}-disable`]: props.disable,
|
|
44
70
|
[`${prefixCls}-base`]: true
|
|
45
71
|
};
|
|
46
72
|
});
|
|
47
73
|
const style = computed(() => {
|
|
48
74
|
return {
|
|
49
|
-
backgroundColor:
|
|
75
|
+
backgroundColor: isActive.value ? props.activeColor : props.inactiveColor
|
|
50
76
|
};
|
|
51
77
|
});
|
|
52
78
|
const onClick = (event) => {
|
|
53
|
-
if (props.disable)
|
|
79
|
+
if (props.disable || props.loading)
|
|
54
80
|
return;
|
|
55
|
-
|
|
56
|
-
emit("
|
|
81
|
+
const value = isActive.value ? props.inactiveValue : props.activeValue;
|
|
82
|
+
emit("update:modelValue", value);
|
|
83
|
+
emit("update:loading");
|
|
84
|
+
emit("change", value, event);
|
|
57
85
|
};
|
|
58
86
|
return {
|
|
59
87
|
classes,
|
|
@@ -63,18 +91,21 @@ var _sfc_main = create({
|
|
|
63
91
|
}
|
|
64
92
|
});
|
|
65
93
|
const _hoisted_1 = { class: "switch-button" };
|
|
66
|
-
const _hoisted_2 = { class: "close-line" };
|
|
67
94
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
68
96
|
return openBlock(), createElementBlock("view", {
|
|
69
97
|
class: normalizeClass(_ctx.classes),
|
|
70
98
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
71
99
|
style: normalizeStyle(_ctx.style)
|
|
72
100
|
}, [
|
|
73
101
|
createElementVNode("view", _hoisted_1, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
102
|
+
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
103
|
+
key: 0,
|
|
104
|
+
name: _ctx.name,
|
|
105
|
+
size: _ctx.size,
|
|
106
|
+
color: _ctx.color
|
|
107
|
+
}, null, 8, ["name", "size", "color"])) : createCommentVNode("", true),
|
|
108
|
+
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
78
109
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
79
110
|
[vShow, _ctx.modelValue]
|
|
80
111
|
]),
|
|
@@ -85,5 +116,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
116
|
])
|
|
86
117
|
], 6);
|
|
87
118
|
}
|
|
88
|
-
_sfc_main
|
|
89
|
-
export {
|
|
119
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
120
|
+
export { index as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { create } = createComponent("tabpane");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
title: {
|
|
12
13
|
type: [String, Number],
|
|
@@ -34,5 +35,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34
35
|
renderSlot(_ctx.$slots, "default")
|
|
35
36
|
], 2);
|
|
36
37
|
}
|
|
37
|
-
_sfc_main
|
|
38
|
-
export {
|
|
38
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
39
|
+
export { index as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { create } = createComponent("tabbar");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
visible: {
|
|
12
13
|
type: [Number, String],
|
|
@@ -68,5 +69,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
68
69
|
renderSlot(_ctx.$slots, "default")
|
|
69
70
|
], 2);
|
|
70
71
|
}
|
|
71
|
-
_sfc_main
|
|
72
|
-
export {
|
|
72
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
73
|
+
export { index as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import { useRouter } from "vue-router";
|
|
8
8
|
import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { create } = createComponent("tabbar-item");
|
|
10
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
12
13
|
tabTitle: {
|
|
13
14
|
type: String,
|
|
@@ -55,14 +56,14 @@ var _sfc_main = create({
|
|
|
55
56
|
const router = useRouter();
|
|
56
57
|
const relation = (child) => {
|
|
57
58
|
if (child.proxy) {
|
|
58
|
-
let
|
|
59
|
-
state.index =
|
|
59
|
+
let index2 = parent.children.length;
|
|
60
|
+
state.index = index2;
|
|
60
61
|
parent.children.push(child.proxy);
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
relation(getCurrentInstance());
|
|
64
|
-
function change(
|
|
65
|
-
parent.changeIndex(
|
|
65
|
+
function change(index2) {
|
|
66
|
+
parent.changeIndex(index2);
|
|
66
67
|
}
|
|
67
68
|
const choosed = computed(() => {
|
|
68
69
|
if (parent) {
|
|
@@ -133,5 +134,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
133
134
|
])
|
|
134
135
|
], 6);
|
|
135
136
|
}
|
|
136
|
-
_sfc_main
|
|
137
|
-
export {
|
|
137
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
138
|
+
export { index as default };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
/*!
|
|
21
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2021 @jdf2e.
|
|
23
|
+
* Released under the MIT License.
|
|
24
|
+
*/
|
|
25
|
+
import { c as createComponent } from "./component.js";
|
|
26
|
+
import { h, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
|
+
var RenderColumn = {
|
|
29
|
+
setup(props) {
|
|
30
|
+
return () => h(`view`, {}, props.slots());
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
slots: Object
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const component = (componentName2) => {
|
|
37
|
+
return {
|
|
38
|
+
components: {
|
|
39
|
+
RenderColumn
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
bordered: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
46
|
+
columns: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: () => {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
data: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => {
|
|
55
|
+
return {};
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
summary: {
|
|
59
|
+
type: Function,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
striped: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emits: ["sorter"],
|
|
68
|
+
setup(props, { emit, slots }) {
|
|
69
|
+
const state = reactive({
|
|
70
|
+
curData: props.data
|
|
71
|
+
});
|
|
72
|
+
const classes = computed(() => {
|
|
73
|
+
const prefixCls = componentName2;
|
|
74
|
+
return {
|
|
75
|
+
[prefixCls]: true
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
const cellClasses = (item) => {
|
|
79
|
+
return {
|
|
80
|
+
"nut-table__main__head__tr--border": props.bordered,
|
|
81
|
+
[`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
const getColumnItem = (value) => {
|
|
85
|
+
return props.columns.filter((item) => item.key === value)[0];
|
|
86
|
+
};
|
|
87
|
+
const handleSorterClick = (item) => {
|
|
88
|
+
if (item.sorter) {
|
|
89
|
+
emit("sorter", item);
|
|
90
|
+
state.curData = typeof item.sorter === "function" ? state.curData.sort(item.sorter) : item.sorter === "default" ? state.curData.sort() : state.curData;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
watch(() => props.data, (val) => {
|
|
94
|
+
state.curData = val.slice();
|
|
95
|
+
});
|
|
96
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
97
|
+
classes,
|
|
98
|
+
cellClasses,
|
|
99
|
+
getColumnItem,
|
|
100
|
+
handleSorterClick
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
const { componentName, create } = createComponent("table");
|
|
106
|
+
const _sfc_main = create(component(componentName));
|
|
107
|
+
const _hoisted_1 = { class: "nut-table__main__head" };
|
|
108
|
+
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
109
|
+
const _hoisted_3 = ["onClick"];
|
|
110
|
+
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
111
|
+
const _hoisted_5 = {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: "nut-table__summary"
|
|
114
|
+
};
|
|
115
|
+
const _hoisted_6 = ["innerHTML"];
|
|
116
|
+
const _hoisted_7 = {
|
|
117
|
+
key: 1,
|
|
118
|
+
class: "nut-table__nodata"
|
|
119
|
+
};
|
|
120
|
+
const _hoisted_8 = {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: "nut-table__nodata__text"
|
|
123
|
+
};
|
|
124
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
125
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
126
|
+
const _component_RenderColumn = resolveComponent("RenderColumn");
|
|
127
|
+
return openBlock(), createElementBlock("view", {
|
|
128
|
+
class: normalizeClass(_ctx.classes)
|
|
129
|
+
}, [
|
|
130
|
+
createElementVNode("view", {
|
|
131
|
+
class: normalizeClass(["nut-table__main", { "nut-table__main--striped": _ctx.striped }])
|
|
132
|
+
}, [
|
|
133
|
+
createElementVNode("view", _hoisted_1, [
|
|
134
|
+
createElementVNode("view", _hoisted_2, [
|
|
135
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
|
|
136
|
+
return openBlock(), createElementBlock("span", {
|
|
137
|
+
class: normalizeClass(["nut-table__main__head__tr__th", _ctx.cellClasses(item)]),
|
|
138
|
+
key: item.key,
|
|
139
|
+
onClick: ($event) => _ctx.handleSorterClick(item)
|
|
140
|
+
}, [
|
|
141
|
+
createTextVNode(toDisplayString(item.title) + " ", 1),
|
|
142
|
+
renderSlot(_ctx.$slots, "icon"),
|
|
143
|
+
!_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
|
|
144
|
+
key: 0,
|
|
145
|
+
name: "down-arrow",
|
|
146
|
+
size: "12px"
|
|
147
|
+
})) : createCommentVNode("", true)
|
|
148
|
+
], 10, _hoisted_3);
|
|
149
|
+
}), 128))
|
|
150
|
+
])
|
|
151
|
+
]),
|
|
152
|
+
createElementVNode("view", _hoisted_4, [
|
|
153
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
|
|
154
|
+
return openBlock(), createElementBlock("view", {
|
|
155
|
+
class: "nut-table__main__body__tr",
|
|
156
|
+
key: item
|
|
157
|
+
}, [
|
|
158
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(item), (value) => {
|
|
159
|
+
return openBlock(), createElementBlock("span", {
|
|
160
|
+
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
161
|
+
key: value
|
|
162
|
+
}, [
|
|
163
|
+
createTextVNode(toDisplayString(typeof item[value] !== "function" ? item[value] : "") + " ", 1),
|
|
164
|
+
typeof item[value] === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
165
|
+
key: 0,
|
|
166
|
+
slots: item[value]
|
|
167
|
+
}, null, 8, ["slots"])) : createCommentVNode("", true)
|
|
168
|
+
], 2);
|
|
169
|
+
}), 128))
|
|
170
|
+
]);
|
|
171
|
+
}), 128))
|
|
172
|
+
])
|
|
173
|
+
], 2),
|
|
174
|
+
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
175
|
+
createElementVNode("span", {
|
|
176
|
+
class: "nut-table__summary__text",
|
|
177
|
+
innerHTML: _ctx.summary().value
|
|
178
|
+
}, null, 8, _hoisted_6)
|
|
179
|
+
])) : createCommentVNode("", true),
|
|
180
|
+
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
181
|
+
createElementVNode("div", {
|
|
182
|
+
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
183
|
+
}, [
|
|
184
|
+
renderSlot(_ctx.$slots, "nodata"),
|
|
185
|
+
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_8, " \u6682\u65E0\u6570\u636E ")) : createCommentVNode("", true)
|
|
186
|
+
], 2)
|
|
187
|
+
])) : createCommentVNode("", true)
|
|
188
|
+
], 2);
|
|
189
|
+
}
|
|
190
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
191
|
+
export { index as default };
|
|
@@ -14,21 +14,19 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
18
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
-
};
|
|
20
17
|
var __publicField = (obj, key, value) => {
|
|
21
18
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
19
|
return value;
|
|
23
20
|
};
|
|
24
21
|
/*!
|
|
25
|
-
* @nutui/nutui v3.1.
|
|
22
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
26
23
|
* (c) 2021 @jdf2e.
|
|
27
24
|
* Released under the MIT License.
|
|
28
25
|
*/
|
|
29
26
|
import { p as pxCheck } from "./pxCheck.js";
|
|
30
27
|
import { provide, computed, ref, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
|
|
31
28
|
import { c as createComponent } from "./component.js";
|
|
29
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
32
30
|
const { create } = createComponent("tabs");
|
|
33
31
|
class Title {
|
|
34
32
|
constructor() {
|
|
@@ -38,7 +36,7 @@ class Title {
|
|
|
38
36
|
__publicField(this, "disabled", false);
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
|
-
|
|
39
|
+
const _sfc_main = create({
|
|
42
40
|
props: {
|
|
43
41
|
modelValue: {
|
|
44
42
|
type: [String, Number],
|
|
@@ -52,14 +50,14 @@ var _sfc_main = create({
|
|
|
52
50
|
type: String,
|
|
53
51
|
default: "horizontal"
|
|
54
52
|
},
|
|
53
|
+
size: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "normal"
|
|
56
|
+
},
|
|
55
57
|
type: {
|
|
56
58
|
type: String,
|
|
57
59
|
default: "line"
|
|
58
60
|
},
|
|
59
|
-
lineWidth: {
|
|
60
|
-
type: [String, Number],
|
|
61
|
-
default: ""
|
|
62
|
-
},
|
|
63
61
|
titleScroll: {
|
|
64
62
|
type: Boolean,
|
|
65
63
|
default: false
|
|
@@ -88,7 +86,7 @@ var _sfc_main = create({
|
|
|
88
86
|
const titles = ref([]);
|
|
89
87
|
const currentIndex = ref(props.modelValue || 0);
|
|
90
88
|
const renderTitles = (vnodes) => {
|
|
91
|
-
vnodes.forEach((vnode,
|
|
89
|
+
vnodes.forEach((vnode, index2) => {
|
|
92
90
|
var _a, _b, _c, _d, _e;
|
|
93
91
|
let type = vnode.type;
|
|
94
92
|
type = type.name || type;
|
|
@@ -96,7 +94,7 @@ var _sfc_main = create({
|
|
|
96
94
|
let title = new Title();
|
|
97
95
|
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
|
|
98
96
|
title.title = (_c = vnode.props) == null ? void 0 : _c.title;
|
|
99
|
-
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) ||
|
|
97
|
+
title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index2;
|
|
100
98
|
title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
|
|
101
99
|
}
|
|
102
100
|
titles.value.push(title);
|
|
@@ -115,11 +113,11 @@ var _sfc_main = create({
|
|
|
115
113
|
init(vnodes);
|
|
116
114
|
});
|
|
117
115
|
watch(() => props.modelValue, (value) => {
|
|
118
|
-
let
|
|
119
|
-
if (
|
|
116
|
+
let index2 = titles.value.findIndex((item) => item.paneKey == value);
|
|
117
|
+
if (index2 == -1) {
|
|
120
118
|
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 .");
|
|
121
119
|
} else {
|
|
122
|
-
currentIndex.value =
|
|
120
|
+
currentIndex.value = index2;
|
|
123
121
|
}
|
|
124
122
|
});
|
|
125
123
|
onMounted(init);
|
|
@@ -148,12 +146,12 @@ var _sfc_main = create({
|
|
|
148
146
|
};
|
|
149
147
|
});
|
|
150
148
|
const methods = {
|
|
151
|
-
tabChange: (item,
|
|
149
|
+
tabChange: (item, index2) => {
|
|
152
150
|
emit("click", item);
|
|
153
151
|
if (item.disabled) {
|
|
154
152
|
return;
|
|
155
153
|
}
|
|
156
|
-
currentIndex.value =
|
|
154
|
+
currentIndex.value = index2;
|
|
157
155
|
emit("update:modelValue", item.paneKey);
|
|
158
156
|
emit("change", item);
|
|
159
157
|
}
|
|
@@ -162,8 +160,8 @@ var _sfc_main = create({
|
|
|
162
160
|
titles,
|
|
163
161
|
contentStyle,
|
|
164
162
|
tabsNavStyle,
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
tabsActiveStyle,
|
|
164
|
+
titleStyle
|
|
167
165
|
}, methods);
|
|
168
166
|
}
|
|
169
167
|
});
|
|
@@ -174,14 +172,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
174
172
|
class: normalizeClass(["nut-tabs", [_ctx.direction]])
|
|
175
173
|
}, [
|
|
176
174
|
createElementVNode("view", {
|
|
177
|
-
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll }]),
|
|
175
|
+
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
178
176
|
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
179
177
|
}, [
|
|
180
|
-
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item,
|
|
178
|
+
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
|
|
181
179
|
return openBlock(), createElementBlock("view", {
|
|
182
180
|
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
183
181
|
style: normalizeStyle(_ctx.titleStyle),
|
|
184
|
-
onClick: ($event) => _ctx.tabChange(item,
|
|
182
|
+
onClick: ($event) => _ctx.tabChange(item, index2),
|
|
185
183
|
key: item.paneKey
|
|
186
184
|
}, [
|
|
187
185
|
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
@@ -213,5 +211,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
213
211
|
], 4)
|
|
214
212
|
], 2);
|
|
215
213
|
}
|
|
216
|
-
_sfc_main
|
|
217
|
-
export {
|
|
214
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
215
|
+
export { index as default };
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @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";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("tag");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
color: { type: String, default: "" },
|
|
12
13
|
textColor: { type: String, default: "" },
|
|
@@ -85,10 +86,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
85
86
|
key: 0,
|
|
86
87
|
class: "nut-tag--close",
|
|
87
88
|
name: "close",
|
|
88
|
-
size: "
|
|
89
|
+
size: "12",
|
|
89
90
|
onClick: _ctx.onClose
|
|
90
91
|
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
91
92
|
], 6);
|
|
92
93
|
}
|
|
93
|
-
_sfc_main
|
|
94
|
-
export {
|
|
94
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
95
|
+
export { index as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass,
|
|
6
|
+
import { computed, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("textarea");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
modelValue: {
|
|
12
13
|
type: [String, Number],
|
|
@@ -86,7 +87,7 @@ var _sfc_main = create({
|
|
|
86
87
|
const input = event.target;
|
|
87
88
|
let value = input.value;
|
|
88
89
|
emitChange(value, event);
|
|
89
|
-
emit("blur", event);
|
|
90
|
+
emit("blur", { value, event });
|
|
90
91
|
};
|
|
91
92
|
return {
|
|
92
93
|
classes,
|
|
@@ -97,21 +98,16 @@ var _sfc_main = create({
|
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
|
-
const _hoisted_1 =
|
|
101
|
+
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder"];
|
|
102
|
+
const _hoisted_2 = {
|
|
101
103
|
key: 0,
|
|
102
|
-
class: "nut-textarea__textarea"
|
|
103
|
-
};
|
|
104
|
-
const _hoisted_2 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder"];
|
|
105
|
-
const _hoisted_3 = {
|
|
106
|
-
key: 2,
|
|
107
104
|
class: "nut-textarea__limit"
|
|
108
105
|
};
|
|
109
106
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
110
107
|
return openBlock(), createElementBlock("view", {
|
|
111
108
|
class: normalizeClass(_ctx.classes)
|
|
112
109
|
}, [
|
|
113
|
-
|
|
114
|
-
key: 1,
|
|
110
|
+
createElementVNode("textarea", {
|
|
115
111
|
class: "nut-textarea__textarea",
|
|
116
112
|
style: normalizeStyle(_ctx.styles),
|
|
117
113
|
rows: _ctx.rows,
|
|
@@ -123,9 +119,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
123
119
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
124
120
|
maxlength: _ctx.maxLength,
|
|
125
121
|
placeholder: _ctx.placeholder
|
|
126
|
-
}, null, 44,
|
|
127
|
-
_ctx.limitShow ? (openBlock(), createElementBlock("view",
|
|
122
|
+
}, null, 44, _hoisted_1),
|
|
123
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
128
124
|
], 2);
|
|
129
125
|
}
|
|
130
|
-
_sfc_main
|
|
131
|
-
export {
|
|
126
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
127
|
+
export { index as default };
|
|
@@ -17,18 +17,16 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
28
|
const { componentName, create } = createComponent("timedetail");
|
|
31
|
-
|
|
29
|
+
const _sfc_main = create({
|
|
32
30
|
name: "timedetail",
|
|
33
31
|
props: {
|
|
34
32
|
times: {
|
|
@@ -100,5 +98,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
98
|
])
|
|
101
99
|
], 2);
|
|
102
100
|
}
|
|
103
|
-
_sfc_main
|
|
104
|
-
export {
|
|
101
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
102
|
+
export { index as default };
|