添加提醒功能

This commit is contained in:
yi-ge 2020-09-20 16:57:04 +08:00
parent 26cdfd79b2
commit dbebc68cb0
6 changed files with 104 additions and 6 deletions

View File

@ -29,7 +29,7 @@
"strip-markdown": "^3.1.2", "strip-markdown": "^3.1.2",
"v-viewer": "^1.5.1", "v-viewer": "^1.5.1",
"vditor": "^3.3.8", "vditor": "^3.3.8",
"vue-js-modal": "^2.0.0-rc.3", "vue-js-modal": "^2.0.0-rc.6",
"vue-toasted": "^1.1.28" "vue-toasted": "^1.1.28"
}, },
"devDependencies": { "devDependencies": {

47
pages/p.vue Normal file
View File

@ -0,0 +1,47 @@
<template lang="pug">
.pClass
Form(ref='form', :model='form', label-width='120px')
FormItem(label='请输入文章编号')
Input(v-model='form.no', size='small', @keyup.enter='onSubmit')
FormItem
Button(type='primary', size='small', @click='onSubmit')
| 确定
</template>
<script>
import { Form, FormItem, Input, Switch, Button } from 'element-ui'
export default {
layout: 'auth',
components: {
Form, FormItem, Input, VueSwitch: Switch, Button
},
data () {
return {
form: {
no: ''
}
}
},
mounted () {
this.$finishLoad()
},
methods: {
onSubmit () {
if (!this.form.no) {
alert('请输入文章编号')
return
}
this.$router.push('/post/' + this.form.no + '#comment')
}
}
}
</script>
<style lang="stylus" scoped>
.pClass
width 100%
height 100%
padding 50px 20px
box-sizing border-box
</style>

View File

@ -951,6 +951,9 @@ $qrcode-width = 96px
$qrcode-height = 96px $qrcode-height = 96px
$logo-width = 64px $logo-width = 64px
modal
display none
.postPage .postPage
.articleDetails .articleDetails
margin-top 30px margin-top 30px

47
pages/post/p.vue Normal file
View File

@ -0,0 +1,47 @@
<template lang="pug">
.pClass
Form(ref='form', :model='form', label-width='120px')
FormItem(label='请输入文章编号')
Input(v-model='form.no', size='small', @keyup.enter='onSubmit')
FormItem
Button(type='primary', size='small', @click='onSubmit')
| 确定
</template>
<script>
import { Form, FormItem, Input, Switch, Button } from 'element-ui'
export default {
layout: 'auth',
components: {
Form, FormItem, Input, VueSwitch: Switch, Button
},
data () {
return {
form: {
no: ''
}
}
},
mounted () {
this.$finishLoad()
},
methods: {
onSubmit () {
if (!this.form.no) {
alert('请输入文章编号')
return
}
this.$router.push('/post/' + this.form.no + '#comment')
}
}
}
</script>
<style lang="stylus" scoped>
.pClass
width 100%
height 100%
padding 50px 20px
box-sizing border-box
</style>

View File

@ -1,4 +1,5 @@
import Vue from 'vue' import Vue from 'vue'
import VModal from 'vue-js-modal' import VModal from 'vue-js-modal/dist/ssr.nocss'
import 'vue-js-modal/dist/styles.css'
Vue.use(VModal, { dialog: true }) Vue.use(VModal, { dialog: true })

View File

@ -9264,10 +9264,10 @@ vue-hot-reload-api@^2.3.0:
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2" resolved "https://mirrors.huaweicloud.com/repository/npm/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-js-modal@^2.0.0-rc.3: vue-js-modal@^2.0.0-rc.6:
version "2.0.0-rc.3" version "2.0.0-rc.6"
resolved "https://registry.yarnpkg.com/vue-js-modal/-/vue-js-modal-2.0.0-rc.3.tgz#c34b33305af10b4ccecdbb381dd58efbb19e2862" resolved "https://registry.npm.taobao.org/vue-js-modal/download/vue-js-modal-2.0.0-rc.6.tgz#2fd596c79a713d2cbf447150abb5fefce65efd2d"
integrity sha512-Q9L9FsIUMuzCKSuB41D8LxV+Yc2q+zWHzzUdWaQ2KeHPS+78+X6AAnBztVoophbjt8UXHO7rQSRgER1MMw5qsw== integrity sha1-L9WWx5pxPSy/RHFQq7X+/OZe/S0=
dependencies: dependencies:
resize-observer-polyfill "^1.5.1" resize-observer-polyfill "^1.5.1"