File tree 2 files changed +37
-40
lines changed
src/utils/crud/components
2 files changed +37
-40
lines changed Original file line number Diff line number Diff line change 130
130
<v-col >
131
131
<span class =" tree-item__field-value" >
132
132
<slot
133
- :name =" `field:${header.value }`"
134
- :value =" item[header .value] "
133
+ :name =" `field:${field.name }`"
134
+ :value =" field .value"
135
135
:item =" item"
136
136
>
137
137
<list-item-field
138
- :value =" item[header .value] "
139
- :text-mode =" textMode(item, header.value )"
138
+ :value =" field .value"
139
+ :text-mode =" textMode(item, field.name )"
140
140
/>
141
141
</slot >
142
142
</span >
@@ -207,6 +207,7 @@ export default {
207
207
const computeFields = (item ) => {
208
208
return this .tableFields .map (field => {
209
209
return {
210
+ name: field .name ,
210
211
label: field .text ,
211
212
value: item[field .name ],
212
213
}
Original file line number Diff line number Diff line change @@ -46,41 +46,6 @@ export default {
46
46
field: {
47
47
type: Object ,
48
48
},
49
- availableExtensions: {
50
- type: Array ,
51
- default : () => {
52
- return [
53
- ' History' ,
54
- ' Bold' ,
55
- ' Italic' ,
56
- ' Underline' ,
57
- ' Strike' ,
58
- ' Paragraph' ,
59
- ' ListItem' ,
60
- ' BulletList' ,
61
- ' OrderedList' ,
62
- {
63
- name: ' Heading' ,
64
- options: {
65
- levels: [
66
- 1 ,
67
- 2 ,
68
- 3 ,
69
- 4 ,
70
- 5 ,
71
- 6 ,
72
- ],
73
- },
74
- },
75
- ' HardBreak' ,
76
- ' HorizontalRule' ,
77
- ' Blockquote' ,
78
- ' Code' ,
79
- ' Link' ,
80
- ' Image' ,
81
- ]
82
- },
83
- },
84
49
},
85
50
data : () => ({
86
51
content: ' ' ,
@@ -102,11 +67,42 @@ export default {
102
67
History ,
103
68
Image,
104
69
},
70
+ availableExtensions: [
71
+ ' History' ,
72
+ ' Bold' ,
73
+ ' Italic' ,
74
+ ' Underline' ,
75
+ ' Strike' ,
76
+ ' Paragraph' ,
77
+ ' ListItem' ,
78
+ ' BulletList' ,
79
+ ' OrderedList' ,
80
+ {
81
+ name: ' Heading' ,
82
+ options: {
83
+ levels: [
84
+ 1 ,
85
+ 2 ,
86
+ 3 ,
87
+ 4 ,
88
+ 5 ,
89
+ 6 ,
90
+ ],
91
+ },
92
+ },
93
+ ' HardBreak' ,
94
+ ' HorizontalRule' ,
95
+ ' Blockquote' ,
96
+ ' Code' ,
97
+ ' Link' ,
98
+ ' Image' ,
99
+ ],
105
100
}),
106
101
computed: {
107
102
extensions () {
108
103
const extensions = []
109
- for (const extension of this .availableExtensions ) {
104
+ const selectedExtensions = this .field .richTextBoxOperations || this .availableExtensions
105
+ for (const extension of selectedExtensions) {
110
106
if (extension) {
111
107
if (typeof extension === ' string' && this .extensionsExists (extension)) {
112
108
extensions .push (this .extensionsMap [extension])
You can’t perform that action at this time.
0 commit comments