You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require(["vue!modal.html"],function(Modal){// INICAR MÓDULO REQUIRE.JS COMO CLASEvarmodal=newModal();// OBTENER DATA DEL COMPONENTE PARA ALTERARcomponent.data=component.data();// INYECTAR DATA EXTRAcomponent.data.options=options;// INICIALIZAR COMPONENTE VUEvarvm=newVue(modal);// INSERTAR COMPONENTE EN EL HTMLvar$div=$("<div>").appendTo("body")[0];vm.$mount($div);// PERSONALIZAR ESTILOS CSS$(vm.$el).find(".div").css('padding',0);// DEFINIR COMPONENTE VUE CONTENIDOvm.page="modules/views/login/login.html";});
Vue independiente
Utilizar Vue sin usar enrutador
<head><style>
/* ESTILOS DEL VIEW */
</style><scriptdata-main="../src/main" src="[..]/require.js"></script></head><body><divid='view_home'><!--oculta código vue antes de compilar--><template><!-- HTML --></template></div><script>//SUSTITUYE AL ROUTER AL CARGAR main.jswindow.router_override=function(){window.vm=newVue({el: "#view_home",// RESTO DEL VUE});};</script></body>