diff --git a/examples/with-element-ui/layouts/default.vue b/examples/with-element-ui/layouts/default.vue new file mode 100644 index 000000000..184d6f6fd --- /dev/null +++ b/examples/with-element-ui/layouts/default.vue @@ -0,0 +1,10 @@ + diff --git a/examples/with-element-ui/nuxt.config.js b/examples/with-element-ui/nuxt.config.js new file mode 100644 index 000000000..643f79ee7 --- /dev/null +++ b/examples/with-element-ui/nuxt.config.js @@ -0,0 +1,15 @@ +module.exports = { + /* + ** Global CSS + */ + css: [ + 'element-ui/lib/theme-default/index.css' + ], + + /* + ** Add element-ui in our app, see plugins/element-ui.js file + */ + plugins: [ + '@/plugins/element-ui' + ] +} diff --git a/examples/with-element-ui/package.json b/examples/with-element-ui/package.json new file mode 100644 index 000000000..d5696a30e --- /dev/null +++ b/examples/with-element-ui/package.json @@ -0,0 +1,18 @@ +{ + "name": "with-element-ui", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "element-ui": "^1.4.9", + "nuxt": "latest" + }, + "scripts": { + "dev": "nuxt", + "build": "nuxt build", + "start": "nuxt start" + }, + "devDependencies": { + "node-sass": "^4.6.0", + "sass-loader": "^6.0.6" + } +} diff --git a/examples/with-element-ui/pages/index.vue b/examples/with-element-ui/pages/index.vue new file mode 100644 index 000000000..69c4a9277 --- /dev/null +++ b/examples/with-element-ui/pages/index.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/examples/with-element-ui/plugins/element-ui.js b/examples/with-element-ui/plugins/element-ui.js new file mode 100644 index 000000000..cb618add9 --- /dev/null +++ b/examples/with-element-ui/plugins/element-ui.js @@ -0,0 +1,7 @@ +import Vue from 'vue' +import Element from 'element-ui/lib/element-ui.common' +import locale from 'element-ui/lib/locale/lang/en' + +export default () => { + Vue.use(Element, { locale }) +}