breadcrumb.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. exports.ids = [2];
  2. exports.modules = {
  3. /***/ 213:
  4. /***/ (function(module, exports) {
  5. // Exports
  6. module.exports = {
  7. };
  8. /***/ }),
  9. /***/ 233:
  10. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11. "use strict";
  12. __webpack_require__.r(__webpack_exports__);
  13. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Breadcrumb_vue_vue_type_style_index_0_id_d96596a6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
  14. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Breadcrumb_vue_vue_type_style_index_0_id_d96596a6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Breadcrumb_vue_vue_type_style_index_0_id_d96596a6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Breadcrumb_vue_vue_type_style_index_0_id_d96596a6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Breadcrumb_vue_vue_type_style_index_0_id_d96596a6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  16. /***/ }),
  17. /***/ 291:
  18. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19. "use strict";
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Breadcrumb.vue?vue&type=template&id=d96596a6&scoped=true
  23. var render = function render() {
  24. var _vm = this,
  25. _c = _vm._self._c;
  26. return _c('div', {
  27. staticClass: "wrap"
  28. }, [_c('el-breadcrumb', {
  29. attrs: {
  30. "separator-class": "el-icon-arrow-right"
  31. }
  32. }, [_c('el-breadcrumb-item', {
  33. attrs: {
  34. "to": {
  35. path: '/'
  36. }
  37. }
  38. }, [_vm._v("Home")]), _vm._v(" "), _c('el-breadcrumb-item', {
  39. nativeOn: {
  40. "click": function ($event) {
  41. return _vm.goCategory();
  42. }
  43. }
  44. }, [_vm._v("All")]), _vm._v(" "), _vm._l(_vm.comCategoryList, function (item, index) {
  45. return _c('el-breadcrumb-item', {
  46. key: item.id,
  47. nativeOn: {
  48. "click": function ($event) {
  49. return _vm.goCategory(index);
  50. }
  51. }
  52. }, [_vm._v(_vm._s(item.name))]);
  53. }), _vm._v(" "), _c('el-breadcrumb-item', {
  54. staticClass: "last-bread"
  55. }, [_vm._v(_vm._s(_vm.pageData.product_code))])], 2)], 1);
  56. };
  57. var staticRenderFns = [];
  58. // CONCATENATED MODULE: ./components/Breadcrumb.vue?vue&type=template&id=d96596a6&scoped=true
  59. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Breadcrumb.vue?vue&type=script&lang=js
  60. /* harmony default export */ var Breadcrumbvue_type_script_lang_js = ({
  61. props: {
  62. pageData: {
  63. type: Object,
  64. default: () => {}
  65. }
  66. },
  67. computed: {
  68. comCategoryList() {
  69. let arr = [];
  70. this.recursive(arr, this.pageData.category_list);
  71. return arr;
  72. }
  73. },
  74. methods: {
  75. recursive(arr = [], obj) {
  76. let temp = {};
  77. temp.id = obj.id ? obj.id : null;
  78. temp.name = obj.name ? obj.name : null;
  79. temp.pid = obj.pid ? obj.pid : null;
  80. arr.push(temp);
  81. if (obj.child) {
  82. this.recursive(arr, obj.child);
  83. }
  84. },
  85. goCategory(index) {
  86. switch (index) {
  87. case 0:
  88. this.$router.push({
  89. name: "category-firstCategory",
  90. params: {
  91. firstCategory: this.comCategoryList[0].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase()
  92. }
  93. });
  94. break;
  95. case 1:
  96. this.$router.push({
  97. name: "category-firstCategory-secondCategory",
  98. params: {
  99. firstCategory: this.comCategoryList[0].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase(),
  100. secondCategory: this.comCategoryList[1].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase()
  101. }
  102. });
  103. break;
  104. case 2:
  105. this.$router.push({
  106. name: "category-firstCategory-secondCategory-thirdCategory",
  107. params: {
  108. firstCategory: this.comCategoryList[0].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase(),
  109. secondCategory: this.comCategoryList[1].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase(),
  110. thirdCategory: this.comCategoryList[2].name.replace(/\s+/g, "-").replace("-&", "").toLowerCase()
  111. }
  112. });
  113. break;
  114. default:
  115. this.$router.push({
  116. path: '/category'
  117. });
  118. }
  119. }
  120. }
  121. });
  122. // CONCATENATED MODULE: ./components/Breadcrumb.vue?vue&type=script&lang=js
  123. /* harmony default export */ var components_Breadcrumbvue_type_script_lang_js = (Breadcrumbvue_type_script_lang_js);
  124. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  125. var componentNormalizer = __webpack_require__(2);
  126. // CONCATENATED MODULE: ./components/Breadcrumb.vue
  127. function injectStyles (context) {
  128. var style0 = __webpack_require__(233)
  129. if (style0.__inject__) style0.__inject__(context)
  130. }
  131. /* normalize component */
  132. var component = Object(componentNormalizer["a" /* default */])(
  133. components_Breadcrumbvue_type_script_lang_js,
  134. render,
  135. staticRenderFns,
  136. false,
  137. injectStyles,
  138. "d96596a6",
  139. "0db93f9e"
  140. )
  141. /* harmony default export */ var Breadcrumb = __webpack_exports__["default"] = (component.exports);
  142. /***/ })
  143. };;
  144. //# sourceMappingURL=breadcrumb.js.map