@nutui/nutui 4.0.12-beta.1 → 4.0.12
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/dist/nutui.es.js +1 -1
- package/dist/nutui.js +1 -1
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +50 -50
- package/dist/styles/themes/jdb.scss +50 -50
- package/dist/styles/themes/jddkh.scss +50 -50
- package/dist/styles/themes/jdt.scss +50 -50
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
import { ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
21
|
+
import { StarFillN } from "@nutui/icons-vue";
|
|
22
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
23
|
+
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
24
|
+
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
25
|
+
import { u as useTouch } from "./index-7a7385e4.js";
|
|
26
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
20
27
|
import "../locale/lang";
|
|
21
|
-
const { create
|
|
28
|
+
const { create, componentName } = createComponent("rate");
|
|
29
|
+
const _sfc_main = create({
|
|
22
30
|
props: {
|
|
23
31
|
count: {
|
|
24
32
|
type: [String, Number],
|
|
@@ -30,7 +38,9 @@ const { create: A, componentName: G } = O("rate"), J = A({
|
|
|
30
38
|
},
|
|
31
39
|
customIcon: {
|
|
32
40
|
type: Object,
|
|
33
|
-
default: () =>
|
|
41
|
+
default: () => {
|
|
42
|
+
return StarFillN;
|
|
43
|
+
}
|
|
34
44
|
},
|
|
35
45
|
size: {
|
|
36
46
|
type: [String, Number],
|
|
@@ -46,108 +56,147 @@ const { create: A, componentName: G } = O("rate"), J = A({
|
|
|
46
56
|
},
|
|
47
57
|
readonly: {
|
|
48
58
|
type: Boolean,
|
|
49
|
-
default:
|
|
59
|
+
default: false
|
|
50
60
|
},
|
|
51
61
|
disabled: {
|
|
52
62
|
type: Boolean,
|
|
53
|
-
default:
|
|
63
|
+
default: false
|
|
54
64
|
},
|
|
55
65
|
allowHalf: {
|
|
56
66
|
type: Boolean,
|
|
57
|
-
default:
|
|
67
|
+
default: false
|
|
58
68
|
},
|
|
59
69
|
touchable: {
|
|
60
70
|
type: Boolean,
|
|
61
|
-
default:
|
|
71
|
+
default: true
|
|
62
72
|
},
|
|
63
73
|
spacing: {
|
|
64
74
|
type: [String, Number],
|
|
65
75
|
default: void 0
|
|
66
76
|
}
|
|
67
77
|
},
|
|
68
|
-
components: { StarFillN
|
|
78
|
+
components: { StarFillN },
|
|
69
79
|
emits: ["update:modelValue", "change"],
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
setup(props, { emit, slots }) {
|
|
81
|
+
const rateRefs = ref([]);
|
|
82
|
+
const classes = computed(() => {
|
|
83
|
+
const prefixCls = componentName;
|
|
84
|
+
return {
|
|
85
|
+
[prefixCls]: true
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
const updateVal = (value) => {
|
|
89
|
+
emit("update:modelValue", value);
|
|
90
|
+
emit("change", value);
|
|
91
|
+
};
|
|
92
|
+
const onClick = (e, index) => {
|
|
93
|
+
if (props.disabled || props.readonly)
|
|
77
94
|
return;
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
let value = 0;
|
|
96
|
+
if (index === 1 && props.modelValue === index)
|
|
97
|
+
;
|
|
98
|
+
else {
|
|
99
|
+
value = index;
|
|
100
|
+
if (props.allowHalf && e == 2) {
|
|
101
|
+
value -= 0.5;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
updateVal(value);
|
|
105
|
+
};
|
|
106
|
+
const getScoreByPosition = (x, rateRefs2, allowHalf) => {
|
|
107
|
+
let v = 0;
|
|
108
|
+
for (let index = rateRefs2.value.length - 1; index >= 0; index--) {
|
|
109
|
+
const item = rateRefs2.value[index];
|
|
110
|
+
if (x > item.offsetLeft) {
|
|
111
|
+
if (allowHalf) {
|
|
112
|
+
v = index + (x > item.offsetLeft + item.clientWidth / 2 ? 1 : 0.5);
|
|
113
|
+
} else {
|
|
114
|
+
v = index + 1;
|
|
115
|
+
}
|
|
86
116
|
break;
|
|
87
117
|
}
|
|
88
118
|
}
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
119
|
+
return v;
|
|
120
|
+
};
|
|
121
|
+
const touch = useTouch();
|
|
122
|
+
const touchMethods = {
|
|
123
|
+
onTouchStart(event) {
|
|
124
|
+
if (!props.touchable || props.readonly)
|
|
125
|
+
return;
|
|
126
|
+
touch.start(event);
|
|
93
127
|
},
|
|
94
|
-
onTouchMove(
|
|
95
|
-
|
|
128
|
+
onTouchMove(event) {
|
|
129
|
+
if (!props.touchable)
|
|
130
|
+
return;
|
|
131
|
+
touch.move(event);
|
|
132
|
+
if (touch.isHorizontal()) {
|
|
133
|
+
if (rateRefs.value) {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
updateVal(getScoreByPosition(touch.moveX.value, rateRefs, props.allowHalf));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
96
138
|
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
139
|
+
};
|
|
140
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
141
|
+
return __spreadProps(__spreadValues({
|
|
142
|
+
classes
|
|
143
|
+
}, touchMethods), {
|
|
144
|
+
onClick,
|
|
145
|
+
pxCheck,
|
|
146
|
+
rateRefs,
|
|
147
|
+
refRandomId,
|
|
148
|
+
renderIcon,
|
|
149
|
+
slots
|
|
107
150
|
});
|
|
108
151
|
}
|
|
109
|
-
})
|
|
152
|
+
});
|
|
153
|
+
const _hoisted_1 = ["id"];
|
|
154
|
+
const _hoisted_2 = { class: "nut-rate-item__icon--full" };
|
|
155
|
+
const _hoisted_3 = {
|
|
110
156
|
key: 0,
|
|
111
157
|
class: "nut-rate-item__icon--half"
|
|
112
|
-
}
|
|
158
|
+
};
|
|
159
|
+
const _hoisted_4 = {
|
|
113
160
|
key: 1,
|
|
114
161
|
class: "nut-rate-item__icon--half"
|
|
115
162
|
};
|
|
116
|
-
function
|
|
117
|
-
return
|
|
118
|
-
class:
|
|
119
|
-
onTouchstart:
|
|
120
|
-
onTouchmove:
|
|
163
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
164
|
+
return openBlock(), createElementBlock("view", {
|
|
165
|
+
class: normalizeClass(_ctx.classes),
|
|
166
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
|
|
167
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args))
|
|
121
168
|
}, [
|
|
122
|
-
(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
169
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.count), (n) => {
|
|
170
|
+
return openBlock(), createElementBlock("view", {
|
|
171
|
+
class: "nut-rate-item",
|
|
172
|
+
key: n,
|
|
173
|
+
ref_for: true,
|
|
174
|
+
ref: "rateRefs",
|
|
175
|
+
id: "rateRefs-" + _ctx.refRandomId + n,
|
|
176
|
+
style: normalizeStyle(n < Number(_ctx.count) ? { marginRight: _ctx.pxCheck(_ctx.spacing) } : {})
|
|
177
|
+
}, [
|
|
178
|
+
createElementVNode("view", _hoisted_2, [
|
|
179
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor })), {
|
|
180
|
+
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
181
|
+
onClick: ($event) => _ctx.onClick(1, n)
|
|
182
|
+
}, null, 8, ["class", "onClick"]))
|
|
183
|
+
]),
|
|
184
|
+
_ctx.allowHalf && Number(_ctx.modelValue) + 1 > n ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
185
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: n <= Number(_ctx.modelValue) + 1 ? _ctx.activeColor : _ctx.voidColor })), {
|
|
186
|
+
class: "nut-rate-item__icon",
|
|
187
|
+
onClick: ($event) => _ctx.onClick(2, n)
|
|
188
|
+
}, null, 8, ["onClick"]))
|
|
189
|
+
])) : _ctx.allowHalf && Number(_ctx.modelValue) + 1 < n ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
190
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: _ctx.voidColor })), {
|
|
191
|
+
class: "nut-rate-item__icon nut-rate-item__icon--disabled",
|
|
192
|
+
onClick: ($event) => _ctx.onClick(2, n)
|
|
193
|
+
}, null, 8, ["onClick"]))
|
|
194
|
+
])) : createCommentVNode("", true)
|
|
195
|
+
], 12, _hoisted_1);
|
|
196
|
+
}), 128))
|
|
148
197
|
], 34);
|
|
149
198
|
}
|
|
150
|
-
const
|
|
199
|
+
const Rate = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
151
200
|
export {
|
|
152
|
-
|
|
201
|
+
Rate as default
|
|
153
202
|
};
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { provide
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create } = createComponent("row");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
type: {
|
|
8
9
|
type: String,
|
|
@@ -26,29 +27,34 @@ const { componentName: d, create: g } = p("row"), y = g({
|
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
emits: [],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
30
|
+
setup(props) {
|
|
31
|
+
const prefixCls = componentName;
|
|
32
|
+
provide("gutter", props.gutter);
|
|
33
|
+
const getClass = (prefix, type) => {
|
|
34
|
+
return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
|
|
35
|
+
};
|
|
36
|
+
const classes = computed(() => {
|
|
37
|
+
return [
|
|
38
|
+
prefixCls,
|
|
39
|
+
getClass("", props.type),
|
|
40
|
+
getClass("justify", props.justify),
|
|
41
|
+
getClass("align", props.align),
|
|
42
|
+
getClass("flex", props.flexWrap)
|
|
43
|
+
];
|
|
44
|
+
});
|
|
33
45
|
return {
|
|
34
|
-
classes
|
|
35
|
-
n,
|
|
36
|
-
e("", t.type),
|
|
37
|
-
e("justify", t.justify),
|
|
38
|
-
e("align", t.align),
|
|
39
|
-
e("flex", t.flexWrap)
|
|
40
|
-
])
|
|
46
|
+
classes
|
|
41
47
|
};
|
|
42
48
|
}
|
|
43
49
|
});
|
|
44
|
-
function
|
|
45
|
-
return
|
|
46
|
-
class:
|
|
50
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
51
|
+
return openBlock(), createElementBlock("view", {
|
|
52
|
+
class: normalizeClass(_ctx.classes)
|
|
47
53
|
}, [
|
|
48
|
-
|
|
54
|
+
renderSlot(_ctx.$slots, "default")
|
|
49
55
|
], 2);
|
|
50
56
|
}
|
|
51
|
-
const
|
|
57
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
52
58
|
export {
|
|
53
|
-
|
|
59
|
+
index as default
|
|
54
60
|
};
|