refactoring
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
</v-form>
|
||||
</v-card>
|
||||
|
||||
<v-container v-if="selected && modelValue.io">
|
||||
<component :is="modelValue.io.id" v-model="modelValue.io"></component>
|
||||
<v-container v-if="selected && modelValue.type">
|
||||
<component :is="modelValue.type" v-model="mv"></component>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
@@ -35,10 +35,11 @@ import Utils from '@/lib/Utils';
|
||||
import VideoPlayer from '../InteractiveObjects/VideoPlayer.vue';
|
||||
import PuzzleGame1 from '../InteractiveObjects/PuzzleGame1.vue';
|
||||
import MazeQuizGame from '../InteractiveObjects/MazeQuizGame/MazeQuizGame.vue';
|
||||
import GenericObject from '../InteractiveObjects/GenericObject.vue';
|
||||
|
||||
export default {
|
||||
emits:['target', 'preview'],
|
||||
components: { SvgIcon, VideoPlayer, PuzzleGame1, MazeQuizGame },
|
||||
components: { SvgIcon, VideoPlayer, PuzzleGame1, MazeQuizGame, GenericObject },
|
||||
data(){
|
||||
return {
|
||||
active: false
|
||||
@@ -60,6 +61,9 @@ export default {
|
||||
showInView(){
|
||||
this.vd.__showInView = this.visible && this.parent.visible;
|
||||
return this.vd.__showInView;
|
||||
},
|
||||
mv(){
|
||||
return this.modelValue
|
||||
}
|
||||
},
|
||||
steps: [['x1', 'y1']],
|
||||
@@ -76,9 +80,9 @@ export default {
|
||||
delete this.modelValue.io;
|
||||
}
|
||||
if (e.type == 'InteractiveObject'){
|
||||
this.modelValue.io = {
|
||||
id: e.id
|
||||
};
|
||||
this.modelValue.type = e.id;
|
||||
}else{
|
||||
this.modelValue.type = 'Object3D'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user