@nutui/nutui 4.0.11 → 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 +2 -2
- 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 +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -4
- 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,32 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 { reactive, ref, computed, onMounted, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vShow, Fragment, renderList, normalizeStyle, createCommentVNode, createVNode, withCtx, renderSlot, toDisplayString } from "vue";
|
|
21
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
+
import { u as useRect } from "./index-29892cda.js";
|
|
23
|
+
import { Close } from "@nutui/icons-vue";
|
|
24
|
+
import Popover from "./Popover.js";
|
|
25
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
19
26
|
import "../locale/lang";
|
|
20
|
-
import "./renderIcon-
|
|
21
|
-
import "./index-
|
|
27
|
+
import "./renderIcon-3d0fd47c.js";
|
|
28
|
+
import "./index-da0a7662.js";
|
|
22
29
|
import "./Overlay.js";
|
|
23
|
-
const { create
|
|
30
|
+
const { create } = createComponent("tour");
|
|
31
|
+
const _sfc_main = create({
|
|
24
32
|
components: {
|
|
25
|
-
[
|
|
26
|
-
Close
|
|
33
|
+
[Popover.name]: Popover,
|
|
34
|
+
Close
|
|
27
35
|
},
|
|
28
36
|
props: {
|
|
29
|
-
modelValue: { type: Boolean, default:
|
|
37
|
+
modelValue: { type: Boolean, default: false },
|
|
30
38
|
type: {
|
|
31
39
|
type: String,
|
|
32
40
|
default: "step"
|
|
@@ -58,7 +66,7 @@ const { create: ot } = x("tour"), st = ot({
|
|
|
58
66
|
},
|
|
59
67
|
mask: {
|
|
60
68
|
type: Boolean,
|
|
61
|
-
default:
|
|
69
|
+
default: true
|
|
62
70
|
},
|
|
63
71
|
offset: {
|
|
64
72
|
type: Array,
|
|
@@ -82,149 +90,195 @@ const { create: ot } = x("tour"), st = ot({
|
|
|
82
90
|
},
|
|
83
91
|
closeOnClickOverlay: {
|
|
84
92
|
type: Boolean,
|
|
85
|
-
default:
|
|
93
|
+
default: true
|
|
86
94
|
},
|
|
87
95
|
showPrevStep: {
|
|
88
96
|
type: Boolean,
|
|
89
|
-
default:
|
|
97
|
+
default: true
|
|
90
98
|
},
|
|
91
99
|
showTitleBar: {
|
|
92
100
|
type: Boolean,
|
|
93
|
-
default:
|
|
101
|
+
default: true
|
|
94
102
|
}
|
|
95
103
|
},
|
|
96
104
|
emits: ["update:modelValue", "change", "close"],
|
|
97
|
-
setup(
|
|
98
|
-
const
|
|
99
|
-
showTour:
|
|
100
|
-
showPopup:
|
|
105
|
+
setup(props, { emit }) {
|
|
106
|
+
const state = reactive({
|
|
107
|
+
showTour: props.modelValue,
|
|
108
|
+
showPopup: false,
|
|
101
109
|
active: 0
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
});
|
|
111
|
+
const maskRect = ref({});
|
|
112
|
+
const classes = computed(() => {
|
|
113
|
+
const prefixCls = "nut-tour";
|
|
114
|
+
return `${prefixCls}`;
|
|
115
|
+
});
|
|
116
|
+
const maskStyle = computed(() => {
|
|
117
|
+
const { offset, maskWidth, maskHeight } = props;
|
|
118
|
+
const { width, height, left, top } = maskRect.value;
|
|
119
|
+
const center = [left + width / 2, top + height / 2];
|
|
120
|
+
const w = Number(maskWidth ? maskWidth : width);
|
|
121
|
+
const h = Number(maskHeight ? maskHeight : height);
|
|
122
|
+
const styles = {
|
|
123
|
+
width: `${w + +offset[1] * 2}px`,
|
|
124
|
+
height: `${h + +offset[0] * 2}px`,
|
|
125
|
+
top: `${center[1] - h / 2 - +offset[0]}px`,
|
|
126
|
+
left: `${center[0] - w / 2 - +offset[1]}px`
|
|
109
127
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
return styles;
|
|
129
|
+
});
|
|
130
|
+
const changeStep = (type) => {
|
|
131
|
+
if (type == "next") {
|
|
132
|
+
state.active = state.active + 1;
|
|
133
|
+
} else {
|
|
134
|
+
state.active = state.active - 1;
|
|
135
|
+
}
|
|
136
|
+
state.showPopup = false;
|
|
137
|
+
nextTick(() => {
|
|
138
|
+
state.showPopup = true;
|
|
139
|
+
getRootPosition();
|
|
140
|
+
});
|
|
141
|
+
emit("change", state.active);
|
|
142
|
+
};
|
|
143
|
+
const getRootPosition = () => {
|
|
144
|
+
const el = document.querySelector(`#${props.steps[state.active].target}`);
|
|
145
|
+
const rect = useRect(el);
|
|
146
|
+
maskRect.value = rect;
|
|
147
|
+
};
|
|
148
|
+
const close = () => {
|
|
149
|
+
state.showTour = false;
|
|
150
|
+
state.showPopup = false;
|
|
151
|
+
emit("close", state.active);
|
|
152
|
+
emit("update:modelValue", false);
|
|
121
153
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
154
|
+
const handleClickMask = () => {
|
|
155
|
+
props.closeOnClickOverlay && close();
|
|
156
|
+
};
|
|
157
|
+
onMounted(() => {
|
|
158
|
+
state.active = 0;
|
|
159
|
+
getRootPosition();
|
|
160
|
+
});
|
|
161
|
+
watch(
|
|
162
|
+
() => props.modelValue,
|
|
163
|
+
(val) => {
|
|
164
|
+
if (val) {
|
|
165
|
+
getRootPosition();
|
|
166
|
+
}
|
|
167
|
+
state.active = 0;
|
|
168
|
+
state.showTour = val;
|
|
169
|
+
state.showPopup = val;
|
|
128
170
|
}
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
171
|
+
);
|
|
172
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
173
|
+
classes,
|
|
174
|
+
maskStyle,
|
|
175
|
+
changeStep,
|
|
176
|
+
close,
|
|
177
|
+
handleClickMask
|
|
135
178
|
});
|
|
136
179
|
}
|
|
137
|
-
})
|
|
180
|
+
});
|
|
181
|
+
const _hoisted_1 = {
|
|
138
182
|
key: 0,
|
|
139
183
|
class: "nut-tour-content"
|
|
140
|
-
}
|
|
184
|
+
};
|
|
185
|
+
const _hoisted_2 = {
|
|
141
186
|
key: 0,
|
|
142
187
|
class: "nut-tour-content-top"
|
|
143
|
-
}
|
|
188
|
+
};
|
|
189
|
+
const _hoisted_3 = { class: "nut-tour-content-inner" };
|
|
190
|
+
const _hoisted_4 = { class: "nut-tour-content-bottom" };
|
|
191
|
+
const _hoisted_5 = { class: "nut-tour-content-bottom-init" };
|
|
192
|
+
const _hoisted_6 = { class: "nut-tour-content-bottom-operate" };
|
|
193
|
+
const _hoisted_7 = {
|
|
144
194
|
key: 1,
|
|
145
195
|
class: "nut-tour-content nut-tour-content-tile"
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
196
|
+
};
|
|
197
|
+
const _hoisted_8 = { class: "nut-tour-content-inner" };
|
|
198
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
199
|
+
const _component_Close = resolveComponent("Close");
|
|
200
|
+
const _component_nut_popover = resolveComponent("nut-popover");
|
|
201
|
+
return openBlock(), createElementBlock("div", {
|
|
202
|
+
class: normalizeClass(_ctx.classes)
|
|
151
203
|
}, [
|
|
152
|
-
|
|
204
|
+
withDirectives(createElementVNode("div", {
|
|
153
205
|
class: "nut-tour-masked",
|
|
154
|
-
onClick:
|
|
206
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickMask && _ctx.handleClickMask(...args))
|
|
155
207
|
}, null, 512), [
|
|
156
|
-
[
|
|
208
|
+
[vShow, _ctx.showTour]
|
|
157
209
|
]),
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
class: "nut-tour-content-bottom-operate-btn active",
|
|
204
|
-
onClick: e[3] || (e[3] = (...s) => t.close && t.close(...s))
|
|
205
|
-
}, u(t.completeTxt), 1)) : a("", !0),
|
|
206
|
-
v(t.$slots, "next-step", {}, () => [
|
|
207
|
-
t.steps.length - 1 != t.active ? (n(), r("div", {
|
|
210
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.steps, (step, i) => {
|
|
211
|
+
return openBlock(), createElementBlock("div", {
|
|
212
|
+
key: i,
|
|
213
|
+
style: { "height": "0" }
|
|
214
|
+
}, [
|
|
215
|
+
i == _ctx.active ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
216
|
+
_ctx.showTour ? (openBlock(), createElementBlock("div", {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: normalizeClass(["nut-tour-mask", [_ctx.mask ? "" : "nut-tour-mask-none"]]),
|
|
219
|
+
style: normalizeStyle(_ctx.maskStyle),
|
|
220
|
+
id: "nut-tour-popid"
|
|
221
|
+
}, null, 6)) : createCommentVNode("", true),
|
|
222
|
+
createVNode(_component_nut_popover, {
|
|
223
|
+
visible: _ctx.showPopup,
|
|
224
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => _ctx.showPopup = $event),
|
|
225
|
+
location: step.location || _ctx.location,
|
|
226
|
+
targetId: "nut-tour-popid",
|
|
227
|
+
bgColor: _ctx.bgColor,
|
|
228
|
+
theme: _ctx.theme,
|
|
229
|
+
"close-on-click-outside": false,
|
|
230
|
+
offset: step.popoverOffset || [0, 12],
|
|
231
|
+
arrowOffset: step.arrowOffset || 0
|
|
232
|
+
}, {
|
|
233
|
+
content: withCtx(() => [
|
|
234
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
235
|
+
_ctx.type == "step" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
236
|
+
_ctx.showTitleBar ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
237
|
+
createElementVNode("div", {
|
|
238
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.close && _ctx.close(...args))
|
|
239
|
+
}, [
|
|
240
|
+
createVNode(_component_Close, { class: "nut-tour-content-top-close" })
|
|
241
|
+
])
|
|
242
|
+
])) : createCommentVNode("", true),
|
|
243
|
+
createElementVNode("div", _hoisted_3, toDisplayString(step.content), 1),
|
|
244
|
+
createElementVNode("div", _hoisted_4, [
|
|
245
|
+
createElementVNode("div", _hoisted_5, toDisplayString(_ctx.active + 1) + "/" + toDisplayString(_ctx.steps.length), 1),
|
|
246
|
+
createElementVNode("div", _hoisted_6, [
|
|
247
|
+
renderSlot(_ctx.$slots, "prev-step", {}, () => [
|
|
248
|
+
_ctx.active != 0 && _ctx.showPrevStep ? (openBlock(), createElementBlock("div", {
|
|
249
|
+
key: 0,
|
|
250
|
+
class: "nut-tour-content-bottom-operate-btn",
|
|
251
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.changeStep("prev"))
|
|
252
|
+
}, toDisplayString(_ctx.prevStepTxt), 1)) : createCommentVNode("", true)
|
|
253
|
+
]),
|
|
254
|
+
_ctx.steps.length - 1 == _ctx.active ? (openBlock(), createElementBlock("div", {
|
|
208
255
|
key: 0,
|
|
209
256
|
class: "nut-tour-content-bottom-operate-btn active",
|
|
210
|
-
onClick:
|
|
211
|
-
},
|
|
257
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.close && _ctx.close(...args))
|
|
258
|
+
}, toDisplayString(_ctx.completeTxt), 1)) : createCommentVNode("", true),
|
|
259
|
+
renderSlot(_ctx.$slots, "next-step", {}, () => [
|
|
260
|
+
_ctx.steps.length - 1 != _ctx.active ? (openBlock(), createElementBlock("div", {
|
|
261
|
+
key: 0,
|
|
262
|
+
class: "nut-tour-content-bottom-operate-btn active",
|
|
263
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.changeStep("next"))
|
|
264
|
+
}, toDisplayString(_ctx.nextStepTxt), 1)) : createCommentVNode("", true)
|
|
265
|
+
])
|
|
212
266
|
])
|
|
213
267
|
])
|
|
214
|
-
])
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
])
|
|
219
|
-
])
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
]
|
|
224
|
-
|
|
268
|
+
])) : createCommentVNode("", true),
|
|
269
|
+
_ctx.type == "tile" ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
270
|
+
createElementVNode("div", _hoisted_8, toDisplayString(step.content), 1)
|
|
271
|
+
])) : createCommentVNode("", true)
|
|
272
|
+
])
|
|
273
|
+
]),
|
|
274
|
+
_: 2
|
|
275
|
+
}, 1032, ["visible", "location", "bgColor", "theme", "offset", "arrowOffset"])
|
|
276
|
+
], 64)) : createCommentVNode("", true)
|
|
277
|
+
]);
|
|
278
|
+
}), 128))
|
|
225
279
|
], 2);
|
|
226
280
|
}
|
|
227
|
-
const
|
|
281
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
228
282
|
export {
|
|
229
|
-
|
|
283
|
+
index as default
|
|
230
284
|
};
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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 { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
21
|
+
import { m as myFixed, c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
+
import { TriangleUp, TriangleDown } from "@nutui/icons-vue";
|
|
23
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
17
24
|
import "../locale/lang";
|
|
18
|
-
const { componentName
|
|
19
|
-
|
|
25
|
+
const { componentName, create } = createComponent("trend-arrow");
|
|
26
|
+
const _sfc_main = create({
|
|
27
|
+
components: { TriangleUp, TriangleDown },
|
|
20
28
|
props: {
|
|
21
29
|
rate: {
|
|
22
30
|
type: Number,
|
|
@@ -28,19 +36,19 @@ const { componentName: M, create: j } = V("trend-arrow"), q = j({
|
|
|
28
36
|
},
|
|
29
37
|
showSign: {
|
|
30
38
|
type: Boolean,
|
|
31
|
-
default:
|
|
39
|
+
default: false
|
|
32
40
|
},
|
|
33
41
|
showZero: {
|
|
34
42
|
type: Boolean,
|
|
35
|
-
default:
|
|
43
|
+
default: false
|
|
36
44
|
},
|
|
37
45
|
arrowLeft: {
|
|
38
46
|
type: Boolean,
|
|
39
|
-
default:
|
|
47
|
+
default: false
|
|
40
48
|
},
|
|
41
49
|
syncTextColor: {
|
|
42
50
|
type: Boolean,
|
|
43
|
-
default:
|
|
51
|
+
default: true
|
|
44
52
|
},
|
|
45
53
|
textColor: {
|
|
46
54
|
type: String,
|
|
@@ -55,52 +63,64 @@ const { componentName: M, create: j } = V("trend-arrow"), q = j({
|
|
|
55
63
|
default: "#64b578"
|
|
56
64
|
}
|
|
57
65
|
},
|
|
58
|
-
setup(
|
|
59
|
-
const
|
|
60
|
-
rateTrend:
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const { rate: o, digits: a, showSign: n, showZero: l } = e;
|
|
65
|
-
r.rateTrend = o > 0;
|
|
66
|
-
const c = Math.abs(o);
|
|
67
|
-
return !l && o === 0 ? "--" : `${n && o !== 0 ? r.rateTrend ? "+" : "-" : ""}${z(
|
|
68
|
-
Number(c),
|
|
69
|
-
a
|
|
70
|
-
)}%`;
|
|
71
|
-
}), f = u(() => {
|
|
72
|
-
const { dropColor: o, riseColor: a, syncTextColor: n, textColor: l, rate: c } = e;
|
|
66
|
+
setup(props) {
|
|
67
|
+
const state = reactive({
|
|
68
|
+
rateTrend: props.rate > 0 ? true : false
|
|
69
|
+
});
|
|
70
|
+
const classes = computed(() => {
|
|
71
|
+
const prefixCls = componentName;
|
|
73
72
|
return {
|
|
74
|
-
|
|
73
|
+
[prefixCls]: true
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
const calcRate = computed(() => {
|
|
77
|
+
const { rate, digits, showSign, showZero } = props;
|
|
78
|
+
state.rateTrend = rate > 0 ? true : false;
|
|
79
|
+
const absRate = Math.abs(rate);
|
|
80
|
+
if (!showZero && rate === 0) {
|
|
81
|
+
return "--";
|
|
82
|
+
}
|
|
83
|
+
let resultRate = `${showSign && rate !== 0 ? state.rateTrend ? "+" : "-" : ""}${myFixed(
|
|
84
|
+
Number(absRate),
|
|
85
|
+
digits
|
|
86
|
+
)}%`;
|
|
87
|
+
return resultRate;
|
|
88
|
+
});
|
|
89
|
+
const calcStyle = computed(() => {
|
|
90
|
+
const { dropColor, riseColor, syncTextColor, textColor, rate } = props;
|
|
91
|
+
let style = {
|
|
92
|
+
color: rate === 0 ? textColor : syncTextColor ? state.rateTrend ? riseColor : dropColor : textColor
|
|
75
93
|
};
|
|
94
|
+
return style;
|
|
76
95
|
});
|
|
77
|
-
return
|
|
96
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), { classes, calcRate, calcStyle });
|
|
78
97
|
}
|
|
79
98
|
});
|
|
80
|
-
function
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
100
|
+
const _component_TriangleUp = resolveComponent("TriangleUp");
|
|
101
|
+
const _component_TriangleDown = resolveComponent("TriangleDown");
|
|
102
|
+
return openBlock(), createElementBlock("view", {
|
|
103
|
+
class: normalizeClass(_ctx.classes)
|
|
84
104
|
}, [
|
|
85
|
-
|
|
105
|
+
!_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
86
106
|
key: 0,
|
|
87
107
|
class: "nut-trend-arrow-icon-before nut-trend-arrow-rate",
|
|
88
|
-
style:
|
|
89
|
-
},
|
|
90
|
-
Number(
|
|
91
|
-
|
|
92
|
-
]) :
|
|
93
|
-
Number(
|
|
94
|
-
|
|
95
|
-
]) :
|
|
96
|
-
|
|
108
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
109
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true),
|
|
110
|
+
Number(_ctx.rate) !== 0 && _ctx.rateTrend ? renderSlot(_ctx.$slots, "up-icon", { key: 1 }, () => [
|
|
111
|
+
createVNode(_component_TriangleUp, { color: _ctx.riseColor }, null, 8, ["color"])
|
|
112
|
+
]) : createCommentVNode("", true),
|
|
113
|
+
Number(_ctx.rate) !== 0 && !_ctx.rateTrend ? renderSlot(_ctx.$slots, "down-icon", { key: 2 }, () => [
|
|
114
|
+
createVNode(_component_TriangleDown, { color: _ctx.dropColor }, null, 8, ["color"])
|
|
115
|
+
]) : createCommentVNode("", true),
|
|
116
|
+
_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
97
117
|
key: 3,
|
|
98
118
|
class: "nut-trend-arrow-icon-after nut-trend-arrow-rate",
|
|
99
|
-
style:
|
|
100
|
-
},
|
|
119
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
120
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true)
|
|
101
121
|
], 2);
|
|
102
122
|
}
|
|
103
|
-
const
|
|
123
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
104
124
|
export {
|
|
105
|
-
|
|
125
|
+
index as default
|
|
106
126
|
};
|