• vue 踩坑记录


    1.绑定双击事件用 @dblclick 不要用@ondblclick  在vue中@=on

    2.Vue中路由跳转踩坑。

    比如我的路由如下定义

    routes: [
        {
          path: "/", name: "index", component: Index
        },
        {
          path: "/gallery", name: "gallery", component: Gallery,
          children: [
            {
              path: "top/:top/skip/:skip", name: "gallerys", component: Gallery,
              children: [
                {
                  path: "query/:query", name: "search", component: Gallery
                }
              ]
            }
          ]
        }
      ]

    然后这么调用“search”这个路由,这个路由里面的参数是动态的,如果“this.searhkey”这个值为空,也可以这么说,只要params里面有一个值为空,都无法定位到“search”路由,会自动跳转到根路由“Index”

    this.$router.push({ name: "search", params: {top: "5", skip: "0", query: this.searhkey } });

    3.Vue 路由报错,如: missing param for named route "mysearchpackage": Expected "query" to be defined,这句话的意思是,在使用“mysearchpackage”的时候,没有给“query”这个参数赋值,全局搜索“mysearchpackage”这个路由,查看是否在使用该路由的时候少给参数“query”赋值

  • 相关阅读:
    Hadoop之MapReduce
    Hadoop之序列化
    Hadoop之mapreduce 实例五
    Hadoop之hive和hadoop的交互流程
    protel总结1
    将正数十进制转换为2~16进制数
    基于verilog分频器总结
    MATLAB设计FIR滤波器
    centos7+hadoop完全分布式集群搭建
    Linux下常用配置文件
  • 原文地址:https://www.cnblogs.com/fqybzhangji/p/7210530.html
Copyright © 2020-2023  润新知