UNPKG

ll-package

Version:

2 lines (1 loc) 1.01 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../@babel/runtime/helpers/esm/extends.js"),o=require("vue"),u=require("../modal/locale.js"),d=require("../_util/warning.js"),s=require("../_util/type.js"),r="internalMark",l=o.defineComponent({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(t,c){let{slots:n}=c;d.default(t.ANT_MARK__===r,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");const i=o.reactive({antLocale:a.default(a.default({},t.locale),{exist:!0}),ANT_MARK__:r});return o.provide("localeData",i),o.watch(()=>t.locale,e=>{u.changeConfirmLocale(e&&e.Modal),i.antLocale=a.default(a.default({},e),{exist:!0})},{immediate:!0}),()=>{var e;return(e=n.default)===null||e===void 0?void 0:e.call(n)}}});l.install=function(t){return t.component(l.name,l),t};const _=s.withInstall(l);exports.ANT_MARK=r;exports.default=_;