Coder Social home page Coder Social logo

sebastienbtr / vue-dashboard Goto Github PK

View Code? Open in Web Editor NEW
67.0 3.0 14.0 2.32 MB

A simple, lightweight and responsive layout for your next Vue.js dashboard

License: MIT License

JavaScript 3.79% HTML 3.81% Vue 74.55% TypeScript 17.85%
vuejs dashboard-widget dashboard-templates dashboard admin-dashboard admin-template

vue-dashboard's Issues

Width for sidebar

Hi Sebastien.
Is there an easy way to set up the sidebar width ?
Thanks !

报错了

Uncaught TypeError: Super expression must either be null or a function
at _inherits (inherits.js:4:11)
at VdHeader.vue:16:30
at Module.fb15 (VdHeader.vue:16:30)
at webpack_require (bootstrap:19:1)
at bootstrap:83:1
at node_modules/vue-dashboard-vd/dist/vue-dashboard-vd.common.js (bootstrap:83:1)
at __require (chunk-CF3WPAMV.js?v=8fe1e737:9:50)
at use-symbol-as-uid.js:6:1

error Expected 'this' to be used by class method 'hello' class-methods-use-this

Pretty sure it is not really an issue, but as a beginner on vue, I have no idea how to bring data on the dashboard using e.g. ESLint. Many of the examples here throw the error mentioned in the topic.

For example adding following lines to the Home.vue file

<template>
 <div>
  <h1 class="title">My patients charchteristics</h1>
  <button v-on:click="hello">Click</button>
 </div>
</template>

<script lang="ts">
import Vue from 'vue';
import Component from 'vue-class-component';

@Component({})
export default class Home extends Vue {
  // Declared as component method
   hello() {
    console.log('Hello World!');
  }
}
</script>

Failed to compile.

./src/views/Home.vue
Module Error (from ./node_modules/eslint-loader/index.js):

/Users/X/Documents/vue-super-dash-example/vue2-example/src/views/Home.vue
 15:8  error  Expected 'this' to be used by class method 'hello'  class-methods-use-this

✖ 1 problem (1 error, 0 warnings)

This also:

// See Hooks section for details about `data` hook inside class.
  data() {
     return {
      // `hello` will be reactive as it is declared via `data` hook.
      hello: undefined
    }
  }

I know about https://eslint.org/docs/rules/class-methods-use-this, but how to get data using API for instance?
Can you provide some links or help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.