@weitutech/by-components 1.1.102 → 1.1.103

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.
@@ -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=08613879
79026
- var ByFloatingMenuvue_type_template_id_08613879_render = function render() {
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=7dd4a57b
79026
+ var ByFloatingMenuvue_type_template_id_7dd4a57b_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_08613879_render = function render() {
79148
79148
  }, [_vm._v(_vm._s(item.text))])]);
79149
79149
  }), 0)])], 1);
79150
79150
  };
79151
- var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79151
+ var ByFloatingMenuvue_type_template_id_7dd4a57b_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 = ({
@@ -79222,11 +79222,9 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79222
79222
  mounted() {
79223
79223
  this.initPosition();
79224
79224
  this.bindEvents();
79225
- this.bindPageEvents();
79226
79225
  },
79227
79226
  beforeDestroy() {
79228
79227
  this.unbindEvents();
79229
- this.unbindPageEvents();
79230
79228
  this.removeShowButton();
79231
79229
  // 清理菜单项拖动事件监听器
79232
79230
  document.removeEventListener('mousemove', this.onMenuItemDrag);
@@ -79273,10 +79271,8 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79273
79271
  transition: 'right 0.3s ease',
79274
79272
  opacity: '0'
79275
79273
  };
79276
- // 只有在页面可见时才创建显示按钮
79277
- if (!document.hidden) {
79278
- this.createShowButton();
79279
- }
79274
+ // 创建显示按钮,使用当前纵向位置
79275
+ this.createShowButton();
79280
79276
  } else {
79281
79277
  // 显示主菜单,保持当前位置
79282
79278
  this.menuStyle = {
@@ -79419,50 +79415,11 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79419
79415
  document.removeEventListener('mousemove', this.onDrag);
79420
79416
  document.removeEventListener('mouseup', this.endDrag);
79421
79417
  },
79422
- // 绑定页面相关事件
79423
- bindPageEvents() {
79424
- // 监听页面可见性变化(切换 tab)
79425
- document.addEventListener('visibilitychange', this.onVisibilityChange);
79426
-
79427
- // 监听页面卸载事件
79428
- window.addEventListener('beforeunload', this.onPageUnload);
79429
-
79430
- // 监听路由变化(如果使用了 Vue Router)
79431
- if (this.$router) {
79432
- this.$router.beforeEach((to, from, next) => {
79433
- // 在路由切换前移除显示按钮
79434
- this.removeShowButton();
79435
- next();
79436
- });
79437
- }
79438
- },
79439
- // 解绑页面相关事件
79440
- unbindPageEvents() {
79441
- document.removeEventListener('visibilitychange', this.onVisibilityChange);
79442
- window.removeEventListener('beforeunload', this.onPageUnload);
79443
- },
79444
- // 页面可见性变化处理
79445
- onVisibilityChange() {
79446
- if (document.hidden) {
79447
- // 页面变为隐藏状态(切换 tab 或最小化),移除显示按钮
79448
- this.removeShowButton();
79449
- }
79450
- },
79451
- // 页面卸载处理
79452
- onPageUnload() {
79453
- // 页面卸载前移除显示按钮
79454
- this.removeShowButton();
79455
- },
79456
79418
  // 创建显示按钮
79457
79419
  createShowButton() {
79458
79420
  // 先移除可能存在的显示按钮
79459
79421
  this.removeShowButton();
79460
79422
 
79461
- // 如果页面不可见,不创建显示按钮
79462
- if (document.hidden) {
79463
- return;
79464
- }
79465
-
79466
79423
  // 计算当前主按钮的纵向位置
79467
79424
  let topPosition = '50%';
79468
79425
  if (this.menuStyle.top) {
@@ -79539,6 +79496,54 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79539
79496
  if (showBtn) {
79540
79497
  showBtn.remove();
79541
79498
  }
79499
+ },
79500
+ // ========== 外部调用方法 ==========
79501
+
79502
+ // 显示悬浮菜单
79503
+ show() {
79504
+ if (this.isHidden) {
79505
+ this.isHidden = false;
79506
+ this.isExpanded = false;
79507
+
79508
+ // 显示主菜单,保持当前位置
79509
+ this.menuStyle = {
79510
+ ...this.menuStyle,
79511
+ right: '20px',
79512
+ transition: 'right 0.3s ease, opacity 0.3s ease',
79513
+ opacity: '1'
79514
+ };
79515
+ // 移除显示按钮
79516
+ this.removeShowButton();
79517
+ }
79518
+ },
79519
+ // 隐藏悬浮菜单
79520
+ hide() {
79521
+ if (!this.isHidden) {
79522
+ this.isHidden = true;
79523
+ this.isExpanded = false;
79524
+
79525
+ // 保持当前纵向位置,只隐藏横向
79526
+ this.menuStyle = {
79527
+ ...this.menuStyle,
79528
+ right: '-100px',
79529
+ transition: 'right 0.3s ease',
79530
+ opacity: '0'
79531
+ };
79532
+ // 移除显示按钮
79533
+ this.removeShowButton();
79534
+ }
79535
+ },
79536
+ // 完全移除显示按钮(用于页面切换时清理)
79537
+ removeShowButtonOnly() {
79538
+ this.removeShowButton();
79539
+ },
79540
+ // 获取当前隐藏状态
79541
+ getHiddenState() {
79542
+ return this.isHidden;
79543
+ },
79544
+ // 切换显示/隐藏状态
79545
+ toggle() {
79546
+ this.toggleHide();
79542
79547
  }
79543
79548
  }
79544
79549
  });
@@ -79554,8 +79559,8 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79554
79559
  ;
79555
79560
  var ByFloatingMenu_component = normalizeComponent(
79556
79561
  floating_menu_ByFloatingMenuvue_type_script_lang_js,
79557
- ByFloatingMenuvue_type_template_id_08613879_render,
79558
- ByFloatingMenuvue_type_template_id_08613879_staticRenderFns,
79562
+ ByFloatingMenuvue_type_template_id_7dd4a57b_render,
79563
+ ByFloatingMenuvue_type_template_id_7dd4a57b_staticRenderFns,
79559
79564
  false,
79560
79565
  null,
79561
79566
  null,
@@ -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=08613879
79036
- var ByFloatingMenuvue_type_template_id_08613879_render = function render() {
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=7dd4a57b
79036
+ var ByFloatingMenuvue_type_template_id_7dd4a57b_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_08613879_render = function render() {
79158
79158
  }, [_vm._v(_vm._s(item.text))])]);
79159
79159
  }), 0)])], 1);
79160
79160
  };
79161
- var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79161
+ var ByFloatingMenuvue_type_template_id_7dd4a57b_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 = ({
@@ -79232,11 +79232,9 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79232
79232
  mounted() {
79233
79233
  this.initPosition();
79234
79234
  this.bindEvents();
79235
- this.bindPageEvents();
79236
79235
  },
79237
79236
  beforeDestroy() {
79238
79237
  this.unbindEvents();
79239
- this.unbindPageEvents();
79240
79238
  this.removeShowButton();
79241
79239
  // 清理菜单项拖动事件监听器
79242
79240
  document.removeEventListener('mousemove', this.onMenuItemDrag);
@@ -79283,10 +79281,8 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79283
79281
  transition: 'right 0.3s ease',
79284
79282
  opacity: '0'
79285
79283
  };
79286
- // 只有在页面可见时才创建显示按钮
79287
- if (!document.hidden) {
79288
- this.createShowButton();
79289
- }
79284
+ // 创建显示按钮,使用当前纵向位置
79285
+ this.createShowButton();
79290
79286
  } else {
79291
79287
  // 显示主菜单,保持当前位置
79292
79288
  this.menuStyle = {
@@ -79429,50 +79425,11 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79429
79425
  document.removeEventListener('mousemove', this.onDrag);
79430
79426
  document.removeEventListener('mouseup', this.endDrag);
79431
79427
  },
79432
- // 绑定页面相关事件
79433
- bindPageEvents() {
79434
- // 监听页面可见性变化(切换 tab)
79435
- document.addEventListener('visibilitychange', this.onVisibilityChange);
79436
-
79437
- // 监听页面卸载事件
79438
- window.addEventListener('beforeunload', this.onPageUnload);
79439
-
79440
- // 监听路由变化(如果使用了 Vue Router)
79441
- if (this.$router) {
79442
- this.$router.beforeEach((to, from, next) => {
79443
- // 在路由切换前移除显示按钮
79444
- this.removeShowButton();
79445
- next();
79446
- });
79447
- }
79448
- },
79449
- // 解绑页面相关事件
79450
- unbindPageEvents() {
79451
- document.removeEventListener('visibilitychange', this.onVisibilityChange);
79452
- window.removeEventListener('beforeunload', this.onPageUnload);
79453
- },
79454
- // 页面可见性变化处理
79455
- onVisibilityChange() {
79456
- if (document.hidden) {
79457
- // 页面变为隐藏状态(切换 tab 或最小化),移除显示按钮
79458
- this.removeShowButton();
79459
- }
79460
- },
79461
- // 页面卸载处理
79462
- onPageUnload() {
79463
- // 页面卸载前移除显示按钮
79464
- this.removeShowButton();
79465
- },
79466
79428
  // 创建显示按钮
79467
79429
  createShowButton() {
79468
79430
  // 先移除可能存在的显示按钮
79469
79431
  this.removeShowButton();
79470
79432
 
79471
- // 如果页面不可见,不创建显示按钮
79472
- if (document.hidden) {
79473
- return;
79474
- }
79475
-
79476
79433
  // 计算当前主按钮的纵向位置
79477
79434
  let topPosition = '50%';
79478
79435
  if (this.menuStyle.top) {
@@ -79549,6 +79506,54 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79549
79506
  if (showBtn) {
79550
79507
  showBtn.remove();
79551
79508
  }
79509
+ },
79510
+ // ========== 外部调用方法 ==========
79511
+
79512
+ // 显示悬浮菜单
79513
+ show() {
79514
+ if (this.isHidden) {
79515
+ this.isHidden = false;
79516
+ this.isExpanded = false;
79517
+
79518
+ // 显示主菜单,保持当前位置
79519
+ this.menuStyle = {
79520
+ ...this.menuStyle,
79521
+ right: '20px',
79522
+ transition: 'right 0.3s ease, opacity 0.3s ease',
79523
+ opacity: '1'
79524
+ };
79525
+ // 移除显示按钮
79526
+ this.removeShowButton();
79527
+ }
79528
+ },
79529
+ // 隐藏悬浮菜单
79530
+ hide() {
79531
+ if (!this.isHidden) {
79532
+ this.isHidden = true;
79533
+ this.isExpanded = false;
79534
+
79535
+ // 保持当前纵向位置,只隐藏横向
79536
+ this.menuStyle = {
79537
+ ...this.menuStyle,
79538
+ right: '-100px',
79539
+ transition: 'right 0.3s ease',
79540
+ opacity: '0'
79541
+ };
79542
+ // 移除显示按钮
79543
+ this.removeShowButton();
79544
+ }
79545
+ },
79546
+ // 完全移除显示按钮(用于页面切换时清理)
79547
+ removeShowButtonOnly() {
79548
+ this.removeShowButton();
79549
+ },
79550
+ // 获取当前隐藏状态
79551
+ getHiddenState() {
79552
+ return this.isHidden;
79553
+ },
79554
+ // 切换显示/隐藏状态
79555
+ toggle() {
79556
+ this.toggleHide();
79552
79557
  }
79553
79558
  }
79554
79559
  });
@@ -79564,8 +79569,8 @@ var ByFloatingMenuvue_type_template_id_08613879_staticRenderFns = [];
79564
79569
  ;
79565
79570
  var ByFloatingMenu_component = normalizeComponent(
79566
79571
  floating_menu_ByFloatingMenuvue_type_script_lang_js,
79567
- ByFloatingMenuvue_type_template_id_08613879_render,
79568
- ByFloatingMenuvue_type_template_id_08613879_staticRenderFns,
79572
+ ByFloatingMenuvue_type_template_id_7dd4a57b_render,
79573
+ ByFloatingMenuvue_type_template_id_7dd4a57b_staticRenderFns,
79569
79574
  false,
79570
79575
  null,
79571
79576
  null,