48 lines
928 B
Vue
48 lines
928 B
Vue
<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>
|