【vue开发心得和技巧分享】教程文章相关的互联网学习教程文章

Vue3使用vue3-video-player【图】

地址:https://github.com/LarchLiu/vue3-video-player这个上面有例子,可以参考。如果出现问题: npm install @cloudgeek/playcore-hls --save效果: 原文:https://www.cnblogs.com/qinghuaL/p/14772806.html

Windows 系统下Vue的安装及环境搭建【代码】【图】

Hope to help those in need and those who use Vue for the first time.1、获得并安装node.js。nodejs官网:https://nodejs.org/en/2、安装git。3、检查安装状态。打开命令行,输入node -v和git –version ,点击回车,如果能看到相应的版本号,说明环境变量已经配置成功。4、使用淘宝镜像及其命令cnpm进行安装。npm install -g cnpm --registry=https://registry.npm.taobao.org 5、安装vue-cli脚手架工具。npm install @vue/cli...

介绍vue-cli脚手架config目录下index.js配置文件【代码】

1、config/index.jsvar path = require(‘path‘)module.exports = {build: { // production 环境env: require(‘./prod.env‘), // 使用 config/prod.env.js 中定义的编译环境index: path.resolve(__dirname, ‘../dist/index.html‘), // 编译输入的 index.html 文件assetsRoot: path.resolve(__dirname, ‘../dist‘), // 编译输出的静态资源路径assetsSubDirectory: ‘static‘, // 编译输出的二级目录assetsPublicPath: ‘/‘...

玩转Vscode-配置vue代码片段【代码】【图】

在vscode中使用 ctrl+shift+p 打开一个选项窗口,然后找到配置用户代码片段,点击进去,输入vue.json找到对应的配置文件点击进去,然后粘贴下面配置替换即可。{// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:// $1, $2...

vue Element-ui 表格自带筛选框自定义高度【代码】【图】

el-table中可以在一行的某列进行筛选,代码如下: <el-table-column prop="classOfTest" class="test" label="测试类名" :filters="classList" filter-placement="bottom-start" width="300" column-key="testOfClass"></el-table-column>其中 filters 就是筛选列表,格式为 classList = [{text: ‘Test_配电箱自动识别‘, value: ‘Test_配电箱自动识别‘},{text: ‘Test_门自动识别‘, value: ‘Test_门自动识别‘},……]filter-...

【laravel5.4+vue.js】laravel 循环三维数组,解决:htmlentities() expects parameter 1 to be string, array given【代码】

laravel循环三维数组 +++ vue.js循环三维数组 (数据均是以三维数组形式存在的)<form-item label="权限名称" prop="interest">@foreach($permission3level as $k => $v)@foreach($v as $k2 => $v2){{$v2[‘name‘]}}+++{{$v2[‘cate_id‘]}}@endforeach@endforeach</form-item><form-item label="权限名称" prop="interest">@foreach($permission3level as $k=> $v)@if($k==1 )<div v-for="(item2,index2) in level"><checkb...

vue在前端的语法应用【代码】

语法实现:v-bind="" : 根据属性的true和false来决定显示样式<!-- 加样式: v-bind:样式":属性}" --><!-- 例1 --> <span v-bind: >{{ username_info }}</span><!-- 例2 --> <button v-bind: >用户名</button> <button v-bind:>验证码</button>v-if="" : 判断语句,存在于template中,""可用来控制整个页面的显示状态,可以在点击事件里面的属性修改该属性状态<p v-if="is_login">{{ username }}</p> <p v-else v-on:click="go_lo...

Vue之数据监听存在的问题【代码】

Vue之数据监听当数据监听的是列表时,数据发生改变,不会被监听到。// 用$set修改数组中的数组能够被监听 // app.$set(this.hobby, 0, "爱你哦");<div id="app">{{name}}<hr>{{hobby}}<hr>{{obj}}<button @click="my_click">点我改变数据</button> </div> <script>const app = new Vue({el: "#app",data: {name: "wjs",hobby: ["抽烟", "喝酒", "烫头"],obj: {age: 32,face: null,}},methods: {my_click: function ...

Vue条件渲染【代码】

gitHub地址:https://github.com/lily1010/vue_learn/tree/master/lesson08 一 v-if显示单个元素注意else只能跟在v-if或者v-show后面<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Vue条件渲染</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/><script src="../js/vue.js" type="text/javascript" charset="utf-8"></script></head><bo...

vue动画的用法【代码】

vue动画    在vue.js中有两种写动画的方法,第一种就是像js里一样,用原生代码来实现,第二种则是使用animate.css的动画类文件,这个动画类和bootstrap.css文件类似,直接调用类就可以了,话不多说,直接上代码。一、vue.js原生动画 1<!DOCTYPE html> 2<html> 3<head> 4<meta charset="utf-8"/> 5<title></title> 6<script type="text/javascript" src="js/vue.js"></script> 7<style> 8 .oDiv{ 9 w...

在vue3中使用vue-property-decorator报错

报错原因:vue-property-decorator目前不支持vue2以及它的ts定义,所以暂时无法让它和vue3一起使用。原帖: https://github.com/kaorun343/vue-property-decorator/issues/294解决方法:1.使用vue2搭建项目2.vue3中使用选项式属性定义或者CompositionAPI完成属性的注入都是比较正式的写法,而且通用,没有必要使用额外的语法糖。原文:https://www.cnblogs.com/cindy79/p/15245977.html

自搭的一个系统框架,使用Spring boot+Vue+Element

基于:jdk1.8、spring boot2.1.3、vue-cli3.4.1特性: ~ 数据库访问使用spring data jpa+alibaba druid ~ 前后端数据交互使用axios ~ 前后端交互数据验证使用validation ~ 前端使用vue+element ~ 前端使用了npm管理包 ~ 用户鉴权使用spring security+jwt的无状态认证方式 ~ 用户鉴权前端路由做了拦截使用: ~ 后端配置文件在boot/src/main/resources/config/ ~ 前端配置文件在ui/.env.development、ui/...

vue1-三种文本渲染方式区别

之前vue学习完,做了一个手机端案例demo后,部门就案子不断,虽然案子中多少有用到一点vue,但是没深入使用,因为老板为了更快给客户反馈,而且案子逻辑比较单一,用的也多偏原生。大半年过去了,有的知识点记忆模糊了。最近有空,稍微在系统学习和温习一遍把。a1.插值表达式{{ }}a2.v-text指令a3.v-html指令 三者区别:a1&a2 无法渲染html字符串,碰到html字符串只会当成普通本渲染到页面;a3顾名思义可以渲染html字符串;{{ m...

Vue中用v-for循环出来的数据,如何单独控制隐藏显示【代码】【图】

搜了好多,没得到想要的答案。终于用自己的方法解决了问题。上代码:html部分<dl class="cc" v-for="(item, index) in courseList" :key="index"><dt class="active" @click="showAndHide"><h5>{{index + 1}} | {{item.name}}</h5><span class="arrow"></span></dt><video-list :class_id="classId" :course_id="item.course_id"></video-list></dl>方法部分 showAndHide (event) {let _el = event.currentTargetif (_el.getAtt...

[vue报错vue-router.esm.js?8c4f:2007 Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}]【代码】【图】

解决方法一:经过多次尝试发现原因可能是 在重新下载依赖包时,安装的vue-router还是之前出错的那个版本,? 解决方法也很简单,在项目目录下运行 npm i vue-router@3.0 -S 即可。解决方法二:如果你不想用方法一那就在 main.js里添加一段代码。import Router from ‘vue-router‘ const routerPush = Router.prototype.push Router.prototype.push = function push(location) {return routerPush.call(this...