@shaxpir/duiduidui-models 1.5.12 → 1.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/models/Term.js +14 -0
- package/package.json +1 -1
package/dist/models/Term.js
CHANGED
|
@@ -166,18 +166,32 @@ class Term extends Content_1.Content {
|
|
|
166
166
|
}
|
|
167
167
|
addUserTag(value) {
|
|
168
168
|
this.checkDisposed("Term.addUserTag");
|
|
169
|
+
console.log('[Term.addUserTag] Adding tag:', value);
|
|
170
|
+
console.log('[Term.addUserTag] Current tags:', this._userTagsView.values);
|
|
169
171
|
const index = this._userTagsView.indexOf(value);
|
|
170
172
|
if (index === -1) {
|
|
171
173
|
this._userTagsView.push(value);
|
|
172
174
|
this._updateTagCount();
|
|
175
|
+
console.log('[Term.addUserTag] Tag added, new tags:', this._userTagsView.values);
|
|
176
|
+
console.log('[Term.addUserTag] Document data after add:', JSON.stringify(this.doc.data.payload.user_tags));
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
console.log('[Term.addUserTag] Tag already exists, skipping');
|
|
173
180
|
}
|
|
174
181
|
}
|
|
175
182
|
removeUserTag(value) {
|
|
176
183
|
this.checkDisposed("Term.removeUserTag");
|
|
184
|
+
console.log('[Term.removeUserTag] Removing tag:', value);
|
|
185
|
+
console.log('[Term.removeUserTag] Current tags:', this._userTagsView.values);
|
|
177
186
|
const index = this._userTagsView.indexOf(value);
|
|
178
187
|
if (index !== -1) {
|
|
179
188
|
this._userTagsView.removeAt(index);
|
|
180
189
|
this._updateTagCount();
|
|
190
|
+
console.log('[Term.removeUserTag] Tag removed, new tags:', this._userTagsView.values);
|
|
191
|
+
console.log('[Term.removeUserTag] Document data after remove:', JSON.stringify(this.doc.data.payload.user_tags));
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
console.log('[Term.removeUserTag] Tag not found, skipping');
|
|
181
195
|
}
|
|
182
196
|
}
|
|
183
197
|
get lastReviewUtc() {
|