不推荐使用getPreventDefault()。请改用defaultPrevented。为什么我在Meteor中收到此错误

时间:2015-05-25 09:18:21

标签: meteor

Use of getPreventDefault() is deprecated.  Use defaultPrevented instead.

此错误将在运行时出现在meteor App中。它在localhost:3000中显示错误,所以我也不知道要更改哪个文件。

如何解决这个问题?

使用以下HTML模板时,我会收到此日志。

<template name="dpVar">
  <h1>variants</h1> 

  <table class="table table-responsive table-bordered">
    <tbody>
    {{#each variant}}
      {{#each VARIENTS}}
        {{#if $eq this.DATATYPE "Text"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td>
              <input type="text" id={{this.NAME}}>
             </td> 

          </tr>
        {{/if}}

        {{#if $eq this.DATATYPE "price"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td><input type="text" id={{this.NAME}}></td> 
          </tr>
        {{/if}}

        {{#if $eq this.DATATYPE "color"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td>
            <div>
              <select>
                <option>Color</option>
                <option>Green</option>
                <option>White</option>
                <option>Red</option>
                <option>Blue</option>
              </select>
            </div>
            </td> 
          </tr>
        {{/if}}

        {{#if $eq this.DATATYPE "boolean"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td><input type="radio" id={{this.NAME}}></td> 
          </tr>
        {{/if}}

        {{#if $eq this.DATATYPE "checkbox"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td><input type="checkbox" id={{this.NAME}}></td> 
              </tr>
        {{/if}}
        {{#if $eq this.DATATYPE "string"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td><input type="text" id={{this.NAME}}></td> 
          </tr>
        {{/if}}
        {{#if $eq this.DATATYPE "date"}}
          <tr>
            <td class="center">{{this.NAME}}</td>
            <td><input data-provide="datepicker" type="text" id={{this.NAME}}></td> 
          </tr>
        {{/if}}
      {{/each}}
    {{/each}}
    </tbody>
  </table>

  <button class="btn btn-success addproduct" id="CreateNewProduct">Create new product</button>   
</template>

但我不确定为什么会发生这种情况。

动态本地主机文件

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/e0ea4006329cdc3a221d2cd8b53b817dfb1bded8.css">


<script type="text/javascript">__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22ROOT_URL%22%3A%22http%3A%2F%2Flocalhost%3A3018%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22appId%22%3A%2215ajde21eyc7cr29ww6p%22%2C%22autoupdateVersion%22%3A%22a0c42be1617fe494b745ead93953bc6dedb0f5fd%22%2C%22autoupdateVersionRefreshable%22%3A%222e3d97ec0e76d08f57e5d3df47d20c6738ba4905%22%2C%22autoupdateVersionCordova%22%3A%22none%22%7D"));</script>

  <script type="text/javascript" src="/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18"></script>
  <script type="text/javascript" src="/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf"></script>
  <script type="text/javascript" src="/packages/json.js?e22856eae714c681199eabc5c0710b904b125554"></script>
  <script type="text/javascript" src="/packages/base64.js?1a63019243b73298e2964e6d4680f25bca657726"></script>
  <script type="text/javascript" src="/packages/ejson.js?71047b64b5196348bdbe5fd5eea9ac97a5a9eb14"></script>
  <script type="text/javascript" src="/packages/logging.js?07e201b648f16be8435a4f666156995eeda0c750"></script>
  <script type="text/javascript" src="/packages/reload.js?da8974b7231dd8c0caccb5f322dcf97329d486d1"></script>
  <script type="text/javascript" src="/packages/tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c"></script>
  <script type="text/javascript" src="/packages/random.js?fe7b46080c91ce482acf6fc326afbc5b176f0502"></script>
  <script type="text/javascript" src="/packages/retry.js?1f1dd2c35d300110fdaba51ce4473583bc3bf031"></script>
  <script type="text/javascript" src="/packages/check.js?ac81167b8513b85b926c167bba423981b0c4cf9c"></script>
  <script type="text/javascript" src="/packages/id-map.js?9ea6eaae8d74693ce2505a858d9a5e60cf191298"></script>
  <script type="text/javascript" src="/packages/ordered-dict.js?bf8af2f26c8d96bf8b2e6b407d3ed69f23c2cd37"></script>
  <script type="text/javascript" src="/packages/geojson-utils.js?81b79d5cf96d00b4b7a28987debcffb665c17526"></script>
  <script type="text/javascript" src="/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c"></script>
  <script type="text/javascript" src="/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706"></script>
  <script type="text/javascript" src="/packages/insecure.js?3dc9d4a2dad55999b5b15a447d57f3d5fb66b290"></script>
  <script type="text/javascript" src="/packages/mongo.js?3cfe0c5981c197df33036a37574850f057e934a6"></script>
  <script type="text/javascript" src="/packages/autoupdate.js?9a5ea03bf057815385bf569c7acc2c285c005491"></script>
  <script type="text/javascript" src="/packages/meteor-platform.js?499a2f8522e25820b1153c69a92751ccaae507b3"></script>
  <script type="text/javascript" src="/packages/autopublish.js?c3059a78bb200b171099fc4fa1a9345101790ddb"></script>
  <script type="text/javascript" src="/packages/meteorhacks_aggregate.js?ccb22d98e1b9f4c4077b31f8c35d1a6f2f5a2228"></script>
  <script type="text/javascript" src="/packages/jquery.js?dd8bac56f8fd3666d433d2285ae01e52597cc51a"></script>
  <script type="text/javascript" src="/packages/twbs_bootstrap.js?e448ccf9152d78f24a6299968e1f39c997a02dbc"></script>
  <script type="text/javascript" src="/packages/deps.js?504589e1e9585dec8f9f6094e5a87b22de3783a1"></script>
  <script type="text/javascript" src="/packages/htmljs.js?567eb96d5d22631c03d6aca6afa4c42f0d1295f2"></script>
  <script type="text/javascript" src="/packages/observe-sequence.js?0532a9dd76dd78f543eb4d79a1e429df186d8bde"></script>
  <script type="text/javascript" src="/packages/reactive-var.js?20335b7b37165980ddd9f23943b2e5b00aae1cc2"></script>
  <script type="text/javascript" src="/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51"></script>
  <script type="text/javascript" src="/packages/ui.js?5a663333fd30f8fd913f110e0ef779e84f67c4b8"></script>
  <script type="text/javascript" src="/packages/reactive-dict.js?1cb61826ceb23464171f17c2191c7e04a9b91508"></script>
  <script type="text/javascript" src="/packages/session.js?daf192a7244079d45db32a6fc26ebc3881fc1aa3"></script>
  <script type="text/javascript" src="/packages/raix_handlebar-helpers.js?7d3b7f73925dd049e8e445e82fec12071446eebe"></script>
  <script type="text/javascript" src="/packages/webapp.js?e1be090051b82f046484dccc2de7d747e50c7328"></script>
  <script type="text/javascript" src="/packages/livedata.js?718526445deb4d9baacb6d92c551adea1d36c1e1"></script>
  <script type="text/javascript" src="/packages/templating.js?376767bb0d2463b3b2615a1b90e77f6b22d39d7b"></script>
  <script type="text/javascript" src="/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f"></script>
  <script type="text/javascript" src="/packages/launch-screen.js?495e58cf2465ba553324c68301cc62076b1fda1e"></script>
  <script type="text/javascript" src="/packages/global-imports.js?ec6113c4a4c1da16253432438a6de01b494bdab1"></script>
  <script type="text/javascript" src="/template.a.js?91c59e8a695ea146061daed42c0f82727dbf1a78"></script>
  <script type="text/javascript" src="/a.js?4d07dccb999b1199311e4410613330967aed6ccd"></script>



<title>dxpauth</title>
    <!-- end: CLIP-TWO CSS -->
    <!-- start: CSS REQUIRED FOR THIS PAGE ONLY -->
    <link href="client/vendor/select2/select2.min.css" rel="stylesheet" media="screen">
    <link href="client/vendor/DataTables/css/DT_bootstrap.css" rel="stylesheet" media="screen">
</head>
<body>

</body>
</html>

编辑:

流星列表

autopublish             1.0.3  Publish the entire database to all clients
insecure                1.0.3  Allow all database writes by default
meteor-platform         1.2.2  Include a standard set of Meteor packages in your app
meteorhacks:aggregate   1.2.1  Proper MongoDB aggregations support for Meteor
raix:handlebar-helpers  0.2.4  Handlebar helpers
twbs:bootstrap          3.3.4  The most popular front-end framework for developing responsive, mobile first projects on the web

0 个答案:

没有答案