@nutui/nutui 3.2.5-beta.1 → 3.2.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/nutui.es.js +4214 -4444
- package/dist/nutui.umd.js +4213 -4543
- package/dist/packages/_es/ActionSheet.js +18 -19
- package/dist/packages/_es/Address.js +94 -85
- package/dist/packages/_es/AddressList.js +25 -12
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +9 -2
- package/dist/packages/_es/AudioOperate.js +5 -1
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +55 -108
- package/dist/packages/_es/Badge.js +6 -4
- package/dist/packages/_es/Barrage.js +79 -103
- package/dist/packages/_es/Button.js +5 -3
- package/dist/packages/_es/Calendar.js +36 -23
- package/dist/packages/_es/CalendarItem.js +4 -3
- package/dist/packages/_es/Card.js +15 -5
- package/dist/packages/_es/Cascader.js +12 -11
- package/dist/packages/_es/Category.js +13 -12
- package/dist/packages/_es/CategoryPane.js +17 -13
- package/dist/packages/_es/Cell.js +9 -12
- package/dist/packages/_es/CellGroup.js +4 -2
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +98 -82
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +65 -34
- package/dist/packages/_es/CollapseItem.js +93 -60
- package/dist/packages/_es/Comment.js +43 -19
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +47 -52
- package/dist/packages/_es/DatePicker.js +37 -54
- package/dist/packages/_es/Dialog.js +9 -88
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +75 -49
- package/dist/packages/_es/Ecard.js +20 -18
- package/dist/packages/_es/Elevator.js +101 -76
- package/dist/packages/_es/Ellipsis.js +140 -100
- package/dist/packages/_es/Empty.js +6 -4
- package/dist/packages/_es/FixedNav.js +11 -6
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +3 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +10 -27
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +13 -114
- package/dist/packages/_es/ImagePreview.js +154 -400
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +103 -115
- package/dist/packages/_es/Input.js +54 -26
- package/dist/packages/_es/InputNumber.js +25 -16
- package/dist/packages/_es/Invoice.js +6 -5
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +47 -34
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +56 -29
- package/dist/packages/_es/Navbar.js +49 -39
- package/dist/packages/_es/NoticeBar.js +52 -41
- package/dist/packages/_es/Notify.js +37 -166
- package/dist/packages/_es/NumberKeyboard.js +15 -20
- package/dist/packages/_es/OldPicker.js +130 -116
- package/dist/packages/_es/OverLay.js +5 -28
- package/dist/packages/_es/Pagination.js +8 -5
- package/dist/packages/_es/Picker.js +196 -65
- package/dist/packages/_es/Popover.js +201 -881
- package/dist/packages/_es/Popup.js +28 -84
- package/dist/packages/_es/Price.js +22 -6
- package/dist/packages/_es/Progress.js +18 -11
- package/dist/packages/_es/PullRefresh.js +4 -2
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +48 -34
- package/dist/packages/_es/Rate.js +15 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +39 -36
- package/dist/packages/_es/ShortPassword.js +97 -66
- package/dist/packages/_es/SideNavBar.js +7 -18
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +113 -80
- package/dist/packages/_es/Skeleton.js +12 -11
- package/dist/packages/_es/Sku.js +63 -38
- package/dist/packages/_es/Step.js +7 -2
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +33 -23
- package/dist/packages/_es/SubSideNavBar.js +4 -2
- package/dist/packages/_es/Swipe.js +41 -26
- package/dist/packages/_es/Swiper.js +38 -21
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +40 -9
- package/dist/packages/_es/TabbarItem.js +24 -30
- package/dist/packages/_es/Table.js +22 -17
- package/dist/packages/_es/Tabs.js +49 -16
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +114 -49
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +12 -10
- package/dist/packages/_es/Toast.js +53 -164
- package/dist/packages/_es/TrendArrow.js +6 -4
- package/dist/packages/_es/Uploader.js +141 -140
- package/dist/packages/_es/Video.js +72 -5
- package/dist/packages/_es/WaterMark.js +22 -14
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
- package/dist/packages/_es/index2.js +8 -31
- package/dist/packages/_es/index3.js +64 -7
- package/dist/packages/_es/index4.js +424 -62
- 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 +21 -3
- package/dist/packages/_es/use-lock-scroll.js +23 -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/signature/index.scss +4 -1
- package/dist/packages/swiperitem/index.scss +1 -1
- package/dist/smartips/attributes.json +4 -0
- package/dist/smartips/tags.json +2 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +73 -33
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +15 -37
- package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +13 -1
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +13 -6
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
- package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -10
- package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
- package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +9 -12
- package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
- package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
- package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
- package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +40 -42
- package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
- package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
- package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +5 -29
- package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
- package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +64 -44
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +53 -28
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +15 -13
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +8 -7
- package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
- package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +54 -182
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
- package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
- package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
- package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
- package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
- package/dist/types/__VUE/video/index.vue.d.ts +3 -1
- package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +0 -48
- package/dist/types/__VUE/image/index.vue.d.ts +0 -117
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
- package/dist/types/__VUE/notify/index.d.ts +0 -26
- package/dist/types/__VUE/tag/type.d.ts +0 -5
- package/dist/types/__VUE/toast/index.d.ts +0 -16
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import Taro from "@tarojs/taro";
|
|
7
|
+
import { computed, ref, reactive, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, createVNode, withCtx, toDisplayString } from "vue";
|
|
7
8
|
import { c as createComponent } from "./component.js";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
import "../locale/lang";
|
|
@@ -20,15 +21,7 @@ const _sfc_main = create({
|
|
|
20
21
|
},
|
|
21
22
|
strokeStyle: {
|
|
22
23
|
type: String,
|
|
23
|
-
default:
|
|
24
|
-
let bodyDom = document.getElementsByTagName("body");
|
|
25
|
-
let clsName = bodyDom[0]["className"];
|
|
26
|
-
if (clsName.indexOf("nut-theme-dark") == -1) {
|
|
27
|
-
return "#000";
|
|
28
|
-
} else {
|
|
29
|
-
return "#fff";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
24
|
+
default: "#000"
|
|
32
25
|
},
|
|
33
26
|
type: {
|
|
34
27
|
type: String,
|
|
@@ -42,8 +35,6 @@ const _sfc_main = create({
|
|
|
42
35
|
components: {},
|
|
43
36
|
emits: ["start", "end", "signing", "confirm", "clear"],
|
|
44
37
|
setup(props, { emit }) {
|
|
45
|
-
const canvas = ref(null);
|
|
46
|
-
const wrap = ref(null);
|
|
47
38
|
const classes = computed(() => {
|
|
48
39
|
const prefixCls = componentName;
|
|
49
40
|
return {
|
|
@@ -51,122 +42,164 @@ const _sfc_main = create({
|
|
|
51
42
|
[`${props.customClass}`]: props.customClass
|
|
52
43
|
};
|
|
53
44
|
});
|
|
45
|
+
const spcanvas = ref(null);
|
|
54
46
|
const state = reactive({
|
|
47
|
+
canvas: null,
|
|
55
48
|
canvasHeight: 0,
|
|
56
49
|
canvasWidth: 0,
|
|
57
|
-
ctx: null
|
|
58
|
-
isSupportTouch: "ontouchstart" in window,
|
|
59
|
-
events: "ontouchstart" in window ? ["touchstart", "touchmove", "touchend", "touchleave"] : ["mousedown", "mousemove", "mouseup", "mouseleave"]
|
|
50
|
+
ctx: null
|
|
60
51
|
});
|
|
61
|
-
const isCanvasSupported = () => {
|
|
62
|
-
let elem = document.createElement("canvas");
|
|
63
|
-
return !!(elem.getContext && elem.getContext("2d"));
|
|
64
|
-
};
|
|
65
|
-
const addEvent = () => {
|
|
66
|
-
canvas.value.addEventListener(state.events[0], startEventHandler, false);
|
|
67
|
-
};
|
|
68
52
|
const startEventHandler = (event) => {
|
|
69
53
|
event.preventDefault();
|
|
54
|
+
if (!state.ctx) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
emit("start");
|
|
70
58
|
state.ctx.beginPath();
|
|
71
59
|
state.ctx.lineWidth = props.lineWidth;
|
|
72
60
|
state.ctx.strokeStyle = props.strokeStyle;
|
|
73
|
-
emit("start");
|
|
74
|
-
canvas.value.addEventListener(state.events[1], moveEventHandler, false);
|
|
75
|
-
canvas.value.addEventListener(state.events[2], endEventHandler, false);
|
|
76
|
-
canvas.value.addEventListener(state.events[3], leaveEventHandler, false);
|
|
77
61
|
};
|
|
78
62
|
const moveEventHandler = (event) => {
|
|
63
|
+
var _a, _b;
|
|
79
64
|
event.preventDefault();
|
|
80
|
-
|
|
65
|
+
if (!state.ctx) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
let evt = event.changedTouches[0];
|
|
81
69
|
emit("signing", evt);
|
|
82
|
-
let
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
70
|
+
let mouseX = evt.x || evt.clientX;
|
|
71
|
+
let mouseY = evt.y || evt.clientY;
|
|
72
|
+
if (Taro.getEnv() === "WEB") {
|
|
73
|
+
let coverPos = spcanvas.value.getBoundingClientRect();
|
|
74
|
+
mouseX = evt.clientX - coverPos.left;
|
|
75
|
+
mouseY = evt.clientY - coverPos.top;
|
|
76
|
+
}
|
|
77
|
+
(_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
|
|
78
|
+
(_b = state.ctx) == null ? void 0 : _b.stroke();
|
|
87
79
|
};
|
|
88
80
|
const endEventHandler = (event) => {
|
|
89
81
|
event.preventDefault();
|
|
90
82
|
emit("end");
|
|
91
|
-
canvas.value.removeEventListener(state.events[1], moveEventHandler, false);
|
|
92
|
-
canvas.value.removeEventListener(state.events[2], endEventHandler, false);
|
|
93
83
|
};
|
|
94
84
|
const leaveEventHandler = (event) => {
|
|
95
85
|
event.preventDefault();
|
|
96
|
-
canvas.value.removeEventListener(state.events[1], moveEventHandler, false);
|
|
97
|
-
canvas.value.removeEventListener(state.events[2], endEventHandler, false);
|
|
98
86
|
};
|
|
99
87
|
const clear = () => {
|
|
100
|
-
canvas.value.addEventListener(state.events[2], endEventHandler, false);
|
|
101
88
|
state.ctx.clearRect(0, 0, state.canvasWidth, state.canvasHeight);
|
|
102
89
|
state.ctx.closePath();
|
|
103
90
|
emit("clear");
|
|
104
91
|
};
|
|
105
92
|
const confirm = () => {
|
|
106
|
-
onSave(
|
|
93
|
+
onSave();
|
|
107
94
|
};
|
|
108
|
-
const onSave = (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
case "png":
|
|
112
|
-
dataurl = canvas2.toDataURL("image/png");
|
|
113
|
-
break;
|
|
114
|
-
case "jpg":
|
|
115
|
-
dataurl = canvas2.toDataURL("image/jpeg", 0.8);
|
|
116
|
-
break;
|
|
95
|
+
const onSave = () => {
|
|
96
|
+
if (!state.canvas) {
|
|
97
|
+
return;
|
|
117
98
|
}
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
Taro.createSelectorQuery().select("#spcanvas").fields({
|
|
100
|
+
node: true,
|
|
101
|
+
size: true
|
|
102
|
+
}).exec(async (res) => {
|
|
103
|
+
Taro.canvasToTempFilePath({
|
|
104
|
+
canvas: res[0].node,
|
|
105
|
+
canvasId: "spcanvas",
|
|
106
|
+
fileType: props.type,
|
|
107
|
+
success: function(result) {
|
|
108
|
+
emit("confirm", state.canvas, result.tempFilePath);
|
|
109
|
+
},
|
|
110
|
+
fail: function(result) {
|
|
111
|
+
emit("confirm", result);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
120
115
|
};
|
|
121
116
|
onMounted(() => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
Taro.nextTick(() => {
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
var _a;
|
|
120
|
+
if (Taro.getEnv() === "WEAPP") {
|
|
121
|
+
Taro.createSelectorQuery().select("#spcanvas").fields(
|
|
122
|
+
{
|
|
123
|
+
node: true,
|
|
124
|
+
size: true
|
|
125
|
+
},
|
|
126
|
+
function(res) {
|
|
127
|
+
const canvas = res.node;
|
|
128
|
+
const ctx = canvas.getContext("2d");
|
|
129
|
+
state.canvas = canvas;
|
|
130
|
+
state.ctx = ctx;
|
|
131
|
+
state.canvasWidth = res.width;
|
|
132
|
+
state.canvasHeight = res.height;
|
|
133
|
+
}
|
|
134
|
+
).exec();
|
|
135
|
+
} else {
|
|
136
|
+
console.log((_a = document.getElementById("spcanvas")) == null ? void 0 : _a.tagName);
|
|
137
|
+
const canvasDom = document.getElementById("spcanvas");
|
|
138
|
+
let canvas = canvasDom;
|
|
139
|
+
if ((canvasDom == null ? void 0 : canvasDom.tagName) !== "CANVAS") {
|
|
140
|
+
canvas = canvasDom == null ? void 0 : canvasDom.getElementsByTagName("canvas")[0];
|
|
141
|
+
}
|
|
142
|
+
const ctx = canvas.getContext("2d");
|
|
143
|
+
state.canvas = canvas;
|
|
144
|
+
state.ctx = ctx;
|
|
145
|
+
state.canvasWidth = canvas.width;
|
|
146
|
+
state.canvasHeight = canvas.height;
|
|
147
|
+
}
|
|
148
|
+
}, 1e3);
|
|
149
|
+
});
|
|
128
150
|
});
|
|
129
|
-
return {
|
|
151
|
+
return {
|
|
152
|
+
taroEnv: Taro.getEnv(),
|
|
153
|
+
spcanvas,
|
|
154
|
+
confirm,
|
|
155
|
+
clear,
|
|
156
|
+
classes,
|
|
157
|
+
startEventHandler,
|
|
158
|
+
moveEventHandler,
|
|
159
|
+
endEventHandler,
|
|
160
|
+
leaveEventHandler,
|
|
161
|
+
translate
|
|
162
|
+
};
|
|
130
163
|
}
|
|
131
164
|
});
|
|
132
|
-
const _hoisted_1 = {
|
|
133
|
-
class: "nut-signature-inner",
|
|
134
|
-
ref: "wrap"
|
|
135
|
-
};
|
|
136
|
-
const _hoisted_2 = ["height", "width"];
|
|
137
|
-
const _hoisted_3 = {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "nut-signature-unsopport"
|
|
140
|
-
};
|
|
141
165
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
142
166
|
const _component_nut_button = resolveComponent("nut-button");
|
|
143
167
|
return openBlock(), createElementBlock("div", {
|
|
144
168
|
class: normalizeClass(_ctx.classes)
|
|
145
169
|
}, [
|
|
146
|
-
createElementVNode("div",
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
170
|
+
createElementVNode("div", {
|
|
171
|
+
class: normalizeClass(["nut-signature-inner", _ctx.taroEnv === "WEAPP" ? "spcanvas_WEAPP" : ""])
|
|
172
|
+
}, [
|
|
173
|
+
createElementVNode("canvas", {
|
|
174
|
+
ref: "spcanvas",
|
|
175
|
+
class: "spcanvas",
|
|
176
|
+
id: "spcanvas",
|
|
177
|
+
canvasId: "spcanvas",
|
|
178
|
+
"canvas-id": "spcanvas",
|
|
179
|
+
type: "2d",
|
|
180
|
+
"disable-scroll": "true",
|
|
181
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.startEventHandler && _ctx.startEventHandler(...args)),
|
|
182
|
+
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.moveEventHandler && _ctx.moveEventHandler(...args)),
|
|
183
|
+
onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.endEventHandler && _ctx.endEventHandler(...args)),
|
|
184
|
+
onTouchleave: _cache[3] || (_cache[3] = (...args) => _ctx.leaveEventHandler && _ctx.leaveEventHandler(...args))
|
|
185
|
+
}, null, 544)
|
|
186
|
+
], 2),
|
|
187
|
+
createTextVNode(),
|
|
156
188
|
createVNode(_component_nut_button, {
|
|
157
189
|
class: "nut-signature-btn",
|
|
158
190
|
type: "default",
|
|
159
|
-
onClick: _cache[
|
|
191
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.clear())
|
|
160
192
|
}, {
|
|
161
193
|
default: withCtx(() => [
|
|
162
194
|
createTextVNode(toDisplayString(_ctx.translate("reSign")), 1)
|
|
163
195
|
]),
|
|
164
196
|
_: 1
|
|
165
197
|
}),
|
|
198
|
+
createTextVNode(),
|
|
166
199
|
createVNode(_component_nut_button, {
|
|
167
200
|
class: "nut-signature-btn",
|
|
168
201
|
type: "primary",
|
|
169
|
-
onClick: _cache[
|
|
202
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.confirm())
|
|
170
203
|
}, {
|
|
171
204
|
default: withCtx(() => [
|
|
172
205
|
createTextVNode(toDisplayString(_ctx.translate("confirm")), 1)
|
|
@@ -175,5 +208,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
175
208
|
})
|
|
176
209
|
], 2);
|
|
177
210
|
}
|
|
178
|
-
var
|
|
179
|
-
export {
|
|
211
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
212
|
+
export { index_taro as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot,
|
|
7
|
+
import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createTextVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderList } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const component = {
|
|
@@ -95,10 +95,7 @@ const _hoisted_2 = {
|
|
|
95
95
|
key: 1,
|
|
96
96
|
class: "skeleton"
|
|
97
97
|
};
|
|
98
|
-
const _hoisted_3 = {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "skeleton-animation"
|
|
101
|
-
};
|
|
98
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("view", { class: "skeleton-animation" }, null, -1);
|
|
102
99
|
const _hoisted_4 = { class: "content" };
|
|
103
100
|
const _hoisted_5 = { class: "content-line" };
|
|
104
101
|
const _hoisted_6 = {
|
|
@@ -110,7 +107,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
110
107
|
return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
111
108
|
renderSlot(_ctx.$slots, "default")
|
|
112
109
|
])) : (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
113
|
-
|
|
110
|
+
_hoisted_3,
|
|
111
|
+
createTextVNode(),
|
|
114
112
|
createElementVNode("view", _hoisted_4, [
|
|
115
113
|
_ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
|
|
116
114
|
key: 0,
|
|
@@ -119,16 +117,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
119
117
|
style: normalizeStyle(_ctx.getStyle()),
|
|
120
118
|
"bg-color": "rgb(239, 239, 239)"
|
|
121
119
|
}, null, 8, ["class", "shape", "style"])) : createCommentVNode("", true),
|
|
120
|
+
createTextVNode(),
|
|
122
121
|
Number(_ctx.row) == 1 ? (openBlock(), createElementBlock("view", {
|
|
123
122
|
key: 1,
|
|
124
123
|
class: normalizeClass(_ctx.blockClass),
|
|
125
124
|
style: normalizeStyle({ width: _ctx.width, height: _ctx.height })
|
|
126
125
|
}, null, 6)) : createCommentVNode("", true),
|
|
126
|
+
createTextVNode(),
|
|
127
127
|
createElementVNode("view", _hoisted_5, [
|
|
128
128
|
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_6)) : createCommentVNode("", true),
|
|
129
|
-
(
|
|
129
|
+
createTextVNode(),
|
|
130
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.row), (item, index) => {
|
|
130
131
|
return openBlock(), createElementBlock("view", {
|
|
131
|
-
key:
|
|
132
|
+
key: index,
|
|
132
133
|
class: normalizeClass(_ctx.blockClass),
|
|
133
134
|
style: normalizeStyle({ width: _ctx.width, height: _ctx.height })
|
|
134
135
|
}, null, 6);
|
|
@@ -137,5 +138,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
137
138
|
])
|
|
138
139
|
]));
|
|
139
140
|
}
|
|
140
|
-
var
|
|
141
|
-
export {
|
|
141
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
142
|
+
export { index_taro as default };
|
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
7
7
|
import { c as createComponent, T as TypeOfFun } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
-
import { popupProps } from "./Popup.js";
|
|
10
9
|
import "../locale/lang";
|
|
11
|
-
import "./OverLay.js";
|
|
12
|
-
import "./Icon.js";
|
|
13
|
-
import "./pxCheck.js";
|
|
14
10
|
const { componentName: componentName$4, create: create$4, translate: translate$1 } = createComponent("sku-header");
|
|
15
11
|
const _sfc_main$4 = create$4({
|
|
16
12
|
props: {
|
|
@@ -41,6 +37,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41
37
|
createElementVNode("img", {
|
|
42
38
|
src: _ctx.goods.imagePath
|
|
43
39
|
}, null, 8, _hoisted_2$4),
|
|
40
|
+
createTextVNode(),
|
|
44
41
|
createElementVNode("view", _hoisted_3$3, [
|
|
45
42
|
_ctx.getSlots("sku-header-price") ? renderSlot(_ctx.$slots, "sku-header-price", { key: 0 }) : (openBlock(), createBlock(_component_nut_price, {
|
|
46
43
|
key: 1,
|
|
@@ -48,7 +45,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
48
45
|
needSymbol: true,
|
|
49
46
|
thousands: false
|
|
50
47
|
}, null, 8, ["price"])),
|
|
48
|
+
createTextVNode(),
|
|
51
49
|
_ctx.getSlots("sku-header-extra") ? renderSlot(_ctx.$slots, "sku-header-extra", { key: 2 }) : createCommentVNode("", true),
|
|
50
|
+
createTextVNode(),
|
|
52
51
|
_ctx.goods.skuId && !_ctx.getSlots("sku-header-extra") ? (openBlock(), createElementBlock("view", _hoisted_4$3, toDisplayString(_ctx.translate("skuId")) + "\xA0:\xA0" + toDisplayString(_ctx.goods.skuId), 1)) : createCommentVNode("", true)
|
|
53
52
|
])
|
|
54
53
|
]);
|
|
@@ -77,13 +76,13 @@ const _sfc_main$3 = create$3({
|
|
|
77
76
|
skuInfo.value = [].slice.call(props.sku);
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
|
-
const changeSaleChild = (attrItem,
|
|
79
|
+
const changeSaleChild = (attrItem, index, parentItem, parentIndex) => {
|
|
81
80
|
if (attrItem.checkFlag || attrItem.disable) {
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
83
|
emit("selectSku", {
|
|
85
84
|
sku: attrItem,
|
|
86
|
-
skuIndex:
|
|
85
|
+
skuIndex: index,
|
|
87
86
|
parentSku: parentItem,
|
|
88
87
|
parentIndex
|
|
89
88
|
});
|
|
@@ -100,17 +99,18 @@ const _hoisted_3$2 = { class: "nut-sku-select-item-skus" };
|
|
|
100
99
|
const _hoisted_4$2 = ["onClick"];
|
|
101
100
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
102
101
|
return openBlock(), createElementBlock("view", _hoisted_1$3, [
|
|
103
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skuInfo, (item,
|
|
102
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skuInfo, (item, index) => {
|
|
104
103
|
return openBlock(), createElementBlock("view", {
|
|
105
104
|
class: "nut-sku-select-item",
|
|
106
105
|
key: item.id
|
|
107
106
|
}, [
|
|
108
107
|
createElementVNode("view", _hoisted_2$3, toDisplayString(item.name), 1),
|
|
108
|
+
createTextVNode(),
|
|
109
109
|
createElementVNode("view", _hoisted_3$2, [
|
|
110
110
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (itemAttr, itemAttrIndex) => {
|
|
111
111
|
return openBlock(), createElementBlock("view", {
|
|
112
112
|
class: normalizeClass(["nut-sku-select-item-skus-sku", [{ active: !itemAttr.disable && itemAttr.active }, { disable: itemAttr.disable }]]),
|
|
113
|
-
onClick: ($event) => _ctx.changeSaleChild(itemAttr, itemAttrIndex, item,
|
|
113
|
+
onClick: ($event) => _ctx.changeSaleChild(itemAttr, itemAttrIndex, item, index),
|
|
114
114
|
key: itemAttr.name
|
|
115
115
|
}, toDisplayString(itemAttr.name), 11, _hoisted_4$2);
|
|
116
116
|
}), 128))
|
|
@@ -188,10 +188,12 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
188
188
|
const _component_nut_inputnumber = resolveComponent("nut-inputnumber");
|
|
189
189
|
return openBlock(), createElementBlock("view", _hoisted_1$2, [
|
|
190
190
|
createElementVNode("view", _hoisted_2$2, toDisplayString(_ctx.stepperTitle), 1),
|
|
191
|
+
createTextVNode(),
|
|
191
192
|
createElementVNode("view", {
|
|
192
193
|
class: "nut-sku-stepper-limit",
|
|
193
194
|
innerHTML: _ctx.getExtraText()
|
|
194
195
|
}, null, 8, _hoisted_3$1),
|
|
196
|
+
createTextVNode(),
|
|
195
197
|
createElementVNode("view", _hoisted_4$1, [
|
|
196
198
|
createVNode(_component_nut_inputnumber, {
|
|
197
199
|
modelValue: _ctx.goodsCount,
|
|
@@ -269,7 +271,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
269
271
|
class: "nut-sku-operate-desc",
|
|
270
272
|
innerHTML: _ctx.btnExtraText
|
|
271
273
|
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
274
|
+
createTextVNode(),
|
|
272
275
|
renderSlot(_ctx.$slots, "operate-btn"),
|
|
276
|
+
createTextVNode(),
|
|
273
277
|
!_ctx.getSlots("operate-btn") ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
274
278
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.btnOptions, (btn, i) => {
|
|
275
279
|
return openBlock(), createElementBlock("view", {
|
|
@@ -285,7 +289,10 @@ var SkuOperate = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
285
289
|
const { componentName, create, translate } = createComponent("sku");
|
|
286
290
|
const _sfc_main = create({
|
|
287
291
|
props: {
|
|
288
|
-
|
|
292
|
+
visible: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: false
|
|
295
|
+
},
|
|
289
296
|
sku: {
|
|
290
297
|
type: Array,
|
|
291
298
|
default: []
|
|
@@ -294,6 +301,10 @@ const _sfc_main = create({
|
|
|
294
301
|
type: Object,
|
|
295
302
|
default: {}
|
|
296
303
|
},
|
|
304
|
+
showSaleLimit: {
|
|
305
|
+
type: Boolean,
|
|
306
|
+
default: false
|
|
307
|
+
},
|
|
297
308
|
stepperMax: {
|
|
298
309
|
type: [Number, String],
|
|
299
310
|
default: 99999
|
|
@@ -302,6 +313,14 @@ const _sfc_main = create({
|
|
|
302
313
|
type: [Number, String],
|
|
303
314
|
default: 1
|
|
304
315
|
},
|
|
316
|
+
purchased: {
|
|
317
|
+
type: [Number, String],
|
|
318
|
+
default: 0
|
|
319
|
+
},
|
|
320
|
+
showSaleLowest: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: false
|
|
323
|
+
},
|
|
305
324
|
btnOptions: {
|
|
306
325
|
type: Array,
|
|
307
326
|
default: () => ["confirm"]
|
|
@@ -310,13 +329,17 @@ const _sfc_main = create({
|
|
|
310
329
|
type: String,
|
|
311
330
|
default: ""
|
|
312
331
|
},
|
|
313
|
-
|
|
332
|
+
saleLowestText: {
|
|
314
333
|
type: [Function, Boolean],
|
|
315
334
|
default: false
|
|
316
335
|
},
|
|
317
|
-
|
|
318
|
-
type:
|
|
319
|
-
default:
|
|
336
|
+
saleLimitText: {
|
|
337
|
+
type: [Function, Boolean],
|
|
338
|
+
default: false
|
|
339
|
+
},
|
|
340
|
+
purchasedText: {
|
|
341
|
+
type: [Function, Boolean],
|
|
342
|
+
default: false
|
|
320
343
|
},
|
|
321
344
|
buyText: {
|
|
322
345
|
type: String,
|
|
@@ -341,8 +364,7 @@ const _sfc_main = create({
|
|
|
341
364
|
"close",
|
|
342
365
|
"reduce",
|
|
343
366
|
"add",
|
|
344
|
-
"overLimit"
|
|
345
|
-
"clickOverlay"
|
|
367
|
+
"overLimit"
|
|
346
368
|
],
|
|
347
369
|
components: {
|
|
348
370
|
SkuHeader,
|
|
@@ -367,8 +389,6 @@ const _sfc_main = create({
|
|
|
367
389
|
}
|
|
368
390
|
}
|
|
369
391
|
);
|
|
370
|
-
onMounted(() => {
|
|
371
|
-
});
|
|
372
392
|
const getSlots = (name) => slots[name];
|
|
373
393
|
const selectSku = (skus) => {
|
|
374
394
|
emit("selectSku", skus);
|
|
@@ -438,13 +458,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
438
458
|
onClickCloseIcon: _cache[1] || (_cache[1] = ($event) => _ctx.closePopup("icon")),
|
|
439
459
|
onClickOverlay: _cache[2] || (_cache[2] = ($event) => _ctx.closePopup("overlay")),
|
|
440
460
|
onClose: _cache[3] || (_cache[3] = ($event) => _ctx.closePopup("close")),
|
|
441
|
-
style: { "height": "75%" }
|
|
442
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
443
|
-
teleport: _ctx.teleport
|
|
461
|
+
style: { "height": "75%" }
|
|
444
462
|
}, {
|
|
445
463
|
default: withCtx(() => [
|
|
446
464
|
createElementVNode("view", _hoisted_1, [
|
|
447
465
|
renderSlot(_ctx.$slots, "sku-header"),
|
|
466
|
+
createTextVNode(),
|
|
448
467
|
!_ctx.getSlots("sku-header") ? (openBlock(), createBlock(_component_sku_header, {
|
|
449
468
|
key: 0,
|
|
450
469
|
goods: _ctx.goods
|
|
@@ -464,49 +483,55 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
464
483
|
key: "1"
|
|
465
484
|
} : void 0
|
|
466
485
|
]), 1032, ["goods"])) : createCommentVNode("", true),
|
|
486
|
+
createTextVNode(),
|
|
467
487
|
createElementVNode("view", _hoisted_2, [
|
|
468
488
|
renderSlot(_ctx.$slots, "sku-select-top"),
|
|
489
|
+
createTextVNode(),
|
|
469
490
|
renderSlot(_ctx.$slots, "sku-select"),
|
|
491
|
+
createTextVNode(),
|
|
470
492
|
!_ctx.getSlots("sku-select") ? (openBlock(), createBlock(_component_SkuSelect, {
|
|
471
493
|
key: 0,
|
|
472
494
|
sku: _ctx.sku,
|
|
473
495
|
onSelectSku: _ctx.selectSku
|
|
474
496
|
}, null, 8, ["sku", "onSelectSku"])) : createCommentVNode("", true),
|
|
497
|
+
createTextVNode(),
|
|
475
498
|
renderSlot(_ctx.$slots, "sku-stepper"),
|
|
499
|
+
createTextVNode(),
|
|
476
500
|
!_ctx.getSlots("sku-stepper") ? (openBlock(), createBlock(_component_sku_stepper, {
|
|
477
501
|
key: 1,
|
|
478
502
|
goods: _ctx.goods,
|
|
479
503
|
stepperTitle: _ctx.stepperTitle || _ctx.translate("buyNumber"),
|
|
480
504
|
stepperMax: _ctx.stepperMax,
|
|
481
505
|
stepperMin: _ctx.stepperMin,
|
|
482
|
-
|
|
506
|
+
purchased: _ctx.purchased,
|
|
507
|
+
showSaleLimit: _ctx.showSaleLimit,
|
|
508
|
+
showSaleLowest: _ctx.showSaleLowest,
|
|
509
|
+
saleLowestText: _ctx.saleLowestText,
|
|
510
|
+
saleLimitText: _ctx.saleLimitText,
|
|
511
|
+
purchasedText: _ctx.purchasedText,
|
|
483
512
|
onAdd: _ctx.add,
|
|
484
513
|
onReduce: _ctx.reduce,
|
|
485
514
|
onChangeStepper: _ctx.changeStepper,
|
|
486
515
|
onOverLimit: _ctx.stepperOverLimit
|
|
487
|
-
}, null, 8, ["goods", "stepperTitle", "stepperMax", "stepperMin", "
|
|
516
|
+
}, null, 8, ["goods", "stepperTitle", "stepperMax", "stepperMin", "purchased", "showSaleLimit", "showSaleLowest", "saleLowestText", "saleLimitText", "purchasedText", "onAdd", "onReduce", "onChangeStepper", "onOverLimit"])) : createCommentVNode("", true),
|
|
517
|
+
createTextVNode(),
|
|
488
518
|
renderSlot(_ctx.$slots, "sku-stepper-bottom")
|
|
489
519
|
]),
|
|
490
|
-
|
|
520
|
+
createTextVNode(),
|
|
521
|
+
renderSlot(_ctx.$slots, "sku-operate"),
|
|
522
|
+
createTextVNode(),
|
|
523
|
+
!_ctx.getSlots("sku-operate") ? (openBlock(), createBlock(_component_sku_operate, {
|
|
524
|
+
key: 1,
|
|
491
525
|
btnOptions: _ctx.btnOptions,
|
|
492
|
-
btnExtraText: _ctx.btnExtraText,
|
|
493
526
|
buyText: _ctx.buyText || _ctx.translate("buyNow"),
|
|
494
527
|
addCartText: _ctx.addCartText || _ctx.translate("addToCart"),
|
|
495
528
|
confirmText: _ctx.confirmText || _ctx.translate("confirm"),
|
|
496
529
|
onClickBtnOperate: _ctx.clickBtnOperate
|
|
497
|
-
},
|
|
498
|
-
_ctx.getSlots("sku-operate") ? {
|
|
499
|
-
name: "operate-btn",
|
|
500
|
-
fn: withCtx(() => [
|
|
501
|
-
renderSlot(_ctx.$slots, "sku-operate")
|
|
502
|
-
]),
|
|
503
|
-
key: "0"
|
|
504
|
-
} : void 0
|
|
505
|
-
]), 1032, ["btnOptions", "btnExtraText", "buyText", "addCartText", "confirmText", "onClickBtnOperate"])
|
|
530
|
+
}, null, 8, ["btnOptions", "buyText", "addCartText", "confirmText", "onClickBtnOperate"])) : createCommentVNode("", true)
|
|
506
531
|
])
|
|
507
532
|
]),
|
|
508
533
|
_: 3
|
|
509
|
-
}, 8, ["visible"
|
|
534
|
+
}, 8, ["visible"]);
|
|
510
535
|
}
|
|
511
|
-
var
|
|
512
|
-
export {
|
|
536
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
537
|
+
export { index_taro as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 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, mergeProps, Fragment, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
6
|
+
import { getCurrentInstance, inject, reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, 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";
|
|
@@ -89,6 +89,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
89
|
}, [
|
|
90
90
|
createElementVNode("view", _hoisted_1, [
|
|
91
91
|
_hoisted_2,
|
|
92
|
+
createTextVNode(),
|
|
92
93
|
createElementVNode("view", {
|
|
93
94
|
class: normalizeClass(["nut-step-icon", [!_ctx.dot ? _ctx.icon ? "is-icon" : "is-text" : ""]])
|
|
94
95
|
}, [
|
|
@@ -102,16 +103,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
102
103
|
}), null, 16, ["color", "name", "size"])) : _ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.index), 1))
|
|
103
104
|
], 2)
|
|
104
105
|
]),
|
|
106
|
+
createTextVNode(),
|
|
105
107
|
createElementVNode("view", _hoisted_4, [
|
|
106
108
|
createElementVNode("view", _hoisted_5, [
|
|
107
109
|
!_ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
110
|
+
createTextVNode(),
|
|
108
111
|
renderSlot(_ctx.$slots, "title")
|
|
109
112
|
]),
|
|
113
|
+
createTextVNode(),
|
|
110
114
|
_ctx.content || _ctx.$slots.content ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
111
115
|
!_ctx.$slots.content ? (openBlock(), createElementBlock("span", {
|
|
112
116
|
key: 0,
|
|
113
117
|
innerHTML: _ctx.content
|
|
114
118
|
}, null, 8, _hoisted_8)) : createCommentVNode("", true),
|
|
119
|
+
createTextVNode(),
|
|
115
120
|
renderSlot(_ctx.$slots, "content")
|
|
116
121
|
])) : createCommentVNode("", true)
|
|
117
122
|
])
|