@jx3box/jx3box-common-ui 7.7.1 → 7.7.3
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/Box.vue +7 -2
- package/src/bread/ListAdmin.vue +24 -1
- package/src/header/nav.vue +6 -1
package/package.json
CHANGED
package/src/Box.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
href="/index"
|
|
12
12
|
v-reporter="{
|
|
13
13
|
data: {
|
|
14
|
-
item:
|
|
14
|
+
item: `${prefix}:/index`,
|
|
15
15
|
},
|
|
16
16
|
caller: 'index_nav_matrix',
|
|
17
17
|
}"
|
|
@@ -80,6 +80,9 @@ export default {
|
|
|
80
80
|
return item.status && (item.client == this.client || item.client == "all");
|
|
81
81
|
});
|
|
82
82
|
},
|
|
83
|
+
prefix: function (){
|
|
84
|
+
return this.client === 'std' ? 'www' : 'origin';
|
|
85
|
+
}
|
|
83
86
|
},
|
|
84
87
|
methods: {
|
|
85
88
|
closeBox: function () {
|
|
@@ -114,7 +117,9 @@ export default {
|
|
|
114
117
|
console.log("loadBox error", e);
|
|
115
118
|
}
|
|
116
119
|
},
|
|
117
|
-
trimSlash
|
|
120
|
+
trimSlash(link) {
|
|
121
|
+
return trimSlash(`${this.prefix}:${link}`);
|
|
122
|
+
},
|
|
118
123
|
},
|
|
119
124
|
created: function () {
|
|
120
125
|
if (this.overlayEnable) {
|
package/src/bread/ListAdmin.vue
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<el-tag size="medium" :type="item.status ? '' : 'info'">{{ item.name }}</el-tag>
|
|
25
25
|
<div class="m-bucket-op">
|
|
26
26
|
<el-button :type="item.status ? 'warning' : 'success'" plain size="mini" class="u-op-btn" :icon="item.status ? 'el-icon-download' : 'el-icon-upload2'" @click="update(item.id, item.status)">{{ item.status ? '下架' : '上架' }}</el-button>
|
|
27
|
+
<el-button @click="edit(item)" plain size="mini" icon="el-icon-edit">修改</el-button>
|
|
27
28
|
<el-button type="info" plain size="mini" class="u-op-btn" icon="el-icon-delete" @click="del(item.id)">删除</el-button>
|
|
28
29
|
</div>
|
|
29
30
|
</div>
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
<div class="c-admin-buttons">
|
|
34
35
|
<el-button type="success" @click="add" icon="el-icon-plus">新增</el-button>
|
|
35
|
-
<el-button type="plain" @click="close" icon="el-icon-close">关闭</el-button>
|
|
36
|
+
<!-- <el-button type="plain" @click="close" icon="el-icon-close">关闭</el-button> -->
|
|
36
37
|
</div>
|
|
37
38
|
</div>
|
|
38
39
|
</el-drawer>
|
|
@@ -140,6 +141,28 @@ export default {
|
|
|
140
141
|
})
|
|
141
142
|
.catch(() => {});
|
|
142
143
|
},
|
|
144
|
+
edit(item) {
|
|
145
|
+
this.$prompt("请输入主题名称", "修改主题", {
|
|
146
|
+
confirmButtonText: "确定",
|
|
147
|
+
cancelButtonText: "取消",
|
|
148
|
+
inputPattern: /\S+/,
|
|
149
|
+
inputErrorMessage: "主题名称不能为空",
|
|
150
|
+
inputValue: item.name,
|
|
151
|
+
})
|
|
152
|
+
.then(({ value }) => {
|
|
153
|
+
const data = {
|
|
154
|
+
name: value,
|
|
155
|
+
};
|
|
156
|
+
updateTopicBucket(item.id, data).then((res) => {
|
|
157
|
+
this.$message({
|
|
158
|
+
type: "success",
|
|
159
|
+
message: "修改成功!",
|
|
160
|
+
});
|
|
161
|
+
this.loadData();
|
|
162
|
+
});
|
|
163
|
+
})
|
|
164
|
+
.catch(() => {})
|
|
165
|
+
}
|
|
143
166
|
},
|
|
144
167
|
};
|
|
145
168
|
</script>
|
package/src/header/nav.vue
CHANGED
|
@@ -164,6 +164,9 @@ export default {
|
|
|
164
164
|
client() {
|
|
165
165
|
return location.href.includes("origin") ? "origin" : "std";
|
|
166
166
|
},
|
|
167
|
+
prefix() {
|
|
168
|
+
return this.client === 'std' ? 'www' : 'origin';
|
|
169
|
+
}
|
|
167
170
|
},
|
|
168
171
|
methods: {
|
|
169
172
|
isFocus: function (type) {
|
|
@@ -193,7 +196,9 @@ export default {
|
|
|
193
196
|
console.log("loadNav error", e);
|
|
194
197
|
}
|
|
195
198
|
},
|
|
196
|
-
trimSlash
|
|
199
|
+
trimSlash(link) {
|
|
200
|
+
return trimSlash(`${this.prefix}:${link}`);
|
|
201
|
+
},
|
|
197
202
|
},
|
|
198
203
|
created: function () {
|
|
199
204
|
this.loadNav();
|