title: VueJS accessing externaly imported method in vue component
body: <p>I have an External Java Script File
  <strong>something.js</strong></p>
  
  <pre><code>function myFun(){
    document.getElementById("demo").innerHTML="Hello World!";
    }
  
  export default myFun;
  </code></pre>
  
  <p>and this is my vue component
  <strong>Dashboard.vue</strong></p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          &lt;button type="button" name="button" @click=""&gt;Call External JS&lt;/button&gt;
          &lt;div id="demo"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import something from "./something.js"
  export default {
  
  created(){
  }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I have two questions.</p>
  
  <ol>
  <li>First how do I call this method inside the created life cycle hook to automatically run.</li>
  <li>Second how do I call this method by hitting the button "Call External JS"</li>
  </ol>
  
  <p>Of-cause I know to change the content of a div can easily done by vueJS without the help of pure JS external files. But I'm asking this question for clarify the concepts of how do I use external JS files inside the vue component.</p>
  
  <p>Thank you.</p>