mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(view) showImage: assign -> spread
This commit is contained in:
parent
cf4a273e83
commit
cb0494d2dc
4 changed files with 14 additions and 4 deletions
3
.babelrc
3
.babelrc
|
|
@ -3,7 +3,8 @@
|
|||
"env"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-object-assign"
|
||||
"transform-object-assign",
|
||||
"transform-object-rest-spread"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"indent": ["error", 4],
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ function showImage(href, prefixUrl) {
|
|||
.map(makeTitle);
|
||||
|
||||
const index = names.indexOf(Info.path);
|
||||
const config = Object.assign({}, Config, {
|
||||
const imageConfig = {
|
||||
index,
|
||||
autoSize : true,
|
||||
type : 'image',
|
||||
|
|
@ -231,7 +231,12 @@ function showImage(href, prefixUrl) {
|
|||
overlay : null,
|
||||
title : {}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const config = {
|
||||
...Config,
|
||||
...imageConfig,
|
||||
};
|
||||
|
||||
$.fancybox.open(titles, config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@
|
|||
"babel-cli": "^6.18.0",
|
||||
"babel-loader": "^7.0.0",
|
||||
"babel-plugin-transform-object-assign": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"clean-css-loader": "^0.1.2",
|
||||
"clear-module": "^2.1.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue