@weitutech/by-components 1.1.104 → 1.1.105
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/lib/by-components.common.js +20 -123
- package/lib/by-components.umd.js +20 -123
- package/lib/by-components.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -79022,8 +79022,8 @@ var ByCascaderPanel_component = normalizeComponent(
|
|
|
79022
79022
|
)
|
|
79023
79023
|
|
|
79024
79024
|
/* harmony default export */ var ByCascaderPanel = (ByCascaderPanel_component.exports);
|
|
79025
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=template&id=
|
|
79026
|
-
var
|
|
79025
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=template&id=4d9e17ff
|
|
79026
|
+
var ByFloatingMenuvue_type_template_id_4d9e17ff_render = function render() {
|
|
79027
79027
|
var _vm = this,
|
|
79028
79028
|
_c = _vm._self._c;
|
|
79029
79029
|
return _c('div', {
|
|
@@ -79148,7 +79148,7 @@ var ByFloatingMenuvue_type_template_id_365e7526_render = function render() {
|
|
|
79148
79148
|
}, [_vm._v(_vm._s(item.text))])]);
|
|
79149
79149
|
}), 0)])], 1);
|
|
79150
79150
|
};
|
|
79151
|
-
var
|
|
79151
|
+
var ByFloatingMenuvue_type_template_id_4d9e17ff_staticRenderFns = [];
|
|
79152
79152
|
|
|
79153
79153
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=script&lang=js
|
|
79154
79154
|
/* harmony default export */ var ByFloatingMenuvue_type_script_lang_js = ({
|
|
@@ -79185,14 +79185,6 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79185
79185
|
}
|
|
79186
79186
|
},
|
|
79187
79187
|
data() {
|
|
79188
|
-
// 在 data 中初始化位置,避免渲染时的位置跳动
|
|
79189
|
-
const {
|
|
79190
|
-
right,
|
|
79191
|
-
bottom
|
|
79192
|
-
} = this.position;
|
|
79193
|
-
const windowHeight = typeof window !== 'undefined' ? window.innerHeight : 800;
|
|
79194
|
-
const bottomValue = parseInt(bottom) || 20;
|
|
79195
|
-
const mainButtonSize = this.getMainButtonSize();
|
|
79196
79188
|
return {
|
|
79197
79189
|
isExpanded: false,
|
|
79198
79190
|
isHidden: false,
|
|
@@ -79204,12 +79196,9 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79204
79196
|
},
|
|
79205
79197
|
currentPosition: {
|
|
79206
79198
|
x: 0,
|
|
79207
|
-
y:
|
|
79208
|
-
},
|
|
79209
|
-
menuStyle: {
|
|
79210
|
-
right: right,
|
|
79211
|
-
bottom: bottom
|
|
79199
|
+
y: 0
|
|
79212
79200
|
},
|
|
79201
|
+
menuStyle: {},
|
|
79213
79202
|
// 菜单项拖动相关
|
|
79214
79203
|
menuItemDragStart: {
|
|
79215
79204
|
x: 0,
|
|
@@ -79222,53 +79211,43 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79222
79211
|
computed: {
|
|
79223
79212
|
// 根据size属性计算实际大小
|
|
79224
79213
|
mainButtonSize() {
|
|
79225
|
-
|
|
79214
|
+
const sizeMap = {
|
|
79215
|
+
mini: 40,
|
|
79216
|
+
small: 50,
|
|
79217
|
+
medium: 60
|
|
79218
|
+
};
|
|
79219
|
+
return sizeMap[this.size] || 50;
|
|
79226
79220
|
}
|
|
79227
79221
|
},
|
|
79228
79222
|
mounted() {
|
|
79229
|
-
|
|
79230
|
-
this.refreshPosition();
|
|
79223
|
+
this.initPosition();
|
|
79231
79224
|
this.bindEvents();
|
|
79232
|
-
this.bindPageEvents();
|
|
79233
79225
|
},
|
|
79234
79226
|
beforeDestroy() {
|
|
79235
79227
|
this.unbindEvents();
|
|
79236
|
-
this.unbindPageEvents();
|
|
79237
79228
|
this.removeShowButton();
|
|
79238
79229
|
// 清理菜单项拖动事件监听器
|
|
79239
79230
|
document.removeEventListener('mousemove', this.onMenuItemDrag);
|
|
79240
79231
|
document.removeEventListener('mouseup', this.endMenuItemDrag);
|
|
79241
79232
|
},
|
|
79242
79233
|
methods: {
|
|
79243
|
-
//
|
|
79244
|
-
|
|
79245
|
-
const sizeMap = {
|
|
79246
|
-
mini: 40,
|
|
79247
|
-
small: 50,
|
|
79248
|
-
medium: 60
|
|
79249
|
-
};
|
|
79250
|
-
return sizeMap[this.size] || 50;
|
|
79251
|
-
},
|
|
79252
|
-
// 刷新位置(在 mounted 时重新计算以确保准确性)
|
|
79253
|
-
refreshPosition() {
|
|
79234
|
+
// 初始化位置
|
|
79235
|
+
initPosition() {
|
|
79254
79236
|
const {
|
|
79255
79237
|
right,
|
|
79256
79238
|
bottom
|
|
79257
79239
|
} = this.position;
|
|
79258
|
-
const windowHeight = window.innerHeight;
|
|
79259
|
-
const bottomValue = parseInt(bottom) || 20;
|
|
79260
|
-
|
|
79261
|
-
// 更新菜单样式
|
|
79262
79240
|
this.menuStyle = {
|
|
79263
|
-
...this.menuStyle,
|
|
79264
79241
|
right: right,
|
|
79265
79242
|
bottom: bottom
|
|
79266
79243
|
};
|
|
79267
79244
|
|
|
79268
|
-
//
|
|
79245
|
+
// 初始化当前位置
|
|
79246
|
+
const windowHeight = window.innerHeight;
|
|
79247
|
+
const bottomValue = parseInt(bottom) || 20;
|
|
79269
79248
|
this.currentPosition = {
|
|
79270
79249
|
x: 0,
|
|
79271
|
-
y: windowHeight - bottomValue - this.mainButtonSize
|
|
79250
|
+
y: windowHeight - bottomValue - this.mainButtonSize // 使用动态主按钮大小
|
|
79272
79251
|
};
|
|
79273
79252
|
},
|
|
79274
79253
|
// 切换菜单展开状态
|
|
@@ -79517,88 +79496,6 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79517
79496
|
if (showBtn) {
|
|
79518
79497
|
showBtn.remove();
|
|
79519
79498
|
}
|
|
79520
|
-
},
|
|
79521
|
-
// ========== 外部调用方法 ==========
|
|
79522
|
-
|
|
79523
|
-
// 显示悬浮菜单
|
|
79524
|
-
show() {
|
|
79525
|
-
if (this.isHidden) {
|
|
79526
|
-
this.isHidden = false;
|
|
79527
|
-
this.isExpanded = false;
|
|
79528
|
-
|
|
79529
|
-
// 显示主菜单,保持当前位置
|
|
79530
|
-
this.menuStyle = {
|
|
79531
|
-
...this.menuStyle,
|
|
79532
|
-
right: '20px',
|
|
79533
|
-
transition: 'right 0.3s ease, opacity 0.3s ease',
|
|
79534
|
-
opacity: '1'
|
|
79535
|
-
};
|
|
79536
|
-
// 移除显示按钮
|
|
79537
|
-
this.removeShowButton();
|
|
79538
|
-
}
|
|
79539
|
-
},
|
|
79540
|
-
// 隐藏悬浮菜单
|
|
79541
|
-
hide() {
|
|
79542
|
-
if (!this.isHidden) {
|
|
79543
|
-
this.isHidden = true;
|
|
79544
|
-
this.isExpanded = false;
|
|
79545
|
-
|
|
79546
|
-
// 保持当前纵向位置,只隐藏横向
|
|
79547
|
-
this.menuStyle = {
|
|
79548
|
-
...this.menuStyle,
|
|
79549
|
-
right: '-100px',
|
|
79550
|
-
transition: 'right 0.3s ease',
|
|
79551
|
-
opacity: '0'
|
|
79552
|
-
};
|
|
79553
|
-
// 移除显示按钮
|
|
79554
|
-
this.removeShowButton();
|
|
79555
|
-
}
|
|
79556
|
-
},
|
|
79557
|
-
// 完全移除显示按钮(用于页面切换时清理)
|
|
79558
|
-
removeShowButtonOnly() {
|
|
79559
|
-
this.removeShowButton();
|
|
79560
|
-
},
|
|
79561
|
-
// 获取当前隐藏状态
|
|
79562
|
-
getHiddenState() {
|
|
79563
|
-
return this.isHidden;
|
|
79564
|
-
},
|
|
79565
|
-
// 切换显示/隐藏状态
|
|
79566
|
-
toggle() {
|
|
79567
|
-
this.toggleHide();
|
|
79568
|
-
},
|
|
79569
|
-
// 绑定页面相关事件
|
|
79570
|
-
bindPageEvents() {
|
|
79571
|
-
// 监听页面可见性变化(切换 tab)
|
|
79572
|
-
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
|
79573
|
-
|
|
79574
|
-
// 监听页面卸载事件
|
|
79575
|
-
window.addEventListener('beforeunload', this.onPageUnload);
|
|
79576
|
-
|
|
79577
|
-
// 监听路由变化(如果使用了 Vue Router)
|
|
79578
|
-
if (this.$router) {
|
|
79579
|
-
this.$router.beforeEach((to, from, next) => {
|
|
79580
|
-
// 在路由切换前移除显示按钮
|
|
79581
|
-
this.removeShowButton();
|
|
79582
|
-
next();
|
|
79583
|
-
});
|
|
79584
|
-
}
|
|
79585
|
-
},
|
|
79586
|
-
// 解绑页面相关事件
|
|
79587
|
-
unbindPageEvents() {
|
|
79588
|
-
document.removeEventListener('visibilitychange', this.onVisibilityChange);
|
|
79589
|
-
window.removeEventListener('beforeunload', this.onPageUnload);
|
|
79590
|
-
},
|
|
79591
|
-
// 页面可见性变化处理
|
|
79592
|
-
onVisibilityChange() {
|
|
79593
|
-
if (document.hidden) {
|
|
79594
|
-
// 页面变为隐藏状态(切换 tab 或最小化),移除显示按钮
|
|
79595
|
-
this.removeShowButton();
|
|
79596
|
-
}
|
|
79597
|
-
},
|
|
79598
|
-
// 页面卸载处理
|
|
79599
|
-
onPageUnload() {
|
|
79600
|
-
// 页面卸载前移除显示按钮
|
|
79601
|
-
this.removeShowButton();
|
|
79602
79499
|
}
|
|
79603
79500
|
}
|
|
79604
79501
|
});
|
|
@@ -79614,8 +79511,8 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79614
79511
|
;
|
|
79615
79512
|
var ByFloatingMenu_component = normalizeComponent(
|
|
79616
79513
|
floating_menu_ByFloatingMenuvue_type_script_lang_js,
|
|
79617
|
-
|
|
79618
|
-
|
|
79514
|
+
ByFloatingMenuvue_type_template_id_4d9e17ff_render,
|
|
79515
|
+
ByFloatingMenuvue_type_template_id_4d9e17ff_staticRenderFns,
|
|
79619
79516
|
false,
|
|
79620
79517
|
null,
|
|
79621
79518
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -79032,8 +79032,8 @@ var ByCascaderPanel_component = normalizeComponent(
|
|
|
79032
79032
|
)
|
|
79033
79033
|
|
|
79034
79034
|
/* harmony default export */ var ByCascaderPanel = (ByCascaderPanel_component.exports);
|
|
79035
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=template&id=
|
|
79036
|
-
var
|
|
79035
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=template&id=4d9e17ff
|
|
79036
|
+
var ByFloatingMenuvue_type_template_id_4d9e17ff_render = function render() {
|
|
79037
79037
|
var _vm = this,
|
|
79038
79038
|
_c = _vm._self._c;
|
|
79039
79039
|
return _c('div', {
|
|
@@ -79158,7 +79158,7 @@ var ByFloatingMenuvue_type_template_id_365e7526_render = function render() {
|
|
|
79158
79158
|
}, [_vm._v(_vm._s(item.text))])]);
|
|
79159
79159
|
}), 0)])], 1);
|
|
79160
79160
|
};
|
|
79161
|
-
var
|
|
79161
|
+
var ByFloatingMenuvue_type_template_id_4d9e17ff_staticRenderFns = [];
|
|
79162
79162
|
|
|
79163
79163
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/floating-menu/ByFloatingMenu.vue?vue&type=script&lang=js
|
|
79164
79164
|
/* harmony default export */ var ByFloatingMenuvue_type_script_lang_js = ({
|
|
@@ -79195,14 +79195,6 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79195
79195
|
}
|
|
79196
79196
|
},
|
|
79197
79197
|
data() {
|
|
79198
|
-
// 在 data 中初始化位置,避免渲染时的位置跳动
|
|
79199
|
-
const {
|
|
79200
|
-
right,
|
|
79201
|
-
bottom
|
|
79202
|
-
} = this.position;
|
|
79203
|
-
const windowHeight = typeof window !== 'undefined' ? window.innerHeight : 800;
|
|
79204
|
-
const bottomValue = parseInt(bottom) || 20;
|
|
79205
|
-
const mainButtonSize = this.getMainButtonSize();
|
|
79206
79198
|
return {
|
|
79207
79199
|
isExpanded: false,
|
|
79208
79200
|
isHidden: false,
|
|
@@ -79214,12 +79206,9 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79214
79206
|
},
|
|
79215
79207
|
currentPosition: {
|
|
79216
79208
|
x: 0,
|
|
79217
|
-
y:
|
|
79218
|
-
},
|
|
79219
|
-
menuStyle: {
|
|
79220
|
-
right: right,
|
|
79221
|
-
bottom: bottom
|
|
79209
|
+
y: 0
|
|
79222
79210
|
},
|
|
79211
|
+
menuStyle: {},
|
|
79223
79212
|
// 菜单项拖动相关
|
|
79224
79213
|
menuItemDragStart: {
|
|
79225
79214
|
x: 0,
|
|
@@ -79232,53 +79221,43 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79232
79221
|
computed: {
|
|
79233
79222
|
// 根据size属性计算实际大小
|
|
79234
79223
|
mainButtonSize() {
|
|
79235
|
-
|
|
79224
|
+
const sizeMap = {
|
|
79225
|
+
mini: 40,
|
|
79226
|
+
small: 50,
|
|
79227
|
+
medium: 60
|
|
79228
|
+
};
|
|
79229
|
+
return sizeMap[this.size] || 50;
|
|
79236
79230
|
}
|
|
79237
79231
|
},
|
|
79238
79232
|
mounted() {
|
|
79239
|
-
|
|
79240
|
-
this.refreshPosition();
|
|
79233
|
+
this.initPosition();
|
|
79241
79234
|
this.bindEvents();
|
|
79242
|
-
this.bindPageEvents();
|
|
79243
79235
|
},
|
|
79244
79236
|
beforeDestroy() {
|
|
79245
79237
|
this.unbindEvents();
|
|
79246
|
-
this.unbindPageEvents();
|
|
79247
79238
|
this.removeShowButton();
|
|
79248
79239
|
// 清理菜单项拖动事件监听器
|
|
79249
79240
|
document.removeEventListener('mousemove', this.onMenuItemDrag);
|
|
79250
79241
|
document.removeEventListener('mouseup', this.endMenuItemDrag);
|
|
79251
79242
|
},
|
|
79252
79243
|
methods: {
|
|
79253
|
-
//
|
|
79254
|
-
|
|
79255
|
-
const sizeMap = {
|
|
79256
|
-
mini: 40,
|
|
79257
|
-
small: 50,
|
|
79258
|
-
medium: 60
|
|
79259
|
-
};
|
|
79260
|
-
return sizeMap[this.size] || 50;
|
|
79261
|
-
},
|
|
79262
|
-
// 刷新位置(在 mounted 时重新计算以确保准确性)
|
|
79263
|
-
refreshPosition() {
|
|
79244
|
+
// 初始化位置
|
|
79245
|
+
initPosition() {
|
|
79264
79246
|
const {
|
|
79265
79247
|
right,
|
|
79266
79248
|
bottom
|
|
79267
79249
|
} = this.position;
|
|
79268
|
-
const windowHeight = window.innerHeight;
|
|
79269
|
-
const bottomValue = parseInt(bottom) || 20;
|
|
79270
|
-
|
|
79271
|
-
// 更新菜单样式
|
|
79272
79250
|
this.menuStyle = {
|
|
79273
|
-
...this.menuStyle,
|
|
79274
79251
|
right: right,
|
|
79275
79252
|
bottom: bottom
|
|
79276
79253
|
};
|
|
79277
79254
|
|
|
79278
|
-
//
|
|
79255
|
+
// 初始化当前位置
|
|
79256
|
+
const windowHeight = window.innerHeight;
|
|
79257
|
+
const bottomValue = parseInt(bottom) || 20;
|
|
79279
79258
|
this.currentPosition = {
|
|
79280
79259
|
x: 0,
|
|
79281
|
-
y: windowHeight - bottomValue - this.mainButtonSize
|
|
79260
|
+
y: windowHeight - bottomValue - this.mainButtonSize // 使用动态主按钮大小
|
|
79282
79261
|
};
|
|
79283
79262
|
},
|
|
79284
79263
|
// 切换菜单展开状态
|
|
@@ -79527,88 +79506,6 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79527
79506
|
if (showBtn) {
|
|
79528
79507
|
showBtn.remove();
|
|
79529
79508
|
}
|
|
79530
|
-
},
|
|
79531
|
-
// ========== 外部调用方法 ==========
|
|
79532
|
-
|
|
79533
|
-
// 显示悬浮菜单
|
|
79534
|
-
show() {
|
|
79535
|
-
if (this.isHidden) {
|
|
79536
|
-
this.isHidden = false;
|
|
79537
|
-
this.isExpanded = false;
|
|
79538
|
-
|
|
79539
|
-
// 显示主菜单,保持当前位置
|
|
79540
|
-
this.menuStyle = {
|
|
79541
|
-
...this.menuStyle,
|
|
79542
|
-
right: '20px',
|
|
79543
|
-
transition: 'right 0.3s ease, opacity 0.3s ease',
|
|
79544
|
-
opacity: '1'
|
|
79545
|
-
};
|
|
79546
|
-
// 移除显示按钮
|
|
79547
|
-
this.removeShowButton();
|
|
79548
|
-
}
|
|
79549
|
-
},
|
|
79550
|
-
// 隐藏悬浮菜单
|
|
79551
|
-
hide() {
|
|
79552
|
-
if (!this.isHidden) {
|
|
79553
|
-
this.isHidden = true;
|
|
79554
|
-
this.isExpanded = false;
|
|
79555
|
-
|
|
79556
|
-
// 保持当前纵向位置,只隐藏横向
|
|
79557
|
-
this.menuStyle = {
|
|
79558
|
-
...this.menuStyle,
|
|
79559
|
-
right: '-100px',
|
|
79560
|
-
transition: 'right 0.3s ease',
|
|
79561
|
-
opacity: '0'
|
|
79562
|
-
};
|
|
79563
|
-
// 移除显示按钮
|
|
79564
|
-
this.removeShowButton();
|
|
79565
|
-
}
|
|
79566
|
-
},
|
|
79567
|
-
// 完全移除显示按钮(用于页面切换时清理)
|
|
79568
|
-
removeShowButtonOnly() {
|
|
79569
|
-
this.removeShowButton();
|
|
79570
|
-
},
|
|
79571
|
-
// 获取当前隐藏状态
|
|
79572
|
-
getHiddenState() {
|
|
79573
|
-
return this.isHidden;
|
|
79574
|
-
},
|
|
79575
|
-
// 切换显示/隐藏状态
|
|
79576
|
-
toggle() {
|
|
79577
|
-
this.toggleHide();
|
|
79578
|
-
},
|
|
79579
|
-
// 绑定页面相关事件
|
|
79580
|
-
bindPageEvents() {
|
|
79581
|
-
// 监听页面可见性变化(切换 tab)
|
|
79582
|
-
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
|
79583
|
-
|
|
79584
|
-
// 监听页面卸载事件
|
|
79585
|
-
window.addEventListener('beforeunload', this.onPageUnload);
|
|
79586
|
-
|
|
79587
|
-
// 监听路由变化(如果使用了 Vue Router)
|
|
79588
|
-
if (this.$router) {
|
|
79589
|
-
this.$router.beforeEach((to, from, next) => {
|
|
79590
|
-
// 在路由切换前移除显示按钮
|
|
79591
|
-
this.removeShowButton();
|
|
79592
|
-
next();
|
|
79593
|
-
});
|
|
79594
|
-
}
|
|
79595
|
-
},
|
|
79596
|
-
// 解绑页面相关事件
|
|
79597
|
-
unbindPageEvents() {
|
|
79598
|
-
document.removeEventListener('visibilitychange', this.onVisibilityChange);
|
|
79599
|
-
window.removeEventListener('beforeunload', this.onPageUnload);
|
|
79600
|
-
},
|
|
79601
|
-
// 页面可见性变化处理
|
|
79602
|
-
onVisibilityChange() {
|
|
79603
|
-
if (document.hidden) {
|
|
79604
|
-
// 页面变为隐藏状态(切换 tab 或最小化),移除显示按钮
|
|
79605
|
-
this.removeShowButton();
|
|
79606
|
-
}
|
|
79607
|
-
},
|
|
79608
|
-
// 页面卸载处理
|
|
79609
|
-
onPageUnload() {
|
|
79610
|
-
// 页面卸载前移除显示按钮
|
|
79611
|
-
this.removeShowButton();
|
|
79612
79509
|
}
|
|
79613
79510
|
}
|
|
79614
79511
|
});
|
|
@@ -79624,8 +79521,8 @@ var ByFloatingMenuvue_type_template_id_365e7526_staticRenderFns = [];
|
|
|
79624
79521
|
;
|
|
79625
79522
|
var ByFloatingMenu_component = normalizeComponent(
|
|
79626
79523
|
floating_menu_ByFloatingMenuvue_type_script_lang_js,
|
|
79627
|
-
|
|
79628
|
-
|
|
79524
|
+
ByFloatingMenuvue_type_template_id_4d9e17ff_render,
|
|
79525
|
+
ByFloatingMenuvue_type_template_id_4d9e17ff_staticRenderFns,
|
|
79629
79526
|
false,
|
|
79630
79527
|
null,
|
|
79631
79528
|
null,
|