eoss-ui 0.8.21 → 0.8.23
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/eoss-ui.common.js +174 -31
- package/lib/index.js +1 -1
- package/lib/main.js +173 -30
- package/package.json +1 -1
- package/packages/main/src/simplicity/index.vue +72 -4
- package/packages/main/src/simplicityTop/index.vue +65 -3
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/calendar.css +1 -0
- package/packages/theme-chalk/lib/calogin.css +0 -0
- package/packages/theme-chalk/lib/card.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +1 -0
- package/packages/theme-chalk/lib/clients.css +1 -0
- package/packages/theme-chalk/lib/data-table-form.css +1 -0
- package/packages/theme-chalk/lib/data-table.css +1 -0
- package/packages/theme-chalk/lib/date-picker.css +1 -0
- package/packages/theme-chalk/lib/dialog.css +1 -0
- package/packages/theme-chalk/lib/enable-drag.css +1 -0
- package/packages/theme-chalk/lib/enterprise.css +1 -0
- package/packages/theme-chalk/lib/error-page.css +1 -0
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/handle-user.css +1 -0
- package/packages/theme-chalk/lib/handler.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/icons.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +1 -0
- package/packages/theme-chalk/lib/label.css +1 -0
- package/packages/theme-chalk/lib/layout.css +1 -0
- package/packages/theme-chalk/lib/login.css +1 -0
- package/packages/theme-chalk/lib/main.css +1 -0
- package/packages/theme-chalk/lib/menu.css +1 -0
- package/packages/theme-chalk/lib/nav.css +1 -0
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/player.css +1 -0
- package/packages/theme-chalk/lib/qr-code.css +1 -0
- package/packages/theme-chalk/lib/radio-group.css +1 -0
- package/packages/theme-chalk/lib/retrial-auth.css +1 -0
- package/packages/theme-chalk/lib/select-ganged.css +1 -0
- package/packages/theme-chalk/lib/select.css +1 -0
- package/packages/theme-chalk/lib/selector-panel.css +1 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/simplicity-top.css +1 -0
- package/packages/theme-chalk/lib/simplicity.css +1 -0
- package/packages/theme-chalk/lib/sizer.css +1 -0
- package/packages/theme-chalk/lib/steps.css +1 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tips.css +1 -0
- package/packages/theme-chalk/lib/toolbar.css +1 -0
- package/packages/theme-chalk/lib/tree-group.css +1 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/upload.css +1 -0
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +1 -0
- package/src/index.js +1 -1
- package/packages/theme-chalk/gulpfile.js +0 -25
package/lib/main.js
CHANGED
|
@@ -5485,8 +5485,8 @@ render._withStripped = true
|
|
|
5485
5485
|
// EXTERNAL MODULE: ./src/config/image.js
|
|
5486
5486
|
var config_image = __webpack_require__(19);
|
|
5487
5487
|
|
|
5488
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
5489
|
-
var
|
|
5488
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=7b9689e2&scoped=true&
|
|
5489
|
+
var simplicityvue_type_template_id_7b9689e2_scoped_true_render = function () {
|
|
5490
5490
|
var _vm = this
|
|
5491
5491
|
var _h = _vm.$createElement
|
|
5492
5492
|
var _c = _vm._self._c || _h
|
|
@@ -6252,11 +6252,11 @@ var simplicityvue_type_template_id_8605940a_scoped_true_render = function () {
|
|
|
6252
6252
|
),
|
|
6253
6253
|
])
|
|
6254
6254
|
}
|
|
6255
|
-
var
|
|
6256
|
-
|
|
6255
|
+
var simplicityvue_type_template_id_7b9689e2_scoped_true_staticRenderFns = []
|
|
6256
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_render._withStripped = true
|
|
6257
6257
|
|
|
6258
6258
|
|
|
6259
|
-
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
6259
|
+
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=7b9689e2&scoped=true&
|
|
6260
6260
|
|
|
6261
6261
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=e722b45c&scoped=true&
|
|
6262
6262
|
var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
|
|
@@ -11882,6 +11882,8 @@ var external_wujie_vue2_ = __webpack_require__(16);
|
|
|
11882
11882
|
var external_wujie_vue2_default = /*#__PURE__*/__webpack_require__.n(external_wujie_vue2_);
|
|
11883
11883
|
|
|
11884
11884
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=script&lang=js&
|
|
11885
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
11886
|
+
|
|
11885
11887
|
var simplicityvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
11886
11888
|
|
|
11887
11889
|
//
|
|
@@ -13670,7 +13672,9 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13670
13672
|
* @date 2024年9月7日
|
|
13671
13673
|
**/
|
|
13672
13674
|
handleRefresh: function handleRefresh(arg) {
|
|
13673
|
-
var
|
|
13675
|
+
var _this7 = this;
|
|
13676
|
+
|
|
13677
|
+
var i = arg && arg != true && arg !== 'pageData' && !((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && arg.path) ? util["a" /* default */].indexOfObj(this.tabs, arg, 'appCode,code,id,url') : util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
|
|
13674
13678
|
var tab = this.tabs[i];
|
|
13675
13679
|
if (isIE || tab.method === 'iframe') {
|
|
13676
13680
|
if (arg && arg === 'pageData') {
|
|
@@ -13690,7 +13694,22 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13690
13694
|
if (arg && arg === 'pageData') {
|
|
13691
13695
|
external_wujie_vue2_default.a.$emit('pageData', tab);
|
|
13692
13696
|
} else {
|
|
13693
|
-
window.document
|
|
13697
|
+
// window.document
|
|
13698
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
13699
|
+
// .contentWindow.location.reload(true);
|
|
13700
|
+
var url = tab.url;
|
|
13701
|
+
// 如果传入了路由参数,需要更新 URL
|
|
13702
|
+
if (arg && (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && arg.path) {
|
|
13703
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
13704
|
+
}
|
|
13705
|
+
// 1. 获取带新时间戳的 URL
|
|
13706
|
+
var newUrl = util["a" /* default */].handlerUrl(url);
|
|
13707
|
+
// 2. 关键:先置空,等待 Wujie 销毁实例
|
|
13708
|
+
tab.url = '';
|
|
13709
|
+
// 3. 使用 setTimeout 替代 $nextTick,给 Wujie 更多时间清理内存和 DOM
|
|
13710
|
+
setTimeout(function () {
|
|
13711
|
+
_this7.$set(_this7.tabs, i, simplicityvue_type_script_lang_js_extends({}, tab, { url: newUrl }));
|
|
13712
|
+
}, 50); // 50ms 的延迟通常足以让 Wujie 完成卸载
|
|
13694
13713
|
}
|
|
13695
13714
|
return;
|
|
13696
13715
|
}
|
|
@@ -13704,6 +13723,61 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13704
13723
|
}
|
|
13705
13724
|
},
|
|
13706
13725
|
|
|
13726
|
+
/**
|
|
13727
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
13728
|
+
* @param {String} baseUrl - 基础 URL
|
|
13729
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
13730
|
+
* @returns {String} 拼接后的完整 URL
|
|
13731
|
+
**/
|
|
13732
|
+
buildWujieUrl: function buildWujieUrl(baseUrl, routeInfo) {
|
|
13733
|
+
var path = routeInfo.path,
|
|
13734
|
+
_routeInfo$params = routeInfo.params,
|
|
13735
|
+
params = _routeInfo$params === undefined ? {} : _routeInfo$params,
|
|
13736
|
+
_routeInfo$query = routeInfo.query,
|
|
13737
|
+
query = _routeInfo$query === undefined ? {} : _routeInfo$query;
|
|
13738
|
+
|
|
13739
|
+
|
|
13740
|
+
if (!path) {
|
|
13741
|
+
return baseUrl;
|
|
13742
|
+
}
|
|
13743
|
+
|
|
13744
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
13745
|
+
var fullPath = path;
|
|
13746
|
+
|
|
13747
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
13748
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
13749
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
13750
|
+
var paramValues = Object.values(params).filter(function (val) {
|
|
13751
|
+
return val !== undefined && val !== null;
|
|
13752
|
+
});
|
|
13753
|
+
if (paramValues.length > 0) {
|
|
13754
|
+
// 确保 path 不以 / 结尾
|
|
13755
|
+
var cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
13756
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
13757
|
+
}
|
|
13758
|
+
|
|
13759
|
+
// 2. 处理 query 参数
|
|
13760
|
+
var queryKeys = Object.keys(query);
|
|
13761
|
+
if (queryKeys.length > 0) {
|
|
13762
|
+
var queryString = queryKeys.map(function (key) {
|
|
13763
|
+
return encodeURIComponent(key) + '=' + encodeURIComponent(query[key]);
|
|
13764
|
+
}).join('&');
|
|
13765
|
+
fullPath += '?' + queryString;
|
|
13766
|
+
}
|
|
13767
|
+
|
|
13768
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
13769
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
13770
|
+
// 提取:'http://example.com/app#'
|
|
13771
|
+
var baseUrlPrefix = baseUrl;
|
|
13772
|
+
var hashIndex = baseUrl.indexOf('#');
|
|
13773
|
+
if (hashIndex > -1) {
|
|
13774
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
13775
|
+
}
|
|
13776
|
+
|
|
13777
|
+
// 4. 拼接最终 URL
|
|
13778
|
+
return baseUrlPrefix + fullPath;
|
|
13779
|
+
},
|
|
13780
|
+
|
|
13707
13781
|
/**
|
|
13708
13782
|
* @desc:删除iframe
|
|
13709
13783
|
* @author huangbo
|
|
@@ -13880,7 +13954,7 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13880
13954
|
* @date 2024年9月7日
|
|
13881
13955
|
**/
|
|
13882
13956
|
handleQuit: function handleQuit() {
|
|
13883
|
-
var
|
|
13957
|
+
var _this8 = this;
|
|
13884
13958
|
|
|
13885
13959
|
this.$confirm('确定退出吗?', '退出系统', {
|
|
13886
13960
|
confirmButtonText: '确定',
|
|
@@ -13896,19 +13970,19 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13896
13970
|
}
|
|
13897
13971
|
break;
|
|
13898
13972
|
}
|
|
13899
|
-
if (
|
|
13900
|
-
for (var _i2 = 0; _i2 <
|
|
13973
|
+
if (_this8.singleLogout) {
|
|
13974
|
+
for (var _i2 = 0; _i2 < _this8.singleLogout.length; _i2++) {
|
|
13901
13975
|
var iframe = document.createElement('iframe');
|
|
13902
13976
|
iframe.style.display = 'none';
|
|
13903
|
-
iframe.src =
|
|
13977
|
+
iframe.src = _this8.singleLogout[_i2];
|
|
13904
13978
|
document.body.appendChild(iframe);
|
|
13905
13979
|
}
|
|
13906
13980
|
}
|
|
13907
13981
|
util["a" /* default */].ajax({ method: 'post', url: api["yb" /* logout */] }).then(function (res) {
|
|
13908
13982
|
if (res.rCode == 0) {
|
|
13909
13983
|
util["a" /* default */].removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
|
|
13910
|
-
if (
|
|
13911
|
-
|
|
13984
|
+
if (_this8.onQuit && typeof _this8.onQuit === 'function') {
|
|
13985
|
+
_this8.onQuit();
|
|
13912
13986
|
} else {
|
|
13913
13987
|
try {
|
|
13914
13988
|
var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
|
|
@@ -13952,7 +14026,7 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13952
14026
|
}
|
|
13953
14027
|
}).catch(function (err) {
|
|
13954
14028
|
if (err.message && err.message !== 'canceled') {
|
|
13955
|
-
|
|
14029
|
+
_this8.$message.error(err.message);
|
|
13956
14030
|
}
|
|
13957
14031
|
});
|
|
13958
14032
|
}).catch(function (e) {});
|
|
@@ -14010,13 +14084,13 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
14010
14084
|
* @date 2024年9月7日
|
|
14011
14085
|
**/
|
|
14012
14086
|
handleOpened: function handleOpened(res) {
|
|
14013
|
-
var
|
|
14087
|
+
var _this9 = this;
|
|
14014
14088
|
|
|
14015
14089
|
if (res === undefined) {
|
|
14016
14090
|
this.sysMsg = [];
|
|
14017
14091
|
} else if (res == false && this.sysMsg.length) {
|
|
14018
14092
|
this.sysMsgOut = setTimeout(function () {
|
|
14019
|
-
|
|
14093
|
+
_this9.sysMsg = [];
|
|
14020
14094
|
}, 3000);
|
|
14021
14095
|
} else if (this.sysMsgOut) {
|
|
14022
14096
|
clearTimeout(this.sysMsgOut);
|
|
@@ -14092,13 +14166,13 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
14092
14166
|
|
|
14093
14167
|
//监听改变菜单
|
|
14094
14168
|
handleListener: function handleListener() {
|
|
14095
|
-
var
|
|
14169
|
+
var _this10 = this;
|
|
14096
14170
|
|
|
14097
14171
|
util["a" /* default */].win.addEventListener('message', function (e) {
|
|
14098
14172
|
var msg = e.data;
|
|
14099
14173
|
if (msg.key == 'jump_Menu') {
|
|
14100
14174
|
var res = msg.data1;
|
|
14101
|
-
|
|
14175
|
+
_this10.jumpMenu(res);
|
|
14102
14176
|
}
|
|
14103
14177
|
}, false);
|
|
14104
14178
|
},
|
|
@@ -14135,18 +14209,18 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
14135
14209
|
|
|
14136
14210
|
var simplicity_component = Object(componentNormalizer["a" /* default */])(
|
|
14137
14211
|
src_simplicityvue_type_script_lang_js_,
|
|
14138
|
-
|
|
14139
|
-
|
|
14212
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_render,
|
|
14213
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_staticRenderFns,
|
|
14140
14214
|
false,
|
|
14141
14215
|
null,
|
|
14142
|
-
"
|
|
14216
|
+
"7b9689e2",
|
|
14143
14217
|
null
|
|
14144
14218
|
|
|
14145
14219
|
)
|
|
14146
14220
|
|
|
14147
14221
|
/* harmony default export */ var simplicity = (simplicity_component.exports);
|
|
14148
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=
|
|
14149
|
-
var
|
|
14222
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=c03e4732&scoped=true&
|
|
14223
|
+
var simplicityTopvue_type_template_id_c03e4732_scoped_true_render = function () {
|
|
14150
14224
|
var _vm = this
|
|
14151
14225
|
var _h = _vm.$createElement
|
|
14152
14226
|
var _c = _vm._self._c || _h
|
|
@@ -14713,11 +14787,11 @@ var simplicityTopvue_type_template_id_bb63a666_scoped_true_render = function ()
|
|
|
14713
14787
|
1
|
|
14714
14788
|
)
|
|
14715
14789
|
}
|
|
14716
|
-
var
|
|
14717
|
-
|
|
14790
|
+
var simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns = []
|
|
14791
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_render._withStripped = true
|
|
14718
14792
|
|
|
14719
14793
|
|
|
14720
|
-
// CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=
|
|
14794
|
+
// CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=c03e4732&scoped=true&
|
|
14721
14795
|
|
|
14722
14796
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
14723
14797
|
var regenerator_ = __webpack_require__(4);
|
|
@@ -17007,6 +17081,8 @@ var simplicityTop_router_page_component = Object(componentNormalizer["a" /* defa
|
|
|
17007
17081
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=script&lang=js&
|
|
17008
17082
|
|
|
17009
17083
|
|
|
17084
|
+
var simplicityTopvue_type_script_lang_js_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
17085
|
+
|
|
17010
17086
|
var simplicityTopvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
17011
17087
|
|
|
17012
17088
|
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
|
@@ -19087,7 +19163,19 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19087
19163
|
if (arg && arg === 'pageData') {
|
|
19088
19164
|
external_wujie_vue2_default.a.$emit('pageData', tab);
|
|
19089
19165
|
} else {
|
|
19090
|
-
window.document
|
|
19166
|
+
// window.document
|
|
19167
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
19168
|
+
// .contentWindow.location.reload(true);
|
|
19169
|
+
var url = tab.url;
|
|
19170
|
+
// 如果传入了路由参数,需要更新 URL
|
|
19171
|
+
if (arg && (typeof arg === 'undefined' ? 'undefined' : simplicityTopvue_type_script_lang_js_typeof(arg)) === 'object' && arg.path) {
|
|
19172
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
19173
|
+
}
|
|
19174
|
+
|
|
19175
|
+
tab.url = '';
|
|
19176
|
+
this.$nextTick(function () {
|
|
19177
|
+
tab.url = util["a" /* default */].handlerUrl(url);
|
|
19178
|
+
});
|
|
19091
19179
|
}
|
|
19092
19180
|
return;
|
|
19093
19181
|
}
|
|
@@ -19102,6 +19190,61 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19102
19190
|
}
|
|
19103
19191
|
},
|
|
19104
19192
|
|
|
19193
|
+
/**
|
|
19194
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
19195
|
+
* @param {String} baseUrl - 基础 URL
|
|
19196
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
19197
|
+
* @returns {String} 拼接后的完整 URL
|
|
19198
|
+
**/
|
|
19199
|
+
buildWujieUrl: function buildWujieUrl(baseUrl, routeInfo) {
|
|
19200
|
+
var path = routeInfo.path,
|
|
19201
|
+
_routeInfo$params = routeInfo.params,
|
|
19202
|
+
params = _routeInfo$params === undefined ? {} : _routeInfo$params,
|
|
19203
|
+
_routeInfo$query = routeInfo.query,
|
|
19204
|
+
query = _routeInfo$query === undefined ? {} : _routeInfo$query;
|
|
19205
|
+
|
|
19206
|
+
|
|
19207
|
+
if (!path) {
|
|
19208
|
+
return baseUrl;
|
|
19209
|
+
}
|
|
19210
|
+
|
|
19211
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
19212
|
+
var fullPath = path;
|
|
19213
|
+
|
|
19214
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
19215
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
19216
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
19217
|
+
var paramValues = Object.values(params).filter(function (val) {
|
|
19218
|
+
return val !== undefined && val !== null;
|
|
19219
|
+
});
|
|
19220
|
+
if (paramValues.length > 0) {
|
|
19221
|
+
// 确保 path 不以 / 结尾
|
|
19222
|
+
var cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
19223
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
19224
|
+
}
|
|
19225
|
+
|
|
19226
|
+
// 2. 处理 query 参数
|
|
19227
|
+
var queryKeys = Object.keys(query);
|
|
19228
|
+
if (queryKeys.length > 0) {
|
|
19229
|
+
var queryString = queryKeys.map(function (key) {
|
|
19230
|
+
return encodeURIComponent(key) + '=' + encodeURIComponent(query[key]);
|
|
19231
|
+
}).join('&');
|
|
19232
|
+
fullPath += '?' + queryString;
|
|
19233
|
+
}
|
|
19234
|
+
|
|
19235
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
19236
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
19237
|
+
// 提取:'http://example.com/app#'
|
|
19238
|
+
var baseUrlPrefix = baseUrl;
|
|
19239
|
+
var hashIndex = baseUrl.indexOf('#');
|
|
19240
|
+
if (hashIndex > -1) {
|
|
19241
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
19242
|
+
}
|
|
19243
|
+
|
|
19244
|
+
// 4. 拼接最终 URL
|
|
19245
|
+
return baseUrlPrefix + fullPath;
|
|
19246
|
+
},
|
|
19247
|
+
|
|
19105
19248
|
/**
|
|
19106
19249
|
* @desc:删除iframe
|
|
19107
19250
|
* @author huangbo
|
|
@@ -19593,11 +19736,11 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19593
19736
|
|
|
19594
19737
|
var simplicityTop_component = Object(componentNormalizer["a" /* default */])(
|
|
19595
19738
|
src_simplicityTopvue_type_script_lang_js_,
|
|
19596
|
-
|
|
19597
|
-
|
|
19739
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_render,
|
|
19740
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns,
|
|
19598
19741
|
false,
|
|
19599
19742
|
null,
|
|
19600
|
-
"
|
|
19743
|
+
"c03e4732",
|
|
19601
19744
|
null
|
|
19602
19745
|
|
|
19603
19746
|
)
|
package/package.json
CHANGED
|
@@ -1856,7 +1856,10 @@ export default {
|
|
|
1856
1856
|
**/
|
|
1857
1857
|
handleRefresh(arg) {
|
|
1858
1858
|
let i =
|
|
1859
|
-
arg &&
|
|
1859
|
+
arg &&
|
|
1860
|
+
arg != true &&
|
|
1861
|
+
arg !== 'pageData' &&
|
|
1862
|
+
!(typeof arg === 'object' && arg.path)
|
|
1860
1863
|
? util.indexOfObj(this.tabs, arg, 'appCode,code,id,url')
|
|
1861
1864
|
: util.indexOfObj(this.tabs, this.activeName, 'id');
|
|
1862
1865
|
let tab = this.tabs[i];
|
|
@@ -1882,9 +1885,22 @@ export default {
|
|
|
1882
1885
|
if (arg && arg === 'pageData') {
|
|
1883
1886
|
WujieVue.$emit('pageData', tab);
|
|
1884
1887
|
} else {
|
|
1885
|
-
window.document
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
+
// window.document
|
|
1889
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
1890
|
+
// .contentWindow.location.reload(true);
|
|
1891
|
+
let url = tab.url;
|
|
1892
|
+
// 如果传入了路由参数,需要更新 URL
|
|
1893
|
+
if (arg && typeof arg === 'object' && arg.path) {
|
|
1894
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
1895
|
+
}
|
|
1896
|
+
// 1. 获取带新时间戳的 URL
|
|
1897
|
+
const newUrl = util.handlerUrl(url);
|
|
1898
|
+
// 2. 关键:先置空,等待 Wujie 销毁实例
|
|
1899
|
+
tab.url = '';
|
|
1900
|
+
// 3. 使用 setTimeout 替代 $nextTick,给 Wujie 更多时间清理内存和 DOM
|
|
1901
|
+
setTimeout(() => {
|
|
1902
|
+
this.$set(this.tabs, i, { ...tab, url: newUrl });
|
|
1903
|
+
}, 50); // 50ms 的延迟通常足以让 Wujie 完成卸载
|
|
1888
1904
|
}
|
|
1889
1905
|
return;
|
|
1890
1906
|
}
|
|
@@ -1897,6 +1913,58 @@ export default {
|
|
|
1897
1913
|
}
|
|
1898
1914
|
}
|
|
1899
1915
|
},
|
|
1916
|
+
/**
|
|
1917
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
1918
|
+
* @param {String} baseUrl - 基础 URL
|
|
1919
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
1920
|
+
* @returns {String} 拼接后的完整 URL
|
|
1921
|
+
**/
|
|
1922
|
+
buildWujieUrl(baseUrl, routeInfo) {
|
|
1923
|
+
const { path, params = {}, query = {} } = routeInfo;
|
|
1924
|
+
|
|
1925
|
+
if (!path) {
|
|
1926
|
+
return baseUrl;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
1930
|
+
let fullPath = path;
|
|
1931
|
+
|
|
1932
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
1933
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
1934
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
1935
|
+
const paramValues = Object.values(params).filter(
|
|
1936
|
+
(val) => val !== undefined && val !== null
|
|
1937
|
+
);
|
|
1938
|
+
if (paramValues.length > 0) {
|
|
1939
|
+
// 确保 path 不以 / 结尾
|
|
1940
|
+
const cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
1941
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
// 2. 处理 query 参数
|
|
1945
|
+
const queryKeys = Object.keys(query);
|
|
1946
|
+
if (queryKeys.length > 0) {
|
|
1947
|
+
const queryString = queryKeys
|
|
1948
|
+
.map(
|
|
1949
|
+
(key) =>
|
|
1950
|
+
`${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`
|
|
1951
|
+
)
|
|
1952
|
+
.join('&');
|
|
1953
|
+
fullPath += '?' + queryString;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
1957
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
1958
|
+
// 提取:'http://example.com/app#'
|
|
1959
|
+
let baseUrlPrefix = baseUrl;
|
|
1960
|
+
const hashIndex = baseUrl.indexOf('#');
|
|
1961
|
+
if (hashIndex > -1) {
|
|
1962
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
// 4. 拼接最终 URL
|
|
1966
|
+
return baseUrlPrefix + fullPath;
|
|
1967
|
+
},
|
|
1900
1968
|
/**
|
|
1901
1969
|
* @desc:删除iframe
|
|
1902
1970
|
* @author huangbo
|
|
@@ -2126,9 +2126,19 @@ export default {
|
|
|
2126
2126
|
if (arg && arg === 'pageData') {
|
|
2127
2127
|
WujieVue.$emit('pageData', tab);
|
|
2128
2128
|
} else {
|
|
2129
|
-
window.document
|
|
2130
|
-
|
|
2131
|
-
|
|
2129
|
+
// window.document
|
|
2130
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
2131
|
+
// .contentWindow.location.reload(true);
|
|
2132
|
+
let url = tab.url;
|
|
2133
|
+
// 如果传入了路由参数,需要更新 URL
|
|
2134
|
+
if (arg && typeof arg === 'object' && arg.path) {
|
|
2135
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
tab.url = '';
|
|
2139
|
+
this.$nextTick(() => {
|
|
2140
|
+
tab.url = util.handlerUrl(url);
|
|
2141
|
+
});
|
|
2132
2142
|
}
|
|
2133
2143
|
return;
|
|
2134
2144
|
}
|
|
@@ -2142,6 +2152,58 @@ export default {
|
|
|
2142
2152
|
}
|
|
2143
2153
|
}
|
|
2144
2154
|
},
|
|
2155
|
+
/**
|
|
2156
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
2157
|
+
* @param {String} baseUrl - 基础 URL
|
|
2158
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
2159
|
+
* @returns {String} 拼接后的完整 URL
|
|
2160
|
+
**/
|
|
2161
|
+
buildWujieUrl(baseUrl, routeInfo) {
|
|
2162
|
+
const { path, params = {}, query = {} } = routeInfo;
|
|
2163
|
+
|
|
2164
|
+
if (!path) {
|
|
2165
|
+
return baseUrl;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
2169
|
+
let fullPath = path;
|
|
2170
|
+
|
|
2171
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
2172
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
2173
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
2174
|
+
const paramValues = Object.values(params).filter(
|
|
2175
|
+
(val) => val !== undefined && val !== null
|
|
2176
|
+
);
|
|
2177
|
+
if (paramValues.length > 0) {
|
|
2178
|
+
// 确保 path 不以 / 结尾
|
|
2179
|
+
const cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
2180
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
// 2. 处理 query 参数
|
|
2184
|
+
const queryKeys = Object.keys(query);
|
|
2185
|
+
if (queryKeys.length > 0) {
|
|
2186
|
+
const queryString = queryKeys
|
|
2187
|
+
.map(
|
|
2188
|
+
(key) =>
|
|
2189
|
+
`${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`
|
|
2190
|
+
)
|
|
2191
|
+
.join('&');
|
|
2192
|
+
fullPath += '?' + queryString;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
2196
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
2197
|
+
// 提取:'http://example.com/app#'
|
|
2198
|
+
let baseUrlPrefix = baseUrl;
|
|
2199
|
+
const hashIndex = baseUrl.indexOf('#');
|
|
2200
|
+
if (hashIndex > -1) {
|
|
2201
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
// 4. 拼接最终 URL
|
|
2205
|
+
return baseUrlPrefix + fullPath;
|
|
2206
|
+
},
|
|
2145
2207
|
/**
|
|
2146
2208
|
* @desc:删除iframe
|
|
2147
2209
|
* @author huangbo
|