Skip to content

Commit

Permalink
cache update
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed May 23, 2018
1 parent 931b926 commit 9a44d67
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 314 deletions.
70 changes: 9 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,8 @@
"start": "gulp less && nico server --watch",
"clean": "rm -rf _site",
"deploy": "npm run clean && webpack --config webpack.config.min.js && gulp less && nico build -C nico.production.js && gulp deploy && gulp coding",
"coding": "npm run clean && webpack --config webpack.config.min.js && gulp less && nico build -C nico.production.js && gulp coding"
},
"dependencies": {
"classnames": "~2.2.0",
"object-assign": "~4.1.0",
"react": "15.x",
"react-dom": "15.x",
"uxcore": "^0.19.9",
"uxcore-album": "^0.3.0",
"uxcore-alert": "^0.3.0",
"uxcore-animate": "^0.2.0",
"uxcore-badge": "^0.2.0",
"uxcore-button": "^0.4.0",
"uxcore-button-group": "^0.1.5",
"uxcore-calendar": "^0.9.0",
"uxcore-carousel": "^0.3.0",
"uxcore-cascade-multi-select": "^0.7.0",
"uxcore-cascade-select": "^0.5.0",
"uxcore-cell-field": "^0.2.2",
"uxcore-checkbox-group": "^1.1.4",
"uxcore-collapse": "^2.0.0",
"uxcore-crumb": "^0.2.0",
"uxcore-dialog": "^0.7.0",
"uxcore-dropdown": "^0.4.0",
"uxcore-empty-data": "^0.1.2",
"uxcore-float-nav": "^0.2.0",
"uxcore-form": "^6.0.0",
"uxcore-form-field": "^0.2.5",
"uxcore-formatter": "^0.1.2",
"uxcore-grid": "^1.2.0",
"uxcore-icon": "^0.1.2",
"uxcore-layout": "^1.0.1",
"uxcore-load-more": "^0.1.2",
"uxcore-matrix": "^0.3.0",
"uxcore-mention": "^0.3.0",
"uxcore-menu": "^3.0.0",
"uxcore-message": "^0.5.0",
"uxcore-multi-select": "^0.4.0",
"uxcore-pagination": "^0.6.0",
"uxcore-pickable": "^3.0.0",
"uxcore-pickable-form-field": "^0.4.1",
"uxcore-popover": "^0.5.0",
"uxcore-progress": "^1.1.0",
"uxcore-radiogroup": "^1.2.2",
"uxcore-rate": "^0.3.0",
"uxcore-select2": "^0.4.0",
"uxcore-steps": "^2.0.0",
"uxcore-switch": "^0.1.1",
"uxcore-table": "^8.0.0",
"uxcore-tabs": "^0.6.0",
"uxcore-tag": "^2.0.0",
"uxcore-timeline": "^0.2.3-beta.0",
"uxcore-tinymce": "^0.2.2",
"uxcore-title": "^0.1.1",
"uxcore-tooltip": "^0.4.0",
"uxcore-totop": "^0.5.0",
"uxcore-transfer": "^0.3.0",
"uxcore-tree": "^0.2.0",
"uxcore-tree-select": "^0.4.0",
"uxcore-uploader": "^3.0.0",
"uxcore-validator": "^0.2.0"
"coding": "npm run clean && webpack --config webpack.config.min.js && gulp less && nico build -C nico.production.js && gulp coding",
"postinstall": "node ./postinstall.js"
},
"devDependencies": {
"autoprefixer": "~6.3.7",
Expand All @@ -90,12 +31,14 @@
"babel-preset-es2015-ie": "^6.6.2",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.5.0",
"classnames": "~2.2.0",
"css-loader": "~0.23.1",
"deepcopy": "~0.6.3",
"extract-text-webpack-plugin": "~1.0.1",
"file-loader": "~0.9.0",
"fs-extra": "^5.0.0",
"gift": "^0.10.0",
"github-markdown-css": "^2.10.0",
"gulp": "^3.9.0",
"gulp-batch": "^1.0.5",
"gulp-clean-css": "~2.0.7",
Expand All @@ -105,6 +48,7 @@
"gulp-less": "^3.0.3",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.6.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"inquirer": "^5.1.0",
Expand All @@ -117,14 +61,18 @@
"less-plugin-inline-urls": "^1.1.0",
"markit": "^0.2.0",
"nico-jsx": "~0.9.0",
"object-assign": "~4.1.0",
"react": "15.x",
"react-clipboard.js": "^1.0.1",
"react-color": "2.2.2",
"react-dom": "15.x",
"readable-stream": "^2.0.2",
"rimraf": "^2.4.3",
"socket.io": "~1.3.6",
"style-loader": "~0.13.0",
"to-case": "^2.0.0",
"url-loader": "~0.5.6",
"uxcore": "^0.19.9",
"vinyl-fs": "^2.2.1",
"webpack": "~1.13.0",
"webpack-dev-middleware": "^1.6.0",
Expand Down
17 changes: 17 additions & 0 deletions postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const fs = require('fs');

fs.copyFileSync('./node_modules/uxcore/README_CN.md', './site/start/base/index.md');

const startMdPath = './node_modules/uxcore/README_CN.md';
let startMd = fs.readFileSync(startMdPath, 'utf-8');
startMd = startMd.replace('中文 | [English](./README.md)', '');
startMd = `
- order: 0
- category: START
- chinese: 开始使用
---
${startMd}`;

fs.writeFileSync('./site/start/base/index.md', startMd);

33 changes: 22 additions & 11 deletions site/components/form/demo/comp.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ class Demo extends React.Component {

handleClick() {
const me = this;
console.log(JSON.stringify(me.refs.form.getValues(true)));
console.log(JSON.stringify(me.form.getValues(true)));
}

handleSetValues() {
const me = this;
me.refs.form.setValues({
me.form.setValues({
test1: '我不是测试',
});
}
Expand All @@ -102,7 +102,7 @@ class Demo extends React.Component {
}

handleFormClick(data) {
this.refs.form.setState({
this.form.setState({
mode: Constants.MODE.VIEW,
});
}
Expand All @@ -116,12 +116,16 @@ class Demo extends React.Component {
console.log(value, name, pass);
const me = this;
// if (name == 'number') {
// me.refs.form.setValues({
// me.form.setValues({
// number: 1
// })
// }
}

handleReset() {
this.form.resetValues();
}

handleKeyDown(e) {
if (e.keyCode == Form.KeyCode.Enter) {
console.log('enter');
Expand Down Expand Up @@ -295,7 +299,13 @@ class Demo extends React.Component {

return (
<div className="demo-comp">
<Form ref="form" instantValidate jsxmode={me.state.mode} jsxvalues={me.state.jsxvalues} jsxonChange={me.handleChange.bind(me)}>
<Form
ref={(c) => { this.form = c; }}
instantValidate
jsxmode={me.state.mode}
jsxvalues={me.state.jsxvalues}
jsxonChange={me.handleChange.bind(me)}
>
<FormRowTitle jsxtitle="我是行标题" />
<FormRow>
<InputFormField
Expand Down Expand Up @@ -424,11 +434,11 @@ class Demo extends React.Component {
}}
dataType="jsonp"
afterFetch={(obj) => {
const data = {};
obj.result.forEach((item, index) => {
data[item[1]] = item[0];
const newData = {};
obj.result.forEach((item) => {
newData[item[1]] = item[0];
});
return data;
return newData;
}}
/>
</FormRow>
Expand All @@ -449,14 +459,15 @@ class Demo extends React.Component {
jsxname="cascade"
jsxlabel="级联选择"
/>
<EditorFormField jsxname="editor"
<EditorFormField
jsxname="editor"
jsxlabel="富文本编辑器"
placeholder="测试"
/>

<OtherFormField className="other">
<Button style={{ marginLeft: '88px', marginRight: '8px' }} onClick={me.handleClick.bind(me)}>提交</Button>
<Button style={{ marginRight: '8px' }} type="secondary" action="reset">取消</Button>
<Button style={{ marginRight: '8px' }} type="secondary" onClick={me.handleReset.bind(me)}>重置</Button>
<Button style={{ marginRight: '8px' }} type="secondary" onClick={me.handleSetValues.bind(me)}>手动setValues</Button>
<Button style={{ marginRight: '8px' }} type="secondary" onClick={me.handleValueChange.bind(me)}>修改 props</Button>
<Button style={{ marginRight: '8px' }} type="secondary" onClick={me.changeMode.bind(me)}>转变模式</Button>
Expand Down
7 changes: 6 additions & 1 deletion site/components/form/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* force:是否强制校验,无视不校验的规则。
* always:强制校验通过或者失败,通常可以用于清空出错状态。

* doValidateAndScroll(force, always) 获取目前的表单是否通过检测并滚动至第一个出错的 field,参数同上。6.0 版本以后支持
* doValidateAndScroll(force, always) 获取目前的表单是否通过检测并滚动至第一个出错的 field,参数同上。

#### Form.createFormField(options)

Expand Down Expand Up @@ -226,6 +226,8 @@ jsxdata 目前支持两种格式
]
```

> 配置 jsxfetchUrl 后,会在组件渲染后立刻以空搜索值发起一次请求,我们强烈建议服务端完善空值搜索的请求处理逻辑,返回热点数据和用户关联数据,以提供更好的选择体验。

> 此外,SelectFormField 还支持 [uxcore-select2](https://www.npmjs.com/package/uxcore-select2) 除 onSelect/onDeselect 外的全部属性。

### SearchFormField
Expand Down Expand Up @@ -286,6 +288,9 @@ jsxdata 目前支持两种格式
|---|---|---|---|---|
|jsxplaceholder|string|optional|""|占位符|
|jsxtype|string|optional|""|目前支持 "money", "cnmobile" 和 "card", 提供三种格式化显示的方法。"money"的格式为`123 121 121.213 121`,"cnmobile"的格式为 `86 1565 7263 8223`, "card" 的格式为 `3321 3123 3243 4343`|
|fixedNum|number|optional| - | 锁定小数位 |
|delimiter|string|optional| ' ' | 分隔符 |
|formatOnBlur|bool|optional| false | 在失焦时进行格式化(6.2.0 后支持) |
Expand Down
101 changes: 37 additions & 64 deletions site/start/base/index.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,86 @@

- order: 0
- category: START
- chinese: 开始使用

---


# [UXCore](http://uxco.re/)

[![npm version](https://img.shields.io/npm/v/uxcore.svg?style=flat-square)](https://www.npmjs.com/package/uxcore) [![Dependency Status](https://img.shields.io/david/uxcore/uxcore.svg?label=deps&style=flat-square)](https://david-dm.org/uxcore/uxcore) [![devDependency Status](https://img.shields.io/david/dev/uxcore/uxcore.svg?label=devDeps&style=flat-square)](https://david-dm.org/uxcore/uxcore#info=devDependencies)

UXCore is a set of [React](http://facebook.github.io/react/) Components that is designed for enterprise-class pc backend application.

* **Rich library:** more than 35 React Components available with high quality design.

* **Focus on backend App:** Powerful but easy-to-use Form and Table.

* **Customizable theme:** theme can be customized easily.
* **丰富的组件功能:** 超过 50 个高质量组件供使用

Before posting an issue, please read the [CHANGELOG](https://github.com/uxcore/uxcore/releases) and the README and the documentation to check the recently updated.
* **专注于企业级中后台应用场景:** 强大易用的表单表格

## For inner staff
* **精心设计的视觉风格:** 深耕中后台场景,让工作变得简单幸福。

please see http://groups.alidemo.cn/uxcore/doc/ for details.
集团内部请查看 http://groups.alidemo.cn/uxcore/doc/ 了解详情。

## CodePen
点击 [文档站点](http://uxco.re/) 获取动态演示例子。

The easiest way to start hacking on UXCore is using the following CodePen Demo:
在提 issue 之前, 请阅读 [更新日志](https://github.com/uxcore/uxcore/releases) 获取最新的功能更新。

* **[UXCore Demo](http://codepen.io/eternalsky/pen/qZwNVL)**

## [Starter kit](https://github.com/uxcore/starter-kit)
## 安装

If you're just getting started, you can download the starter kit. The starter kit is initialized by [NOWA](http://nowa-webpack.github.io/web/index.html?en) which is our project-level development and production solution collections.

<a style="height: 48px;line-height: 48px;font-size:24px;text-align:center;width: 300px;background: #2599f2;color: white;display:block;border-radius: 5px;margin: 20px auto;text-decoration:none;" href="https://github.com/uxcore/starter-kit/archive/master.zip" target="_blank">Download Starter Kit</a>
```sh
npm install uxcore --save
```

## Installation
## 使用

The fastest way to get started is to serve JavaScript from the CDN
### 引入 js

```html
<link rel="stylesheet" type="text/css" href="//g.alicdn.com/??platform/common/s/1.1/global/global.css,uxcore/uxcore/0.19.25/orange.min.css">
<script src="//g.alicdn.com/uxcore/uxcore/0.19.25/uxcore.min.js">
```jsx
import { Button } from 'uxcore';
ReactDOM.render(<Button />, mountNode);
```

if you'd like to use [npm](npmjs.com)
### 按需引入 js

```sh
npm install uxcore
```
* 使用 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (推荐)

## Usage
```js
// .babelrc or babel-loader option
{
"plugins": [
["import", { libraryName: "uxcore", camel2DashComponentName: false }]
]
}
```

### For cdn

```jsx
const {Button} = Uxcore;
ReactDOM.render(<Button />, mountNode);
```
* 或者,手动引入

### For npm
```jsx
import {Button} from 'uxcore';
// or
import Button from 'uxcore/lib/Button';
ReactDOM.render(<Button />, mountNode);
```
```js
import Button from 'uxcore/lib/Button';
```

And import style mannally
### 引入样式包

```less
@import '~uxcore/assets/iconfont.css';
@import '~uxcore/assets/orange.css';
```

### import component as required

Install the component
```sh
npm install uxcore-button kuma-base
```
## 浏览器支持

```jsx
import Button from 'uxcore-button';
```
And import style in your less file
```less
@import '~kuma-base/theme/blue.less'; // or orange.less global variables which components need
@import '~kuma-base/core.less'; // base element style and reset
@import '~uxcore-button/src/Button.less'; // component style
```
主流浏览器及 IE9+

## 项目共建

## Browser Support
我们非常欢迎您一起将 uxcore 做的更好! 查看 [CONTRIBUTING 文档](https://github.com/uxcore/uxcore/blob/master/CONTRIBUTING.md) 获取详细信息。

Mainstream browsers and Internet Explorer 8+. For IE 8, see [react-ie8](https://github.com/xcatliu/react-ie8) to get support.
## 许可

## Customization
本项目基于 [MIT 协议](https://github.com/uxcore/uxcore/blob/master/LICENSE) 进行开发和发布

We have implemented two default themes(orange/blue) to render UXCore Components. Theme customization is simple using our online [design tools](http://uxco.re/theme/builder).

## Contribute

Yes please! See the [CONTRIBUTING](https://github.com/uxcore/uxcore/blob/master/CONTRIBUTING.md) for details.

## License

This project is licensed under the terms of the [MIT license](This project is licensed under the terms of the MIT license)

Loading

0 comments on commit 9a44d67

Please sign in to comment.