Vue.js

Missing query attribute on result Vue graphql

两盒软妹~` 提交于 2021-02-09 10:53:52
问题 I can't understand why this error occurs in the console import gql from 'graphql-tag' // import gql const getBooksQuery = gql`query // describing query { books{ name id } } `; export default { name: "BookList", // template name apollo: { // apollo instance query: getBooksQuery // query } } What am i doing wrong? 回答1: You have to name the apollo property (docs, e.g bookList ): export default { name: "BookList", // template name apollo: { bookList: { query: getBooksQuery // query } } } or even

JS 和简历方面的

杀马特。学长 韩版系。学妹 提交于 2021-02-09 08:45:01
js历史背景   布兰登.艾奇 195年在网景公司,发明的javascript ECMAScript在2015年6月,发布了ECMAScript 6的版本 js 网站 http//:2004.sina.com.cn/雅典奥运会 http//:2008.sina.com.cn/北京奥运会 http//:2012.sina.com.cn/伦敦奥运会 http//:2016.sina.com.cn/里约奥运会 javascript 简称 JS 精通python基础语法  mysql:掌握  html熟练使用html  css熟练使用  javascript熟练使用 熟练使用vue reat,angular 前端包含的三部分:   HTML:定义文档 (document)的结构   CSS:定义文档的样式   JS:行为 active  JS的三部分:     ECMAScript基础语法(重点两颗星)     (1)声明变量     (2)测试语句     (3)数据类型      5个基本数据类型       Number(读南波)       String(读死翠)       boolean       undefined(读安迪樊的)未定义       null      引用数据类型       Array(数组)       Object(对象)       function

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

ぐ巨炮叔叔 提交于 2021-02-09 08:29:59
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

雨燕双飞 提交于 2021-02-09 08:29:51
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

浪子不回头ぞ 提交于 2021-02-09 08:28:00
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

我只是一个虾纸丫 提交于 2021-02-09 08:27:34
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

2020 年 12 月全国招收程序员 39 W人,平均薪资是……

随声附和 提交于 2021-02-09 08:22:22
2020 年对于很多人来说,可能会成为此生最深刻的回忆之一。一场突如其来的疫情,让我们的工作、生活变得略加艰难。 一转眼,2020 年已经在和我们“告别”,今天让我们来看看 2020 年最后 1 个月程序员工资情况,和你相差多少? 01 从下图,我们可以看到 2020 年 12 月全国招聘程序员 39 W 人。2020 年 12 月全国程序员平均工资 14222 元 ,工资中位数 12500 元,其中 96% 的人的工资介于 3250 元到 62500 元。 可见,相较于其他行业,程序员的薪资是真的高呀~ 不过,在程序员群体内部,薪资差异其实也很大。 根据调查结果显示,程序员的平均年薪达到 15 万以上。年薪在 5-10 万的程序员占比为 19.4%,年薪在 10-15 万的程序员占比为 21.6%,年薪在 15-20 万的程序员占比为 15.8%,年薪在 30 万 及以上的程序员占比为 15.2%。 同为程序员,薪资却有极大的差距。 年薪在30万以上的程序员,其实只占很少一部分。 02 在职场中打拼多年,我看见过刚毕业就年薪 50 万+的程序员,也和薪资被“倒挂”的老程序员一起交流怎样才能摆脱窘境…… 说来说去,想要获得高薪,还是需要不断提高自身技能来满足市场所需。 最近,我就在前端开发工程师的交流群里,就看到有人在吐槽: 如果你也有这样的疑惑,大概率你还处在初中级前端的阶段

vite2 vue3-ts 添加router, vuex和alias

旧街凉风 提交于 2021-02-08 23:36:34
原文链接: vite2 vue3-ts 添加router, vuex和alias 安装 yarn add vue-router@4 yarn add vuex@next https://next.vuex.vuejs.org/installation.html https://github.com/vuejs/vue-router-next https://next.router.vuejs.org/ https://next.vuex.vuejs.org/installation.html vuex store import { createStore } from "vuex"; const defaultState = { count: 0, }; const store = createStore({ state() { return defaultState; }, mutations: { increment(state: typeof defaultState) { state.count++; }, }, getters: { double(state: typeof defaultState) { return 2 * state.count; }, }, }); export default store; app.vue <template> <el

2020年,大前端最为理想的技术体系

对着背影说爱祢 提交于 2021-02-08 14:35:46
大前端时代 现在的前端,已经不是只能制作 H5 网页,发送 Ajax 请求这样比较简单的岗位。一个真正意义上的大前端,可以同时开发跨平台桌面、移动端,小程序,中间件编写、 docker 自动化、云端服务器部署等。 写这篇文章的起因 最近很多朋友在吐槽,社区重复出现了很多篇 10分钟 精通**技术,万字长文彻底了解 ES 系列等文章,其实技术分享并没有什么问题,只是这样反复的技术文章出现说明, 目前的前端技术栈,已经基本稳固,再有出现,短期难有爆发。 关键是很多人询问,该怎么学习前端技术,工作经验很少等等。可是我的工作经验其实也很短呢。 刚好今晚与一起做即时通讯的后端同事在谈论技术,于是想写一篇关于 2020 年前端技术栈的文章。 以下是作者本人推荐掌握的技术栈: 首先是: 原生基础三剑客: JavaScript 、TypeScript 、 Node.js 抛出一个问题: 是不是有了React、Vue等框架就不需要Dom操作,不需要了解JQuery了? 答案:实现越复杂的功能, DOM 操作越重要,框架底层也是 DOM 操作。只不过加了些中间层( diff 算法等),想深入了解的可以 gitHub 看我的仓库 mini-react ,自己实现的 React 框架~ https: //github.com/JinJieTan/mini-react JavaScript 的学习:

What's the real difference between target: 'static' and target: 'server' in Nuxt 2.14 universal mode?

元气小坏坏 提交于 2021-02-08 14:00:08
问题 in the latest version of Nuxt (2.14) they introduced an optimization for building the app when no code is changed (for drastically improve build times). I make websites in jamstack, deploy on netlify with nuxt generate and, until now, with target: 'server' . I tried the new target: 'static' in order to take advantage of this new feature, but my code won't build as it seems that in this mode the app can't access to this.$route in order to generate dynamic pages. So, my question is: how is this