- 博客(15)
- 资源 (8)
- 收藏
- 关注
原创 Nginx配置ReactJs项目,Url后面直接输入路由路径时老报404问题。
当我们写完项目后,要对项目进行部署,我的配置很简单location /demo { root E:/; index index.html index.htm;}这样配置的有一个问题,只能 http://localhost/demo/来访问。 如果想访问里面的其它界面如 http://localhost/demo/page1的话,就报404找不到页面。 可我在开发的时候,确实没有问题
2017-08-31 13:03:17 8118
原创 ReactJs 添加和删除onScroll事件。
大家都可能会遇到这样的问题,那就是滚动事件 。比较获取div的滚动事件,在ReactJS想要给div添加一个滚动事件,那基本上是添加不上的(可能是我的能力有限吧,反正我到目前为止,还没有找到可以直接给DIV添加滚动事件的)。要想实现滚动,那就必须得componentWillMount里注册scroll事件, window.addEventListener(‘scroll’, this.onScr
2017-08-27 15:02:37 10924 1
原创 预览本地图片--Angular4
今天就是想弄一个,在本地可以预览选择的图片,然后做相应的操作,如上传等。选择图片的方法:<input type="file" (change)="onChangeSelectFile()">显示图片 <div class="header" *ngIf="HeadPortrait"> <img [src]="imageUrl"> </div>js怎么处理呢,很简单
2017-08-21 23:12:56 6701 2
原创 移动端刷新组件XtnScroll--ReactJS实现
XtnScroll 组件,先看一下效果图下拉的效果 上拉的效果 以前都是用Vue–XtnScroll、Angular4–XtnScroll来实现的刷新组件今天说说React怎么实现。其实这三种框架里用到的方法都是一样的,只是每个里面都有自己的语法特性不一样,所以实现起来大同小意了。创建组件步骤目录结构如下图所示scss 样式文件svg 加载动画XtnScroll.js真正的文件Xtn
2017-08-21 16:43:14 1306
原创 Angular4 绑定html内容 警告处理
绑定html内容如果用正常的方法去绑定的话,可能会出再这种警告<div [innerHTML]="Catcha" ></div>--------------------------------------- WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).而且页面上也显示不出东西来
2017-08-14 23:15:09 10498 2
原创 NodeJs 生成验证码
NodeJs 验证码NodeJs生成验证码还真是不好弄呀。有些是要用到C++内库什么的,这个东西,在跨平方便还真是非常不方便呢今天在网上找一个用svg生成的验证码,这个真心不错。标记一下安装方式如下 svg-captcha npm install --save svg-captcha安装好了,调用方法如: - 返回的是一个字符串,前端调用的时候,前端调用把返回的数据按svg的方法展示出来就可
2017-08-13 23:46:01 10759 3
原创 NodeJs访问MySQL老是报Pool Close问题。
最近在写一个接口配置管理的一个东西。比如前端要一个用户登录接口,是post请求,之前写的话,就是规规矩矩的在后台写代码,通过路由什么怎么的跳转到相应的方法那里,然后获取到传过来的参数,拿到参数后,再调用数据库查询,判断用户存在与否最后返回结果给前端。我现在写的这个东西,将以前的这些步骤全都以抽里出一条或几天规则,然后按照事先定义好的顺序,由上而下依次执行,最后返回结果给调用者。以后我只配置规则,不用
2017-08-12 11:25:47 2978
原创 微信小程序--Tabs组件
Tabs组件上一篇讲的是 Loading组件的编写,后来发现微信自己也有一个Loading,如果想要个性的话,可以自己修改了。这次是写一个Tabs的组件,根据不同的状态,回来切换操作,标记一下,先看一下效果图: 本试例的全部代码 点击 获取,试例里用导入的引用,都可以从github里找到。目录结构tabs 三个文件tabs.wxml<template name="XtnTabs"> <view
2017-08-10 18:08:52 5129
原创 微信小程序--Loading组件
Loading组件这两天都在看微信小程序开发,在看的过程当中,也会自己写写,有的时候,这个时候就会想到,以前项目当中如ReactJs里会有一些公共的组件好多地方都要用到,于就是想着微信小程序里如何提取出来。在小程序里提取公共部分叫template。在其它页面上要用的时候,只要引用就可以了,下面就是如何创建一个的步骤吧,自己也标记一下。效果如下所示,所有完整的代码都github上找到。 创建一个
2017-08-09 17:52:32 11308 1
原创 Angular4动态创建组件--根据组件名称动态创建出来组件
动态创建组件说说场景先,比我写了一些组件,这此组件内容都很少,弹出的对话框也许只有一行数据,也有可能是一个表单等,或都一些多选的,单选的选项等。网上有好多,动态创建组件的Demo,都不是很满意,愿意就是要动态创建组件的时候,传入的你即将要创建的组件对象进去,然后把这个放到页面里显示出来。这算什么动态创建呀,我就想传一个组件的名字,然后就能把他创建出来。之前写过C#动态创建类,都是给一个类的名称
2017-08-07 23:52:22 2308
原创 移动端刷新组件XtnScroll--Vue实现
XtnScroll –Vue之前写了一个Angular实现刷新的,今天用Vue也实现一下吧,核心代码都差不多,判断滑动方法,是向上,还是向下,向左或向右。其它的就是各种代码自己一些特性吧。 后台是NodeJs提供接口调用,具体的可以看一下 https://github.com/xiaotuni/angular-map-http2 里的server目录里,把NodeJs启动起来就以了。少什么接口,配置
2017-08-06 23:01:19 778
原创 ReactJS 页面跳转保存当前scrollTop回来时,自动移动到上次浏览器的位置
在移动端的操作的时候,相信大家都遇到到这种情况,翻了好几页了,点击一项进去查,然后回来的时候,还想回来我原来的位置。google上也找了一此,有一个组件,但是好像是如果想实现这个功能,页面就得用那个组件包进来。一个项目已经写了几十个页面了,每个页面都去把他包进去,然后再实现组件里的方法,太痛苦了。后来发现router里有onEnter onLeave事件,那就在这里做文章吧。这就方便多了,就在rou
2017-08-04 11:22:29 6879 2
原创 移动端刷新组件XtnScroll--Angular4实现
刷新组件- 主要是学习一下Angular4所有花了我一天时间,写了这个刷新组件。以项目开发当中,特别是手机移动端开发的时候,经常要用到就是上拉加载下一面,下拉刷新获取最新数据的功能。在网也有很多类似的组件,前段时间用ReactJs写的项目的时候,就经常要用到,要是项目当时间也紧,从网找了一些,用来总是不那么顺手,后来干脆就自己写,这样也好控制。在用第三库的,有个很大问题,就是样式,第三库的样式
2017-08-04 01:19:54 3558 4
原创 Angular4+NodeJs+MySQL 入门-06 接口配置
在上篇中说了怎么调用接口,这篇就来说说,接口配置吧。后端是用NodeJS来写的,由于写后台(以前用的是C#语言)的时候,大部操作都在是对数据库表的增、删、改、查操作,比如:根据查询出来的数据,然后某个字段进行 if else 操作。满足条件我的执行A操作,不满足的时间执行B操作。所有就我就把这些操作抽里出来,封装成相应的规则。一个接口可能要用到好条规则,按照执行顺序一次执行下去,就可以了,执行到最后
2017-08-03 00:33:52 1160
原创 Angular4+NodeJs+MySQL 入门-05 接口调用
接口调用今天讲一下,如果在前端页面上通过调用后台接口,返回来的数据。把前面的几章结合起来。 这里所有用的代码在 https://github.com/xiaotuni/angular-map-http2。简单介绍一下 https://github.com/xiaotuni/angular-map-http2 这个项目吧分前端用的是Angular4写的: 前端分两部分一部分是WebApp移动端,
2017-08-02 01:10:07 4155
DB2 Universal Database v8 Handbook
2009-03-26
Oracle to DB2 UDB Conversion Guide
2009-03-26
PL/SQL Developer 7.0 User’s Guide
2007-09-12
Using NetBeansTM IDE 5.5
2007-04-28
MySQL/PHP Database Applications 英文版
2007-04-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人