Vue.js

7 天开发后台系统技术小结

别说谁变了你拦得住时间么 提交于 2021-01-05 13:28:01
在确定了后台系统的详细规划和整体功能以后,花费时间更多的其实是对技术细节的打磨。本主题借鉴我开发个人网站 魚立说 的经验,整理了在开发后台系统过程可能会遇到的各种技术要点。 本文来源:魚立说。本文链接: https://www.yulisay.com/d/endskills.html ,支持微信浏览器打开。 更多精彩文章,请移步 魚立说个人网站 翻看。欢迎欣赏,吐槽不足之处。 涉及到的代码已经整理到 https://github.com/yulis-say/web-full-stack 中的 end-skills 目录,若觉得有用,请分享并 star 。 1 后台开发小结 下面对后台系统的开发技术要点依次进行概括,包括必要的说明和资源引导。 1.1 后台系统模板 搭建后台系统,为了省时省力,可以选用一些流行的后台系统模板。关于这部分,可以阅读本站整理的《流行的后台管理系统模板》一文。 考虑到技术的流行性和后台功能的完善,本站使用了基于 Vue.js 和 Element-UI 实现的 vue-admin-template 作为参考,进行了后台系统的搭建和二次开发。 参考 vue-element-admin 后台系统模板,最终的后台系统效果将如图所示: 1.2 vue-admin-template 使用技巧 配置代理请求,解决跨域问题。做如下修改: 修改 .env

Pass data from child to parent without events just on load, it’s possible on vue world?

Deadly 提交于 2021-01-05 11:13:31
问题 I feel that impossible to pass data from child to parent without @- click event or events or input fields or something need to interaction just on load pass data from child data variable to parent in another data variable by using variable and control in this data from the parent variable, just on load, it’s possible? Pass JSON data from child to parent and control it from the parent something like this ``` //child.vue <template> <div> {{getData}} </div> </template> <script> export default {

Pass data from child to parent without events just on load, it’s possible on vue world?

不想你离开。 提交于 2021-01-05 11:11:40
问题 I feel that impossible to pass data from child to parent without @- click event or events or input fields or something need to interaction just on load pass data from child data variable to parent in another data variable by using variable and control in this data from the parent variable, just on load, it’s possible? Pass JSON data from child to parent and control it from the parent something like this ``` //child.vue <template> <div> {{getData}} </div> </template> <script> export default {

Pass data from child to parent without events just on load, it’s possible on vue world?

南笙酒味 提交于 2021-01-05 11:06:34
问题 I feel that impossible to pass data from child to parent without @- click event or events or input fields or something need to interaction just on load pass data from child data variable to parent in another data variable by using variable and control in this data from the parent variable, just on load, it’s possible? Pass JSON data from child to parent and control it from the parent something like this ``` //child.vue <template> <div> {{getData}} </div> </template> <script> export default {

vue内引入jsPlumb流程控制器(一)

梦想的初衷 提交于 2021-01-05 10:19:27
1. npm i jsplumb --save 注:jsplumb要全小写 2. 在main.js内 加: import jsPlumb from 'jsplumb' Vue.prototype.$jsPlumb = jsPlumb.jsPlumb 3. 组件内访问 jsPlumb只有等到DOM初始化完成之后才能使用,因此我们在以下代码中调用jsPlumb方法 this .$jsPlumb.ready( function (){ ··· }); // or this .$jsPlumb.bind("ready", function (){ ··· }); 4. 如果在以上方法内访问 要注意 this指向已经不同 要在方法外 加 var that = this 让方法内的this指向vue 或用箭头函数 或直接在组件内引入 import { jsPlumb } from 'jsplumb' 来源: oschina 链接: https://my.oschina.net/u/4285215/blog/4030065

vue composition api how does it solve naming conflicts?

有些话、适合烂在心里 提交于 2021-01-05 09:12:25
问题 It's said that composition api solves naming conflicts which were brought by mixins. This is what I found on the internet about composition API. export default { setup () { const { someVar1, someMethod1 } = useCompFunction1(); const { someVar2, someMethod2 } = useCompFunction2(); return { someVar1, someMethod1, someVar2, someMethod2 } } } I guess, useCompFunction1() and useCompFunction2 are like mixins. In the example, all is good. but if useCompFunction1() and useCompFunction2() use the

vue composition api how does it solve naming conflicts?

我们两清 提交于 2021-01-05 09:12:16
问题 It's said that composition api solves naming conflicts which were brought by mixins. This is what I found on the internet about composition API. export default { setup () { const { someVar1, someMethod1 } = useCompFunction1(); const { someVar2, someMethod2 } = useCompFunction2(); return { someVar1, someMethod1, someVar2, someMethod2 } } } I guess, useCompFunction1() and useCompFunction2 are like mixins. In the example, all is good. but if useCompFunction1() and useCompFunction2() use the

Change CSS of instances from the same class using vue.js

半世苍凉 提交于 2021-01-05 07:17:25
问题 As of now, I am struggling to place images of switches at different positions on my front-end. I have a class "switch", which is bound to closed or opened, dependent on its current state (open or closed). Since the switches need to be placed on a circuit plan, I need to set each of their CSS manually by editing each position individually, but keeping the class for general styling, I only need it for changing positions of the respective switches. Like so: *switch.firstone {position: relative,

Change CSS of instances from the same class using vue.js

邮差的信 提交于 2021-01-05 07:16:26
问题 As of now, I am struggling to place images of switches at different positions on my front-end. I have a class "switch", which is bound to closed or opened, dependent on its current state (open or closed). Since the switches need to be placed on a circuit plan, I need to set each of their CSS manually by editing each position individually, but keeping the class for general styling, I only need it for changing positions of the respective switches. Like so: *switch.firstone {position: relative,

Change :value in vc-date-picker > v-text-field using v-for

左心房为你撑大大i 提交于 2021-01-05 07:05:25
问题 I want :value to change from inputValue.start to inputValue.end automatically. So when I click on the end date it should be updated in the second text field. Likewise, if I select a date range in the second text field, the first text field should also be updated again. At the end of this question you can see the result of both cases. P.S.: I use the V-Calendar plugin for Vue.js. The vc-date-picker element is from this plugin. HTML: <v-col v-for="(dateF, date_id) in datesF" :key="date_id + 'A'