自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 收藏
  • 关注

转载 li 不换行

ul li{display: inline-block;margin: 0 5px;padding: 0;white-space: nowrap;}<ul><li *ngFor="let menu of menus; let i = index"><a href="#" [class.active]="...

2019-09-02 09:42:00 187

转载 点击标题变色

1 <li *ngFor="let menu of menus; let i = index"> 2 <a href="#" [class.active]="i == selectedIndex" (click)="selectedIndex =i" >{{menu.title}}2</a> 3 4 </li>css:...

2019-09-02 09:23:00 278

转载 angular真机调试

电脑手机同一wifing serve --host 0.0.0.0手机打开浏览器 http://<电脑IP>:4200转载于:https://www.cnblogs.com/sulanlan/p/11444504.html

2019-09-02 07:11:00 532

转载 css3属性 -webkit-filter

https://www.cnblogs.com/duanhuajian/archive/2012/09/20/2694552.htmlcss3属性 -webkit-filter  -webkit-filter是css3的一个属性,Webkit率先支持了这几个功能,感觉效果很不错。下面咱们就学习一下filter这个属性吧。现在规范中支持的效果有:grayscal...

2019-08-27 07:32:00 173

转载 后台管理模板

https://wrapbootstrap.com/theme/angle-bootstrap-admin-template-WB04HF123这个网站各种模板 angle dashahttps://themeforest.net/item/able-pro-responsive-bootstrap-4-admin-template/19300403able fuseht...

2019-08-27 07:31:00 278

转载 angular bootstrap分页 pagination

https://www.cnblogs.com/sulishibaobei/p/7413808.htmlhttps://ng-bootstrap.github.io/#/components/pagination/overview 1 <div class='container tl_body'> 2 <div class="row"&gt...

2019-08-23 08:49:00 239

转载 sweetalert2 弹窗插件

SweetAlert2 是一个漂亮、响应式、可定制、易用的(WAI-ARIA) JavaScript 弹窗https://www.npmjs.com/package/sweetalert2更多例子https://sweetalert2.github.io/转载于:https://www.cnblogs.com/sulanlan/p/11361625.html...

2019-08-16 08:19:00 380

转载 angular 表单验证 Reactive Forms 和 Template-Driven Forms

https://segmentfault.com/a/1190000009041192?utm_source=tuicool&utm_medium=referralhttps://segmentfault.com/a/1190000009037539https://segmentfault.com/a/1190000009053752转载于:http...

2019-08-13 11:32:00 206

转载 更改时间模式 yyyy/mm/dd 转换成 dd/mm/yyyy的格式

//时间格式化函数,此处仅针对yyyy-MM-dd hh:mm:ss 的格式进行格式化dateFormat:function(time) { var date=new Date(time); var year=date.getFullYear(); /* 在日期格式中,月份是从0开始的,因此要加0 * 使用三元表达式在小于10的前面加0,...

2019-08-12 08:37:00 1816

转载 html input 日期加上范围限制

<input id="date" name="dateName" required min="2013-01-01" max="2013-09-23"type="date"/>https://zhidao.baidu.com/question/1493762451327171059.html转载于:https://www.cnblogs.com/sulanla...

2019-08-12 08:04:00 4842

转载 HTML5新增input标签属性

https://www.cnblogs.com/EricZLin/p/8855567.html转载于:https://www.cnblogs.com/sulanlan/p/11325079.html

2019-08-09 09:10:00 171

转载 angular routerlinkActive

https://www.cnblogs.com/nw0220/p/9111176.htmlangular2的routerLinkActive指令在路由激活时添加样式class.red{ color: red;} <a routerLink="/user/login" routerLinkActive="red">login</a>当url是user...

2019-08-06 09:13:00 361

转载 如何在github显示angular项目网页

https://dzone.com/articles/how-to-deploy-an-angular-application-to-github转载于:https://www.cnblogs.com/sulanlan/p/11287401.html

