@jx3box/jx3box-vue3-ui 0.4.10 → 0.4.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-vue3-ui",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -21,6 +21,7 @@
21
21
  </LeftSidebar>
22
22
 
23
23
  <Main :withoutLeft="false" :withoutRight="false">
24
+ <!-- <Admin :fromList="true" :show="true" :postId="post_id" @update="update"></Admin> -->
24
25
  <!-- <clientBy @filter="filterMeta" :type="client"></clientBy>
25
26
 
26
27
  <markBy @filter="filterMeta"></markBy>
@@ -84,6 +85,7 @@ import PostTopic from "./single/PostTopic.vue";
84
85
  import axios from "axios";
85
86
  import post_topics from "@jx3box/jx3box-common/data/post_topics.json";
86
87
  import { get_item } from "../service/item";
88
+ // import Admin from "@/bread/Admin.vue";
87
89
  export default {
88
90
  name: "App",
89
91
  components: {
@@ -94,6 +96,7 @@ export default {
94
96
  PostHeader,
95
97
  PostTopic,
96
98
  UploadAlum,
99
+ // Admin,
97
100
  },
98
101
  data() {
99
102
  return {
@@ -120,6 +123,9 @@ export default {
120
123
  },
121
124
  },
122
125
  methods: {
126
+ update(data) {
127
+ console.log(data);
128
+ },
123
129
  loadPost() {
124
130
  axios.get(`/api/cms/post/${this.post_id}`).then((res) => {
125
131
  this.post = res.data.data;
@@ -116,6 +116,22 @@ import MARK from "@jx3box/jx3box-common/data/mark.json";
116
116
  // import { onClickOutside } from "@vueuse/core";
117
117
  export default {
118
118
  name: "BreadAdmin",
119
+ emits: ["update"],
120
+ props: {
121
+ // 入口是否是后台管理/list
122
+ fromList: {
123
+ type: Boolean,
124
+ default: false,
125
+ },
126
+ show: {
127
+ type: Boolean,
128
+ default: false,
129
+ },
130
+ postId: {
131
+ type: [Number, String],
132
+ default: 0,
133
+ },
134
+ },
119
135
  data() {
120
136
  return {
121
137
  // 可视
@@ -261,6 +277,7 @@ export default {
261
277
  push: function () {
262
278
  postSetting(this.data)
263
279
  .then(() => {
280
+ this.$emit("update", this.data);
264
281
  this.$message({
265
282
  message: "设置成功",
266
283
  type: "success",
@@ -276,6 +293,18 @@ export default {
276
293
  "$route.params.id": function () {
277
294
  this.checkPostID();
278
295
  },
296
+ show: {
297
+ immediate: true,
298
+ handler(bol) {
299
+ if (this.fromList) {
300
+ this.dialog_visible = bol;
301
+ if (bol) {
302
+ this.pid = this.postId;
303
+ this.pull();
304
+ }
305
+ }
306
+ },
307
+ },
279
308
  },
280
309
  created: function () {
281
310
  // 是否mount