53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const _sfc_main = {
|
|
__name: "index",
|
|
props: {
|
|
modelValue: {
|
|
type: Number,
|
|
default: 1
|
|
},
|
|
min: {
|
|
type: Number,
|
|
default: 1
|
|
},
|
|
max: {
|
|
type: Number,
|
|
default: 100
|
|
}
|
|
},
|
|
emits: ["update:modelValue"],
|
|
setup(__props, { emit: __emit }) {
|
|
const props = __props;
|
|
const emit = __emit;
|
|
const value = common_vendor.ref(props.modelValue);
|
|
const decrease = () => {
|
|
if (value.value === 1)
|
|
return;
|
|
if (value.value > props.min) {
|
|
value.value--;
|
|
emit("update:modelValue", value.value);
|
|
}
|
|
};
|
|
const increase = () => {
|
|
if (value.value < props.max) {
|
|
value.value++;
|
|
emit("update:modelValue", value.value);
|
|
}
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_assets._imports_0$10,
|
|
b: common_vendor.o(decrease),
|
|
c: common_vendor.t(value.value),
|
|
d: common_assets._imports_1$4,
|
|
e: common_vendor.o(increase)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-52e20cb2"]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/Stepper/index.js.map
|