1.在定义组件时调用内建的 $emit 方法并传入事件的名字,来向父级组件触发一个事件enlarge-text: 2.用 v-on 在上述组件上监听这个事件,就像监听一个原生 DOM 事件一样: 详情见官网:https://cn.vuejs.org/v2/guide/components.html ...
分类:
其他好文 时间:
2018-09-03 13:52:12
阅读次数:
365
If an event handler is specific to a component (that is, not shared by other components), there is no need to declare a class to handle the event. The ...
分类:
其他好文 时间:
2018-09-02 23:47:02
阅读次数:
181
普通的Vue实例data是一个对象: 组件的data是一个方法: 详情见官网:https://cn.vuejs.org/v2/guide/components.html ...
分类:
其他好文 时间:
2018-09-02 20:24:43
阅读次数:
160
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <script src="bower_components/vue/dist/vue.js"></script> <style> ...
分类:
其他好文 时间:
2018-09-01 20:36:00
阅读次数:
169
api 与后台交互文件夹 common 通用资源文件夹 components 非路由组件文件夹 filters 自定义过滤器模块文件夹 mock 模拟数据文件夹 pages 路由组件文件夹 router 路由器文件夹 app.vue 应用组件 main.js 入口 ...
分类:
移动开发 时间:
2018-09-01 20:28:27
阅读次数:
226
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <script src="bower_components/vue/dist/vue.js"></script> <script ...
分类:
其他好文 时间:
2018-09-01 20:25:12
阅读次数:
179
本篇可参看:https://trailhead.salesforce.com/modules/lightning_data_service Lightning中针对object的detail页面,一个lightning app可能包含了多个components,多个components不可避免的会对 ...
分类:
其他好文 时间:
2018-09-01 00:45:15
阅读次数:
317
compoent引入组件1.先写好子组件x.vue,需要从父组件传变量到子组件; 在子组件里写:props:['xx'];为变量, 用法{{xx}}即可;2.在全局样式里引用组件 import X from './components/x.vue';Vue.compoent('X',X); 3.在你 ...
分类:
其他好文 时间:
2018-08-31 00:34:30
阅读次数:
168
将pdf文件转换成图片文件 概要 现在手头的项目有一个需求是要从微信卡包里面拉取发票下来,把它的PDF文档保存下来,并且转换成图片保存在本地,我以前也使用过像Components.PDFRender4NET.dll这些PDF插件,可是这些都测试了一下,或多或少有一些地方不是很满意,转换出来的发票图片 ...
分类:
其他好文 时间:
2018-08-29 18:01:50
阅读次数:
189
/*并查集*/ #include int *a; int *sz; int count; //the number of connected component //union two connected components with weights void union_two_points(i... ...
分类:
其他好文 时间:
2018-08-29 14:01:34
阅读次数:
155