Vue.js

2020年前端学习体系与前端概述

大兔子大兔子 提交于 2021-02-08 13:41:56
前端学习目标 基础课程:HTML + CSS javaScript DOM BOM AJAX HTML5 + CSS3 应用课程:jQuery easyUI 移动端开发 响应式开发 PHP基础 H5UI bootstrap less/stylus 模板引擎 swiper iscroll select2 工程课程:ES5/6/7 git&GitHub nodeJS mongoDB mySQL webpack gulp babel VUE 微信小程序 REACT 学习前端所需要用到的工具 欲善其事必先利器,工具花样不在多,重点在人的技术本身。 最简化工具有 chrome 浏览器、 editplus 编辑器、 pxCook 量图器。后续随着课程推进,会慢慢介绍各种辅助工具,在这里就罗列,以免干扰新手小白。 浏览器 浏览器是网页的载体,是咱们前端工程师的主战场。浏览器常用的有 IE系列、火狐(FireFox)、谷歌(chrome)、Safari(苹果)、Opera等 浏览器市场份额 在2020年,浏览器的霸主地位已经确立,Chrome凭借超简约的界面以及强大的扩展性夺得宝座,当然少不了国内浏览器大量使用chromium内核带来的二次推广的贡献 查看网站 : https://tongji.baidu.com/research/site 开发工具 开发工具很多

Nuxt.js error: The client-side rendered virtual DOM tree is not matching server-rendered content

邮差的信 提交于 2021-02-08 11:41:21
问题 How can I fix this error in Nuxt? A tip would be appreciated, I've been trying to get this to work for a few hours. [Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render. (repeated 9 times) value @ vendors.app.js:12923 value @ vendors.app.js:12923 value @ vendors.app.js:12923

Deploying Django with Nginx, Gunicorn and Supervisor

六眼飞鱼酱① 提交于 2021-02-08 11:12:36
问题 I'm trying to deploy my Django app with Nginx and Gunicorn by following this tutorial, but I modified some steps so I can use Conda instead of ViritualEnv. The setup looks like this: Nginx replies with my Vue app Requests from Vue are made to api.example.com Nginx listens to api.example.com and directs requests to Gunicorn's unix socket Things I've checked: I can see the Vue requests in Nginx's access.log . I can also see those requests with journalctl -f -u gunicorn , in the supervisor.log ,

Import Vue-Navigation-Bar in Gridsome

扶醉桌前 提交于 2021-02-08 10:38:50
问题 I'm trying to import https://github.com/johndatserakis/vue-navigation-bar into my Gridsome project but I receive the error: 'Module not found: Error: Empty Dependency (no request.)' I've tried changing the way I import the component with no luck. I've also tried yarn install in case there was anything missing. <template> <vue-navigation-bar :options="navbarOptions" /> </template> <script> export default { name: 'VueNavBar', components: { VueNavBar: () => import('vue-navigation-bar'), data ()

Need multiple instances of Vuex module for multiple Vue instances

十年热恋 提交于 2021-02-08 10:30:47
问题 I'm integrating Vue onto a site for forms, which means I have to create several instances of that Vue application if there are multiple forms on the page. All instances share the same Vuex store. I created a Vuex module so that each Vue instance could have it's own local state. My main goal is to prevent one Vue instance from updating the state of another Vue instance. Here's my Vuex module export default { state() { return { stateObj: {...} } } } Creating my Vuex instance: export default new

Need multiple instances of Vuex module for multiple Vue instances

霸气de小男生 提交于 2021-02-08 10:30:26
问题 I'm integrating Vue onto a site for forms, which means I have to create several instances of that Vue application if there are multiple forms on the page. All instances share the same Vuex store. I created a Vuex module so that each Vue instance could have it's own local state. My main goal is to prevent one Vue instance from updating the state of another Vue instance. Here's my Vuex module export default { state() { return { stateObj: {...} } } } Creating my Vuex instance: export default new

implement https on nginx config file

泄露秘密 提交于 2021-02-08 10:02:47
问题 I have a single page application written with vuejs and i want to deploy the application using digitalocean, nginx and docker my question is, what do i need to add to the config file/docker file to make that the app will use https and not http? (i'm going to use self signed certificates) yes, i searched the question already, but nothing seems to work with that template. also, the backend for this app is nodejs with express that will be on different container on the same digital ocean server

Why is the vue <template> invalid with v-bind:src?

让人想犯罪 __ 提交于 2021-02-08 10:00:13
问题 I want to dynamically switch html content, so I used vue-loader src to import, but v-bind:src doesn't take effect at all. <template src="./app.html"></template> Ok,effective <template :src="getDOM(true)"></template> getDOM(a){ if(a){ return './app.html' } else { return './app2.html' } } Not active. So, what can I do to achieve this effect? 回答1: It seems like you need to use Vue dynamic components https://vuejs.org/v2/guide/components.html#Dynamic-Components You can make a couple of components

Why is the vue <template> invalid with v-bind:src?

别等时光非礼了梦想. 提交于 2021-02-08 09:58:51
问题 I want to dynamically switch html content, so I used vue-loader src to import, but v-bind:src doesn't take effect at all. <template src="./app.html"></template> Ok,effective <template :src="getDOM(true)"></template> getDOM(a){ if(a){ return './app.html' } else { return './app2.html' } } Not active. So, what can I do to achieve this effect? 回答1: It seems like you need to use Vue dynamic components https://vuejs.org/v2/guide/components.html#Dynamic-Components You can make a couple of components

axios response headers missing data when running in vuejs app

社会主义新天地 提交于 2021-02-08 09:44:26
问题 I have simple vuejs application. In the main.js I have something like: import Vue from "vue"; import App from "./App.vue"; import router from "./router/routes"; import store from "./store/root"; import vuetify from "./plugins/vuetify"; import { RootActions } from "./constants"; import axios from "axios"; axios.get("https://api.github.com/users/mzabriskie").then(function(response) { console.log({ headers: response.headers }); }); In the chrome console log I got these: However in https://runkit