cloud-web-corejs 1.0.266 → 1.0.268

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.266",
4
+ "version": "1.0.268",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,3 +1,5 @@
1
+ import { scrollIntoScrollParent } from '@base/utils/scrollUtil';
2
+
1
3
  let baseTabsMixin, baseTabPaneMixin;
2
4
 
3
5
  baseTabsMixin = {
@@ -76,17 +78,10 @@ baseTabsMixin = {
76
78
  this.$emit('input', name);
77
79
  this.$emit('on-click', name);
78
80
  let target = this.getTabs()[index].$el;
79
- let scrollContainer = Array.prototype.find.call(
80
- this.$el.children,
81
- item => item.classList && item.classList.contains('d-cont')
82
- );
83
- if (scrollContainer) {
84
- let containerRect = scrollContainer.getBoundingClientRect();
85
- let targetRect = target.getBoundingClientRect();
86
- scrollContainer.scrollTop += targetRect.top - containerRect.top;
87
- } else {
88
- target.scrollIntoView();
89
- }
81
+ //滚动体是 .d-cont 还是它外面那层(.d-header + div{flex:1;overflow-y:auto})由布局决定,
82
+ //原来写死 .d-cont,在 .d-cont 没有确定高度(height:inherit 拿到 auto)的页面上
83
+ //scrollTop 赋值是空操作,点导航没反应——统一交给 scrollIntoScrollParent 找真正的滚动体。
84
+ scrollIntoScrollParent(target);
90
85
  }
91
86
  },
92
87
  watch: {
@@ -1,5 +1,6 @@
1
1
  import Vue from 'vue';
2
2
  import settingConfig from '@/settings.js'
3
+ import { scrollIntoScrollParent } from '@base/utils/scrollUtil';
3
4
 
4
5
  let f;
5
6
  let configUtil = {
@@ -90,7 +91,9 @@ f = async function (option) {
90
91
  click: (event) => {
91
92
  instance.$children[0].handleFold(true);
92
93
  that.$nextTick(() => {
93
- instance.$el.scrollIntoView();
94
+ //流程区是挂在 .d-cont 里滚的,直接 scrollIntoView 会把外层文档/宿主容器
95
+ //一起滚起来(固定头被顶走、微前端下滚的是主应用),只在真正的滚动容器里滚。
96
+ scrollIntoScrollParent(instance.$el);
94
97
  })
95
98
  }
96
99
  }