n20-common-lib 2.11.24 → 2.11.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -58,6 +58,19 @@ export function colfF(colf, map) {
|
|
|
58
58
|
return (row) => tplFn(row, sc, mck, map)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
export function colfFRow(row, colf, map) {
|
|
62
|
+
if (typeof colf !== 'string') return colf
|
|
63
|
+
let sc = colf.split(/{.+?}/g) || []
|
|
64
|
+
let mc = colf.match(/{.+?}/g) || []
|
|
65
|
+
let mck = []
|
|
66
|
+
mc.forEach((t) => {
|
|
67
|
+
t = t.replace(/^{|\s+|}$/g, '').split('|')
|
|
68
|
+
mck.push(t)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
return tplFn(row, sc, mck, map)
|
|
72
|
+
}
|
|
73
|
+
|
|
61
74
|
export function colftF(colft, fMap) {
|
|
62
75
|
if (typeof colft !== 'string') return colft
|
|
63
76
|
return fMap[colft]
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
:width="column.width"
|
|
62
62
|
:align="column.align"
|
|
63
63
|
:show-overflow-tooltip="column.showOverflowTooltip"
|
|
64
|
-
:formatter="column.formatter | colfF(column.formatterMap)"
|
|
65
64
|
>
|
|
66
65
|
<template slot-scope="scope">
|
|
66
|
+
<span v-if="column.formatter">{{ scope.row | colfFRow(column.formatter, column.formatterMap) }}</span>
|
|
67
67
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
68
|
-
<span v-html="scope.row[column.prop]"></span>
|
|
68
|
+
<span v-else v-html="scope.row[column.prop]"></span>
|
|
69
69
|
</template>
|
|
70
70
|
</el-table-column>
|
|
71
71
|
</el-table>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
import XEUtils from 'xe-utils'
|
|
117
117
|
import { $lc } from '../../utils/i18n/index'
|
|
118
118
|
import Pagination from '../Pagination/index.vue'
|
|
119
|
-
import {
|
|
119
|
+
import { colfFRow } from '../Table/filters.js'
|
|
120
120
|
export default {
|
|
121
121
|
name: 'UploadMsg',
|
|
122
122
|
components: { Pagination },
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
filters: {
|
|
174
|
-
|
|
174
|
+
colfFRow
|
|
175
175
|
},
|
|
176
176
|
data() {
|
|
177
177
|
return {
|