2019-08-02 11:10:00 165

转载 vs code 添加扩展 实时显示网页效果 live server

vs code 添加扩展 live server后,右键单击index.html选择 open with live server. 后自动打开网页,而且每次保存代码会自动更新网页。最好打开vs code的自动保存功能,vs code,自动保存: 文件(file)----自动保存(auto save),然后 文件 --- 设...

2019-07-25 18:48:00 1497

转载 bootstrap 表格 table样式

https://www.cnblogs.com/shark1100913/p/5627233.html<table class="table table-striped"> <thead> <tr> <th>表格标题</th> <th>表格标题</th&...

2019-07-23 09:38:00 146

转载 javascript uuid 生成ID

https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascriptFor an RFC4122 version 4 compliant solution, this one-liner(ish) solution is the most compact I could come up wit...

2019-07-15 08:40:00 189

转载 vs code 自动保存

https://blog.csdn.net/westlonly/article/details/78048049step one: file--auto savestep two: file--preferences--settings--change "afterDelay" to "onFocusChange"转载于:https://www.cnblogs.com/...

2019-07-12 08:26:00 467

转载 angular cli 及font -awesome

打开git bashnpm -vnode-vnpm install -g @angular/climkdir Projectscd Projectsng new angularappcd angularappcode . 这个意思是用vs code打开这个文件夹ng serve --opennpm install bootstrap@4.3.1 jqu...

2019-07-11 07:51:00 107

转载 js email regular expression EMAIL输入验证

https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascriptangular-----------------------<div class="form-group"><label>email</label>...

2019-07-08 11:02:00 605

转载 DIV设置 float以后使下一个DIV另起一行的方法

<div runat="server" class="export">请不要直接打开此页面</div> <button class="Btn" onclick="javascript: location.href = 'Default2.aspx'">返回</button>上面是源码这是在CSS中的.export下加入f...

2019-06-14 07:49:00 1643

转载 bootstrap系列之响应式布局及相关的visible-sm、hidden-xs等的使用

https://www.jianshu.com/p/7d3fef79fbbf转载于:https://www.cnblogs.com/sulanlan/p/11020716.html

2019-06-14 07:31:00 405

转载 Bootstrap栅栏布局里col-xs-*、col-sm-*、col-md-*、col-lg-*之间的区别及使用方法

转载。 https://blog.csdn.net/Mr_JavaScript/article/details/79677503概括一句话概括,就是根据显示屏幕宽度的大小,自动的选用对应的类的样式。关键字1、col是column简写:列;2、xs是maxsmall简写:超小,sm是small简写:小, md是medium简写:中等,lg是large简写:大;3、-* 表...

2019-06-14 07:26:00 456

转载 vue 编程式js跳转路由

请看goNews()方法 1 <template> 2 <!-- 所有的内容要被根节点包含起来 --> 3 <div id="home"> 4 我是首页组件 5 6 7 <button @click="goNews()">通过js跳转到新闻页面<...

2018-11-17 16:55:00 155

转载 vue 路由router

路由可以让根组件自动挂载不同的组件。即可以动态的挂在而不用手动挂载。1. 安装 npm install vue-router --save2. 在main.js 里引入并使用import VueRouter from 'vue-router'Vue.use(VueRouter)3. 配置路由 (1)创建组件,引入组件 (2)定义路由 c...

2018-11-14 09:37:00 101

转载 vue 非父子组件传值

1 <template> 2 <div id="news"> 3 4 我是新闻组件 5 <br> 6 7 <button @click="emitHome()">给Home组件广播数据</button> 8 9 ...

2018-11-11 17:20:00 56

转载 怎么用正则表达式限制输入框输入数字的范围(数字范围是50-1000),怎么限制输入框输入的数字是以9506开头的...

转自https://zhidao.baidu.com/question/1829801257322895700.html<input type="text" onkeyup="var v=this.value||'';v=v.replace(/[^\d]/g,'');v=parseInt(v,10);if(v<50){this.value=50;}else i...

