-
Vue-13-vue component 组件报错 Avoid mutating a prop directly since the value will be overwritten
说明
想简单封装一下组件,结果报错。
错误的实现
子组件
<template>
<el-drawer direction="rtl"
:visible.sync="visibile" size="50%">
详情
xxx
</el-drawer>
</template>
<script>...
2017-09-04 12:38:53 |
Vue
-
Vue-12-vue 如何自定义 component 组件
说明
暂时不基于 webpack 实现自己的 vue 应用。
思路1
直接通过 html 字符串指定 template 的内容。
不过这样有一个很大的缺点,就是难以维护和修改。
思路2
requirejs
如果不使用webpack等任何模块打包方案,可以试试requirejs模块加载方案。
requirejs有配套的加载css和html的插件,将.css,.html,.js放...
2017-09-04 12:38:53 |
Vue
-
Vue-11-vue 如何实现背景图片全屏
业务背景
想做一个登录页,本来想把图片放左边,登录表单放在右边。
调整了半天也不满意,直接全屏得了。
效果图
源码实现
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>登录</title>
<!-- 引入...
2017-09-04 12:38:53 |
Vue
-
Vue-08-vue+ element-ui 入门使用
监听
<div id="app">
3.1415926
</div>
var vm = null;
window.onload = function(){
vm = new Vue({
el: "#app",
data: {
age: "",
name: "",
...
2017-09-04 12:38:53 |
Vue
-
Vue-08-vue+ element-ui 实现基本的增删改查
说明
最基本的 CRUD
后端
import com.baomidou.mybatisplus.toolkit.IdWorker;
import com.github.houbb.privilege.admin.common.dto.BasePageInfo;
import com.github.houbb.privilege.admin.common.dto.BaseResp;
im...
2017-09-04 12:38:53 |
Vue
-
Vue-08-vue element-ui 使用入门
说明
最基本的,直接依赖 cdn 的方式。
引入
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>用户首页</title>
<!-- 引入样式 -->
<link rel="styleshee...
2017-09-04 12:38:53 |
Vue
-
Vue-07-vue resource 使用简介
使用方式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-e...
2017-09-04 12:38:53 |
Vue
-
Vue-06-模板语法
插入值
文本
<div id="vue">
<h1>\{\{ message \}\}</h1>
</div>
<script type="text/javascript">
var vm = new Vue({
el: '#vue',
data: {
me...
2017-09-04 12:38:53 |
Vue