PLDaily / vue2-waterfall

😁 An AutoHeight Waterfall Component For Vue2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问script 标签引入脚本的时候,全局变量 Vue2Waterfall怎么访问?

loje opened this issue · comments

commented

也可以在 html 文件中使用 script 标签引入脚本,访问全局变量 Vue2Waterfall

<script src="dist/vue2-waterfall.js"></script>

vue.min.js:580 [Vue warn]: Unknown custom element: <waterfall> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
vue.min.js:580 [Vue warn]: Unknown custom element: <waterfallitem> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>vue2-waterfall</title>
</head>
<body>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
  <script type="text/javascript" src="./dist/vue2-waterfall.js"></script>
  <script>
    console.log(Vue2Waterfall)
  </script>
</body>
</html>