Сделал по видеоинструкции такой вот код. Причем у блогера он работает,
а у меня выдает ошибку в консоли:
[Vue warn]: Property or method "options" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
https://vuejs.org/v2/guide/reactivity.html#Declari...
found in
---> at resources\assets\js\component\rooms\add_rooms.vue
а следом вторую ошибку:
[Vue warn]: Error in directive loading bind hook: "TypeError: Cannot set property 'static' of undefined"
found in
---> at resources\assets\js\component\rooms\add_rooms.vue
В чем может быть проблема?
<template>
<div class="row">
<div class="col-md-12" v-loading="isLoading" :loading-options="{ options }">
<h1>Добавить новую комнату</h1>
<div class="form-group">
<label for="name">Имя комнаты</label>
<input type="text" name="name" class="form-control" v-model="room_name">
</div>
<div class="form-group">
<input type="submit" @click="AddRoom()" name="submit" value="Add Room" class="btn btn-default">
</div>
</div>
</div>
</template>
<script>
import loading from 'vue-loading';
export default{
directives: { loading },
data: function() {
return {
room_name:"",
isLoading:false,
}
},
methods:{
AddRoom:function(){
this.isLoading = true;
}
}
}
</script>