Vue.js 如何在vue js网页包中包含插件和导入css文件

Vue.js 如何在vue js网页包中包含插件和导入css文件,vue.js,vuejs2,vue-component,Vue.js,Vuejs2,Vue Component,我在main.js中包含了插件及其css文件:- 从“Vue”导入Vue 从“./App”导入应用程序 从“./路由器”导入路由器 导入“时刻” 导入“jquery” 导入“引导” 从“vue引导日期时间选择器”导入引导更新日期选择器 从“vue multiselect”导入vueMultiSelect 从“vue表单生成器”导入VueFormGenerator 导入“bootstrap/dist/css/bootstrap.css” 导入“bootstrap vue/dist/bootstr

我在main.js中包含了插件及其css文件:-

从“Vue”导入Vue 从“./App”导入应用程序 从“./路由器”导入路由器 导入“时刻” 导入“jquery” 导入“引导” 从“vue引导日期时间选择器”导入引导更新日期选择器 从“vue multiselect”导入vueMultiSelect 从“vue表单生成器”导入VueFormGenerator 导入“bootstrap/dist/css/bootstrap.css” 导入“bootstrap vue/dist/bootstrap vue.css” 导入“vue multiselect/dist/vue multiselect.min.css” 导入“eonasdan bootstrap datetimepicker/build/css/bootstrap datetimepicker.css” 导入“vue表单生成器/dist/vfg.css” Vue.config.productionTip=false Vue.使用{vueMultiSelect,VueFormGenerator} Vue.componentBootstrapDatePicker Vue.component'multiselect',vueMultiSelect.default Vue.component'Vue-form-generator',VueFormGenerator.component /*eslint禁用无新*/ 新Vue{ el:“应用程序”, 路由器, 模板:, 组件:{App}
} 如果要在Vue中导入和使用库而不必重新声明,请使用Vue原型:

Vue.prototype.$moment = require('moment')
然后在组件内部:

method: {
  action () {
    let date = this.$moment()
  }
}
您可以在此处阅读有关实例属性的更多信息: