mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-22 11:16:35 +10:00
Updates
This commit is contained in:
@@ -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>;
|
||||
});
|
||||
|
||||
@@ -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>;
|
||||
});
|
||||
|
||||
Vendored
+11237
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1170
-1080
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+14
-14
File diff suppressed because one or more lines are too long
+1
-1
@@ -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
@@ -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
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.@{calendar-prefix-cls}-time .@{timepicker-prefix-cls}-panel {
|
||||
min-width: 168px;
|
||||
}
|
||||
|
||||
.@{timepicker-prefix-cls} {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
&:not([disabled]).active {
|
||||
> .@{iconfont-css-prefix} {
|
||||
color: @btn-primary-color;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var config = require('./webpack.config');
|
||||
config.entry = {
|
||||
'antd': ['./index.js']
|
||||
'antd': ['./index.js', './style/index.less']
|
||||
};
|
||||
config.externals = {
|
||||
'react': {
|
||||
|
||||
Reference in New Issue
Block a user