天道酬勤,学无止境

vue-select

在laravel中导入vue包(Import vue package in laravel)

问题 在 laravel 5.6 中导入 vue 包的正确方法是什么? 它带有 vue 和 bootstrap 预安装。 我看到它们都是从 public 目录在 app.js 中编译的,但我可以弄清楚如何导入 https://github.com/moreta/vue-search-select 并使用它。 在我尝试自己导入之后: 错误: ncaught TypeError: Vue.component is not a function 在线: Vue.component('search-user', __webpack_require__(42)); 直到现在我试过这个: 资产/js/bootstrap.js: import { BasicSelect } from 'vue-search-select'; window.BasicSelect = BasicSelect; 资产/js/app.js: require('./bootstrap'); window.Vue = require('vue'); window.Vue = require('vue-search-select'); Vue.component('search-user', require('./components/SearchUser.vue')); var app = new Vue({ el: '

2021-10-21 18:00:21    分类:技术分享    vue.js   vue-component   laravel-5.6   vue-select

Import vue package in laravel

What is the corect way to import vue packages in laravel 5.6? It comes with vue and bootstrap preinstall. I see they are all compile in app.js from public directory but I can figure out how to import https://github.com/moreta/vue-search-select and use it. After I tried to import it on my own: Error: ncaught TypeError: Vue.component is not a function At line: Vue.component('search-user', __webpack_require__(42)); Until now I tried this: assets/js/bootstrap.js: import { BasicSelect } from 'vue-search-select'; window.BasicSelect = BasicSelect; assets/js/app.js: require('./bootstrap'); window.Vue

2021-05-11 04:11:33    分类:问答    vue.js   vue-component   laravel-5.6   vue-select