@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
36 lines (35 loc) • 1.43 kB
TypeScript
/**
* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from 'vue-i18n';
import { LocaleConfig } from './types';
import { App } from 'vue';
export declare class LocaleService {
static i18n: I18n;
private static config;
static setup(app: App, config?: Partial<LocaleConfig>): Promise<void>;
static getLocale(): string | import("vue").WritableComputedRef<string, string>;
static getLocaleValue(key: string): string | true;
/**
* 属性空值或者有值但等于默认值,返回默认值多语言属性;有值但不相等返回当前属性自有值
* @param propertyValue
* @param defaultValue
* @param localeKey
* @returns
*/
static getRealPropertyValue(propertyValue: any, defaultValue: any, localeKey: any): any;
private static loadResources;
private static loadLocaleResources;
}