mirror of
https://github.com/centau/vide.git
synced 2026-08-20 23:01:37 +00:00
This commit is contained in:
parent
f7f589626c
commit
795ff8725c
13 changed files with 145 additions and 314 deletions
52
todo.md
52
todo.md
|
|
@ -1,43 +1,13 @@
|
|||
```lua
|
||||
function TextInput(p: {
|
||||
DefaultText: string,
|
||||
Output: (string) -> ()
|
||||
} & Layout)
|
||||
return create "TextBox" {
|
||||
Layout = p.Layout,
|
||||
Children = p.Children
|
||||
# todo
|
||||
|
||||
BackgroundText = DefaultText,
|
||||
|
||||
[{"Changed"}] = function(self)
|
||||
p.Output(self.Text)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
function Counter()
|
||||
local count = source(0)
|
||||
|
||||
return create "TextButton" {
|
||||
Text = count
|
||||
}
|
||||
end
|
||||
|
||||
source
|
||||
derive
|
||||
map
|
||||
|
||||
spring
|
||||
```
|
||||
|
||||
onCleanup
|
||||
Index
|
||||
For
|
||||
untrack
|
||||
batch
|
||||
async/loading/suspense
|
||||
|
||||
define order with nested properties
|
||||
- Implement from solid
|
||||
- onCleanup
|
||||
- Index
|
||||
- For
|
||||
- untrack
|
||||
- batch
|
||||
- async/loading/suspense
|
||||
- define order with nested properties
|
||||
|
||||
```lua
|
||||
type Action<T> = {
|
||||
|
|
@ -50,7 +20,7 @@ local function action(priority: number, fn: (Instance) -> ()): Action
|
|||
|
||||
end
|
||||
|
||||
local function Changed(property: string, callback: () -> ())
|
||||
local function changed(property: string, callback: () -> ())
|
||||
return action(1, function(instance)
|
||||
instance:GetPropertyChangedSignal(property):Connect(callback)
|
||||
end) :: Action<"Changed">
|
||||
|
|
@ -59,7 +29,7 @@ end
|
|||
create "TextBox" {
|
||||
Text = "test",
|
||||
|
||||
Changed "Text" < function(self, data)
|
||||
changed "Text" < function(self, data)
|
||||
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue