qdt-admin-layout 1.1.15 → 1.1.17
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
|
@@ -149,6 +149,10 @@ export default {
|
|
|
149
149
|
|
|
150
150
|
// 模拟选中菜单
|
|
151
151
|
onSelect(index, indexPath, item, jump = true) {
|
|
152
|
+
if (indexPath.length > 20) {
|
|
153
|
+
this.$message.error("最多打开20个页面,请先关闭之前的页面再打开新页面");
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
152
156
|
// 非折叠且开启手风琴模式时,收起其它展开项
|
|
153
157
|
if (!asideGetters.collapse && asideGetters.uniqueOpen) {
|
|
154
158
|
const elMenu = this.$_getElMenuInstance();
|
|
@@ -177,19 +177,28 @@ export default {
|
|
|
177
177
|
* 关闭所选页签
|
|
178
178
|
* @param view {VisitedView}
|
|
179
179
|
*/
|
|
180
|
-
closeSelectedTag(view = this.selectedTag
|
|
181
|
-
if (["访销订单", "车销单", "销售出库单"].includes(
|
|
182
|
-
this.$confirm(`是否关闭${
|
|
180
|
+
closeSelectedTag(view = this.selectedTag) {
|
|
181
|
+
if (["访销订单", "车销单", "销售出库单"].includes(view.meta.title))
|
|
182
|
+
this.$confirm(`是否关闭${view.meta.title},没有保存的单据将会丢失?`, "提示", {
|
|
183
183
|
confirmButtonText: "确定",
|
|
184
184
|
cancelButtonText: "取消",
|
|
185
185
|
type: "warning",
|
|
186
|
-
})
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
})
|
|
187
|
+
.then(() => {
|
|
188
|
+
if (tagsViewGetters.visitedViews.length <= 1 || isAffix(view))
|
|
189
|
+
return;
|
|
190
|
+
tagsViewMutations.delTagAndCache(view);
|
|
191
|
+
this.activeKey === view.key && this.gotoLastTag();
|
|
192
|
+
})
|
|
193
|
+
.catch(() => {
|
|
194
|
+
});
|
|
195
|
+
else {
|
|
196
|
+
if (tagsViewGetters.visitedViews.length <= 1 || isAffix(view)) return;
|
|
197
|
+
tagsViewMutations.delTagAndCache(view);
|
|
198
|
+
this.activeKey === view.key && this.gotoLastTag();
|
|
199
|
+
}
|
|
192
200
|
},
|
|
201
|
+
|
|
193
202
|
// 关闭除激活、固定页签以外的所有页签
|
|
194
203
|
closeOthersTags() {
|
|
195
204
|
tagsViewMutations.delOtherTagAndCache(this.selectedTag);
|