mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Change Type::Object to be able to hold a name
Internally, structure will be represented with a Type::Object with a name instead of a Component with a void base type
This commit is contained in:
parent
b9533a217e
commit
333c96fd79
9 changed files with 176 additions and 66 deletions
|
@ -182,10 +182,10 @@ fn to_eval_value<'cx>(
|
|||
},
|
||||
Type::Resource => Ok(Value::String(val.to_string(cx)?.value().into())),
|
||||
Type::Bool => Ok(Value::Bool(val.downcast_or_throw::<JsBoolean, _>(cx)?.value())),
|
||||
Type::Object(o) => {
|
||||
Type::Object{fields, ..} => {
|
||||
let obj = val.downcast_or_throw::<JsObject, _>(cx)?;
|
||||
Ok(Value::Object(
|
||||
o
|
||||
fields
|
||||
.iter()
|
||||
.map(|(pro_name, pro_ty)| {
|
||||
Ok((
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue