mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 01:42:47 +01:00
normal string format and locale support string format
This commit is contained in:
parent
7fefc17f04
commit
800c95830d
@ -62,7 +62,8 @@ String.prototype.asUint8Array = () ->
|
||||
if not String.prototype.format
|
||||
String.prototype.format = () ->
|
||||
args = arguments
|
||||
return new FormatedString(@, args)
|
||||
return @replace /{(\d+)}/g, (match, number) ->
|
||||
return if typeof args[number] != 'undefined' then args[number] else match
|
||||
|
||||
String.prototype.f = () ->
|
||||
args = arguments
|
||||
|
@ -14,7 +14,7 @@
|
||||
}
|
||||
this.on("update", function(){
|
||||
if(self.updateContent)
|
||||
self.updateContent()
|
||||
self.root.innerHTML = self.updateContent()
|
||||
})
|
||||
</script>
|
||||
</afx-html>
|
Loading…
x
Reference in New Issue
Block a user