Skip to content

Commit 1ffb46b

Browse files
authored
Merge pull request cryingjoker#41 from cryingjoker/newb2b
profit fix
2 parents 631e5f4 + 691e9c7 commit 1ffb46b

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

src/example-pages/components/main-elements/RowList.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
<rt-row-list :is-profit-list=&quot;true&quot;>
218218
<rt-row-list-item
219219
:more-than-one-column=&quot;true&quot;
220-
:columns-quantity=&quot;2&quot;
220+
:columns-quantity=&quot;3&quot;
221221
icon=&quot;/static/images/B2B/ATS.svg&quot;>
222222
<template slot=&quot;option&quot;>
223223
<div class=&quot;d-flex flex-row&quot;>
@@ -230,7 +230,7 @@
230230
</rt-row-list-item>
231231
<rt-row-list-item
232232
:more-than-one-column=&quot;true&quot;
233-
:columns-quantity=&quot;2&quot;
233+
:columns-quantity=&quot;3&quot;
234234
icon=&quot;/static/images/B2B/ATS.svg&quot;>
235235
<template slot=&quot;option&quot;>
236236
<div class=&quot;d-flex flex-row&quot;>
@@ -243,7 +243,7 @@
243243
</rt-row-list-item>
244244
<rt-row-list-item
245245
:more-than-one-column=&quot;true&quot;
246-
:columns-quantity=&quot;2&quot;
246+
:columns-quantity=&quot;3&quot;
247247
icon=&quot;/static/images/B2B/mobile-call.svg&quot;>
248248
<template slot=&quot;option&quot;>
249249
<div class=&quot;d-flex flex-row&quot;>
@@ -256,7 +256,7 @@
256256
</rt-row-list-item>
257257
<rt-row-list-item
258258
:more-than-one-column=&quot;true&quot;
259-
:columns-quantity=&quot;2&quot;
259+
:columns-quantity=&quot;3&quot;
260260
icon=&quot;/static/images/B2B/ATS.svg&quot;>
261261
<template slot=&quot;option&quot;>
262262
<div class=&quot;d-flex flex-row&quot;>
@@ -269,7 +269,7 @@
269269
</rt-row-list-item>
270270
<rt-row-list-item
271271
:more-than-one-column=&quot;true&quot;
272-
:columns-quantity=&quot;2&quot;
272+
:columns-quantity=&quot;3&quot;
273273
icon=&quot;/static/images/B2B/ATS.svg&quot;>
274274
<template slot=&quot;option&quot;>
275275
<div class=&quot;d-flex flex-row&quot;>
@@ -282,7 +282,7 @@
282282
</rt-row-list-item>
283283
<rt-row-list-item
284284
:more-than-one-column=&quot;true&quot;
285-
:columns-quantity=&quot;2&quot;
285+
:columns-quantity=&quot;3&quot;
286286
icon=&quot;/static/images/B2B/shield.svg&quot;>
287287
<template slot=&quot;option&quot;>
288288
<div class=&quot;d-flex flex-row&quot;>

src/lib/components/RowList/RowListItem.vue

+18-21
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ export default {
66
type: Boolean,
77
default: false
88
},
9-
moreThanOneColumn: {
10-
type: Boolean,
11-
default: false
12-
},
139
columnsQuantity: {
1410
type: Number,
1511
default: 1
@@ -37,7 +33,7 @@ export default {
3733
}
3834
},
3935
render: function(h) {
40-
if(!this.moreThanOneColumn){
36+
if(this.columnsQuantity === 1){
4137
if (this.$slots.moreInfo) {
4238
return (
4339
<div
@@ -106,22 +102,23 @@ export default {
106102
);
107103
}
108104
} else {
109-
if(this.columnsQuantity === 2) {
110-
return (<div class="rt-row-list__item rtb-profit rtb-profit--col-2 rt-col-6 rt-col-td-3 rt-col-md-3">
111-
<div class="rt-row-list__header">
112-
<div class="rt-row-list__icon" style={this.iconImage}></div>
113-
{this.$slots.option}
114-
</div>
115-
</div>)
116-
}
117-
if(this.columnsQuantity === 3) {
118-
return (<div class="rt-row-list__item rtb-profit rtb-profit--col-3 rt-col-4 rt-col-td-3 rt-col-md-3">
119-
<div class="rt-row-list__header">
120-
<div class="rt-row-list__icon" style={this.iconImage}></div>
121-
{this.$slots.option}
122-
</div>
123-
</div>)
124-
}
105+
const columnClass = (() => {
106+
let profitColumn = '';
107+
if(this.columnsQuantity === 2) {
108+
profitColumn += ' rtb-profit--col-2 rt-col-6 '
109+
}
110+
if(this.columnsQuantity === 3) {
111+
profitColumn += ' rtb-profit--col-3 rt-col-4 '
112+
}
113+
return profitColumn;
114+
})();
115+
return (<div class={"rt-row-list__item rtb-profit" + (columnClass) + "rt-col-td-3 rt-col-md-3"}>
116+
<div class="rt-row-list__header">
117+
<div class="rt-row-list__icon" style={this.iconImage}></div>
118+
{this.$slots.option}
119+
</div>
120+
</div>);
121+
125122
}
126123
}
127124
};

0 commit comments

Comments
 (0)