55fc0aea4415c92276922e4b2b6adb07eb4a400ba8a8c1258d479661e4eb16d7266b544f68be6db8f7402d3c4c40d68878966086ff00bb44ca69122b28eb49 884 B

12345678910111213141516171819202122
  1. import { defineComponent, watch, renderSlot } from 'vue';
  2. import { provideGlobalConfig } from './hooks/use-global-config.mjs';
  3. import { configProviderProps } from './config-provider-props.mjs';
  4. const messageConfig = {
  5. placement: "top"
  6. };
  7. const ConfigProvider = defineComponent({
  8. name: "ElConfigProvider",
  9. props: configProviderProps,
  10. setup(props, { slots }) {
  11. const config = provideGlobalConfig(props);
  12. watch(() => props.message, (val) => {
  13. var _a, _b;
  14. Object.assign(messageConfig, (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.message) != null ? _b : {}, val != null ? val : {});
  15. }, { immediate: true, deep: true });
  16. return () => renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
  17. }
  18. });
  19. export { ConfigProvider as default, messageConfig };
  20. //# sourceMappingURL=config-provider.mjs.map