waibu-db 1.1.0 → 1.1.1
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
|
@@ -4,7 +4,7 @@ async function table () {
|
|
|
4
4
|
const WdbBase = await wdbBase.call(this)
|
|
5
5
|
|
|
6
6
|
return class WdbTable extends WdbBase {
|
|
7
|
-
isRightAligned (field, schema) {
|
|
7
|
+
isRightAligned = (field, schema) => {
|
|
8
8
|
const { get, find } = this.plugin.app.bajo.lib._
|
|
9
9
|
const prop = find(schema.properties, { name: field })
|
|
10
10
|
if (!prop) return false
|
|
@@ -13,7 +13,7 @@ async function table () {
|
|
|
13
13
|
return value
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
isNoWrap (field, schema) {
|
|
16
|
+
isNoWrap = (field, schema) => {
|
|
17
17
|
const { get } = this.plugin.app.bajo.lib._
|
|
18
18
|
return get(schema, 'view.noWrap', []).includes(field)
|
|
19
19
|
}
|
|
@@ -140,7 +140,7 @@ async function table () {
|
|
|
140
140
|
const formatter = get(schema, `view.formatter.${f}`)
|
|
141
141
|
if (formatter) {
|
|
142
142
|
if (isFunction(formatter)) value = await formatter(dataValue, d)
|
|
143
|
-
else value = await callHandler(formatter, req, dataValue, d)
|
|
143
|
+
else value = await callHandler(this.plugin.app[schema.ns], formatter, req, dataValue, d)
|
|
144
144
|
value = await this.component.buildSentence(value)
|
|
145
145
|
}
|
|
146
146
|
const line = await this.component.buildTag({ tag: 'td', attr, html: value })
|