Skip to content

Commit

Permalink
feat: field.href attr that point to href field, default row.href
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed May 14, 2022
1 parent f958e2d commit 50efccd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,9 @@ export default {
// шаблоны полей задаются здесь
if (field.href && row.href) {
valueText = `<a href="${row.href}" target="_blank">${valueText}</a>`;
if (field.href) {
let href = row[field.href] || row.href;
valueText = `<a href="${href}" target="_blank">${valueText}</a>`;
}
if (field.type === 'integer' && valueText) {
Expand Down

0 comments on commit 50efccd

Please sign in to comment.