如何在TouchSpin功能中添加步骤

时间:2018-12-17 10:11:29

标签: jquery prestashop-1.7

在Prestashop 1.7中,我想在结帐时逐步添加数量(例如,逐步添加10)。这是原始代码:

function r() {
    s.default.each((0, s.default)(u), function(t, e) {
        (0, s.default)(e).TouchSpin({
            verticalbuttons: !0,
            verticalupclass: "material-icons touchspin-up",
            verticaldownclass: "material-icons touchspin-down",
            buttondown_class: "btn btn-touchspin js-touchspin js-increase-product-quantity",
            buttonup_class: "btn btn-touchspin js-touchspin js-decrease-product-quantity",
            min: parseInt((0, s.default)(e).attr("min"), e),

            max: 1e6
        })
    })
}

我想一步一步地添加:

function r() {
        s.default.each((0, s.default)(u), function(t, e) {
            (0, s.default)(e).TouchSpin({
                verticalbuttons: !0,
                verticalupclass: "material-icons touchspin-up",
                verticaldownclass: "material-icons touchspin-down",
                buttondown_class: "btn btn-touchspin js-touchspin js-increase-product-quantity",
                buttonup_class: "btn btn-touchspin js-touchspin js-decrease-product-quantity",
                min: parseInt((0, s.default)(e).attr("min"), e),
                step: parseInt((0, s.default)(e).attr("step"), e),
                max: 1e6
            })
        })
    }

为什么我有错误,“ NaN”值。我做错了什么?

亲切的问候

0 个答案:

没有答案