19-2-10 canvas文字操作详解张鑫旭

526 阅读1分钟

打包自动上传qn,node下index.html模板等

juejin.cn/post/684490…

Vue.directive 自定义指令

~~ 运算符

Math.floor 用法相同

~~ 4.9=== 4 //true

~~ 4=== 4 //true

web页面录屏实现

juejin.cn/post/684490…

dispatchEvent?

// 向 window派发一个resize内置事件
window.dispatchEvent(new Event('resize'))

canvas文字操作详解张鑫旭

www.zhangxinxu.com/wordpress/2…

插槽作用域 slot-scop

插槽作用域,是一种从子组件向父组件传递信息的机制,绑定在子组件slot上的数据,可以再父组件中通过slot-scope得到

//绑定在子组件上的数据
<template>
  <span>
    <slot :user="user">
      {{ user.sec }}
    </slot>
  </span>
</template>

//从父组件中拿到
<template>
  <slot-child>
    <template slot-scope="user">
      {{ user }}
    </template>
  </slot-child>
</template>