vuejs1.x中定义异步组件实例
2017-02-20 10:43
316 查看
官方文档中描述得不是很详细。这里做个笔记。
HTML:
JS:
HTML:
<div id="full"> <home></home> </div>
JS:
//定义异步组件,主页 Vue.component('home', function(resolve, reject) { $.ajax({ url: "main.html", dataType: 'text', type: "get", success: function(html) { resolve({ template: html, ready: function() { } }); } }); }); var full = new Vue({ el: "#full", ready: function() { }, data: { isLogin: true } });
相关文章推荐
- 实例演示使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-WinForm
- 实例演示如何使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-WinForm 推荐
- Extjs单独定义各组件的实例代码
- 实例演示使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-Web
- Extjs单独定义各组件的实例代码
- 简单的Vue异步组件实例Demo
- 实例演示使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-WinForm
- Vuejs第八篇之Vuejs组件的定义实例解析
- 实例演示使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-Web 推荐
- sencha touch2---直接用xxtype定义的组件无法使用该实例的方法;必须要用create
- 实例演示使用RDIFramework.NET 框架的工作流组件进行业务流程的定义—请假申请流程-Web
- 在组件之间实现事务和异步提交事务(NET2.0)
- 一个COM异步实现接口列集(Marshal)源代码实例
- [EnterpriseServices]利用assembly定义我们的组件在COM+中的注册方式
- 以增加收藏夹功能为实例,解析asp.net forums2结构流程及组件设计
- 体验CORBA组件模型CCM:2、实例
- 续实例解析SOCKET编程模型之异步通信篇-客户端
- 关于webservice的异步调用简单实例
- [C#]I/O完成端口的类定义和测试实例
- aspjpeg组件技术在ASP的应用实例