u-slider.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u--slider",
  5. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$16],
  6. methods: {
  7. // 拖动过程中触发
  8. changingHandler(e) {
  9. const {
  10. value
  11. } = e.detail;
  12. this.$emit("input", value);
  13. this.$emit("changing", value);
  14. },
  15. // 滑动结束时触发
  16. changeHandler(e) {
  17. const {
  18. value
  19. } = e.detail;
  20. this.$emit("input", value);
  21. this.$emit("change", value);
  22. }
  23. }
  24. };
  25. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  26. return {
  27. a: _ctx.min,
  28. b: _ctx.max,
  29. c: _ctx.step,
  30. d: _ctx.value,
  31. e: _ctx.activeColor,
  32. f: _ctx.inactiveColor,
  33. g: _ctx.$u.getPx(_ctx.blockSize),
  34. h: _ctx.blockColor,
  35. i: _ctx.showValue,
  36. j: _ctx.disabled,
  37. k: common_vendor.o((...args) => $options.changingHandler && $options.changingHandler(...args)),
  38. l: common_vendor.o((...args) => $options.changeHandler && $options.changeHandler(...args)),
  39. m: common_vendor.s(_ctx.$u.addStyle(_ctx.customStyle))
  40. };
  41. }
  42. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3ffc2d59"], ["__file", "F:/兴元/开门柜项目/平台端管理系统小程序/node_modules/uview-plus/components/u-slider/u-slider.vue"]]);
  43. wx.createComponent(Component);