From 71b92b0c6d3d7efd603d9fcb84506be0cbf0e4a6 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期一, 08 八月 2022 18:20:39 +0800
Subject: [PATCH] 完善Readme
---
src/components/Administrator/Edit copy.vue | 66 ++++++++++++++++----------------
1 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/components/Administrator/Edit copy.vue b/src/components/Administrator/Edit copy.vue
index 385da2b..92eeee7 100644
--- a/src/components/Administrator/Edit copy.vue
+++ b/src/components/Administrator/Edit copy.vue
@@ -1,11 +1,11 @@
<template>
<div class="box">
<el-row>{{ $route.query.title }}</el-row>
- 鏂伴椈鏍囬锛�<el-input v-model="title" placeholder="璇疯緭鍏ユ柊闂绘爣棰�"></el-input><br/><br/>
- 鍙戝竷鏃ユ湡锛�<el-date-picker format="yyyy 骞� MM 鏈� dd 鏃�" value-format="yyyy-MM-dd" v-model="releaseTime" placeholder="璇烽�夋嫨鏂伴椈鍙戝竷鏃ユ湡"></el-date-picker><br/><br/>
+ 鏂伴椈鏍囬锛�<el-input v-model="title" placeholder="璇疯緭鍏ユ柊闂绘爣棰�"></el-input><br /><br />
+ 鍙戝竷鏃ユ湡锛�<el-date-picker format="yyyy 骞� MM 鏈� dd 鏃�" value-format="yyyy-MM-dd" v-model="releaseTime" placeholder="璇烽�夋嫨鏂伴椈鍙戝竷鏃ユ湡"></el-date-picker><br /><br />
鏂伴椈鍐呭锛�<quill-editor ref="text" v-model="content" class="myQuillEditor" :options="editorOption" />
<el-row style="margin-top:50px;">
- <el-button type="success" @click="submit">鍙戝竷</el-button>
+ <el-button type="success" @click="submit">鍙戝竷</el-button>
</el-row>
</div>
</template>
@@ -16,45 +16,45 @@
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default {
- components:{ quillEditor },
- data(){
+ components: { quillEditor },
+ data() {
return {
- title:'', //鏍囬鍐呭
- releaseTime:'', //鍙戝竷鏃ユ湡
- content: '', //鏂伴椈鍐呭
- newsCategoryId:2,
+ title: '', //鏍囬鍐呭
+ releaseTime: '', //鍙戝竷鏃ユ湡
+ content: '', //鏂伴椈鍐呭
+ newsCategoryId: 2,
editorOption: {
- placeholder: "璇疯緭鍏ユ鏂�",
+ placeholder: '璇疯緭鍏ユ鏂�',
// editorOption閲屾槸鏀惧浘鐗囦笂浼犻厤缃弬鏁扮敤鐨勶紝渚嬪锛�
- action: '/api/product/richtext_img_upload.do', // 蹇呭~鍙傛暟 鍥剧墖涓婁紶鍦板潃
- methods: 'POST', // 蹇呭~鍙傛暟 鍥剧墖涓婁紶鏂瑰紡
- token: '', // 鍙�夊弬鏁� 濡傛灉闇�瑕乼oken楠岃瘉锛屽亣璁句綘鐨則oken鏈夊瓨鏀惧湪sessionStorage
- name: 'upload_file', // 蹇呭~鍙傛暟 鏂囦欢鐨勫弬鏁板悕
- size: 10000000, // 鍙�夊弬鏁� 鍥剧墖澶у皬锛屽崟浣嶄负Kb, 1M = 1024Kb
- accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg' // 鍙�� 鍙笂浼犵殑鍥剧墖鏍煎紡
- } , //缂栬緫鍣ㄦ柊闂诲璞�
- fileList:[],
+ action: '/api/product/richtext_img_upload.do', // 蹇呭~鍙傛暟 鍥剧墖涓婁紶鍦板潃
+ methods: 'POST', // 蹇呭~鍙傛暟 鍥剧墖涓婁紶鏂瑰紡
+ token: '', // 鍙�夊弬鏁� 濡傛灉闇�瑕乼oken楠岃瘉锛屽亣璁句綘鐨則oken鏈夊瓨鏀惧湪sessionStorage
+ name: 'upload_file', // 蹇呭~鍙傛暟 鏂囦欢鐨勫弬鏁板悕
+ size: 10000000, // 鍙�夊弬鏁� 鍥剧墖澶у皬锛屽崟浣嶄负Kb, 1M = 1024Kb
+ accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg' // 鍙�� 鍙笂浼犵殑鍥剧墖鏍煎紡
+ }, //缂栬緫鍣ㄦ柊闂诲璞�
+ fileList: []
}
},
- created(){
+ created() {
// console.log('>>>>>>>',this.$route.query.id);
this.newsCategoryId = this.$route.query.id
},
- methods:{
- submit(){
+ methods: {
+ submit() {
const data = {
- newsCategoryId:this.newsCategoryId,
- content:this.content,
- title:this.title,
- releaseTime:this.releaseTime
+ newsCategoryId: this.newsCategoryId,
+ content: this.content,
+ title: this.title,
+ releaseTime: this.releaseTime
}
add(data).then(res => {
- console.log(res);
- if(res.code !== 200){
+ console.log(res)
+ if (res.code !== 200) {
return this.$message.error('鍙戝竷鏂伴椈澶辫触锛岃閲嶈瘯锛�')
- }else{
+ } else {
this.$message.success('鏂伴椈鍙戝竷鎴愬姛锛�')
- console.log(this.content);
+ console.log(this.content)
this.$router.go(-1)
}
})
@@ -64,16 +64,16 @@
</script>
<style lang="less" scoped>
-.box{
+.box {
width: 1200px;
margin: 0 auto;
}
-.myQuillEditor{
+.myQuillEditor {
height: 350px;
}
-.btn{
+.btn {
position: absolute;
bottom: 20px;
left: 168px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0