mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 08:06:51 +00:00
Add view classes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { AbstractNode, NodeMods } from './AbstractNode'
|
||||
import { Path } from '../model/Path'
|
||||
import { DataModel } from '../model/DataModel'
|
||||
import { TreeView } from '../view/TreeView'
|
||||
|
||||
export class StringNode extends AbstractNode<string> {
|
||||
constructor(mods?: NodeMods<string>) {
|
||||
@@ -10,8 +11,8 @@ export class StringNode extends AbstractNode<string> {
|
||||
updateModel(el: Element, path: Path, model: DataModel) {
|
||||
}
|
||||
|
||||
render(path: Path, value: string, model: DataModel) {
|
||||
return this.wrap(path, model,
|
||||
render(path: Path, value: string, view: TreeView) {
|
||||
return this.wrap(path, view,
|
||||
`<span>${path.last()}</span> <input value="${value || ''}"></input>`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user