File tree Expand file tree Collapse file tree 5 files changed +19
-9
lines changed
Expand file tree Collapse file tree 5 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 7777
7878 export default {
7979 name: ' example' ,
80+
8081 components: {
8182 FlowForm
8283 },
84+
8385 data () {
8486 return {
8587 submitted: false ,
103105 required: true ,
104106 placeholder: ' Start typing here...'
105107 }),
106- new QuestionModel ({
108+ new QuestionModel ({
107109 id: ' multiple_choice_image' ,
108110 tagline: " Let's take it one step further..." ,
109111 title: ' Tell us what is your favorite social network hangout.' ,
220222 path_b: ' path_b'
221223 }
222224 }),
223- new QuestionModel ({
225+ new QuestionModel ({
224226 id: ' path_a' ,
225227 title: ' Excellent choice! 🥳' ,
226228 content: ' Press enter or use the continue button for the final submit screen.' ,
253255 ]
254256 }
255257 },
258+
256259 mounted () {
257260 document .addEventListener (' keyup' , this .onKeyListener )
258261 },
259- beforeDestroy () {
262+
263+ beforeUnmount () {
260264 document .removeEventListener (' keyup' , this .onKeyListener )
261265 },
266+
262267 methods: {
263268 onKeyListener ($event ) {
264269 // We've overriden the default "complete" slot so
324329
325330 return data
326331 }
327- },
332+ }
328333 }
329334 </script >
330335
Original file line number Diff line number Diff line change 202202 this .checkTimer ()
203203 },
204204
205- beforeDestroy () {
205+ beforeUnmount () {
206206 document .removeEventListener (' keydown' , this .onKeyDownListener )
207207 document .removeEventListener (' keyup' , this .onKeyUpListener , true )
208208 window .removeEventListener (' beforeunload' , this .onBeforeUnload )
Original file line number Diff line number Diff line change 171171 this .$refs .qanimate .addEventListener (' animationend' , this .onAnimationEnd )
172172 },
173173
174- beforeDestroy () {
174+ beforeUnmount () {
175175 this .$refs .qanimate .removeEventListener (' animationend' , this .onAnimationEnd )
176176 },
177177
Original file line number Diff line number Diff line change 2626 */
2727
2828 import BaseType from ' ./BaseType.vue'
29- import LanguageModel from ' ../../models/LanguageModel'
3029 import { QuestionType } from ' ../../models/QuestionModel'
3130 import TextareaAutosize from ' vue-textarea-autosize/src/components/TextareaAutosize'
3231
3332 export default {
3433 extends: BaseType,
34+
3535 name: QuestionType .LongText ,
36+
3637 components: {
3738 TextareaAutosize
3839 },
40+
3941 data () {
4042 return {
4143 canReceiveFocus: true
4244 }
4345 },
46+
4447 mounted () {
4548 window .addEventListener (' resize' , this .onResizeListener )
4649 },
47- beforeDestroy () {
50+
51+ beforeUnmount () {
4852 window .removeEventListener (' resize' , this .onResizeListener )
4953 },
54+
5055 methods: {
5156 onResizeListener () {
5257 this .$refs .input .resize ()
Original file line number Diff line number Diff line change 7373 this .addKeyListener ()
7474 },
7575
76- beforeDestroy () {
76+ beforeUnmount () {
7777 this .removeKeyListener ()
7878 },
7979
You can’t perform that action at this time.
0 commit comments