qdt-admin-layout 1.1.15 → 1.1.16

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": "qdt-admin-layout",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -177,19 +177,28 @@ export default {
177
177
  * 关闭所选页签
178
178
  * @param view {VisitedView}
179
179
  */
180
- closeSelectedTag(view = this.selectedTag, e) {
181
- if (["访销订单", "车销单", "销售出库单"].includes(e.innerText))
182
- this.$confirm(`是否关闭${e.innerText}?`, "提示", {
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
- }).catch(() => {
187
- return;
188
- });
189
- if (tagsViewGetters.visitedViews.length <= 1 || isAffix(view)) return;
190
- tagsViewMutations.delTagAndCache(view);
191
- this.activeKey === view.key && this.gotoLastTag();
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);