Commit bb26980 1 parent 5501cc6 commit bb26980 Copy full SHA for bb26980
File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ const defaultPngPath = 'http://jietu-10024907.file.myqcloud.com/kblthjeuhituluuaalpiuyvfwrldpkrj.jpg'
2
+
3
+ export default {
4
+ name : 'lbp-picture' ,
5
+ render ( ) {
6
+ return < img src = { this . imgSrc || defaultPngPath } alt = "" srcset = "" width = "100%" />
7
+ } ,
8
+ props : {
9
+ imgSrc : {
10
+ type : String ,
11
+ default : defaultPngPath
12
+ }
13
+ } ,
14
+ data : ( ) => ( {
15
+ defaultPngPath
16
+ } ) ,
17
+ editorConfig : {
18
+ propsConfig : {
19
+ imgSrc : {
20
+ type : 'picture-picker' ,
21
+ label : '' ,
22
+ require : true ,
23
+ widgetProps : {
24
+ value : '' ,
25
+ template : '%i' ,
26
+ } ,
27
+ } ,
28
+ } ,
29
+ components : {
30
+ // 'picture-picker': PicturePicker,
31
+ }
32
+ }
33
+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Vue from 'vue'
3
3
import CoreEditor from ' ../components/core/editor'
4
4
5
5
import LbpButton from ' ../components/plugins/lbp-button'
6
+ import LbpPicture from ' ../components/plugins/lbp-picture'
6
7
7
8
const PluginList = [
8
9
{
@@ -11,6 +12,13 @@ const PluginList = [
11
12
component: LbpButton,
12
13
visible: true ,
13
14
name: ' lbp-button'
15
+ },
16
+ {
17
+ title: ' 图片' ,
18
+ icon: ' file-image-o' ,
19
+ component: LbpPicture,
20
+ visible: true ,
21
+ name: ' lbp-picture'
14
22
}
15
23
]
16
24
You can’t perform that action at this time.
0 commit comments