vueComponent / pro-components

easy use `Ant Design Vue` layout
MIT License
535 stars 214 forks source link

feat(WaterMark): 使用 toRef 保留 props.content 的响应性 #175

Closed kkaaddff closed 2 years ago

sendya commented 2 years ago

建议直接在 watchEffect 内第一行直接解构 prop content

watchEffect(() => {
      const canvas = document.createElement('canvas');

顺便把里面用到的 fontColor gapX gapY width height 之类的一并响应了把

kkaaddff commented 2 years ago

建议直接在 watchEffect 内第一行直接解构 prop content

watchEffect(() => {
      const canvas = document.createElement('canvas');

顺便把里面用到的 fontColor gapX gapY width height 之类的一并响应了把

已经将所有绘制背景图相关的props都移到 watch Effect内解构了