优化税类描述标题描述显示过长问题
This commit is contained in:
parent
8394ab5c6b
commit
e389c3b184
|
|
@ -2389,6 +2389,15 @@ __webpack_require__.r(__webpack_exports__);
|
|||
}
|
||||
|
||||
return defaultValue || '';
|
||||
},
|
||||
stringLengthInte: function stringLengthInte(text) {
|
||||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 50;
|
||||
|
||||
if (text.length) {
|
||||
return text.slice(0, length) + (text.length > length ? '...' : '');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -46,5 +46,13 @@ export default {
|
|||
return decodeURIComponent(r[2]);
|
||||
}
|
||||
return defaultValue || '';
|
||||
},
|
||||
|
||||
stringLengthInte(text, length = 50) {
|
||||
if (text.length) {
|
||||
return text.slice(0, length) + (text.length > length ? '...' : '');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<tr v-for="tax, index in tax_classes" :key="index">
|
||||
<td>@{{ tax.id }}</td>
|
||||
<td>@{{ tax.title }}</td>
|
||||
<td>@{{ tax.description }}</td>
|
||||
<td>@{{ descriptionFormat(tax.description) }}</td>
|
||||
<td>@{{ tax.created_at }}</td>
|
||||
<td>@{{ tax.updated_at }}</td>
|
||||
<td class="text-end">
|
||||
|
|
@ -137,6 +137,10 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
descriptionFormat(text) {
|
||||
return bk.stringLengthInte(text)
|
||||
},
|
||||
|
||||
checkedCreate(type, index) {
|
||||
this.dialog.show = true
|
||||
this.dialog.type = type
|
||||
|
|
|
|||
Loading…
Reference in New Issue