app.js 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * First we will load all of this project's JavaScript dependencies which
  3. * includes Vue and other libraries. It is a great starting point when
  4. * building robust, powerful web applications using Vue and Laravel.
  5. */
  6. require('./bootstrap');
  7. window.Clipboard = require('clipboard');
  8. require('./notify.min.js');
  9. import Vue from 'vue'
  10. import VueRouter from 'vue-router'
  11. Vue.use(VueRouter)
  12. import App from './views/App'
  13. import Welcome from './views/Welcome'
  14. const router = new VueRouter({
  15. mode: 'history',
  16. routes: [
  17. {
  18. path: '/',
  19. name: 'home',
  20. component: Welcome
  21. },
  22. ],
  23. })
  24. const app = new Vue({
  25. el: '#app',
  26. components: { App },
  27. router,
  28. })
  29. $(function () {
  30. $('[data-toggle="tooltip"]').tooltip()
  31. });
  32. var clipboard = new Clipboard('.btn-clip');
  33. clipboard.on('success', function(e) {
  34. $('#' + e.trigger.getAttribute('id')).notify('Copied to Clipboard', {position:"right", className:'success'});
  35. e.clearSelection();
  36. });