From 4c6ad37f3ad40af7f4134f07bc823f28f066fa3f Mon Sep 17 00:00:00 2001 From: yige Date: Thu, 17 Sep 2020 21:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E7=BD=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuxt.config.js | 13 ++++++++- package.json | 2 ++ pages/post/_id.vue | 44 ++++++++++++++++++++++------ yarn.lock | 72 ++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 120 insertions(+), 11 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index 012813c..e0eaf06 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -120,7 +120,18 @@ module.exports = { }) } }, - vendor: ['moment'] + vendor: ['moment'], + babel: { + plugins: [ + [ + 'component', + { + libraryName: 'element-ui', + styleLibraryName: 'theme-chalk' + } + ] + ] + } }, env: { version: pkg.version, diff --git a/package.json b/package.json index 2c4a3ca..9ab802b 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@fortawesome/vue-fontawesome": "^0.1.8", "@nuxtjs/axios": "^5.8.0", "cross-env": "^6.0.3", + "element-ui": "^2.13.2", "highlight.js": "^9.17.1", "koa": "^2.11.0", "moment": "^2.27.0", @@ -34,6 +35,7 @@ "devDependencies": { "@nuxtjs/eslint-config": "^2.0.0", "babel-eslint": "^10.0.3", + "babel-plugin-component": "^1.1.1", "eslint": "^6.7.2", "eslint-config-standard": ">=14.1.0", "eslint-loader": "^3.0.3", diff --git a/pages/post/_id.vue b/pages/post/_id.vue index f8b375e..b3f759b 100644 --- a/pages/post/_id.vue +++ b/pages/post/_id.vue @@ -159,11 +159,19 @@ .btnFooter.btnNext(:style='"color: " + (articels.next ? "#333" : "#ccc")') | 下一篇 {{ articels.next ? "(" + decodeTitle(articels.next.post_name) + ")" : "" }}   Icon(:icon='["fas", "chevron-right"]') - modal(name='setting') - div - | 此功能正在开发中,敬请期待。 - .vue-module-buttons - button.vue-module-button( + modal.modal-setting(name='setting') + .vue-modal-content + Form(ref='form', :model='form', label-width='130px') + FormItem(label='手机号') + Input(v-model='form.phone') + FormItem(label='发送提醒到手机') + Switch(v-model='form.sendPhone') + FormItem(label='邮箱') + Input(v-model='form.phone') + FormItem(label='发送提醒到邮箱') + Switch(v-model='form.sendEmail') + .vue-modal-buttons + button.vue-modal-button( type='button', @click.stop='$modal.hide("setting")' ) @@ -173,8 +181,12 @@