index.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. "use strict";
  2. var _page = _interopRequireDefault(require("../../common/page"));
  3. var _toast = _interopRequireDefault(require("../../dist/toast/toast"));
  4. var _config = _interopRequireDefault(require("../../dist/_vant/icons/src/config"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  6. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  7. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  8. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  9. var steps = [{
  10. text: "步骤一",
  11. desc: "描述信息"
  12. }, {
  13. text: "步骤二",
  14. desc: "描述信息"
  15. }, {
  16. text: "步骤三",
  17. desc: "描述信息"
  18. }, {
  19. text: "步骤四",
  20. desc: "描述信息"
  21. }];
  22. (0, _page["default"])({
  23. data: {
  24. active: 1,
  25. steps: steps,
  26. customIconSteps: steps.map(function (item, index) {
  27. return _objectSpread(_objectSpread({}, item), {}, {
  28. inactiveIcon: _config["default"].outline[index],
  29. activeIcon: _config["default"].basic[index]
  30. });
  31. })
  32. },
  33. nextStep: function nextStep() {
  34. this.setData({
  35. active: ++this.data.active % 4
  36. });
  37. },
  38. onClick: function onClick(event) {
  39. (0, _toast["default"])("Index: ".concat(event.detail));
  40. }
  41. });