热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

BuiltInComponents

Built-InComponentscomponentProps:is-string|ComponentDefinition|ComponentConstructorinline

Built-In Components
component

Props:is - string | ComponentDefinition | ComponentConstructorinline-template - booleanUsage:A “meta component” for rendering dynamic components. The actual component to render is determined by the is prop:


See also: Dynamic Components

transition

Props:name - string, Used to automatically generate transition CSS class names. e.g. name: 'fade' will auto expand to .fade-enter, .fade-enter-active, etc. Defaults to "v".appear - boolean, Whether to apply transition on initial render. Defaults to false.css - boolean, Whether to apply CSS transition classes. Defaults to true. If set to false, will only trigger Javascript hooks registered via component events.type - string, Specifies the type of transition events to wait for to determine transition end timing. Available values are "transition" and "animation". By default, it will automatically detect the type that has a longer duration.mode - string, Controls the timing sequence of leaving/entering transitions. Available modes are "out-in" and "in-out"; defaults to simultaneous.duration - number | { enter: number, leave: number }, Specifies the duration of transition. By default, Vue waits for the first transitionend or animationend event on the root transition element.enter-class - stringleave-class - stringappear-class - stringenter-to-class - stringleave-to-class - stringappear-to-class - stringenter-active-class - stringleave-active-class - stringappear-active-class - stringEvents:before-enterbefore-leavebefore-appearenterleaveappearafter-enterafter-leaveafter-appearenter-cancelledleave-cancelled (v-show only)appear-cancelledUsage: serve as transition effects for single element/component. The only applies the transition behavior to the wrapped content inside; it doesn’t render an extra DOM element, or show up in the inspected component hierarchy.

toggled content




toggled content

