我正在运行ESLint,我目前遇到以下ESLint错误:
error ‘state’ is already declared in the upper scope no-shadow
const state = { date: '',show: false }; const getters = { date: state => state.date,show: state => state.show }; const mutations = { updateDate(state,payload) { state.date = payload.date; },showDatePicker(state) { state.show = true; } }; export default { state,getters,mutations };