form-tdesigner
Version:
好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
24 lines (17 loc) • 431 B
JavaScript
import {useLocale} from './index';
import {ref} from 'vue';
import ZhCn from '../locale/zh-cn';
let _t = null;
let locale = ref(null);
function t(...args) {
return _t(...args);
}
const globalUseLocale = (_locale) => {
locale.value = _locale || ZhCn;
const data = useLocale(locale);
_t = data.t;
return data;
};
globalUseLocale();
export default globalUseLocale;
export {t, locale};