mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 18:02: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
|
if not String.prototype.format
|
||||||
String.prototype.format = () ->
|
String.prototype.format = () ->
|
||||||
args = arguments
|
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 = () ->
|
String.prototype.f = () ->
|
||||||
args = arguments
|
args = arguments
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
}
|
}
|
||||||
this.on("update", function(){
|
this.on("update", function(){
|
||||||
if(self.updateContent)
|
if(self.updateContent)
|
||||||
self.updateContent()
|
self.root.innerHTML = self.updateContent()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</afx-html>
|
</afx-html>
|
Loading…
x
Reference in New Issue
Block a user