Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js VueJS筛选器不工作_Vue.js - Fatal编程技术网

Vue.js VueJS筛选器不工作

Vue.js VueJS筛选器不工作,vue.js,Vue.js,为什么过滤器不工作 错误说明:[Vue warn]:无法解析筛选器:大写 不确定原因,但过滤器不工作。 另外,这是编写此功能的最佳方式吗?有什么方法可以做到这一点,或者有什么建议的方法?我不确定是否要使用$refs,也许我可以做得更简单,但要有效地使用可重用组件 我试图通过使用随机消息和状态来模拟Ajax响应 链接: Vue.js 2中已删除大写筛选器 您可以简单地使用: {{ text.toUpperCase() }} 就您的代码结构而言,类似这样的方法可能更好: close: functi

为什么过滤器不工作

错误说明:[Vue warn]:无法解析筛选器:大写

不确定原因,但过滤器不工作。 另外,这是编写此功能的最佳方式吗?有什么方法可以做到这一点,或者有什么建议的方法?我不确定是否要使用$refs,也许我可以做得更简单,但要有效地使用可重用组件

我试图通过使用随机消息和状态来模拟Ajax响应

链接:


Vue.js 2中已删除大写筛选器

您可以简单地使用:

{{ text.toUpperCase() }}
就您的代码结构而言,类似这样的方法可能更好:

close: function() {
  this.alertType= null;
  this.title= null;
  this.message= null;
  this.showAlert= false;
}

由于您复制了两次,但只是使用了不同的值。

Vue.js 2中的大写筛选器已被删除

您可以简单地使用:

{{ text.toUpperCase() }}
就您的代码结构而言,类似这样的方法可能更好:

close: function() {
  this.alertType= null;
  this.title= null;
  this.message= null;
  this.showAlert= false;
}
因为您要复制它两次,但只是使用不同的值。

可能的重复可能的重复