@jx3box/jx3box-common-ui 6.0.4 → 6.0.5
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/package.json +1 -1
- package/src/single/cms-single.vue +13 -0
package/package.json
CHANGED
|
@@ -59,6 +59,7 @@ import Article from "@jx3box/jx3box-editor/src/Article.vue";
|
|
|
59
59
|
import ArticleMarkdown from "@jx3box/jx3box-editor/src/ArticleMarkdown.vue";
|
|
60
60
|
import Comment from "@jx3box/jx3box-comment-ui/src/Comment.vue";
|
|
61
61
|
import { __visibleMap } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
62
|
+
import { getAppType } from '@jx3box/jx3box-common/js/utils'
|
|
62
63
|
export default {
|
|
63
64
|
name: "cms-single",
|
|
64
65
|
components: {
|
|
@@ -85,6 +86,9 @@ export default {
|
|
|
85
86
|
id: function() {
|
|
86
87
|
return ~~this.post?.ID || 0;
|
|
87
88
|
},
|
|
89
|
+
app_type: function() {
|
|
90
|
+
return getAppType();
|
|
91
|
+
},
|
|
88
92
|
post_type: function() {
|
|
89
93
|
return this.post?.post_type;
|
|
90
94
|
},
|
|
@@ -157,6 +161,15 @@ export default {
|
|
|
157
161
|
handler : function (val){
|
|
158
162
|
this.$emit('extendUpdate',val)
|
|
159
163
|
}
|
|
164
|
+
},
|
|
165
|
+
post_type: {
|
|
166
|
+
deep : true,
|
|
167
|
+
immediate : true,
|
|
168
|
+
handler : function (val){
|
|
169
|
+
if (val && val !== this.app_type) {
|
|
170
|
+
location.href = `/${val}/${this.id}`
|
|
171
|
+
}
|
|
172
|
+
}
|
|
160
173
|
}
|
|
161
174
|
}
|
|
162
175
|
};
|