当前位置: 首页 > news >正文

网站框架一般用什么做怎么修改wordpress绑定的域名

网站框架一般用什么做,怎么修改wordpress绑定的域名,网站空间续费多钱一年,aso应用商店优化slot 插槽的实现实际上就是一种 延时渲染#xff0c;把父组件中编写的插槽内容保存到一个对象上#xff0c;并且把具体渲染 DOM 的代码用函数的方式封装#xff0c;然后在子组件渲染的时候#xff0c;根据插槽名在对象中找到对应的函数#xff0c;然后执行这些函数做真正的…slot 插槽的实现实际上就是一种 延时渲染把父组件中编写的插槽内容保存到一个对象上并且把具体渲染 DOM 的代码用函数的方式封装然后在子组件渲染的时候根据插槽名在对象中找到对应的函数然后执行这些函数做真正的渲染。 /*** 创建 vnode*/ function createVNode(type, props null, children null) {if (props) {// 处理 props 相关逻辑标准化 class 和 style}// 对 vnode 类型信息编码// 创建 vnode 对象const vnode {type,props,// 其他一些属性}// 标准化子节点把不同数据类型的 children 转成数组或者文本类型normalizeChildren(vnode, children)return vnode }/*** 标准化子节点以及获取 vnode 节点类型 shapeFlagshapeFlag 最终为 SLOTS_CHILDREN | STATEFUL_COMPONENT*/ function normalizeChildren(vnode, children) {let type 0const { shapeFlag } vnode// 没有子节点if (children null) {children null}// 子节点为数组else if (isArray(children)) {type 16 /* ARRAY_CHILDREN */}// 子节点为对象else if (typeof children object) {// 子节点为元素或 teleportif ((shapeFlag 1/* ELEMENT */ || shapeFlag 64 /* TELEPORT */) children.default) {normalizeChildren(vnode, children.default())return}// 子节点为 slotelse {type 32/* SLOTS_CHILDREN */const slotFlag children._if (!slotFlag !(InternalObjectKey in children)) {children._ctx currentRenderinglnstance}// 处理类型为 FORWARDED 的情况else if (slotFlag 3 /* FORWARDED */ currentRenderinglnstance) {// 动态插槽if (currentRenderingInstance.vnode.patchFlag 1024/* DYNAMIC_SLOTS */) {children._ 2/* DYNAMIC */vnode.patchFlag | 1024 /* DYNAMIC SLOTS */}// 静态插槽else {children._ 1/* STABLE */}}}}// 子节点为函数else if (isFunction(children)) {children { default: children, _ctx: currentRenderinglnstance }type 32/* SLOTS_CHILDREN */}// 其他子节点else {children String(children)// teleport 类型if (shapeFlag 64/* TELEPORT */) {type 16/* ARRAY_CHILDREN */children [createTextVNode(children)]}// 文本类型else {type 8/* TEXT_CHILDREN */}}vnode.children childrenvnode.shapeFlag | type }/*** 初始化 Slots*/ const initSlots (instance, children) {if (instance.vnode.shapeFlag 32/* SLOTS_CHILDREN */) {const type children._if (type) {instance.slots childrendef(children, _, type)} else {normalizeObjectSlots(children, (instance.slots {}))}} else {instance.slots {}if (children) {normalizeVNodeSlots(instance, children)}}def(instance.slots, InternalObjectKey, 1) }/*** 渲染 slot DOM* param {Object} slots - 插槽对象 instance.slots* param {string} name - 插槽名*/ function renderSlot(slots, name, props {}, fallback) {// 根据 name 获取对应插槽函数let slot slots[name]// 通过 createBlock 创建 vnode 节点类型为 Fragmentchildren 是执行 slot 插槽函数的返回值return (openBlock(), createBlock(Fragment, { key: props.key }, slot ? slot(props) : fallback ? fallback() : [], slots._ 1/* STABLE */ ? 64/* STABLE_FRAGMENT */ : -2/* BAIL */)); }/*** 保证子组件中渲染具体插槽内容保证它的数据作用域也是父组件*/ function withCtx(fn, ctx currentRenderinglnstance) {if (!ctx) return fnreturn function renderFnWithContext() {// 保存当前渲染的组件实例 ownerconst owner currentRenderingInstance// 把 ctx 设置为当前渲染的实例setCurrentRenderinglnstance(ctx)// 执行 fnconst res fn.apply(null, arguments)// 把 ctx 设置为当前渲染的实例setCurrentRenderingInstance(owner)return res} }/*** 处理 Fragment*/ const processFragment (nl, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {const fragmentStartAnchor (n2.el n1 ? nl.el : hostCreateText())const fragmentEndAnchor (n2.anchor n1 ? nl.anchor : hostCreateText())let { patchFlag } n2if (patchFlag 0) {optimized true}// 插入节点if (n1 null) {// 先在前后插入两个空文本节点hostInsert(fragmentStartAnchor, container, anchor)hostInsert(fragmentEndAnchor, container, anchor)// 再挂载子节点mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, optimized)}//更新节点else { } }
http://www.zqtcl.cn/news/776003/

相关文章:

  • 顺德高端网站企业建设网站没有服务器
  • .net网站开发模板天津手网站开发
  • 网页设计大赛网站开发重庆最近的新闻大事10条
  • 网站ftp用户名和密码是什么建设单位网站设计
  • 公司请人做的网站打不开网页游戏大厅都有哪些
  • 网投网站制作中国建设教育协会报名网站
  • 做外贸需要做网站吗上海中建建筑设计院有限公司
  • 网站源代码免费下载苏州seo网络优化公司
  • 建网站跟建网店的区别pico笔克品牌介绍
  • 网站设计小技巧西安网站建设网站
  • 做听书网站怎么做网站留言板带后台模板
  • 石家庄网站建设王道下拉棒厦门橄榄网站建设
  • 赤峰网站建设培训建筑资格证书查询官网
  • 共和县公司网站建设seo网络推广招聘
  • 网站怎样做外链百度网站地图提交
  • 瑞安联科网站建设中国做网站公司排名
  • jsp网站开发详解 赵增敏jsp网站首页怎么做
  • 有哪些可以做图的网站啊莱芜金点子广告电子版2024
  • 免费营销型网站模版南宁比较有好的网站制作公司
  • 做外贸上什么网站什么什么设计英文网站
  • 嘿客免费网站建设网站对联图片
  • 一件代发48个货源网站韶关最新消息
  • 网站都需要备案吗安徽建设通网站
  • 外包公司 网站建设 深圳电子商务公司设计网站建设
  • 怎么添加网站背景音乐定制建站
  • 西安网站建设和推广公司php企业网站开发实训报告
  • 市网站制作番禺绿叶居
  • 网站漂浮物怎么做电子商务网站开发实训体会
  • 电商网站建设定制济南网站建设及推广
  • 网站标签化wordpress 输出评论内容 函数