fix bugs on branch merge

This commit is contained in:
CPunisher 2021-10-06 02:20:02 +08:00
parent effe43a91c
commit c7e9efb7c8
1 changed files with 3 additions and 0 deletions

View File

@ -2,10 +2,12 @@ import {encodeData} from "../utils/qrcodeHandler";
import {actionTypes} from "../constant/ActionTypes"; import {actionTypes} from "../constant/ActionTypes";
import {QRBTF_URL} from "../constant/References"; import {QRBTF_URL} from "../constant/References";
import {getExactValue} from "../utils/util"; import {getExactValue} from "../utils/util";
import {RendererRect} from "../components/renderer/RendererBase";
const initialState = { const initialState = {
selectedIndex: 0, selectedIndex: 0,
value: 'A1', value: 'A1',
rendererType: RendererRect,
correctLevel: 0, correctLevel: 0,
textUrl: QRBTF_URL, textUrl: QRBTF_URL,
textUrlArray: [], textUrlArray: [],
@ -32,6 +34,7 @@ export default function appReducer(state = initialState, action) {
case actionTypes.CHANGE_STYLE: { case actionTypes.CHANGE_STYLE: {
return Object.assign({}, state, { return Object.assign({}, state, {
value: action.value, value: action.value,
rendererType: action.rendererType,
selectedIndex: action.rendererIndex, selectedIndex: action.rendererIndex,
history: state.history.slice().concat(action.value) history: state.history.slice().concat(action.value)
}); });