Commit 35946b7b by hfpp2012 yinsigan

尝试使用immutable

1 parent f3002db8
......@@ -12,6 +12,7 @@
"babel-preset-stage-0": "^6.24.1",
"halogen": "^0.2.0",
"html-webpack-plugin": "^2.28.0",
"immutable": "^3.8.1",
"jquery": "^3.2.1",
"path": "^0.12.7",
"react": "^15.5.4",
......
const init_state = [
import { List } from 'immutable'
const init_state = List([
{ id: 1, name: "药库", initialPos: {x: 80, y: 70}, target_type: 'RegionalDesign::Repo' },
{ id: 2, name: "药架", initialPos: {x: 80, y: 70 + 60}, target_type: 'RegionalDesign::DrugRepo' },
{ id: 3, name: "药架格", initialPos: {x: 80, y: 70 + 60 * 2}, target_type: 'RegionalDesign::DrugBrandreth' }
]
])
const headergroup = (state = init_state, action) => {
switch (action.type) {
......
......@@ -2694,6 +2694,10 @@ ignore@^3.2.0:
version "3.3.3"
resolved "http://registry.npm.taobao.org/ignore/download/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d"
immutable@^3.8.1:
version "3.8.1"
resolved "http://registry.npm.taobao.org/immutable/download/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2"
imurmurhash@^0.1.4:
version "0.1.4"
resolved "http://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!