我使用 typed-vuex ,在没有 nuxt 的情况下工作,我无法解决这个错误

问题描述

我无法解决此错误。

error

"typed-vuex": "^0.2.0","@vue/eslint-config-typescript": "7.0.0","打字稿": "~4.1.5",

import Vuex from 'vuex'
import Vue from 'vue'

import { actionTree,getterTree,mutationTree } from 'typed-vuex'
import { vuexfireMutations,firebaseAction } from 'vuexfire'
import { db } from "../plugins/firebase/initializationApp"
import ProductType from "../components/ProguctCard.vue"
import 'firebase/database'

Vue.use(Vuex)

export const state = () => ({
    products: [] as ProductType[],});

export const getters = getterTree(state,{
    getProducts: state => state.products,});

export const mutations = mutationTree(state,{
    ...vuexfireMutations,})

export const actions = actionTree(
    { state,getters,mutations },{
        bindProducts: firebaseAction(({ bindFirebaseRef }) => {  < ERROR IS THIS  LINE
            // return the promise returned by `bindFirebaseRef`
            return bindFirebaseRef('products',db.ref('products'))
        }),}
)

export default new Vuex.Store({
    state,actions,mutations,});

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)