fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Add length function #1382

Closed ichan-mb closed 3 years ago

ichan-mb commented 3 years ago

Add length function expression for string or array

Example:

<ClientPanel>
    <LetString ux:Name="s" Value="This is text" />
    <JavaScript>
        var arr = [1,2,3,4,5]
        module.exports = { arr }
    </JavaScript>
    <StackPanel>
        <Text Value="{s}" />
        <Text Value="{= length({s})}" />

        <Text Value="{arr}" />
        <Text Value="{= length({arr})}" />
    </StackPanel>
</ClientPanel>

also fix a mistake on indexOf function

This PR contains:

mortend commented 3 years ago

https://travis-ci.org/github/fuse-open/fuselibs/builds/746503462