new Vue({...methods: {transitionComplete: function (el) {// for passed 'el' that DOM element as the argument, something ...}}...
}).$mount('#transition-demo')See also: Transitions: Entering, Leaving, and Lists

transition-group

Props:tag - string, defaults to span.move-class - overwrite CSS class applied during moving transition.exposes the same props as except mode.Events:exposes the same events as .Usage: serve as transition effects for multiple elements/components. The renders a real DOM element. By default it renders a , and you can configure what element it should render via the tag attribute.Note every child in a must be uniquely keyed for the animations to work properly. supports moving transitions via CSS transform. When a child’s position on screen has changed after an update, it will get applied a moving CSS class (auto generated from the name attribute or configured with the move-class attribute). If the CSS transform property is “transition-able” when the moving class is applied, the element will be smoothly animated to its destination using the FLIP technique.

  • {{ item.text }}

  • See also: Transitions: Entering, Leaving, and Lists

    keep-alive

    Props:include - string or RegExp or Array. Only components with matching names will be cached.exclude - string or RegExp or Array. Any component with a matching name will not be cached.max - number. The maximum number of component instances to cache.Usage:When wrapped around a dynamic component, caches the inactive component instances without destroying them. Similar to , is an abstract component: it doesn’t render a DOM element itself, and doesn’t show up in the component parent chain.When a component is toggled inside , its activated and deactivated lifecycle hooks will be invoked accordingly.In 2.2.0+ and above, activated and deactivated will fire for all nested components inside a tree.Primarily used to preserve component state or avoid re-rendering.


    1">


    Note, is designed for the case where it has one direct child component that is being toggled. It does not work if you have v-for inside it. When there are multiple conditional children, as above, requires that only one child is rendered at a time.include and excludeNew in 2.1.0+The include and exclude props allow components to be conditionally cached. Both props can be a comma-delimited string, a RegExp or an Array:





    The match is first checked on the component’s own name option, then its local registration name (the key in the parent’s components option) if the name option is not available. Anonymous components cannot be matched against.maxNew in 2.5.0+The maximum number of component instances to cache. Once this number is reached, the cached component instance that was least recently accessed will be destroyed before creating a new instance.
    does not work with functional components because they do not have instances to be cached.See also: Dynamic Components - keep-alive

    slot

    Props:name - string, Used for named slot.Usage: serve as content distribution outlets in component templates. itself will be replaced.For detailed usage, see the guide section linked below.See also: Content Distribution with Slots

    VNode Interface

    Please refer to the VNode class declaration.

    Server-Side Rendering

    Please refer to the vue-server-renderer package documentation.

    Caught a mistake or want to contribute to the documentation? Edit this on GitHub! Deployed on Netlify .


    推荐阅读
    • VScode格式化文档换行或不换行的设置方法
      本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
    • javascript  – 概述在Firefox上无法正常工作
      我试图提出一些自定义大纲,以达到一些Web可访问性建议.但我不能用Firefox制作.这就是它在Chrome上的外观:而那个图标实际上是一个锚点.在Firefox上,它只概述了整个 ... [详细]
    • 单页面应用 VS 多页面应用的区别和适用场景
      本文主要介绍了单页面应用(SPA)和多页面应用(MPA)的区别和适用场景。单页面应用只有一个主页面,所有内容都包含在主页面中,页面切换快但需要做相关的调优;多页面应用有多个独立的页面,每个页面都要加载相关资源,页面切换慢但适用于对SEO要求较高的应用。文章还提到了两者在资源加载、过渡动画、路由模式和数据传递方面的差异。 ... [详细]
    • Nginx使用(server参数配置)
      本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
    • 目录实现效果:实现环境实现方法一:基本思路主要代码JavaScript代码总结方法二主要代码总结方法三基本思路主要代码JavaScriptHTML总结实 ... [详细]
    • CSS3选择器的使用方法详解,提高Web开发效率和精准度
      本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
    • 本文介绍了RPC框架Thrift的安装环境变量配置与第一个实例,讲解了RPC的概念以及如何解决跨语言、c++客户端、web服务端、远程调用等需求。Thrift开发方便上手快,性能和稳定性也不错,适合初学者学习和使用。 ... [详细]
    • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
    • 本文记录了在vue cli 3.x中移除console的一些采坑经验,通过使用uglifyjs-webpack-plugin插件,在vue.config.js中进行相关配置,包括设置minimizer、UglifyJsPlugin和compress等参数,最终成功移除了console。同时,还包括了一些可能出现的报错情况和解决方法。 ... [详细]
    • 本文介绍了如何使用vue-awesome-swiper组件,包括在main.js中引入和使用swiper和swiperSlide组件,以及设置options和ref属性。同时还介绍了如何在模板中使用swiper和swiperSlide组件,并展示了如何通过循环渲染swipes数组中的数据,并使用picUrl属性显示图片。最后还介绍了如何添加分页器。 ... [详细]
    • 网址:https:vue.docschina.orgv2guideforms.html表单input绑定基础用法可以通过使用v-model指令,在 ... [详细]
    • 先看看ElementUI里关于el-table的template数据结构:<template><el-table:datatableData><e ... [详细]
    • 随着前端技术的发展,越来越多的开发者开始使用react、vue等web框架,但很少有人深入理解这些框架的源码。然而,这些框架底层都是由原生的javascript构建而成。对于初学前端的人来说,可能会认为javascript很容易上手,但实际上只是因为它被高度封装了。与能够使用封装类的人相比,能够理解框架原理的人则处于另一个层面。本文将深入剖析jquery源码,探寻框架底层的原理,帮助读者更好地理解web框架的运行机制。 ... [详细]
    • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
    • Voicewo在线语音识别转换jQuery插件的特点和示例
      本文介绍了一款名为Voicewo的在线语音识别转换jQuery插件,该插件具有快速、架构、风格、扩展和兼容等特点,适合在互联网应用中使用。同时还提供了一个快速示例供开发人员参考。 ... [详细]
    author-avatar
    yuanyuan
    这个家伙很懒,什么也没留下!
    PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
    Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有