文件操作 - i18n.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@nuxtjs/i18n/dist/runtime/routing/i18n.js
编辑文件内容
import { effectScope } from "#imports"; import { isVueI18n, getComposer } from "../compatibility.js"; export function extendI18n(i18n, { extendComposer, extendComposerInstance }) { const scope = effectScope(); const installI18n = i18n.install.bind(i18n); i18n.install = (app, ...options) => { const pluginOptions = Object.assign({}, options[0]); pluginOptions.__composerExtend = (c) => { extendComposerInstance(c, getComposer(i18n)); return () => { }; }; if (i18n.mode === "legacy") { pluginOptions.__vueI18nExtend = (vueI18n) => { extendComposerInstance(vueI18n, getComposer(vueI18n)); return () => { }; }; } Reflect.apply(installI18n, i18n, [app, pluginOptions]); const globalComposer = getComposer(i18n); scope.run(() => { extendComposer(globalComposer); if (i18n.mode === "legacy" && isVueI18n(i18n.global)) { extendComposerInstance(i18n.global, getComposer(i18n.global)); } }); if (i18n.mode === "composition" && app.config.globalProperties.$i18n != null) { extendComposerInstance(app.config.globalProperties.$i18n, globalComposer); } if (app.unmount) { const unmountApp = app.unmount.bind(app); app.unmount = () => { scope.stop(); unmountApp(); }; } }; return scope; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件