This commit is contained in:
afc163
2016-01-15 16:56:25 +08:00
parent 2900f18419
commit 322656d4c0
14 changed files with 12448 additions and 1110 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ var MyUpload = React.createClass({
fileList = fileList.map(function (file) {
if (file.response) {
// 组件会将 file.url 作为链接进行展示
file.url = JSON.parse(file.response).url;
file.url = file.response.url;
}
return file;
});
@@ -39,7 +39,7 @@ var MyUpload = React.createClass({
// 3. 按照服务器返回信息筛选成功上传的文件
fileList = fileList.filter(function (file) {
if (file.response) {
return JSON.parse(file.response).status === 'success';
return file.response.status === 'success';
}
return true;
});
@@ -89,7 +89,7 @@ ReactDOM.render(React.createElement(MyUpload, null), mountNode);})()</script><di
fileList = fileList.map(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
<span class="hljs-keyword">if</span> (file.response) {
<span class="hljs-comment">// 组件会将 file.url 作为链接进行展示</span>
file.url = <span class="hljs-built_in">JSON</span>.parse(file.response).url;
file.url = file.response.url;
}
<span class="hljs-keyword">return</span> file;
});
@@ -97,7 +97,7 @@ ReactDOM.render(React.createElement(MyUpload, null), mountNode);})()</script><di
<span class="hljs-comment">// 3. 按照服务器返回信息筛选成功上传的文件</span>
fileList = fileList.filter(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
<span class="hljs-keyword">if</span> (file.response) {
<span class="hljs-keyword">return</span> <span class="hljs-built_in">JSON</span>.parse(file.response).status === <span class="hljs-string">'success'</span>;
<span class="hljs-keyword">return</span> file.response.status === <span class="hljs-string">'success'</span>;
}
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
});
+4 -4
View File
@@ -780,7 +780,7 @@ var MyUpload = React.createClass({
fileList = fileList.map(function (file) {
if (file.response) {
// 组件会将 file.url 作为链接进行展示
file.url = JSON.parse(file.response).url;
file.url = file.response.url;
}
return file;
});
@@ -788,7 +788,7 @@ var MyUpload = React.createClass({
// 3. 按照服务器返回信息筛选成功上传的文件
fileList = fileList.filter(function (file) {
if (file.response) {
return JSON.parse(file.response).status === 'success';
return file.response.status === 'success';
}
return true;
});
@@ -838,7 +838,7 @@ ReactDOM.render(React.createElement(MyUpload, null), mountNode);})()</script><di
fileList = fileList.map(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
<span class="hljs-keyword">if</span> (file.response) {
<span class="hljs-comment">// 组件会将 file.url 作为链接进行展示</span>
file.url = <span class="hljs-built_in">JSON</span>.parse(file.response).url;
file.url = file.response.url;
}
<span class="hljs-keyword">return</span> file;
});
@@ -846,7 +846,7 @@ ReactDOM.render(React.createElement(MyUpload, null), mountNode);})()</script><di
<span class="hljs-comment">// 3. 按照服务器返回信息筛选成功上传的文件</span>
fileList = fileList.filter(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">file</span>) </span>{
<span class="hljs-keyword">if</span> (file.response) {
<span class="hljs-keyword">return</span> <span class="hljs-built_in">JSON</span>.parse(file.response).status === <span class="hljs-string">'success'</span>;
<span class="hljs-keyword">return</span> file.response.status === <span class="hljs-string">'success'</span>;
}
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>;
});
+11237
View File
File diff suppressed because it is too large Load Diff
+1
View File
File diff suppressed because one or more lines are too long
+1170 -1080
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+14 -14
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -13,7 +13,7 @@ fs.writeFileSync(
"module.exports = " + JSON.stringify(require('../package.json')) + ";",
'utf-8'
);
var antdCss = path.join(cwd, 'dist/index.css');
var antdCss = path.join(cwd, 'dist/antd.css');
fs.createReadStream(antdCss)
.pipe(fs.createWriteStream(path.join(cwd, 'lib/index.css')));
console.log('prenpm done');
+1 -1
View File
@@ -1,6 +1,6 @@
npm run babel
rm -rf dist
webpack
webpack --config webpack.antd.config.js
node scripts/prenpm.js
npm publish $1 $2
rm -rf lib
+4
View File
@@ -28,6 +28,10 @@
}
}
.@{calendar-prefix-cls}-time .@{timepicker-prefix-cls}-panel {
min-width: 168px;
}
.@{timepicker-prefix-cls} {
position: relative;
display: inline-block;
+8 -3
View File
@@ -158,9 +158,9 @@
&-picture &-item-thumbnail {
width: 48px;
height: 48px;
display: inline-block;
overflow: hidden;
vertical-align: middle;
position: absolute;
top: 8px;
left: 8px;
}
&-picture &-item-thumbnail img {
@@ -182,6 +182,11 @@
margin: 0 0 0 8px;
line-height: 42px;
transition: all 0.3s ease;
padding-left: 48px;
padding-right: 8px;
max-width: 100%;
display: inline-block;
box-sizing: border-box;
}
&-picture &-item-uploading &-item-name {
+1
View File
@@ -215,6 +215,7 @@
&:not([disabled]).active {
> .@{iconfont-css-prefix} {
color: @btn-primary-color;
position: relative;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
var config = require('./webpack.config');
config.entry = {
'antd': ['./index.js']
'antd': ['./index.js', './style/index.less']
};
config.externals = {
'react': {