2018-11-11 09:15:00 3520

转载 input 的值大于等于0并且小于等于50

oninput="this.value=this.value.replace(/[^0-9\.]/g,''); if(this.value<0){this.value='';}else if(this.value>50){this.value='';}"//如果是小于50,改为 else if(this.value>=50){this.value='';}...

2018-11-11 07:22:00 800

转载 input 输入大于1的数(可以是整数或小数)oninput 和正则

<input type="number" oninput="this.value=this.value.replace(/[^1-9\.]/g,'');"//用的oninput方法和正则表达式,如果是只能输入大于0的整数或小数则改为(/[^0-9\.]/g,'') id="raisingAmount" step="1" min="0">...

2018-11-10 18:34:00 1632

转载 vue 子组件主动获取父组件的数据和方法

子组件主动获取父组件的数据和方法: this.$parent.数据 this.$parent.方法在子组件Header.vue里面<template> <div> <h2>我是头部组件</h2> &...

2018-11-09 06:20:00 1622

转载 vue父组件主动获取子组件的数据和方法

父组件主动获取子组件的数据和方法:1.调用子组件的时候定义一个ref<v-header ref="header"></v-header>2.在父组件里面通过this.$refs.header.属性this.$refs.header.方法<template> <!-- 所有的内容要被根节点包含起来 -->...

2018-11-09 06:14:00 170

转载 这些内容只作为自己的学习笔记,知识和经验有限,仅能方便自己查阅。我是个前端新人,笔记如有不妥请见谅!!谢谢!...

本人刚开始学习前端知识,知识和经验积累不足。这些笔记只能满足自己查阅方便。见笑!转载于:https://www.cnblogs.com/sulanlan/p/9930049.html

2018-11-08 16:46:00 104

转载 vue 父组件给子组件传值

父组件Home.vue 1 <template> 2 <div> 3 <h2>这是一个首页{{msg2}}</h2><button>按钮</button> 4 <v-header :title="title" :homemsg='msg' run='run'></v-he...

2018-11-08 16:40:00 110

转载 安装axios

axios和vue-resource都是获取数据用的安装1. npm i axios --save2. 哪里用哪里应用axios<scrip>import Axios from 'axios';export default{3. 使用 import Axios from 'axios'; export default{...

2018-11-08 16:03:00 138

转载 <style lang="scss" scoped> 中的scoped表示是局部作用域。只作用于本组件

<style lang="scss" scoped> 中的scoped表示是局部作用域。只作用于本组件转载于:https://www.cnblogs.com/sulanlan/p/9923610.html

2018-11-07 16:56:00 1480

转载 <template>里面定义id,<script>里面要#id{ color: red} class 用点.

<template>里面定义id,<script>里面要#id{ color: red}转载于:https://www.cnblogs.com/sulanlan/p/9923591.html

2018-11-07 16:54:00 406

转载 脚手架 搭建 vue

1. 安装node.js2. 安装vue开发环境,安装vue脚手架vue-clinpm i --g vue-cli3. 创建项目vue init webpackmy-projectsimple版vue init webpack-simple my-project4. 终端输入cdmy-projectnpm inpm run dev转...

2018-11-06 15:03:00 61

转载 简单 vue todo list 封装JavaScript 的storage 在localStorage

在rsc文件夹下新建model文件夹,再新建storage.jsstorage.js代码: 1 var storage={ 2 set(key,value){ 3 localStorage.setItem(key,JSON.stringify(value)); 4 5 }, 6 get(key){ 7 ...

2018-11-06 12:18:00 106

转载 没有封装的简单vue todo

<template> <div id="app"> <input type='text' v-model='todo' @keyup.enter="doAdd"/> <button @click="doAdd()"> +增加</button><br><hr><hr>...

2018-11-06 11:29:00 73

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除