ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
2 lines (1 loc) • 2.28 kB
JavaScript
"use strict";const t=require("vue"),i=require("../chunks/helper-chunk.js"),c=require("./context.js"),p=require("./hooks/use-x-provider-context.js"),f=require("ant-design-vue"),q=t.defineComponent({name:"AXProvider",inheritAttrs:!1,__name:"index",props:{actions:{type:null,required:!1},bubble:{type:null,required:!1},conversations:{type:null,required:!1},prompts:{type:null,required:!1},sender:{type:null,required:!1},suggestion:{type:null,required:!1},thoughtChain:{type:null,required:!1},attachments:{type:null,required:!1},welcome:{type:null,required:!1},iconPrefixCls:{type:String,required:!1},getTargetContainer:{type:Function,required:!1},getPopupContainer:{type:Function,required:!1},prefixCls:{type:String,required:!1},getPrefixCls:{type:Function,required:!1},renderEmpty:{type:null,required:!1},transformCellText:{type:Function,required:!1},csp:{type:null,required:!1},input:{type:Object,required:!1},autoInsertSpaceInButton:{type:Boolean,required:!1},locale:{type:null,required:!1},pageHeader:{type:Object,required:!1},componentSize:{type:null,required:!1},componentDisabled:{type:Boolean,required:!1},direction:{type:String,required:!1},space:{type:Object,required:!1},virtual:{type:Boolean,required:!1},dropdownMatchSelectWidth:{type:null,required:!1},form:{type:Object,required:!1},pagination:{type:Object,required:!1},theme:{type:null,required:!1},select:{type:Object,required:!1},wave:{type:Object,required:!1}},setup(e,{expose:l}){l();const u=i.createPropsRestProxy(e,["attachments","bubble","conversations","prompts","sender","suggestion","thoughtChain","welcome"]),r=t.useSlots(),o=t.computed(()=>({attachments:e.attachments,bubble:e.bubble,conversations:e.conversations,prompts:e.prompts,sender:e.sender,suggestion:e.suggestion,thoughtChain:e.thoughtChain,welcome:e.welcome})),{theme:n}=p.default(),a=t.computed(()=>({...(n==null?void 0:n.value)||{},...u.theme})),d=t.computed(()=>{var s;return(s=r.default)==null?void 0:s.call(r)});return()=>t.createVNode(c.XProviderContextProvider,{value:o.value},{default:()=>[t.createVNode(f.ConfigProvider,t.mergeProps(u,{theme:a.value}),{default:()=>[d.value]})]})}}),y=i._export_sfc(q,[["__file","/Users/wangzhichao/办公/code/github/ant-design-x-vue-pure/ant-design-x-vue/src/x-provider/index.vue"]]);exports.XProvider=y;