VeeValidate-通过CDN安装不起作用

时间:2018-11-06 10:33:37

标签: cdn vue-cli-3 vee-validate

我正在通过html文件中的CDN来安装VeeValidate,如下所示,控制台会不断记录

[Vue warn]: Failed to resolve directive: validate

当我尝试在组件中使用v-validate指令时。

那么通过CDN将其安装在Vue项目中是正确的方法吗?我正在使用Vue CLI 3。

请帮助我! 谢谢。

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title></title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
  </head>
  <body>
    <noscript>
      <strong>We're sorry but ... doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->

    <script type="text/javascript" src="https://cdn.jsdelivr.net/vee-validate/2.0.0-beta.13/vee-validate.min.js"></script>

</html>

0 个答案:

没有答案