随笔分类 -  前端框架

摘要:const { getFieldDecorator, getFieldValue, setFieldsValue, resetFields, validateFields, getFieldError } = this.props.form; getFieldDecorator: 用于和表单进行双向 阅读全文
posted @ 2022-04-06 17:28 journeyIT 阅读(627) 评论(0) 推荐(0) 编辑
摘要:可以使用path 和 name 来进行页面的跳转 this.router.push(path:/inspection/inspectionRegister,query:item)this.router.push({ name: 'inspectionRegister' 阅读全文
posted @ 2018-07-06 21:04 journeyIT 编辑
摘要:由于公司最近在做的项目,涉及App的开发,正好前段时间有研究过vue 和 react native 正好可以在此派上用场。 整个APP应用 采用 远程的Android WebViwe 内嵌 H5页面 方式进行开发 ,所以 H5页面采用 基于vue 和 ionic 的 vux框架 进行开发 (过程中遇 阅读全文
posted @ 2018-07-06 20:47 journeyIT 编辑
摘要:一、安装 dva-cli cnpm install dva-cli -g 二、创建应用 dva new dva-project 三、启动应用 cd dva-project npm start 四、安装并使用antd cnpm install antd babel-plugin-import --sa 阅读全文
posted @ 2018-03-02 09:54 journeyIT 阅读(992) 评论(0) 推荐(0) 编辑
摘要:'use strict' import 'semantic-ui/semantic.min.css!'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; // import { Router, R 阅读全文
posted @ 2018-01-23 18:06 journeyIT 阅读(8) 评论(0) 推荐(0) 编辑
摘要:打开CommentBox.js 修改handleCommentSubmit方法 handleCommentSubmit(comment){ // console.log(comment); let comments = this.state.data, newComments = comments. 阅读全文
posted @ 2018-01-23 16:00 journeyIT 阅读(6) 评论(0) 推荐(0) 编辑
摘要:儿子将获取到的数据提交给父亲 打开CommentBox.js 我们在CommentForm标签上添加onCommentSubmit={this.handleCommentSubmit} 创建handleCommentSubmit方法 handleCommentSubmit(comment){ con 阅读全文
posted @ 2018-01-23 13:50 journeyIT 阅读(15) 评论(0) 推荐(0) 编辑
摘要:在input和textarea标签上使用ref属性 <input type="text" placeholder="姓名" ref="author"/> <textarea placeholder="评论" ref="text"></textarea> 在onSubmit={this.handleS 阅读全文
posted @ 2018-01-23 13:24 journeyIT 阅读(32) 评论(0) 推荐(0) 编辑
摘要:事件处理函数的使用 鼠标事件: onClick onContextMenu onDoubleClick onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onDrop onDrag o 阅读全文
posted @ 2018-01-23 13:12 journeyIT 阅读(13) 评论(0) 推荐(0) 编辑
摘要:修改main.js CommentBox标签 <CommentBox url="app/comments.json"/>,document.getElementById('app') 在 app 文件夹下 新建 comments,json 文件 [ {"author": "journey" , "d 阅读全文
posted @ 2018-01-23 12:48 journeyIT 阅读(24) 评论(0) 推荐(0) 编辑
摘要:打开main.js 添加一些模拟数据 var comments = [ {"author": "journey" , "date" : "3分钟前" , "text" : "今天天气有点冷!"}, {"author": "jim" , "date" : "5分钟前" , "text" : "今天早上 阅读全文
posted @ 2018-01-23 11:41 journeyIT 阅读(34) 评论(0) 推荐(0) 编辑
摘要:在comment文件夹下新建Comment.js Comment.js 'use strict' import React from 'react'; class Comment extends React.Component{ render(){ return ( <div className=" 阅读全文
posted @ 2018-01-23 11:14 journeyIT 阅读(17) 评论(0) 推荐(0) 编辑
摘要:在app下的comment文件夹下面分别新建CommentList.js 和 CommentForm.js CommentList.js 'use strict' import React from 'react'; class CommentList extends React.Component 阅读全文
posted @ 2018-01-23 10:58 journeyIT 阅读(24) 评论(0) 推荐(0) 编辑
摘要:在app文件夹下新建一个comment文件夹,并创建CommentBox.js CommentBox.js 'use strict'; import React from 'react'; class CommentBox extends React.Component{ render() { re 阅读全文
posted @ 2018-01-22 22:31 journeyIT 阅读(9) 评论(0) 推荐(0) 编辑
摘要:使用命令 jspm install react 进行安装 使用命令 jspm install react-dom 安装 react-dom 使用命令 jspm install semantic-ui 进行 semantic-ui样式的安装(不是必须) 使用 jspm install css 进行插件 阅读全文
posted @ 2018-01-22 21:48 journeyIT 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1.在搭建vue脚手架时提示是否启用eslint检测的。 Use ESLint to lint your code? 写 no; 2.如果项目已经生成,我们可以这样。 在项目中代开 bulid 文件夹下的 webpack.base.config.js 文件。将以下代码删掉或注销: { test: / 阅读全文
posted @ 2018-01-22 08:55 journeyIT 阅读(11) 评论(0) 推荐(0) 编辑
摘要:一、点击一次按钮 会发送两次请求的问题 第一个请求 Method是OPTIONS 第二个请求 Method是POST 后台过滤器也是检测出访问了两次,但是是偶尔才会重复访问。 这是因为 跨域请求导致 每次请求前都会先发送一个空的请求检查服务器, 可以在后台过滤器加个这个: @Override pub 阅读全文
posted @ 2018-01-19 15:11 journeyIT 阅读(9) 评论(0) 推荐(0) 编辑
摘要:Vue.js 自定义指令 除了默认设置的核心指令( v-model 和 v-show ), Vue 也允许注册自定义指令。 下面我们注册一个全局指令 v-focus, 该指令的功能是在页面加载时,元素获得焦点: <div id="app"> <p>页面载入时,input 元素自动获取焦点:</p> 阅读全文
posted @ 2018-01-12 15:58 journeyIT 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Vue.js 路由 Vue.js 路由允许我们通过不同的 URL 访问不同的内容。 通过 Vue.js 可以实现多视图的单页Web应用(single page web application,SPA)。 Vue.js 路由需要载入 vue-router 库 中文文档地址:vue-router文档。 阅读全文
posted @ 2018-01-12 15:58 journeyIT 阅读(4) 评论(0) 推荐(0) 编辑
摘要:Vue.js 表单 你可以用 v-model 指令在表单控件元素上创建双向数据绑定。 v-model 会根据控件类型自动选取正确的方法来更新元素。 <body> <div id="app"> <p>input 元素:</p> <input v-model="message" placeholder= 阅读全文
posted @ 2018-01-12 15:57 journeyIT 阅读(6) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示