index-legacy.f44c2def.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. ;(function () {
  2. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  3. try {
  4. var info = gen[key](arg)
  5. var value = info.value
  6. } catch (error) {
  7. reject(error)
  8. return
  9. }
  10. if (info.done) {
  11. resolve(value)
  12. } else {
  13. Promise.resolve(value).then(_next, _throw)
  14. }
  15. }
  16. function _asyncToGenerator(fn) {
  17. return function () {
  18. var self = this,
  19. args = arguments
  20. return new Promise(function (resolve, reject) {
  21. var gen = fn.apply(self, args)
  22. function _next(value) {
  23. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value)
  24. }
  25. function _throw(err) {
  26. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err)
  27. }
  28. _next(undefined)
  29. })
  30. }
  31. }
  32. var __vite_style__ = document.createElement('style')
  33. __vite_style__.innerHTML =
  34. '._filter-top_1vale_1{height:.98667rem;font-size:.37333rem;color:#666;transition:color cubic-bezier(.075,.82,.165,1);background:#ffffff}._filter-top_1vale_1 .van-col{display:flex;align-items:center;justify-content:center}._filter-top_1vale_1 ._active_1vale_13{color:#333;font-weight:500}._filter-top_1vale_1 ._filterBtn_1vale_17{color:#333}._filterTagWrap_1vale_20{display:flex;padding:.16rem 0 0 .37333rem;flex-wrap:wrap}._filterTagWrap_1vale_20 ._filterTag_1vale_20{border:.02667rem solid var(--van-primary-color)!important;color:var(--van-primary-color)!important;border-radius:.32rem;font-size:.32rem;background-color:#f7f8f9;padding:.10667rem .26667rem;margin-right:.21333rem;margin-bottom:.21333rem;font-weight:500}._filter-productCategory_1vale_36{font-size:.37333rem;color:#666}._filter-productCategory_1vale_36 .van-tab{padding:0}._filter-productCategory_1vale_36 .van-tabs__line{display:none!important}._filter-productCategory_1vale_36 .van-col{height:.98667rem;display:flex;align-items:center;justify-content:center}._filter-productCategory_1vale_36 ._filter-tag_1vale_52{padding:.13333rem .26667rem;height:80%;border-radius:.53333rem;display:flex;justify-content:center;align-items:center;margin:0 .13333rem;min-width:1.33333rem}._filter-productCategory_1vale_36 ._filter-tag-checked_1vale_62{background:var(--van-primary);color:#fff}._filterSort_1vale_66{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-left:.13333rem}._filterSort_1vale_66 ._icon-active_1vale_73{color:#01C1B5}._filterSort_1vale_66 ._iconSort_1vale_76{margin-top:-.13333rem;margin-left:-.02667rem}._loading_1wy15_1{height:.8rem;display:flex;justify-content:center;align-items:center}._titlePopup_1wy15_7{padding:.48rem;text-align:center;color:#000;font-weight:500;font-size:.48rem}._title_1wy15_7{color:#333;font-size:.37333rem;line-height:.53333rem;padding-left:.42667rem;font-weight:500}._radio-group_1wy15_21{display:flex;flex-wrap:wrap;margin-top:.37333rem}._radio_1wy15_21{margin-right:.26667rem;margin-bottom:.21333rem}._radio_1wy15_21 .van-radio__icon{display:none}._radio_1wy15_21 .van-tag{box-sizing:border-box;font-size:.37333rem;display:flex;align-items:center;justify-content:center;border-radius:.42667rem;padding:.16rem .32rem;border:.02667rem solid transparent;height:.85333rem;line-height:.85333rem;min-width:2.13333rem}._radio_1wy15_21 .van-tag--default{color:#999}._radio_1wy15_21 .van-tag--primary{background-color:#f7f8f9;border:.02667rem solid var(--van-primary);color:var(--van-primary)}._radio_1wy15_21 .van-radio__label{margin-left:0}._filterAction_1wy15_57{padding:.29333rem .42667rem;display:flex;align-items:center}._filterAction_1wy15_57 .van-button{flex:1;height:1.12rem;line-height:1.12rem}\n'
  35. document.head.appendChild(__vite_style__)
  36. System.register(
  37. [
  38. './vendor-legacy.09f20d09.js',
  39. './index-legacy.637f35563.js',
  40. './index-legacy.f25f109a10.js',
  41. './index-legacy.f25f109a3.js',
  42. './index-legacy.637f3556.js',
  43. './index-legacy.637f35562.js',
  44. './index-legacy.7eb04225.js',
  45. './index-legacy.f72eae88.js',
  46. './index-legacy.595c24c3.js',
  47. './index-legacy.f25f109a.js',
  48. './index-legacy.637f35565.js',
  49. './index-legacy.f25f109a14.js',
  50. './index-legacy.f25f109a17.js',
  51. './index-legacy.f25f109a6.js',
  52. './index-legacy.b67c6e0d.js',
  53. './index-legacy.f25f109a2.js',
  54. './index-legacy.f25f109a12.js',
  55. './icon-sell-out-legacy.ae9d997a.js',
  56. './shop-mall-legacy.42d570fe.js',
  57. './index-legacy.f25f109a5.js'
  58. ],
  59. function (exports) {
  60. 'use strict'
  61. var defineComponent,
  62. createVNode,
  63. Loading,
  64. createTextVNode,
  65. Cell,
  66. RadioGroup,
  67. Radio,
  68. Tag,
  69. isVNode,
  70. Divider,
  71. Button,
  72. Sticky,
  73. Row,
  74. Col,
  75. Icon,
  76. Tabs,
  77. Tab,
  78. Popup,
  79. TabList,
  80. ColSearch,
  81. iconFilter,
  82. request
  83. return {
  84. setters: [
  85. function (module) {
  86. defineComponent = module.d
  87. createVNode = module.a
  88. Loading = module.L
  89. createTextVNode = module.j
  90. Cell = module.C
  91. RadioGroup = module.ac
  92. Radio = module.ad
  93. Tag = module.U
  94. isVNode = module.x
  95. Divider = module.aw
  96. Button = module.B
  97. Sticky = module.S
  98. Row = module.z
  99. Col = module.A
  100. Icon = module.K
  101. Tabs = module.v
  102. Tab = module.w
  103. Popup = module.P
  104. },
  105. function () {},
  106. function () {},
  107. function () {},
  108. function () {},
  109. function () {},
  110. function (module) {
  111. TabList = module.T
  112. },
  113. function (module) {
  114. ColSearch = module.C
  115. iconFilter = module.i
  116. },
  117. function (module) {
  118. request = module.r
  119. },
  120. function () {},
  121. function () {},
  122. function () {},
  123. function () {},
  124. function () {},
  125. function () {},
  126. function () {},
  127. function () {},
  128. function () {},
  129. function () {},
  130. function () {}
  131. ],
  132. execute: function execute() {
  133. var active = '_active_1vale_13'
  134. var filterBtn = '_filterBtn_1vale_17'
  135. var filterTagWrap = '_filterTagWrap_1vale_20'
  136. var filterTag = '_filterTag_1vale_20'
  137. var filterSort = '_filterSort_1vale_66'
  138. var iconSort = '_iconSort_1vale_76'
  139. var styles$1 = {
  140. 'filter-top': '_filter-top_1vale_1',
  141. active: active,
  142. filterBtn: filterBtn,
  143. filterTagWrap: filterTagWrap,
  144. filterTag: filterTag,
  145. 'filter-productCategory': '_filter-productCategory_1vale_36',
  146. 'filter-tag': '_filter-tag_1vale_52',
  147. 'filter-tag-checked': '_filter-tag-checked_1vale_62',
  148. filterSort: filterSort,
  149. 'icon-active': '_icon-active_1vale_73',
  150. iconSort: iconSort
  151. }
  152. var loading = '_loading_1wy15_1'
  153. var titlePopup = '_titlePopup_1wy15_7'
  154. var title = '_title_1wy15_7'
  155. var radio = '_radio_1wy15_21'
  156. var filterAction = '_filterAction_1wy15_57'
  157. var styles = {
  158. loading: loading,
  159. titlePopup: titlePopup,
  160. title: title,
  161. 'radio-group': '_radio-group_1wy15_21',
  162. radio: radio,
  163. filterAction: filterAction
  164. }
  165. function _isSlot(s) {
  166. return (
  167. typeof s === 'function' ||
  168. (Object.prototype.toString.call(s) === '[object Object]' &&
  169. !isVNode(s))
  170. )
  171. }
  172. var init = function init() {
  173. return {
  174. productCategorySmallVoList: null,
  175. productAttributeCategoryList: null,
  176. brandList: null
  177. }
  178. }
  179. var GoodsFilterList = defineComponent({
  180. name: 'goods-filter-list',
  181. props: {
  182. setFilter: {
  183. type: Function,
  184. default: function _default(item) {}
  185. },
  186. cateGoryId: { type: Number, default: 0 }
  187. },
  188. data: function data() {
  189. return {
  190. dataShow: true, // 判断是否有数据
  191. loading: false,
  192. brandList: [],
  193. productAttributeCategoryList: [],
  194. productCategorySmallVoList: [],
  195. params: init()
  196. }
  197. },
  198. mounted: function mounted() {
  199. this.getFilterList()
  200. },
  201. methods: {
  202. getFilterList: function getFilterList() {
  203. var _this = this
  204. return _asyncToGenerator(
  205. /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
  206. var res,
  207. _ref,
  208. _ref$brandList,
  209. brandList,
  210. _ref$productAttribute,
  211. productAttributeCategoryList,
  212. _ref$productCategoryS,
  213. productCategorySmallVoList,
  214. i
  215. return regeneratorRuntime.wrap(
  216. function _callee$(_context) {
  217. while (1) {
  218. switch ((_context.prev = _context.next)) {
  219. case 0:
  220. _this.loading = true
  221. _context.prev = 1
  222. _context.next = 4
  223. return request.get(
  224. '/api-mall-portal/product/search/condition'
  225. )
  226. case 4:
  227. res = _context.sent
  228. _this.dataShow = res.code === 200
  229. ;(_ref = res.data || {}),
  230. (_ref$brandList = _ref.brandList),
  231. (brandList =
  232. _ref$brandList === void 0
  233. ? []
  234. : _ref$brandList),
  235. (_ref$productAttribute =
  236. _ref.productAttributeCategoryList),
  237. (productAttributeCategoryList =
  238. _ref$productAttribute === void 0
  239. ? []
  240. : _ref$productAttribute),
  241. (_ref$productCategoryS =
  242. _ref.productCategorySmallVoList),
  243. (productCategorySmallVoList =
  244. _ref$productCategoryS === void 0
  245. ? []
  246. : _ref$productCategoryS)
  247. _this.brandList = brandList
  248. _this.productAttributeCategoryList =
  249. productAttributeCategoryList
  250. _this.productCategorySmallVoList =
  251. productCategorySmallVoList
  252. if (_this.cateGoryId) {
  253. i = productCategorySmallVoList.findIndex(
  254. function (n) {
  255. return n.id == _this.cateGoryId
  256. }
  257. )
  258. _this.params.productCategorySmallVoList =
  259. i > -1 ? i : null
  260. }
  261. _context.next = 16
  262. break
  263. case 13:
  264. _context.prev = 13
  265. _context.t0 = _context['catch'](1)
  266. _this.dataShow = false
  267. case 16:
  268. _this.loading = false
  269. case 17:
  270. case 'end':
  271. return _context.stop()
  272. }
  273. }
  274. },
  275. _callee,
  276. null,
  277. [[1, 13]]
  278. )
  279. })
  280. )()
  281. }, // 筛选条件
  282. onFilterClick: function onFilterClick() {
  283. this.setFilter({
  284. productCategory:
  285. this.productCategorySmallVoList[
  286. this.params.productCategorySmallVoList
  287. ],
  288. productAttributeCategory:
  289. this.productAttributeCategoryList[
  290. this.params.productAttributeCategoryList
  291. ],
  292. brand: this.brandList[this.params.brandList]
  293. })
  294. },
  295. setParams: function setParams(key) {
  296. this.params[key] = null
  297. }
  298. },
  299. render: function render() {
  300. var _this2 = this
  301. return createVNode('div', null, [
  302. this.loading &&
  303. createVNode('div', { class: styles.loading }, [
  304. createVNode(Loading, { color: 'var(--van-primary)' }, null)
  305. ]),
  306. createVNode('div', { class: styles.filterWrap }, [
  307. createVNode('div', { class: styles.titlePopup }, [
  308. createTextVNode('\u7B5B\u9009')
  309. ]),
  310. Object.keys(this.params).map(function (key) {
  311. return createVNode(
  312. Cell,
  313. { border: false },
  314. {
  315. title: function title() {
  316. return createVNode('div', null, [
  317. key === 'productCategorySmallVoList'
  318. ? '商品分类'
  319. : key === 'productAttributeCategoryList'
  320. ? '商品类型'
  321. : '品牌'
  322. ])
  323. },
  324. label: function label() {
  325. var _slot
  326. return createVNode(
  327. RadioGroup,
  328. {
  329. class: styles['radio-group'],
  330. modelValue: _this2.params[key],
  331. 'onUpdate:modelValue':
  332. function onUpdateModelValue(val) {
  333. return (_this2.params[key] = val)
  334. }
  335. },
  336. _isSlot(
  337. (_slot = _this2[key].map(function (item, index) {
  338. var isActive = index === _this2.params[key]
  339. var type = isActive ? 'primary' : 'default'
  340. return createVNode(
  341. Radio,
  342. {
  343. class: styles.radio,
  344. name: index,
  345. onClick: function onClick() {}
  346. },
  347. {
  348. default: function _default() {
  349. return [
  350. createVNode(
  351. Tag,
  352. { size: 'large', type: type },
  353. {
  354. default: function _default() {
  355. return [item.name]
  356. }
  357. }
  358. )
  359. ]
  360. }
  361. }
  362. )
  363. }))
  364. )
  365. ? _slot
  366. : {
  367. default: function _default() {
  368. return [_slot]
  369. }
  370. }
  371. )
  372. }
  373. }
  374. )
  375. }),
  376. createVNode(Divider, { style: { margin: '0' } }, null),
  377. createVNode('div', { class: styles.filterAction }, [
  378. createVNode(
  379. Button,
  380. {
  381. round: true,
  382. style: { marginRight: '8px' },
  383. onClick: function onClick() {
  384. return (_this2.params = init())
  385. }
  386. },
  387. {
  388. default: function _default() {
  389. return [createTextVNode('\u91CD\u7F6E')]
  390. }
  391. }
  392. ),
  393. createVNode(
  394. Button,
  395. {
  396. round: true,
  397. type: 'primary',
  398. style: { marginLeft: '8px' },
  399. onClick: function onClick() {
  400. return _this2.onFilterClick()
  401. }
  402. },
  403. {
  404. default: function _default() {
  405. return [createTextVNode('\u786E\u8BA4')]
  406. }
  407. }
  408. )
  409. ])
  410. ])
  411. ])
  412. }
  413. })
  414. var index = exports(
  415. 'default',
  416. defineComponent({
  417. name: 'goods-list',
  418. data: function data() {
  419. var query = this.$route.query
  420. return {
  421. tabListShow: query.id ? false : true,
  422. typeId: 0,
  423. filterActive: 0,
  424. filterListShow: false,
  425. productCategory: {
  426. active: 0,
  427. name: query.tag || '',
  428. id: Number(query.id) || 0,
  429. children: []
  430. },
  431. productAttributeCategory: { children: [], name: '', id: 0 },
  432. brand: { name: '', id: 0 },
  433. keyword: '',
  434. autofocus: false
  435. }
  436. },
  437. computed: {
  438. getProductAttributeCategory:
  439. function getProductAttributeCategory() {
  440. if (this.productCategory.id) {
  441. if (this.productCategory.children) {
  442. var child =
  443. this.productCategory.children[
  444. this.productCategory.active
  445. ] || {}
  446. return child.id || ''
  447. }
  448. this.productCategory.id
  449. }
  450. return 0
  451. }
  452. },
  453. mounted: function mounted() {
  454. var _this3 = this
  455. return _asyncToGenerator(
  456. /*#__PURE__*/ regeneratorRuntime.mark(function _callee2() {
  457. var res
  458. return regeneratorRuntime.wrap(
  459. function _callee2$(_context2) {
  460. while (1) {
  461. switch ((_context2.prev = _context2.next)) {
  462. case 0:
  463. _this3.$nextTick(function () {
  464. if (_this3.$route.query.input === 'focus') {
  465. var input = document.querySelector(
  466. '.van-field__control'
  467. )
  468. input.focus()
  469. }
  470. })
  471. if (!_this3.productCategory.id) {
  472. _context2.next = 11
  473. break
  474. }
  475. _context2.prev = 2
  476. _context2.next = 5
  477. return request.get(
  478. '/api-mall-portal/product/search/condition'
  479. )
  480. case 5:
  481. res = _context2.sent
  482. if (res.code === 200) {
  483. _this3.setFilter({
  484. productCategory:
  485. res.data.productCategorySmallVoList.find(
  486. function (n) {
  487. return (
  488. n.id === _this3.productCategory.id
  489. )
  490. }
  491. ),
  492. productAttributeCategory: undefined,
  493. brand: undefined
  494. })
  495. }
  496. _context2.next = 11
  497. break
  498. case 9:
  499. _context2.prev = 9
  500. _context2.t0 = _context2['catch'](2)
  501. case 11:
  502. _this3.tabListShow = true
  503. case 12:
  504. case 'end':
  505. return _context2.stop()
  506. }
  507. }
  508. },
  509. _callee2,
  510. null,
  511. [[2, 9]]
  512. )
  513. })
  514. )()
  515. },
  516. methods: {
  517. onFilter: function onFilter(n) {
  518. var _this4 = this
  519. if (this.filterActive === 3 && n === 3) n = 4
  520. if (this.filterActive === 4 && n === 3) n = 3
  521. if (this.filterActive === n) return
  522. this.filterActive = n
  523. this.$nextTick(function () {
  524. _this4.onSearch()
  525. })
  526. },
  527. setFilter: function setFilter(_ref2) {
  528. var _this5 = this
  529. var productCategory = _ref2.productCategory,
  530. productAttributeCategory = _ref2.productAttributeCategory,
  531. brand = _ref2.brand // console.log(productCategory.active)
  532. if (productCategory && productCategory.active === undefined) {
  533. productCategory.active = 0
  534. }
  535. this.productCategory = productCategory
  536. ? productCategory
  537. : { id: 0, name: '' }
  538. this.productAttributeCategory = productAttributeCategory
  539. ? productAttributeCategory
  540. : { id: 0, name: '' }
  541. this.brand = brand ? brand : { id: 0, name: '' }
  542. this.$nextTick(function () {
  543. _this5.onSearch()
  544. _this5.filterListShow = false
  545. })
  546. },
  547. onToggleTag: function onToggleTag() {
  548. var _this6 = this
  549. var tabList = this.$refs.tabList
  550. if (tabList.loading) return // this.productCategory.active = i
  551. this.$nextTick(function () {
  552. _this6.onSearch()
  553. })
  554. },
  555. onClearTag: function onClearTag(key) {
  556. var _this7 = this
  557. this[key] = { id: 0, name: '' }
  558. var goodsFilter = this.$refs.goodsFilter
  559. if (goodsFilter) {
  560. if (key === 'productCategory') {
  561. goodsFilter.setParams('productCategorySmallVoList')
  562. } else if (key === 'productAttributeCategory') {
  563. goodsFilter.setParams('productAttributeCategoryList')
  564. } else {
  565. goodsFilter.setParams('brandList')
  566. }
  567. }
  568. this.$nextTick(function () {
  569. _this7.onSearch()
  570. })
  571. },
  572. onSearch: function onSearch() {
  573. var tabList = this.$refs.tabList
  574. tabList.onSearch()
  575. },
  576. searchBtn: function searchBtn(keyword) {
  577. var _this8 = this
  578. this.keyword = keyword
  579. console.log(this.keyword)
  580. this.$nextTick(function () {
  581. _this8.onSearch()
  582. })
  583. }
  584. },
  585. render: function render() {
  586. var _this9 = this
  587. return createVNode('div', null, [
  588. createVNode(Sticky, null, {
  589. default: function _default() {
  590. return [
  591. createVNode(
  592. ColSearch,
  593. {
  594. modelValue: _this9.keyword,
  595. onSearch: _this9.searchBtn
  596. },
  597. null
  598. ),
  599. createVNode(
  600. Row,
  601. { class: styles$1['filter-top'], align: 'center' },
  602. {
  603. default: function _default() {
  604. return [
  605. createVNode(
  606. Col,
  607. {
  608. span: 6,
  609. class:
  610. _this9.filterActive === 0
  611. ? styles$1.active
  612. : '',
  613. onClick: function onClick() {
  614. return _this9.onFilter(0)
  615. }
  616. },
  617. {
  618. default: function _default() {
  619. return [
  620. createTextVNode(
  621. '\u7EFC\u5408\u6392\u5E8F'
  622. )
  623. ]
  624. }
  625. }
  626. ),
  627. createVNode(
  628. Col,
  629. {
  630. span: 6,
  631. class:
  632. _this9.filterActive === 3 ||
  633. _this9.filterActive === 4
  634. ? styles$1.active
  635. : '',
  636. onClick: function onClick() {
  637. return _this9.onFilter(3)
  638. }
  639. },
  640. {
  641. default: function _default() {
  642. return [
  643. createTextVNode('\u4EF7\u683C'),
  644. createVNode(
  645. 'div',
  646. { class: styles$1.filterSort },
  647. [
  648. createVNode(
  649. Icon,
  650. {
  651. class:
  652. _this9.filterActive === 3
  653. ? styles$1['icon-active']
  654. : '',
  655. style: {
  656. transform: 'rotate(-90deg)'
  657. },
  658. name: 'play',
  659. size: 12
  660. },
  661. null
  662. ),
  663. createVNode(
  664. Icon,
  665. {
  666. class: [
  667. styles$1.iconSort,
  668. _this9.filterActive === 4
  669. ? [styles$1['icon-active']]
  670. : ''
  671. ],
  672. style: {
  673. transform: 'rotate(90deg)'
  674. },
  675. name: 'play',
  676. size: 12
  677. },
  678. null
  679. )
  680. ]
  681. )
  682. ]
  683. }
  684. }
  685. ),
  686. createVNode(
  687. Col,
  688. {
  689. style: { marginLeft: 'auto' },
  690. span: 6,
  691. class: styles$1.filterBtn,
  692. onClick: function onClick() {
  693. return (_this9.filterListShow = true)
  694. }
  695. },
  696. {
  697. default: function _default() {
  698. return [
  699. createTextVNode('\u7B5B\u9009'),
  700. createVNode(
  701. Icon,
  702. { name: iconFilter, size: 18 },
  703. null
  704. )
  705. ]
  706. }
  707. }
  708. )
  709. ]
  710. }
  711. }
  712. ),
  713. _this9.productCategory.id &&
  714. _this9.productCategory.children &&
  715. _this9.productCategory.children.length
  716. ? createVNode(
  717. Tabs,
  718. {
  719. class: styles$1['filter-productCategory'],
  720. shrink: true,
  721. ellipsis: false,
  722. active: _this9.productCategory.active,
  723. 'onUpdate:active': function onUpdateActive(
  724. $event
  725. ) {
  726. return (_this9.productCategory.active =
  727. $event)
  728. },
  729. onChange: function onChange() {
  730. return _this9.onToggleTag()
  731. }
  732. },
  733. {
  734. default: function _default() {
  735. return [
  736. _this9.productCategory &&
  737. _this9.productCategory.children.map(
  738. function (n, i) {
  739. return createVNode(
  740. Tab,
  741. { name: i, title: n.name },
  742. {
  743. title: function title() {
  744. return createVNode(
  745. 'div',
  746. {
  747. class: [
  748. styles$1['filter-tag'],
  749. _this9.productCategory
  750. .active === i
  751. ? styles$1[
  752. 'filter-tag-checked'
  753. ]
  754. : ''
  755. ]
  756. },
  757. [n.name]
  758. )
  759. }
  760. }
  761. )
  762. }
  763. )
  764. ]
  765. }
  766. }
  767. )
  768. : null
  769. ]
  770. }
  771. }),
  772. createVNode('div', { class: styles$1.filterTagWrap }, [
  773. this.productAttributeCategory.id
  774. ? createVNode(
  775. Tag,
  776. {
  777. class: styles$1.filterTag,
  778. closeable: true,
  779. onClose: function onClose() {
  780. return _this9.onClearTag(
  781. 'productAttributeCategory'
  782. )
  783. }
  784. },
  785. {
  786. default: function _default() {
  787. return [_this9.productAttributeCategory.name]
  788. }
  789. }
  790. )
  791. : '',
  792. this.brand.id
  793. ? createVNode(
  794. Tag,
  795. {
  796. class: styles$1.filterTag,
  797. closeable: true,
  798. onClose: function onClose() {
  799. return _this9.onClearTag('brand')
  800. }
  801. },
  802. {
  803. default: function _default() {
  804. return [_this9.brand.name]
  805. }
  806. }
  807. )
  808. : ''
  809. ]),
  810. this.tabListShow
  811. ? createVNode(
  812. TabList,
  813. {
  814. ref: 'tabList',
  815. typeId: Number(this.getProductAttributeCategory),
  816. productAttributeCategoryId:
  817. this.productAttributeCategory.id,
  818. brandId: this.brand.id,
  819. sort: this.filterActive,
  820. keyword: this.keyword
  821. },
  822. null
  823. )
  824. : null,
  825. createVNode(
  826. Popup,
  827. {
  828. show: this.filterListShow,
  829. closeable: true,
  830. position: 'bottom',
  831. round: true,
  832. onClose: function onClose() {
  833. _this9.filterListShow = false
  834. }
  835. },
  836. {
  837. default: function _default() {
  838. return [
  839. createVNode(
  840. GoodsFilterList,
  841. {
  842. cateGoryId: _this9.productCategory.id,
  843. ref: 'goodsFilter',
  844. setFilter: _this9.setFilter
  845. },
  846. null
  847. )
  848. ]
  849. }
  850. }
  851. )
  852. ])
  853. }
  854. })
  855. )
  856. }
  857. }
  858. }
  859. )
  860. })()