上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 父组件 <listItem :arr="list"></listItem> 子组件 export default { name: 'list-item', props: { arr: { type: Array, default () { return [] } } }, render(h, vm) 阅读全文
posted @ 2020-03-02 15:58 一城柳絮吹成雪 阅读(4935) 评论(0) 推荐(1) 编辑
摘要: 父组件: <template> <div class="p-home"> <p v-for="(item,i) in c" :key="i">{{ i }}:{{ item }}</p> <childone> 壹号按钮 </childone> <!-- 添加点击事件 --> <childtwo @c 阅读全文
posted @ 2020-03-02 14:06 一城柳絮吹成雪 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 5.上传文件的案例(简单版的) // html <input type="file" id="avatar" name="avatar" value="" accept="image/png, image/jpeg" multiple required> // js代码 (function () { 阅读全文
posted @ 2020-02-29 15:55 一城柳絮吹成雪 阅读(235) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="about"> <h1>This is an about page</h1> <input type="file" value="上传图片" class="upload" @change="handleFileChange" ref="inputer" 阅读全文
posted @ 2020-02-29 15:47 一城柳絮吹成雪 阅读(1919) 评论(0) 推荐(0) 编辑
摘要: 需要安装 concurrently 模块 npm install concurrently 在packjson中运行 "scripts": { "start": "concurrently \"npm run serve\" \"npm run node\"", "serve": "vue-cli- 阅读全文
posted @ 2020-02-29 14:07 一城柳絮吹成雪 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: const path = require('path'); // 将脚本自动注入到指定html文件的插件 yarn add html-webpack-plugin --dev const HtmlWebpackPlugin = require('html-webpack-plugin'); modu 阅读全文
posted @ 2020-02-24 14:13 一城柳絮吹成雪 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1. 挂载卸载过程 1.1.constructor() 1.2.componentWillMount() 1.3.componentDidMount() 1.4.componentWillUnmount () 2. 更新过程 2.1. componentWillReceiveProps (nextP 阅读全文
posted @ 2020-02-21 21:17 一城柳絮吹成雪 阅读(513) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 --> <html lang="zh-cmn-Hans"> <!-- 1. 简体中文页面:html lang=zh-cmn-Hans 2. 繁体中文页面:html lang=zh-cmn-Hant 3. 英语页 阅读全文
posted @ 2020-02-20 13:26 一城柳絮吹成雪 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 相对网页外层重要部分CSS样式命名: 外套 wrap 用于最外层头部 header 用于头部主要内容 main 用于主体内容(中部)左侧 main-left 左侧布局右侧 main-right 右侧布局导航条 nav 网页菜单导航条内容 content 用于网页中部主体底部 footer 用于底部 阅读全文
posted @ 2020-02-20 12:52 一城柳絮吹成雪 阅读(121) 评论(0) 推荐(0) 编辑
摘要: progress 示例:<progress value="22" max="100"></progress> meter 示例: <meter value="2" min="0" max="10">2 out of 10</meter><br> <meter value="0.6">60%</met 阅读全文
posted @ 2020-02-11 20:52 一城柳絮吹成雪 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 导航守卫 译者注 “导航”表示路由正在发生改变。 正如其名,vue-router 提供的导航守卫主要用来通过跳转或取消的方式守卫导航。有多种机会植入路由导航过程中:全局的, 单个路由独享的, 或者组件级的。 记住参数或查询的改变并不会触发进入/离开的导航守卫。你可以通过观察 $route 对象来应对 阅读全文
posted @ 2020-02-09 15:57 一城柳絮吹成雪 阅读(1952) 评论(0) 推荐(0) 编辑
摘要: const changeFavicon = link => { let $favicon = document.querySelector('link[rel="icon"]'); // If a <link rel="icon"> element already exists, // change 阅读全文
posted @ 2020-02-08 20:42 一城柳絮吹成雪 阅读(3352) 评论(0) 推荐(0) 编辑
摘要: 内容 UI组件 开发框架 实用库 服务端 辅助工具 应用实例 Demo示例 UI组件 element ★13489 - 饿了么出品的Vue2的web UI工具套件 Vux ★8133 - 基于Vue和WeUI的组件库 iview ★6634 - 基于 Vuejs 的开源 UI 组件库 mint-ui 阅读全文
posted @ 2020-02-08 19:45 一城柳絮吹成雪 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-02-08 16:34 一城柳絮吹成雪 阅读(429) 评论(0) 推荐(0) 编辑
摘要: watch: { person: { handler(n,o){ this.person.fullname = n.firstname + ‘ ‘ + this.person.lastname; }, // immediate: true, //刷新加载 立马触发一次handler // deep: 阅读全文
posted @ 2020-02-07 21:10 一城柳絮吹成雪 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 十大算法:https://blog.csdn.net/weixin_41317985/article/details/79461929 排序问题: 1.1冒泡排序冒泡排序算法就是依次比较大小,小的的大的进行位置上的交换。 var example=[8,95,34,21,53,12]; functio 阅读全文
posted @ 2020-02-07 15:39 一城柳絮吹成雪 阅读(880) 评论(0) 推荐(0) 编辑
摘要: // colors @colors: darkslateblue mediumorchid seagreen steelblue; // loop definition .backgrounds(@list, @i: 1) when (@i <= length(@list)) { // extrac 阅读全文
posted @ 2020-01-31 19:58 一城柳絮吹成雪 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-01-31 15:13 一城柳絮吹成雪 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1.状态共享 随着组件的细化,就会遇到多组件状态共享的情况,Vuex当然可以解决这类问题,不过就像Vuex官方文档所说的,如果应用不够大,为避免代码繁琐冗余,最好不要使用它,今天我们介绍的是vue.js 2.6新增加的Observable API ,通过使用这个api我们可以应对一些简单的跨组件数据 阅读全文
posted @ 2020-01-30 21:41 一城柳絮吹成雪 阅读(174) 评论(0) 推荐(0) 编辑
摘要: // 注册一个全局自定义指令 `v-focus` Vue.directive('focus', { // 当被绑定的元素插入到 DOM 中时…… inserted: function (el) { // 聚焦元素 el.focus() } }) 局部 directives: { focus: { / 阅读全文
posted @ 2020-01-30 19:53 一城柳絮吹成雪 阅读(398) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页