【发布时间】:2021-01-07 00:24:22
【问题描述】:
我是 nuxtjs 的新手,我正在尝试将 vue 组件导入到 nuxt。
我在我的项目中使用 vuetify,我想使用这个插件 https://vuejsexamples.com/date-range-picker-for-vuetify-js/,它是一个日期范围选择器。
我已经使用npm 添加了组件。
我的nuxt.config.js 看起来像这样:
...
// Global CSS (https://go.nuxtjs.dev/config-css)
css: [
{ src: '~/node_modules/vuetify-daterange-picker/dist/vuetify-daterange-picker.css' }
],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [
],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// https://go.nuxtjs.dev/eslint
//'@nuxtjs/eslint-module',
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify',
'~/node_modules/vuetify-daterange-picker'
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxt/content',
],
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: {},
// Content module configuration (https://go.nuxtjs.dev/config-content)
content: {},
...
【问题讨论】:
标签: javascript vue.js import module nuxt.js