firest commit

This commit is contained in:
wwweww
2026-02-21 22:48:40 +08:00
commit 55e8053e07
1034 changed files with 99049 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const t = require('typical')
const _value = new WeakMap()
const _column = new WeakMap()
class Cell {
constructor (value, column) {
this.value = value
_column.set(this, column)
}
set value (val) {
_value.set(this, val)
}
get value () {
let cellValue = _value.get(this)
if (typeof cellValue === 'function') cellValue = cellValue.call(_column.get(this))
if (cellValue === undefined) {
cellValue = ''
} else {
cellValue = String(cellValue)
}
return cellValue
}
}
module.exports = Cell