File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
src/components/CodemirrorEditor Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,19 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章
76
76
示例代码:
77
77
78
78
``` js
79
- const { file , util , okCb , errCb } = CUSTOM_ARG ;
80
- const param = new FormData ();
81
- param .append (` file` , file);
79
+ const { file , util , okCb , errCb } = CUSTOM_ARG
80
+ const param = new FormData ()
81
+ param .append (` file` , file)
82
82
util .axios
83
83
.post (` http://127.0.0.1:9000/upload` , param, {
84
- headers: { " Content-Type" : ` multipart/form-data` },
84
+ headers: { ' Content-Type' : ` multipart/form-data` },
85
85
})
86
86
.then ((res ) => {
87
- okCb (res .url );
87
+ okCb (res .url )
88
88
})
89
89
.catch ((err ) => {
90
- errCb (err);
91
- });
90
+ errCb (err)
91
+ })
92
92
93
93
// 提供的可用参数:
94
94
// CUSTOM_ARG = {
Original file line number Diff line number Diff line change @@ -90,9 +90,10 @@ function delPost() {
90
90
:key =" post.title"
91
91
href =" #"
92
92
:class =" {
93
- 'bg-primary text-primary-foreground': store.currentPostIndex === index,
93
+ 'bg-primary text-primary-foreground shadow-lg border-2 border-primary': store.currentPostIndex === index,
94
+ 'dark:bg-primary-dark dark:text-primary-foreground-dark dark:border-primary-dark': store.currentPostIndex === index,
94
95
}"
95
- class =" hover:bg-primary/90 hover:text-primary-foreground dark:bg-muted dark:hover:bg-muted h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:text-white"
96
+ class =" hover:bg-primary/90 hover:text-primary-foreground dark:bg-muted dark:hover:bg-muted dark:hover:border-primary-dark h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:text-white"
96
97
@click =" store.currentPostIndex = index"
97
98
>
98
99
<span class =" line-clamp-1" >{{ post.title }}</span >
You can’t perform that action at this time.
0 commit comments