ecinc-cloud-moabase 9.7.8 → 9.7.9
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/ecmoabase.common.js +136 -19
- package/lib/ecmoabase.umd.js +136 -19
- package/lib/ecmoabase.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecmoabase.common.js
CHANGED
|
@@ -1152,7 +1152,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".applet-wrap[data-v-9bb86398]{width:10
|
|
|
1152
1152
|
|
|
1153
1153
|
/***/ }),
|
|
1154
1154
|
|
|
1155
|
-
/***/
|
|
1155
|
+
/***/ 8957:
|
|
1156
1156
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1157
1157
|
|
|
1158
1158
|
"use strict";
|
|
@@ -1166,7 +1166,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1166
1166
|
|
|
1167
1167
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
1168
1168
|
// Module
|
|
1169
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".board[data-v-
|
|
1169
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".board[data-v-6b99084c]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;width:100%;position:relative;background:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#f8f8f8));background:linear-gradient(180deg,#f9f9f9 0,#f8f8f8)}.board .homePage[data-v-6b99084c]{height:100%;width:100%;overflow:auto}.board .refresh-tip[data-v-6b99084c]{position:relative;z-index:10;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;font-size:12px;color:#999;background:transparent;-webkit-transition:height .2s;transition:height .2s}", ""]);
|
|
1170
1170
|
// Exports
|
|
1171
1171
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
1172
1172
|
|
|
@@ -25956,19 +25956,19 @@ var update = add("f8dd5fa4", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
25956
25956
|
|
|
25957
25957
|
/***/ }),
|
|
25958
25958
|
|
|
25959
|
-
/***/
|
|
25959
|
+
/***/ 491:
|
|
25960
25960
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
25961
25961
|
|
|
25962
25962
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
25963
25963
|
|
|
25964
25964
|
// load the styles
|
|
25965
|
-
var content = __webpack_require__(
|
|
25965
|
+
var content = __webpack_require__(8957);
|
|
25966
25966
|
if(content.__esModule) content = content.default;
|
|
25967
25967
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
25968
25968
|
if(content.locals) module.exports = content.locals;
|
|
25969
25969
|
// add the styles to the DOM
|
|
25970
25970
|
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
25971
|
-
var update = add("
|
|
25971
|
+
var update = add("81c29d3c", content, true, {"sourceMap":false,"shadowMode":false});
|
|
25972
25972
|
|
|
25973
25973
|
/***/ }),
|
|
25974
25974
|
|
|
@@ -136849,8 +136849,8 @@ var Calendar_component = normalizeComponent(
|
|
|
136849
136849
|
)
|
|
136850
136850
|
|
|
136851
136851
|
/* harmony default export */ var Calendar = (Calendar_component.exports);
|
|
136852
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=template&id=
|
|
136853
|
-
var
|
|
136852
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=template&id=6b99084c&scoped=true
|
|
136853
|
+
var DragAppletvue_type_template_id_6b99084c_scoped_true_render = function render() {
|
|
136854
136854
|
var _vm = this,
|
|
136855
136855
|
_c = _vm._self._c;
|
|
136856
136856
|
return _c('div', {
|
|
@@ -136861,9 +136861,23 @@ var DragAppletvue_type_template_id_cd089ff2_scoped_true_render = function render
|
|
|
136861
136861
|
"id": "homePage"
|
|
136862
136862
|
},
|
|
136863
136863
|
on: {
|
|
136864
|
-
"scroll": _vm.scrollTop
|
|
136864
|
+
"scroll": _vm.scrollTop,
|
|
136865
|
+
"touchstart": _vm.handleTouchStart,
|
|
136866
|
+
"touchend": _vm.handleTouchEnd,
|
|
136867
|
+
"touchcancel": _vm.handleTouchCancel
|
|
136865
136868
|
}
|
|
136866
|
-
},
|
|
136869
|
+
}, [_c('div', {
|
|
136870
|
+
directives: [{
|
|
136871
|
+
name: "show",
|
|
136872
|
+
rawName: "v-show",
|
|
136873
|
+
value: _vm.tipVisible,
|
|
136874
|
+
expression: "tipVisible"
|
|
136875
|
+
}],
|
|
136876
|
+
staticClass: "refresh-tip",
|
|
136877
|
+
style: {
|
|
136878
|
+
height: _vm.tipHeight + 'px'
|
|
136879
|
+
}
|
|
136880
|
+
}, [_c('span', [_vm._v(_vm._s(_vm.tipText))])]), _vm._l(_vm.layoutData, function (item, index) {
|
|
136867
136881
|
return _c('div', {
|
|
136868
136882
|
key: index,
|
|
136869
136883
|
staticClass: "drag-item",
|
|
@@ -136880,9 +136894,9 @@ var DragAppletvue_type_template_id_cd089ff2_scoped_true_render = function render
|
|
|
136880
136894
|
"applet-data": item
|
|
136881
136895
|
}
|
|
136882
136896
|
})], 1);
|
|
136883
|
-
}),
|
|
136897
|
+
})], 2)]);
|
|
136884
136898
|
};
|
|
136885
|
-
var
|
|
136899
|
+
var DragAppletvue_type_template_id_6b99084c_scoped_true_staticRenderFns = [];
|
|
136886
136900
|
|
|
136887
136901
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/Applet.vue?vue&type=template&id=9bb86398&scoped=true
|
|
136888
136902
|
var Appletvue_type_template_id_9bb86398_scoped_true_render = function render() {
|
|
@@ -137044,18 +137058,57 @@ var Applet_component = normalizeComponent(
|
|
|
137044
137058
|
},
|
|
137045
137059
|
data: function data() {
|
|
137046
137060
|
return {
|
|
137047
|
-
startScroll: 123
|
|
137061
|
+
startScroll: 123,
|
|
137062
|
+
startX: 0,
|
|
137063
|
+
// 触摸起始横坐标(用于排除横向滑动误判)
|
|
137064
|
+
startY: 0,
|
|
137065
|
+
// 触摸起始纵坐标
|
|
137066
|
+
pullDistance: 0,
|
|
137067
|
+
// 当前下拉位移(带阻尼)
|
|
137068
|
+
isRefreshing: false,
|
|
137069
|
+
collapsing: false,
|
|
137070
|
+
// 刷新结束后的收起阶段(文案保持"正在刷新...",高度平滑归零)
|
|
137071
|
+
tipVisible: false,
|
|
137072
|
+
// 提示条是否显示(收起动画结束后才隐藏,避免闪现)
|
|
137073
|
+
pullEnabled: false,
|
|
137074
|
+
// 仅滚动到顶部时允许下拉
|
|
137075
|
+
threshold: 60,
|
|
137076
|
+
// 触发刷新阈值
|
|
137077
|
+
maxDistance: 90 // 最大下拉位移
|
|
137048
137078
|
};
|
|
137049
137079
|
},
|
|
137050
|
-
computed: {
|
|
137080
|
+
computed: {
|
|
137081
|
+
tipHeight: function tipHeight() {
|
|
137082
|
+
// 刷新中固定展示 40px 指示条;收起阶段高度归零由 transition 平滑过渡;其余跟随下拉位移
|
|
137083
|
+
return this.isRefreshing && !this.collapsing ? 40 : this.pullDistance;
|
|
137084
|
+
},
|
|
137085
|
+
tipText: function tipText() {
|
|
137086
|
+
// 优先读语言包($tx 内部已带语言包命中逻辑),任何异常都回退中文默认文案,保证提示永不空白
|
|
137087
|
+
try {
|
|
137088
|
+
if (this.isRefreshing || this.collapsing) return this.$tx('common.refreshing', '正在刷新...');
|
|
137089
|
+
if (this.pullDistance >= this.threshold) return this.$tx('common.releaseToRefresh', '释放立即刷新');
|
|
137090
|
+
return this.$tx('common.pullToRefresh', '下拉刷新');
|
|
137091
|
+
} catch (err) {
|
|
137092
|
+
if (this.isRefreshing || this.collapsing) return '正在刷新...';
|
|
137093
|
+
return this.pullDistance >= this.threshold ? '释放立即刷新' : '下拉刷新';
|
|
137094
|
+
}
|
|
137095
|
+
}
|
|
137096
|
+
},
|
|
137051
137097
|
// 监控data中的数据变化
|
|
137052
137098
|
watch: {},
|
|
137053
137099
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
137054
137100
|
created: function created() {
|
|
137055
137101
|
this.$bus.on('scrollToPosition', this.scrollToPosition);
|
|
137102
|
+
this.refreshTimer = null; // 刷新状态复位定时器(非响应式)
|
|
137103
|
+
this.hideTimer = null; // 提示条收起后隐藏定时器(非响应式)
|
|
137056
137104
|
},
|
|
137057
137105
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
137058
137106
|
mounted: function mounted() {
|
|
137107
|
+
// touchmove 内条件性 preventDefault 需 passive: false,故用 JS 绑定(避免浏览器默认 passive 导致失效)
|
|
137108
|
+
var el = document.getElementById('homePage');
|
|
137109
|
+
el && el.addEventListener('touchmove', this.handleTouchMove, {
|
|
137110
|
+
passive: false
|
|
137111
|
+
});
|
|
137059
137112
|
if (localStorage.scrollPosition) {
|
|
137060
137113
|
setTimeout(function () {
|
|
137061
137114
|
document.getElementById('homePage').scrollTo(0, Number(localStorage.scrollPosition));
|
|
@@ -137072,6 +137125,10 @@ var Applet_component = normalizeComponent(
|
|
|
137072
137125
|
// 生命周期 - 更新之后
|
|
137073
137126
|
beforeDestroy: function beforeDestroy() {
|
|
137074
137127
|
this.$bus.off('scrollToPosition', this.scrollToPosition);
|
|
137128
|
+
var el = document.getElementById('homePage');
|
|
137129
|
+
el && el.removeEventListener('touchmove', this.handleTouchMove);
|
|
137130
|
+
clearTimeout(this.refreshTimer);
|
|
137131
|
+
clearTimeout(this.hideTimer);
|
|
137075
137132
|
},
|
|
137076
137133
|
// 生命周期 - 销毁之前
|
|
137077
137134
|
destroyed: function destroyed() {},
|
|
@@ -137079,6 +137136,66 @@ var Applet_component = normalizeComponent(
|
|
|
137079
137136
|
activated: function activated() {},
|
|
137080
137137
|
// 方法集合
|
|
137081
137138
|
methods: {
|
|
137139
|
+
handleTouchStart: function handleTouchStart(e) {
|
|
137140
|
+
if (e.touches.length > 1) {
|
|
137141
|
+
this.pullEnabled = false;
|
|
137142
|
+
return;
|
|
137143
|
+
}
|
|
137144
|
+
var el = document.getElementById('homePage');
|
|
137145
|
+
this.startX = e.touches[0].clientX;
|
|
137146
|
+
this.startY = e.touches[0].clientY;
|
|
137147
|
+
this.pullEnabled = !!el && el.scrollTop <= 0;
|
|
137148
|
+
this.tipVisible = this.pullEnabled;
|
|
137149
|
+
},
|
|
137150
|
+
handleTouchMove: function handleTouchMove(e) {
|
|
137151
|
+
if (!this.pullEnabled || this.isRefreshing) return;
|
|
137152
|
+
var dy = e.touches[0].clientY - this.startY;
|
|
137153
|
+
var dx = Math.abs(e.touches[0].clientX - this.startX);
|
|
137154
|
+
if (dy <= 0 || dx > dy) {
|
|
137155
|
+
// 上滑或横向滑动不响应下拉,复位位移
|
|
137156
|
+
this.pullDistance = 0;
|
|
137157
|
+
return;
|
|
137158
|
+
}
|
|
137159
|
+
var el = document.getElementById('homePage');
|
|
137160
|
+
if (!el || el.scrollTop > 0) return;
|
|
137161
|
+
this.pullDistance = Math.min(dy * 0.4, this.maxDistance);
|
|
137162
|
+
if (e.cancelable) e.preventDefault();
|
|
137163
|
+
},
|
|
137164
|
+
handleTouchEnd: function handleTouchEnd() {
|
|
137165
|
+
var _this = this;
|
|
137166
|
+
if (this.isRefreshing) return; // 刷新指示期内忽略后续触摸,避免提前隐藏提示条
|
|
137167
|
+
if (this.pullDistance >= this.threshold) {
|
|
137168
|
+
this.isRefreshing = true;
|
|
137169
|
+
this.$bus.emit('refreshPortletData');
|
|
137170
|
+
this.pullDistance = 40; // 平滑收拢到刷新指示条高度,显示"正在刷新..."
|
|
137171
|
+
clearTimeout(this.refreshTimer);
|
|
137172
|
+
clearTimeout(this.hideTimer);
|
|
137173
|
+
this.refreshTimer = setTimeout(function () {
|
|
137174
|
+
// 进入收起阶段:文案保持"正在刷新...",高度 40→0 平滑过渡,无跳变无闪烁
|
|
137175
|
+
_this.collapsing = true;
|
|
137176
|
+
_this.pullDistance = 0;
|
|
137177
|
+
// 收起过渡(0.2s)结束后再隐藏提示条并复位状态,避免瞬间消失造成卡顿感
|
|
137178
|
+
_this.hideTimer = setTimeout(function () {
|
|
137179
|
+
_this.isRefreshing = false;
|
|
137180
|
+
_this.collapsing = false;
|
|
137181
|
+
_this.tipVisible = false;
|
|
137182
|
+
}, 250);
|
|
137183
|
+
}, 1000);
|
|
137184
|
+
} else {
|
|
137185
|
+
this.pullDistance = 0;
|
|
137186
|
+
// 收起过渡结束后再隐藏,与刷新分支保持一致的平滑回弹
|
|
137187
|
+
clearTimeout(this.hideTimer);
|
|
137188
|
+
this.hideTimer = setTimeout(function () {
|
|
137189
|
+
_this.tipVisible = false;
|
|
137190
|
+
}, 250);
|
|
137191
|
+
}
|
|
137192
|
+
this.pullEnabled = false;
|
|
137193
|
+
},
|
|
137194
|
+
handleTouchCancel: function handleTouchCancel() {
|
|
137195
|
+
this.pullDistance = 0;
|
|
137196
|
+
this.tipVisible = false;
|
|
137197
|
+
this.pullEnabled = false;
|
|
137198
|
+
},
|
|
137082
137199
|
scrollToPosition: function scrollToPosition() {
|
|
137083
137200
|
document.getElementById('homePage') && (document.getElementById('homePage').scrollTop = this.scrollPosition);
|
|
137084
137201
|
},
|
|
@@ -137107,9 +137224,9 @@ var Applet_component = normalizeComponent(
|
|
|
137107
137224
|
});
|
|
137108
137225
|
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=script&lang=js
|
|
137109
137226
|
/* harmony default export */ var components_DragAppletvue_type_script_lang_js = (DragAppletvue_type_script_lang_js);
|
|
137110
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=
|
|
137111
|
-
var
|
|
137112
|
-
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=
|
|
137227
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=6b99084c&prod&lang=scss&scoped=true
|
|
137228
|
+
var DragAppletvue_type_style_index_0_id_6b99084c_prod_lang_scss_scoped_true = __webpack_require__(491);
|
|
137229
|
+
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=6b99084c&prod&lang=scss&scoped=true
|
|
137113
137230
|
|
|
137114
137231
|
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue
|
|
137115
137232
|
|
|
@@ -137122,11 +137239,11 @@ var DragAppletvue_type_style_index_0_id_cd089ff2_prod_lang_scss_scoped_true = __
|
|
|
137122
137239
|
|
|
137123
137240
|
var DragApplet_component = normalizeComponent(
|
|
137124
137241
|
components_DragAppletvue_type_script_lang_js,
|
|
137125
|
-
|
|
137126
|
-
|
|
137242
|
+
DragAppletvue_type_template_id_6b99084c_scoped_true_render,
|
|
137243
|
+
DragAppletvue_type_template_id_6b99084c_scoped_true_staticRenderFns,
|
|
137127
137244
|
false,
|
|
137128
137245
|
null,
|
|
137129
|
-
"
|
|
137246
|
+
"6b99084c",
|
|
137130
137247
|
null
|
|
137131
137248
|
|
|
137132
137249
|
)
|
package/lib/ecmoabase.umd.js
CHANGED
|
@@ -1162,7 +1162,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".applet-wrap[data-v-9bb86398]{width:10
|
|
|
1162
1162
|
|
|
1163
1163
|
/***/ }),
|
|
1164
1164
|
|
|
1165
|
-
/***/
|
|
1165
|
+
/***/ 6967:
|
|
1166
1166
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1167
1167
|
|
|
1168
1168
|
"use strict";
|
|
@@ -1176,7 +1176,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1176
1176
|
|
|
1177
1177
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
1178
1178
|
// Module
|
|
1179
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".board[data-v-
|
|
1179
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".board[data-v-6b99084c]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;width:100%;position:relative;background:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#f8f8f8));background:linear-gradient(180deg,#f9f9f9 0,#f8f8f8)}.board .homePage[data-v-6b99084c]{height:100%;width:100%;overflow:auto}.board .refresh-tip[data-v-6b99084c]{position:relative;z-index:10;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;font-size:12px;color:#999;background:transparent;-webkit-transition:height .2s;transition:height .2s}", ""]);
|
|
1180
1180
|
// Exports
|
|
1181
1181
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
1182
1182
|
|
|
@@ -25966,19 +25966,19 @@ var update = add("865bc1a4", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
25966
25966
|
|
|
25967
25967
|
/***/ }),
|
|
25968
25968
|
|
|
25969
|
-
/***/
|
|
25969
|
+
/***/ 6382:
|
|
25970
25970
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
25971
25971
|
|
|
25972
25972
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
25973
25973
|
|
|
25974
25974
|
// load the styles
|
|
25975
|
-
var content = __webpack_require__(
|
|
25975
|
+
var content = __webpack_require__(6967);
|
|
25976
25976
|
if(content.__esModule) content = content.default;
|
|
25977
25977
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
25978
25978
|
if(content.locals) module.exports = content.locals;
|
|
25979
25979
|
// add the styles to the DOM
|
|
25980
25980
|
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
25981
|
-
var update = add("
|
|
25981
|
+
var update = add("bf717f3c", content, true, {"sourceMap":false,"shadowMode":false});
|
|
25982
25982
|
|
|
25983
25983
|
/***/ }),
|
|
25984
25984
|
|
|
@@ -136859,8 +136859,8 @@ var Calendar_component = normalizeComponent(
|
|
|
136859
136859
|
)
|
|
136860
136860
|
|
|
136861
136861
|
/* harmony default export */ var Calendar = (Calendar_component.exports);
|
|
136862
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=template&id=
|
|
136863
|
-
var
|
|
136862
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=template&id=6b99084c&scoped=true
|
|
136863
|
+
var DragAppletvue_type_template_id_6b99084c_scoped_true_render = function render() {
|
|
136864
136864
|
var _vm = this,
|
|
136865
136865
|
_c = _vm._self._c;
|
|
136866
136866
|
return _c('div', {
|
|
@@ -136871,9 +136871,23 @@ var DragAppletvue_type_template_id_cd089ff2_scoped_true_render = function render
|
|
|
136871
136871
|
"id": "homePage"
|
|
136872
136872
|
},
|
|
136873
136873
|
on: {
|
|
136874
|
-
"scroll": _vm.scrollTop
|
|
136874
|
+
"scroll": _vm.scrollTop,
|
|
136875
|
+
"touchstart": _vm.handleTouchStart,
|
|
136876
|
+
"touchend": _vm.handleTouchEnd,
|
|
136877
|
+
"touchcancel": _vm.handleTouchCancel
|
|
136875
136878
|
}
|
|
136876
|
-
},
|
|
136879
|
+
}, [_c('div', {
|
|
136880
|
+
directives: [{
|
|
136881
|
+
name: "show",
|
|
136882
|
+
rawName: "v-show",
|
|
136883
|
+
value: _vm.tipVisible,
|
|
136884
|
+
expression: "tipVisible"
|
|
136885
|
+
}],
|
|
136886
|
+
staticClass: "refresh-tip",
|
|
136887
|
+
style: {
|
|
136888
|
+
height: _vm.tipHeight + 'px'
|
|
136889
|
+
}
|
|
136890
|
+
}, [_c('span', [_vm._v(_vm._s(_vm.tipText))])]), _vm._l(_vm.layoutData, function (item, index) {
|
|
136877
136891
|
return _c('div', {
|
|
136878
136892
|
key: index,
|
|
136879
136893
|
staticClass: "drag-item",
|
|
@@ -136890,9 +136904,9 @@ var DragAppletvue_type_template_id_cd089ff2_scoped_true_render = function render
|
|
|
136890
136904
|
"applet-data": item
|
|
136891
136905
|
}
|
|
136892
136906
|
})], 1);
|
|
136893
|
-
}),
|
|
136907
|
+
})], 2)]);
|
|
136894
136908
|
};
|
|
136895
|
-
var
|
|
136909
|
+
var DragAppletvue_type_template_id_6b99084c_scoped_true_staticRenderFns = [];
|
|
136896
136910
|
|
|
136897
136911
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/Applet.vue?vue&type=template&id=9bb86398&scoped=true
|
|
136898
136912
|
var Appletvue_type_template_id_9bb86398_scoped_true_render = function render() {
|
|
@@ -137054,18 +137068,57 @@ var Applet_component = normalizeComponent(
|
|
|
137054
137068
|
},
|
|
137055
137069
|
data: function data() {
|
|
137056
137070
|
return {
|
|
137057
|
-
startScroll: 123
|
|
137071
|
+
startScroll: 123,
|
|
137072
|
+
startX: 0,
|
|
137073
|
+
// 触摸起始横坐标(用于排除横向滑动误判)
|
|
137074
|
+
startY: 0,
|
|
137075
|
+
// 触摸起始纵坐标
|
|
137076
|
+
pullDistance: 0,
|
|
137077
|
+
// 当前下拉位移(带阻尼)
|
|
137078
|
+
isRefreshing: false,
|
|
137079
|
+
collapsing: false,
|
|
137080
|
+
// 刷新结束后的收起阶段(文案保持"正在刷新...",高度平滑归零)
|
|
137081
|
+
tipVisible: false,
|
|
137082
|
+
// 提示条是否显示(收起动画结束后才隐藏,避免闪现)
|
|
137083
|
+
pullEnabled: false,
|
|
137084
|
+
// 仅滚动到顶部时允许下拉
|
|
137085
|
+
threshold: 60,
|
|
137086
|
+
// 触发刷新阈值
|
|
137087
|
+
maxDistance: 90 // 最大下拉位移
|
|
137058
137088
|
};
|
|
137059
137089
|
},
|
|
137060
|
-
computed: {
|
|
137090
|
+
computed: {
|
|
137091
|
+
tipHeight: function tipHeight() {
|
|
137092
|
+
// 刷新中固定展示 40px 指示条;收起阶段高度归零由 transition 平滑过渡;其余跟随下拉位移
|
|
137093
|
+
return this.isRefreshing && !this.collapsing ? 40 : this.pullDistance;
|
|
137094
|
+
},
|
|
137095
|
+
tipText: function tipText() {
|
|
137096
|
+
// 优先读语言包($tx 内部已带语言包命中逻辑),任何异常都回退中文默认文案,保证提示永不空白
|
|
137097
|
+
try {
|
|
137098
|
+
if (this.isRefreshing || this.collapsing) return this.$tx('common.refreshing', '正在刷新...');
|
|
137099
|
+
if (this.pullDistance >= this.threshold) return this.$tx('common.releaseToRefresh', '释放立即刷新');
|
|
137100
|
+
return this.$tx('common.pullToRefresh', '下拉刷新');
|
|
137101
|
+
} catch (err) {
|
|
137102
|
+
if (this.isRefreshing || this.collapsing) return '正在刷新...';
|
|
137103
|
+
return this.pullDistance >= this.threshold ? '释放立即刷新' : '下拉刷新';
|
|
137104
|
+
}
|
|
137105
|
+
}
|
|
137106
|
+
},
|
|
137061
137107
|
// 监控data中的数据变化
|
|
137062
137108
|
watch: {},
|
|
137063
137109
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
137064
137110
|
created: function created() {
|
|
137065
137111
|
this.$bus.on('scrollToPosition', this.scrollToPosition);
|
|
137112
|
+
this.refreshTimer = null; // 刷新状态复位定时器(非响应式)
|
|
137113
|
+
this.hideTimer = null; // 提示条收起后隐藏定时器(非响应式)
|
|
137066
137114
|
},
|
|
137067
137115
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
137068
137116
|
mounted: function mounted() {
|
|
137117
|
+
// touchmove 内条件性 preventDefault 需 passive: false,故用 JS 绑定(避免浏览器默认 passive 导致失效)
|
|
137118
|
+
var el = document.getElementById('homePage');
|
|
137119
|
+
el && el.addEventListener('touchmove', this.handleTouchMove, {
|
|
137120
|
+
passive: false
|
|
137121
|
+
});
|
|
137069
137122
|
if (localStorage.scrollPosition) {
|
|
137070
137123
|
setTimeout(function () {
|
|
137071
137124
|
document.getElementById('homePage').scrollTo(0, Number(localStorage.scrollPosition));
|
|
@@ -137082,6 +137135,10 @@ var Applet_component = normalizeComponent(
|
|
|
137082
137135
|
// 生命周期 - 更新之后
|
|
137083
137136
|
beforeDestroy: function beforeDestroy() {
|
|
137084
137137
|
this.$bus.off('scrollToPosition', this.scrollToPosition);
|
|
137138
|
+
var el = document.getElementById('homePage');
|
|
137139
|
+
el && el.removeEventListener('touchmove', this.handleTouchMove);
|
|
137140
|
+
clearTimeout(this.refreshTimer);
|
|
137141
|
+
clearTimeout(this.hideTimer);
|
|
137085
137142
|
},
|
|
137086
137143
|
// 生命周期 - 销毁之前
|
|
137087
137144
|
destroyed: function destroyed() {},
|
|
@@ -137089,6 +137146,66 @@ var Applet_component = normalizeComponent(
|
|
|
137089
137146
|
activated: function activated() {},
|
|
137090
137147
|
// 方法集合
|
|
137091
137148
|
methods: {
|
|
137149
|
+
handleTouchStart: function handleTouchStart(e) {
|
|
137150
|
+
if (e.touches.length > 1) {
|
|
137151
|
+
this.pullEnabled = false;
|
|
137152
|
+
return;
|
|
137153
|
+
}
|
|
137154
|
+
var el = document.getElementById('homePage');
|
|
137155
|
+
this.startX = e.touches[0].clientX;
|
|
137156
|
+
this.startY = e.touches[0].clientY;
|
|
137157
|
+
this.pullEnabled = !!el && el.scrollTop <= 0;
|
|
137158
|
+
this.tipVisible = this.pullEnabled;
|
|
137159
|
+
},
|
|
137160
|
+
handleTouchMove: function handleTouchMove(e) {
|
|
137161
|
+
if (!this.pullEnabled || this.isRefreshing) return;
|
|
137162
|
+
var dy = e.touches[0].clientY - this.startY;
|
|
137163
|
+
var dx = Math.abs(e.touches[0].clientX - this.startX);
|
|
137164
|
+
if (dy <= 0 || dx > dy) {
|
|
137165
|
+
// 上滑或横向滑动不响应下拉,复位位移
|
|
137166
|
+
this.pullDistance = 0;
|
|
137167
|
+
return;
|
|
137168
|
+
}
|
|
137169
|
+
var el = document.getElementById('homePage');
|
|
137170
|
+
if (!el || el.scrollTop > 0) return;
|
|
137171
|
+
this.pullDistance = Math.min(dy * 0.4, this.maxDistance);
|
|
137172
|
+
if (e.cancelable) e.preventDefault();
|
|
137173
|
+
},
|
|
137174
|
+
handleTouchEnd: function handleTouchEnd() {
|
|
137175
|
+
var _this = this;
|
|
137176
|
+
if (this.isRefreshing) return; // 刷新指示期内忽略后续触摸,避免提前隐藏提示条
|
|
137177
|
+
if (this.pullDistance >= this.threshold) {
|
|
137178
|
+
this.isRefreshing = true;
|
|
137179
|
+
this.$bus.emit('refreshPortletData');
|
|
137180
|
+
this.pullDistance = 40; // 平滑收拢到刷新指示条高度,显示"正在刷新..."
|
|
137181
|
+
clearTimeout(this.refreshTimer);
|
|
137182
|
+
clearTimeout(this.hideTimer);
|
|
137183
|
+
this.refreshTimer = setTimeout(function () {
|
|
137184
|
+
// 进入收起阶段:文案保持"正在刷新...",高度 40→0 平滑过渡,无跳变无闪烁
|
|
137185
|
+
_this.collapsing = true;
|
|
137186
|
+
_this.pullDistance = 0;
|
|
137187
|
+
// 收起过渡(0.2s)结束后再隐藏提示条并复位状态,避免瞬间消失造成卡顿感
|
|
137188
|
+
_this.hideTimer = setTimeout(function () {
|
|
137189
|
+
_this.isRefreshing = false;
|
|
137190
|
+
_this.collapsing = false;
|
|
137191
|
+
_this.tipVisible = false;
|
|
137192
|
+
}, 250);
|
|
137193
|
+
}, 1000);
|
|
137194
|
+
} else {
|
|
137195
|
+
this.pullDistance = 0;
|
|
137196
|
+
// 收起过渡结束后再隐藏,与刷新分支保持一致的平滑回弹
|
|
137197
|
+
clearTimeout(this.hideTimer);
|
|
137198
|
+
this.hideTimer = setTimeout(function () {
|
|
137199
|
+
_this.tipVisible = false;
|
|
137200
|
+
}, 250);
|
|
137201
|
+
}
|
|
137202
|
+
this.pullEnabled = false;
|
|
137203
|
+
},
|
|
137204
|
+
handleTouchCancel: function handleTouchCancel() {
|
|
137205
|
+
this.pullDistance = 0;
|
|
137206
|
+
this.tipVisible = false;
|
|
137207
|
+
this.pullEnabled = false;
|
|
137208
|
+
},
|
|
137092
137209
|
scrollToPosition: function scrollToPosition() {
|
|
137093
137210
|
document.getElementById('homePage') && (document.getElementById('homePage').scrollTop = this.scrollPosition);
|
|
137094
137211
|
},
|
|
@@ -137117,9 +137234,9 @@ var Applet_component = normalizeComponent(
|
|
|
137117
137234
|
});
|
|
137118
137235
|
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=script&lang=js
|
|
137119
137236
|
/* harmony default export */ var components_DragAppletvue_type_script_lang_js = (DragAppletvue_type_script_lang_js);
|
|
137120
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=
|
|
137121
|
-
var
|
|
137122
|
-
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=
|
|
137237
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=6b99084c&prod&lang=scss&scoped=true
|
|
137238
|
+
var DragAppletvue_type_style_index_0_id_6b99084c_prod_lang_scss_scoped_true = __webpack_require__(6382);
|
|
137239
|
+
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue?vue&type=style&index=0&id=6b99084c&prod&lang=scss&scoped=true
|
|
137123
137240
|
|
|
137124
137241
|
;// CONCATENATED MODULE: ./packages/ecmoa/moabase/src/common/components/DragApplet/index.vue
|
|
137125
137242
|
|
|
@@ -137132,11 +137249,11 @@ var DragAppletvue_type_style_index_0_id_cd089ff2_prod_lang_scss_scoped_true = __
|
|
|
137132
137249
|
|
|
137133
137250
|
var DragApplet_component = normalizeComponent(
|
|
137134
137251
|
components_DragAppletvue_type_script_lang_js,
|
|
137135
|
-
|
|
137136
|
-
|
|
137252
|
+
DragAppletvue_type_template_id_6b99084c_scoped_true_render,
|
|
137253
|
+
DragAppletvue_type_template_id_6b99084c_scoped_true_staticRenderFns,
|
|
137137
137254
|
false,
|
|
137138
137255
|
null,
|
|
137139
|
-
"
|
|
137256
|
+
"6b99084c",
|
|
137140
137257
|
null
|
|
137141
137258
|
|
|
137142
137259
|
)
|