rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
219 stars 57 forks source link

doesnt work #20

Closed NikolaiT closed 5 years ago

NikolaiT commented 5 years ago

when following your instructions by including the following scripts

    <link  rel="stylesheet"  href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"  crossorigin="anonymous">

    <script  src="https://code.jquery.com/jquery-3.2.1.slim.min.js"  crossorigin="anonymous"></script>

    <script  src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"  crossorigin="anonymous"></script>

    <script  src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"  crossorigin="anonymous"></script>

    <script  src="https://unpkg.com/vue-bootstrap4-table@1.0.28/dist/vue-bootstrap4-table.min.js"  crossorigin="anonymous"></script>

it yields the error

VM206 vue-bootstrap4-table.min.js:1 Uncaught ReferenceError: Vue is not defined
    at VM206 vue-bootstrap4-table.min.js:1

if i try to include vue js from some cdn

    <link  rel="stylesheet"  href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"  crossorigin="anonymous">

    <script  src="https://code.jquery.com/jquery-3.2.1.slim.min.js"  crossorigin="anonymous"></script>

    <script  src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"  crossorigin="anonymous"></script>

    <script  src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"  crossorigin="anonymous"></script>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.8/dist/vue.js"></script>

    <script  src="https://unpkg.com/vue-bootstrap4-table@1.0.28/dist/vue-bootstrap4-table.min.js"  crossorigin="anonymous"></script>

doesn't work either:

Uncaught SyntaxError: Unexpected identifier

Please provide a README with an exampel how to use your software over CDN that works when I copy paste it. I don't want to read through 100 variations to start using that software.

rubanraj54 commented 5 years ago

Hi @NikolaiT ,

The first error is valid since there is no vue library is included. I didn't mention to include vue.js file, because this is a vue based plugin. So developers who uses this plugin, they know there should be a vue library. Sorry for the inconvenience, I will update the README.

After you include the vue library, table component should definitely work and also the error is unclear. It is unsure to tell that the second error Uncaught SyntaxError: Unexpected identifier is coming from table plugin itself.

I made a simple codepen example (https://codepen.io/rubanraj54/pen/qvPBBr) with your code which you mentioned above and it works perfectly.

Cheers, Ruby.

rubanraj54 commented 5 years ago

Hi @NikolaiT

Closing this issue since there is no activity for a week. However, you can always reopen this issue or create a new one.

Cheers, Ruby.