@nutui/nutui 3.1.23-beta.5 → 3.2.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 +63 -1
- package/dist/nutui.es.js +382 -355
- package/dist/nutui.umd.js +375 -348
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +17 -15
- package/dist/packages/_es/AddressList.js +3 -5
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +29 -44
- package/dist/packages/_es/AudioOperate.js +2 -4
- package/dist/packages/_es/Avatar.js +4 -5
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Category.js +2 -2
- package/dist/packages/_es/CategoryPane.js +10 -10
- package/dist/packages/_es/Cell.js +8 -9
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +11 -10
- package/dist/packages/_es/CollapseItem.js +13 -11
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -1
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +18 -14
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +6 -5
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +3 -6
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +4 -10
- package/dist/packages/_es/Input.js +97 -67
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +6 -5
- package/dist/packages/_es/MenuItem.js +9 -7
- package/dist/packages/_es/Navbar.js +10 -8
- package/dist/packages/_es/NoticeBar.js +4 -4
- package/dist/packages/_es/Notify.js +5 -11
- package/dist/packages/_es/NumberKeyboard.js +10 -12
- package/dist/packages/_es/OldPicker.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +7 -1
- package/dist/packages/_es/Popover.js +4 -7
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +4 -5
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +21 -8
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +6 -5
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +6 -5
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +11 -15
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +4 -5
- package/dist/packages/_es/Uploader.js +41 -32
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -4
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +5 -5
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +1 -1
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +1 -111
- package/dist/packages/actionsheet/index.scss +17 -0
- package/dist/packages/address/index.scss +60 -0
- package/dist/packages/addresslist/index.scss +57 -17
- package/dist/packages/audio/index.scss +8 -0
- package/dist/packages/barrage/index.scss +7 -0
- package/dist/packages/card/index.scss +8 -1
- package/dist/packages/category/index.scss +25 -4
- package/dist/packages/categorypane/index.scss +18 -65
- package/dist/packages/circleprogress/index.scss +6 -0
- package/dist/packages/collapseitem/index.scss +21 -0
- package/dist/packages/comment/index.scss +37 -0
- package/dist/packages/countup/index.scss +24 -3
- package/dist/packages/ecard/index.scss +31 -1
- package/dist/packages/elevator/index.scss +16 -0
- package/dist/packages/empty/index.scss +6 -0
- package/dist/packages/fixednav/index.scss +7 -0
- package/dist/packages/image/index.scss +12 -0
- package/dist/packages/infiniteloading/index.scss +18 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menu/index.scss +14 -2
- package/dist/packages/menuitem/index.scss +8 -0
- package/dist/packages/noticebar/index.scss +13 -0
- package/dist/packages/notify/index.scss +5 -0
- package/dist/packages/numberkeyboard/index.scss +10 -0
- package/dist/packages/picker/index.scss +33 -0
- package/dist/packages/popup/index.scss +10 -0
- package/dist/packages/shortpassword/index.scss +20 -0
- package/dist/packages/sidenavbaritem/index.scss +9 -0
- package/dist/packages/sku/index.scss +40 -0
- package/dist/packages/step/index.scss +52 -0
- package/dist/packages/subsidenavbar/index.scss +12 -0
- package/dist/packages/swiper/index.scss +2 -0
- package/dist/packages/swiperitem/index.scss +3 -0
- package/dist/packages/tag/index.scss +20 -0
- package/dist/packages/textarea/index.scss +6 -0
- package/dist/packages/watermark/index.scss +1 -1
- package/dist/smartips/attributes.json +17 -1
- package/dist/smartips/tags.json +8 -3
- package/dist/smartips/web-types.json +40 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +50 -50
- package/dist/styles/themes/jdb.scss +50 -50
- package/dist/styles/themes/jdt.scss +50 -50
- package/dist/styles/variables-jdb.scss +28 -7
- package/dist/styles/variables-jdt.scss +28 -7
- package/dist/styles/variables.scss +27 -7
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +1 -1
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/audio/index.vue.d.ts +4 -1
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +15 -72
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +7 -0
- package/dist/types/__VUE/cellgroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/configprovider/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countdown/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/common.d.ts +56 -0
- package/dist/types/__VUE/fixednav/index.vue.d.ts +17 -9
- package/dist/types/__VUE/formitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +5 -9
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +3 -0
- package/dist/types/__VUE/menuitem/index.vue.d.ts +7 -4
- package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/notify/index.vue.d.ts +5 -5
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/overlay/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +13 -13
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -1
- package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/signature/index.vue.d.ts +5 -2
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timedetail/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timepannel/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/index.vue.d.ts +9 -2
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { getCurrentInstance, inject, reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, Fragment, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
6
|
+
import { getCurrentInstance, inject, reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, mergeProps, Fragment, toDisplayString, createCommentVNode, renderSlot } 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
|
import "../locale/lang";
|
|
@@ -92,13 +92,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
92
92
|
createElementVNode("view", {
|
|
93
93
|
class: normalizeClass(["nut-step-icon", [!_ctx.dot ? _ctx.icon ? "is-icon" : "is-text" : ""]])
|
|
94
94
|
}, [
|
|
95
|
-
_ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
95
|
+
_ctx.icon ? (openBlock(), createBlock(_component_nut_icon, mergeProps({
|
|
96
96
|
key: 0,
|
|
97
|
-
class: "nut-step-icon-inner"
|
|
97
|
+
class: "nut-step-icon-inner"
|
|
98
|
+
}, _ctx.$attrs, {
|
|
98
99
|
color: _ctx.iconColor,
|
|
99
100
|
name: _ctx.icon,
|
|
100
101
|
size: _ctx.size
|
|
101
|
-
}, null,
|
|
102
|
+
}), null, 16, ["color", "name", "size"])) : _ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.index), 1))
|
|
102
103
|
], 2)
|
|
103
104
|
]),
|
|
104
105
|
createElementVNode("view", _hoisted_4, [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
|
|
6
|
+
import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, mergeProps, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } 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
|
import "../locale/lang";
|
|
@@ -108,12 +108,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
108
108
|
style: normalizeStyle(_ctx.style)
|
|
109
109
|
}, [
|
|
110
110
|
createElementVNode("view", _hoisted_1, [
|
|
111
|
-
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
|
|
111
|
+
_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, mergeProps({
|
|
112
112
|
key: 0,
|
|
113
|
-
name: _ctx.name
|
|
113
|
+
name: _ctx.name
|
|
114
|
+
}, _ctx.$attrs, {
|
|
114
115
|
size: _ctx.size,
|
|
115
116
|
color: _ctx.color
|
|
116
|
-
}, null,
|
|
117
|
+
}), null, 16, ["name", "size", "color"])) : createCommentVNode("", true),
|
|
117
118
|
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
118
119
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
119
120
|
[vShow, _ctx.modelValue]
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -47,23 +47,19 @@ const _sfc_main = create({
|
|
|
47
47
|
};
|
|
48
48
|
});
|
|
49
49
|
const getStyle = () => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
const style = {};
|
|
51
|
+
if (textColor.value) {
|
|
52
|
+
style.color = textColor.value;
|
|
53
|
+
} else if (color.value && plain.value) {
|
|
54
|
+
style.color = color.value;
|
|
55
55
|
}
|
|
56
56
|
if (plain.value) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
57
|
+
style.background = "#fff";
|
|
58
|
+
style["border-color"] = color.value;
|
|
59
|
+
} else if (color.value) {
|
|
60
|
+
style.background = color.value;
|
|
62
61
|
}
|
|
63
|
-
return
|
|
64
|
-
color: "",
|
|
65
|
-
background: ""
|
|
66
|
-
};
|
|
62
|
+
return style;
|
|
67
63
|
};
|
|
68
64
|
const onClose = (event) => {
|
|
69
65
|
event.stopPropagation();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, createCommentVNode, toDisplayString, vShow, render } from "vue";
|
|
6
|
+
import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, mergeProps, createCommentVNode, toDisplayString, vShow, render } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import _sfc_main$1 from "./Icon.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -176,11 +176,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
176
|
})
|
|
177
177
|
}, [
|
|
178
178
|
_ctx.hasIcon ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
179
|
-
createVNode(_component_nut_icon, {
|
|
180
|
-
size: _ctx.iconSize,
|
|
179
|
+
createVNode(_component_nut_icon, mergeProps({ size: _ctx.iconSize }, _ctx.$attrs, {
|
|
181
180
|
color: "#ffffff",
|
|
182
181
|
name: _ctx.icon
|
|
183
|
-
}, null,
|
|
182
|
+
}), null, 16, ["size", "name"])
|
|
184
183
|
])) : createCommentVNode("", true),
|
|
185
184
|
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
186
185
|
createElementVNode("view", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode } from "vue";
|
|
6
|
+
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode, mergeProps } 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
|
import "../locale/lang";
|
|
@@ -49,8 +49,8 @@ class Uploader {
|
|
|
49
49
|
xhr.setRequestHeader(key, value);
|
|
50
50
|
}
|
|
51
51
|
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
52
|
-
if (options.
|
|
53
|
-
|
|
52
|
+
if (options.beforeXhrUpload) {
|
|
53
|
+
options.beforeXhrUpload(xhr, options);
|
|
54
54
|
} else {
|
|
55
55
|
xhr.send(options.formData);
|
|
56
56
|
}
|
|
@@ -64,34 +64,38 @@ class Uploader {
|
|
|
64
64
|
if (env === "WEB") {
|
|
65
65
|
this.upload();
|
|
66
66
|
} else {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
(
|
|
67
|
+
if (options.beforeXhrUpload) {
|
|
68
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
69
|
+
} else {
|
|
70
|
+
const uploadTask = uploadFile({
|
|
71
|
+
url: options.url,
|
|
72
|
+
filePath: options.taroFilePath,
|
|
73
|
+
fileType: options.fileType,
|
|
74
|
+
header: {
|
|
75
|
+
"Content-Type": "multipart/form-data",
|
|
76
|
+
...options.headers
|
|
77
|
+
},
|
|
78
|
+
formData: options.formData,
|
|
79
|
+
name: options.name,
|
|
80
|
+
success(response) {
|
|
81
|
+
var _a2, _b;
|
|
82
|
+
if (options.xhrState == response.statusCode) {
|
|
83
|
+
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
84
|
+
} else {
|
|
85
|
+
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
fail(e) {
|
|
89
|
+
var _a2;
|
|
90
|
+
(_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
|
|
83
91
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
92
|
+
});
|
|
93
|
+
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
94
|
+
uploadTask.progress((res) => {
|
|
86
95
|
var _a2;
|
|
87
|
-
(_a2 = options.
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
91
|
-
uploadTask.progress((res) => {
|
|
92
|
-
var _a2;
|
|
93
|
-
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
94
|
-
});
|
|
96
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
}
|
|
@@ -134,6 +138,10 @@ const _sfc_main = create({
|
|
|
134
138
|
type: Function,
|
|
135
139
|
default: null
|
|
136
140
|
},
|
|
141
|
+
beforeXhrUpload: {
|
|
142
|
+
type: Function,
|
|
143
|
+
default: null
|
|
144
|
+
},
|
|
137
145
|
beforeDelete: {
|
|
138
146
|
type: Function,
|
|
139
147
|
default: (file, files) => {
|
|
@@ -177,6 +185,7 @@ const _sfc_main = create({
|
|
|
177
185
|
uploadOption.xhrState = props.xhrState;
|
|
178
186
|
uploadOption.headers = props.headers;
|
|
179
187
|
uploadOption.withCredentials = props.withCredentials;
|
|
188
|
+
uploadOption.beforeXhrUpload = props.beforeXhrUpload;
|
|
180
189
|
try {
|
|
181
190
|
uploadOption.sourceFile = fileItem.formData.get(props.name);
|
|
182
191
|
} catch (error) {
|
|
@@ -457,11 +466,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
457
466
|
key: 1,
|
|
458
467
|
class: normalizeClass(["nut-uploader__upload", [_ctx.listType]])
|
|
459
468
|
}, [
|
|
460
|
-
createVNode(_component_nut_icon, {
|
|
469
|
+
createVNode(_component_nut_icon, mergeProps(_ctx.$attrs, {
|
|
461
470
|
size: _ctx.uploadIconSize,
|
|
462
471
|
color: "#808080",
|
|
463
472
|
name: _ctx.uploadIcon
|
|
464
|
-
}, null,
|
|
473
|
+
}), null, 16, ["size", "name"]),
|
|
465
474
|
_ctx.capture ? (openBlock(), createElementBlock("input", {
|
|
466
475
|
key: 0,
|
|
467
476
|
class: "nut-uploader__input",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -104,7 +104,6 @@ const _sfc_main = create({
|
|
|
104
104
|
const init = () => {
|
|
105
105
|
const canvas = document.createElement("canvas");
|
|
106
106
|
const ratio = window.devicePixelRatio;
|
|
107
|
-
console.log(ratio);
|
|
108
107
|
const ctx = canvas.getContext("2d");
|
|
109
108
|
const canvasWidth = `${(gapX + width) * ratio}px`;
|
|
110
109
|
const canvasHeight = `${(gapY + height) * ratio}px`;
|
|
@@ -124,7 +123,6 @@ const _sfc_main = create({
|
|
|
124
123
|
ctx.drawImage(img, -imageWidth * ratio / 2, -imageHeight * ratio / 2, imageWidth * ratio, imageHeight * ratio);
|
|
125
124
|
ctx.restore();
|
|
126
125
|
state.base64Url = canvas.toDataURL();
|
|
127
|
-
console.log(state.base64Url);
|
|
128
126
|
};
|
|
129
127
|
} else if (content) {
|
|
130
128
|
ctx.textBaseline = "middle";
|
|
@@ -137,7 +135,6 @@ const _sfc_main = create({
|
|
|
137
135
|
ctx.fillText(content, 0, 0);
|
|
138
136
|
ctx.restore();
|
|
139
137
|
state.base64Url = canvas.toDataURL();
|
|
140
|
-
console.log(state.base64Url);
|
|
141
138
|
}
|
|
142
139
|
} else {
|
|
143
140
|
throw new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { shallowReactive, getCurrentInstance, provide, markRaw, isVNode, computed, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
9
|
function flattenVNodes(children, childName) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1
|
|
2
|
+
* @nutui/nutui v3.2.1 Tue Aug 09 2022 17:11:10 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { defineComponent } from "vue";
|
|
7
7
|
import locale from "../locale/lang";
|
|
8
8
|
const TypeOfFun = (value) => {
|
|
9
|
-
if (
|
|
9
|
+
if (null === value) {
|
|
10
10
|
return "null";
|
|
11
11
|
}
|
|
12
12
|
const type = typeof value;
|
|
13
|
-
if (
|
|
13
|
+
if ("undefined" === type || "string" === type) {
|
|
14
14
|
return type;
|
|
15
15
|
}
|
|
16
16
|
const typeString = toString.call(value);
|
|
@@ -28,8 +28,8 @@ const TypeOfFun = (value) => {
|
|
|
28
28
|
case "[object RegExp]":
|
|
29
29
|
return "regexp";
|
|
30
30
|
case "[object Object]":
|
|
31
|
-
if (value.nodeType
|
|
32
|
-
if (value.nodeType
|
|
31
|
+
if (void 0 !== value.nodeType) {
|
|
32
|
+
if (3 == value.nodeType) {
|
|
33
33
|
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
34
34
|
} else {
|
|
35
35
|
return "element";
|
package/dist/packages/_es/raf.js
CHANGED
|
@@ -1,111 +1 @@
|
|
|
1
|
-
.
|
|
2
|
-
display: flex;
|
|
3
|
-
background: rgb(255, 255, 255);
|
|
4
|
-
}
|
|
5
|
-
.nut-categorypane__cateListLeft {
|
|
6
|
-
background: rgb(246, 247, 249);
|
|
7
|
-
}
|
|
8
|
-
.nut-categorypane__cateListItemChecked, .nut-categorypane__cateListItem {
|
|
9
|
-
width: 100px;
|
|
10
|
-
height: 50px;
|
|
11
|
-
font-size: 13px;
|
|
12
|
-
font-family: PingFangSC;
|
|
13
|
-
font-weight: normal;
|
|
14
|
-
color: rgb(51, 51, 51);
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
transition: all 0.3s;
|
|
19
|
-
}
|
|
20
|
-
.nut-categorypane__cateListItemChecked {
|
|
21
|
-
background: rgb(255, 255, 255);
|
|
22
|
-
font-weight: 500;
|
|
23
|
-
transition: all 0.3s;
|
|
24
|
-
}
|
|
25
|
-
.nut-categorypane__cateListRight {
|
|
26
|
-
padding-left: 15px;
|
|
27
|
-
background: rgb(255, 255, 255);
|
|
28
|
-
}
|
|
29
|
-
.nut-categorypane__childTitle {
|
|
30
|
-
margin-top: 15px;
|
|
31
|
-
margin-bottom: 15px;
|
|
32
|
-
font-size: 13px;
|
|
33
|
-
font-family: PingFangSC;
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
color: rgb(51, 51, 51);
|
|
36
|
-
}
|
|
37
|
-
.nut-categorypane__childItemList {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-wrap: wrap;
|
|
40
|
-
}
|
|
41
|
-
.nut-categorypane__childItem {
|
|
42
|
-
margin-right: 10px;
|
|
43
|
-
}
|
|
44
|
-
.nut-categorypane__childImg {
|
|
45
|
-
width: 75px;
|
|
46
|
-
height: 75px;
|
|
47
|
-
border-radius: 5px;
|
|
48
|
-
}
|
|
49
|
-
.nut-categorypane__skuName {
|
|
50
|
-
margin-right: 10px;
|
|
51
|
-
width: 75px;
|
|
52
|
-
height: 40px;
|
|
53
|
-
border: 1px solid rgb(153, 153, 153);
|
|
54
|
-
border-radius: 5px;
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
font-family: PingFangSC;
|
|
57
|
-
font-weight: normal;
|
|
58
|
-
color: rgb(102, 102, 102);
|
|
59
|
-
display: flex;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
align-items: center;
|
|
62
|
-
}
|
|
63
|
-
.nut-categorypane__skuName:nth-child(3n) {
|
|
64
|
-
margin-right: 0;
|
|
65
|
-
}
|
|
66
|
-
.nut-categorypane__skuName:nth-child(n+4) {
|
|
67
|
-
margin-top: 15px;
|
|
68
|
-
}
|
|
69
|
-
.nut-categorypane__skuImg {
|
|
70
|
-
font-size: 12px;
|
|
71
|
-
font-family: PingFangSC;
|
|
72
|
-
font-weight: normal;
|
|
73
|
-
color: rgb(102, 102, 102);
|
|
74
|
-
margin-top: 10px;
|
|
75
|
-
margin-bottom: 10px;
|
|
76
|
-
text-align: center;
|
|
77
|
-
}
|
|
78
|
-
.nut-categorypane__selfItemList {
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-wrap: wrap;
|
|
81
|
-
}
|
|
82
|
-
.nut-categorypane__selfskuName {
|
|
83
|
-
margin-left: 15px;
|
|
84
|
-
margin-top: 15px;
|
|
85
|
-
display: flex;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
align-items: center;
|
|
88
|
-
width: 75px;
|
|
89
|
-
height: 40px;
|
|
90
|
-
border: 1px solid rgb(153, 153, 153);
|
|
91
|
-
border-radius: 5px;
|
|
92
|
-
font-size: 12px;
|
|
93
|
-
font-family: PingFangSC;
|
|
94
|
-
font-weight: normal;
|
|
95
|
-
color: rgb(102, 102, 102);
|
|
96
|
-
}
|
|
97
|
-
.nut-categorypane__skuName {
|
|
98
|
-
margin-left: 15px;
|
|
99
|
-
margin-top: 15px;
|
|
100
|
-
display: flex;
|
|
101
|
-
justify-content: center;
|
|
102
|
-
align-items: center;
|
|
103
|
-
width: 75px;
|
|
104
|
-
height: 40px;
|
|
105
|
-
border: 1px solid rgb(153, 153, 153);
|
|
106
|
-
border-radius: 5px;
|
|
107
|
-
font-size: 12px;
|
|
108
|
-
font-family: PingFangSC;
|
|
109
|
-
font-weight: normal;
|
|
110
|
-
color: rgb(102, 102, 102);
|
|
111
|
-
}/* @import './index.scss'; */
|
|
1
|
+
/* @import './index.scss'; */
|