fix test implementation of function t

This commit is contained in:
Pig Fang 2020-08-29 08:39:25 +08:00
parent 329af60d74
commit 01f693c75d
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2

View File

@ -21,8 +21,10 @@ export let site_name = 'Blessing Skin'
export let version: string
export let route: string
export function t(key: string, params?: object) {
return `${key}(${JSON.stringify(params)})`
export function t(key: string, params?: object): string {
const data = params ? `(${JSON.stringify(params)})` : ''
return key + data
}
export const fetch = {