如果有当前的变量(VUEX声名的)会发生改变的(change),刚绑定的值需要在data () 内进行声明 一个新的变量进行处理。

VUEX报 “was assigned to but it has no setter”的更多相关文章

  1. vue 将值存储到vuex 报错问题

    报错 :Vuex - Computed property “name” was assigned to but it has no setter 如何解决: computed: { addModal: ...

  2. Vue——解决报错 Computed property "****" was assigned to but it has no setter.

    在最近的项目中遇到了如下的警告信息: [Vue warn]: Computed property " currentStep" was assigned to but it has ...

  3. vue报类似警告Computed property "isLoading" was assigned to but it has no setter

    一.原因:一个计算属性,当计算传入的是一个函数,或者传入的是一个对象,而没有设置 setter,也就是 set 属性,当你尝试直接该改变这个这个计算属性的值,都会报这个警告,vuex还会出现通过com ...

  4. VUEX报错 [vuex] Do not mutate vuex store state outside mutation handlers

    数组 错误的写法:let listData= state.playList; // 数组深拷贝,VUEX就报错 正确的写法:let listDate= state.playList.slice(); ...

  5. vuex报错: [vuex] Expects string as the type, but found undefined.

    报错如图 检查了好久,发现 import * as types from '../mutation-types'const actions = { add({commit}){ commit(type ...

  6. 踩坑记录-nuxt引入vuex报错store/index.js should export a method that returns a Vuex instance.

    错误 store/index.js代码如下: import Vue from 'vue'; import Vuex from 'vuex'; import city from './moudle/ci ...

  7. 多组件共享-vuex —— 使用vuex 报错 actions should be function or object with ”handler“

    vuex分模块使用时出现的问题,单文件暂时没有用到 原因是在action 文件中没有任何定义(即:文件为空)或则 action 没有任何方法返回,将action在模块引用时去掉即可 转自:https: ...

  8. vue使用vuex报错 "export 'watch' was not found in 'vue'

    问题 安装Vuex后报错"export 'watch' was not found in 'vue' 解决方法 如果你的vue版本是 2.X ,将vuex升到 3.X.X 就能够解决 npm ...

  9. vue store获取值时 Computed property "activeTag" was assigned to but it has no setter.

    出现原因: element-ui中 el-tab绑定的值在切换tab时会自动修改 而activeTag是从store中获取的值,不能直接修改 要添加给它绑定上set   <el-tabs cla ...

随机推荐

  1. 数组Array的API1

    数组的方法arr.includes()arr.every(fn(val,i))arr.some(fn(val,i))arr.filter(fn(val,i))arr.map(fn(val,i))ar. ...

  2. Thinkphp整合阿里云OSS图片上传实例

    Thinkphp3.2整合阿里云OSS图片上传实例,图片上传至OSS可减少服务器压力,节省宽带,安全又稳定,阿里云OSS对于做负载均衡非常方便,不用传到各个服务器了 首先引入阿里云OSS类库 < ...

  3. 【C语音基础】printf()用法

    printf() -- 将变量的内容输出到显示器上 四种用法 1.printf("字符串\n"); 2.printf("输出控制符",输出参数); 3.prin ...

  4. python———day04

    一.tuple (元组) 元组被称为制度列表,可以被查询,但是不能被修改. 元组写在小括号里(),元素之间用逗号隔开. tup1 = () #空元组 tup2 = (20,) #只有一个元素的元组 记 ...

  5. [UNITY 5.4 UGUI] 控件重叠触摸穿透

    问题. imge 和 button重叠时,imge 覆盖在button上面,导致点击事件无法传递到button. 1.给imge 添加 [Canvas Group]组件 2.修改[Canvas Gro ...

  6. js 字符串操作方法

    1.字符串转换 你可以将任何类型的数据都转换为字符串,你可以用下面三种方法的任何一种: 1 2 var num= 19; // 19 var myStr = num.toString(); // &q ...

  7. React props

    class WebSite extends React.Component { constructor() { super(); this.state = { name: "菜鸟教程&quo ...

  8. [Linux]Ubuntu与终端破墙

    参考:https://www.jianshu.com/p/941bf811f9c2 亲测在ubuntu-14.04.4-desktop-amd64.iso上安装成功 福利:https://github ...

  9. thinkphp51 重定向 redirect()

    thinkphp51 重定向 跨域 redirect() 可以重新定义新的路由,是fetch() 无法做到的.

  10. Kafka运维填坑(转)

    前提: 只针对Kafka 0.9.0.1版本; 说是运维,其实偏重于问题解决; 大部分解决方案都是google而来, 我只是作了次搬运工; 有些问题的解决方案未必一定是通用的, 若应用到线上请慎重; ...