bfg-common 1.2.61 → 1.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@
31
31
  v-show="type !== 2"
32
32
  v-model:description="description"
33
33
  v-model:email="email"
34
- :selected-tab="type"
34
+ :type="type"
35
35
  @screen-shot="onScreenShot"
36
36
  />
37
37
  <common-feedback-visit-portal v-show="type === 2" />
@@ -115,11 +115,12 @@ const hide = (): void => {
115
115
  const submit = (): void => {
116
116
  if (type.value !== 0 && type.value !== 1) return
117
117
 
118
- const canvas = document.getElementById('feedbackImg') as HTMLCanvasElement
118
+ const canvasData = (document.getElementById('feedbackImg') as HTMLCanvasElement).toDataURL()
119
+ const canvasBlankData = (document.getElementById('feedbackImgBlank') as HTMLCanvasElement).toDataURL()
119
120
 
120
- const image = canvas?.toDataURL().match(/base64,(.+)/)?.[1] || ''
121
+ const image = canvasData.match(/base64,(.+)/)?.[1] || ''
121
122
  emits('submit', {
122
- image,
123
+ image: canvasData === canvasBlankData ? '' : image,
123
124
  type: type.value,
124
125
  description: description.value,
125
126
  email: email.value,
@@ -126,6 +126,7 @@
126
126
  ref="feedbackImg"
127
127
  :class="{ feedbackImg: !hasTakeScreenshot }"
128
128
  ></canvas>
129
+ <canvas id='feedbackImgBlank' style='display:none'></canvas>
129
130
  </div>
130
131
  </div>
131
132
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.61",
4
+ "version": "1.2.62",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",