File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- VUE_APP_BASE_URL = http://localhost:8080/frickl/v1.2 .0/api/
1+ VUE_APP_BASE_URL = http://localhost:8080/frickl/v2.1 .0/api/
22# VUE_APP_BASE_URL=./api/
Original file line number Diff line number Diff line change @@ -39,12 +39,6 @@ export default {
3939 type: {
4040 type: String ,
4141 default: null
42- },
43- prefilledTags: {
44- type: Array ,
45- default : function () {
46- return []
47- }
4842 }
4943 },
5044 components: {
@@ -75,7 +69,9 @@ export default {
7569 })
7670
7771 if (this .tempInput !== null && this .tempInput .length > 0 ) {
78- mappedTags .push (this .tempInput )
72+ mappedTags .push ({
73+ name: this .tempInput
74+ })
7975 }
8076
8177 if (this .type === ' image' ) {
@@ -90,25 +86,22 @@ export default {
9086 })
9187 }
9288 },
89+ update : function () {
90+ this .apiGetTags (result => {
91+ this .allTags = result .map (t => {
92+ return {
93+ text: t .tag .name
94+ }
95+ })
96+ })
97+ },
9398 show () {
99+ this .newTags = []
100+ this .allTags = []
101+ this .update ()
102+
94103 this .$nextTick (() => this .$refs .addTagModal .show ())
95104 }
96- },
97- mounted : function () {
98- this .apiGetTags (result => {
99- this .allTags = result .map (t => {
100- return {
101- text: t .tag .name
102- }
103- })
104- })
105-
106- this .newTags = this .prefilledTags .map (t => {
107- return {
108- text: t,
109- classes: ' bg-primary'
110- }
111- })
112105 }
113106}
114107 </script >
You can’t perform that action at this time.
0 commit comments