eoss-ui 0.8.21 → 0.8.22
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 +158 -20
- package/lib/index.js +1 -1
- package/lib/main.js +157 -19
- package/package.json +1 -1
- package/packages/main/src/simplicity/index.vue +66 -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=65535c71&scoped=true&
|
|
5489
|
+
var simplicityvue_type_template_id_65535c71_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_65535c71_scoped_true_staticRenderFns = []
|
|
6256
|
+
simplicityvue_type_template_id_65535c71_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=65535c71&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,7 @@ 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 i = arg && arg != true && arg !== 'pageData' ? util["a" /* default */].indexOfObj(this.tabs, arg, 'appCode,code,id,url') : util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
|
|
13675
|
+
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
13676
|
var tab = this.tabs[i];
|
|
13675
13677
|
if (isIE || tab.method === 'iframe') {
|
|
13676
13678
|
if (arg && arg === 'pageData') {
|
|
@@ -13690,7 +13692,19 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13690
13692
|
if (arg && arg === 'pageData') {
|
|
13691
13693
|
external_wujie_vue2_default.a.$emit('pageData', tab);
|
|
13692
13694
|
} else {
|
|
13693
|
-
window.document
|
|
13695
|
+
// window.document
|
|
13696
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
13697
|
+
// .contentWindow.location.reload(true);
|
|
13698
|
+
var url = tab.url;
|
|
13699
|
+
// 如果传入了路由参数,需要更新 URL
|
|
13700
|
+
if (arg && (typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && arg.path) {
|
|
13701
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
13702
|
+
}
|
|
13703
|
+
|
|
13704
|
+
tab.url = '';
|
|
13705
|
+
this.$nextTick(function () {
|
|
13706
|
+
tab.url = util["a" /* default */].handlerUrl(url);
|
|
13707
|
+
});
|
|
13694
13708
|
}
|
|
13695
13709
|
return;
|
|
13696
13710
|
}
|
|
@@ -13704,6 +13718,61 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
13704
13718
|
}
|
|
13705
13719
|
},
|
|
13706
13720
|
|
|
13721
|
+
/**
|
|
13722
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
13723
|
+
* @param {String} baseUrl - 基础 URL
|
|
13724
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
13725
|
+
* @returns {String} 拼接后的完整 URL
|
|
13726
|
+
**/
|
|
13727
|
+
buildWujieUrl: function buildWujieUrl(baseUrl, routeInfo) {
|
|
13728
|
+
var path = routeInfo.path,
|
|
13729
|
+
_routeInfo$params = routeInfo.params,
|
|
13730
|
+
params = _routeInfo$params === undefined ? {} : _routeInfo$params,
|
|
13731
|
+
_routeInfo$query = routeInfo.query,
|
|
13732
|
+
query = _routeInfo$query === undefined ? {} : _routeInfo$query;
|
|
13733
|
+
|
|
13734
|
+
|
|
13735
|
+
if (!path) {
|
|
13736
|
+
return baseUrl;
|
|
13737
|
+
}
|
|
13738
|
+
|
|
13739
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
13740
|
+
var fullPath = path;
|
|
13741
|
+
|
|
13742
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
13743
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
13744
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
13745
|
+
var paramValues = Object.values(params).filter(function (val) {
|
|
13746
|
+
return val !== undefined && val !== null;
|
|
13747
|
+
});
|
|
13748
|
+
if (paramValues.length > 0) {
|
|
13749
|
+
// 确保 path 不以 / 结尾
|
|
13750
|
+
var cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
13751
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
13752
|
+
}
|
|
13753
|
+
|
|
13754
|
+
// 2. 处理 query 参数
|
|
13755
|
+
var queryKeys = Object.keys(query);
|
|
13756
|
+
if (queryKeys.length > 0) {
|
|
13757
|
+
var queryString = queryKeys.map(function (key) {
|
|
13758
|
+
return encodeURIComponent(key) + '=' + encodeURIComponent(query[key]);
|
|
13759
|
+
}).join('&');
|
|
13760
|
+
fullPath += '?' + queryString;
|
|
13761
|
+
}
|
|
13762
|
+
|
|
13763
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
13764
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
13765
|
+
// 提取:'http://example.com/app#'
|
|
13766
|
+
var baseUrlPrefix = baseUrl;
|
|
13767
|
+
var hashIndex = baseUrl.indexOf('#');
|
|
13768
|
+
if (hashIndex > -1) {
|
|
13769
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
13770
|
+
}
|
|
13771
|
+
|
|
13772
|
+
// 4. 拼接最终 URL
|
|
13773
|
+
return baseUrlPrefix + fullPath;
|
|
13774
|
+
},
|
|
13775
|
+
|
|
13707
13776
|
/**
|
|
13708
13777
|
* @desc:删除iframe
|
|
13709
13778
|
* @author huangbo
|
|
@@ -14135,18 +14204,18 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
14135
14204
|
|
|
14136
14205
|
var simplicity_component = Object(componentNormalizer["a" /* default */])(
|
|
14137
14206
|
src_simplicityvue_type_script_lang_js_,
|
|
14138
|
-
|
|
14139
|
-
|
|
14207
|
+
simplicityvue_type_template_id_65535c71_scoped_true_render,
|
|
14208
|
+
simplicityvue_type_template_id_65535c71_scoped_true_staticRenderFns,
|
|
14140
14209
|
false,
|
|
14141
14210
|
null,
|
|
14142
|
-
"
|
|
14211
|
+
"65535c71",
|
|
14143
14212
|
null
|
|
14144
14213
|
|
|
14145
14214
|
)
|
|
14146
14215
|
|
|
14147
14216
|
/* 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
|
|
14217
|
+
// 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&
|
|
14218
|
+
var simplicityTopvue_type_template_id_c03e4732_scoped_true_render = function () {
|
|
14150
14219
|
var _vm = this
|
|
14151
14220
|
var _h = _vm.$createElement
|
|
14152
14221
|
var _c = _vm._self._c || _h
|
|
@@ -14713,11 +14782,11 @@ var simplicityTopvue_type_template_id_bb63a666_scoped_true_render = function ()
|
|
|
14713
14782
|
1
|
|
14714
14783
|
)
|
|
14715
14784
|
}
|
|
14716
|
-
var
|
|
14717
|
-
|
|
14785
|
+
var simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns = []
|
|
14786
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_render._withStripped = true
|
|
14718
14787
|
|
|
14719
14788
|
|
|
14720
|
-
// CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=
|
|
14789
|
+
// CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=c03e4732&scoped=true&
|
|
14721
14790
|
|
|
14722
14791
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
14723
14792
|
var regenerator_ = __webpack_require__(4);
|
|
@@ -17007,6 +17076,8 @@ var simplicityTop_router_page_component = Object(componentNormalizer["a" /* defa
|
|
|
17007
17076
|
// 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
17077
|
|
|
17009
17078
|
|
|
17079
|
+
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; };
|
|
17080
|
+
|
|
17010
17081
|
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
17082
|
|
|
17012
17083
|
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 +19158,19 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19087
19158
|
if (arg && arg === 'pageData') {
|
|
19088
19159
|
external_wujie_vue2_default.a.$emit('pageData', tab);
|
|
19089
19160
|
} else {
|
|
19090
|
-
window.document
|
|
19161
|
+
// window.document
|
|
19162
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
19163
|
+
// .contentWindow.location.reload(true);
|
|
19164
|
+
var url = tab.url;
|
|
19165
|
+
// 如果传入了路由参数,需要更新 URL
|
|
19166
|
+
if (arg && (typeof arg === 'undefined' ? 'undefined' : simplicityTopvue_type_script_lang_js_typeof(arg)) === 'object' && arg.path) {
|
|
19167
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
19168
|
+
}
|
|
19169
|
+
|
|
19170
|
+
tab.url = '';
|
|
19171
|
+
this.$nextTick(function () {
|
|
19172
|
+
tab.url = util["a" /* default */].handlerUrl(url);
|
|
19173
|
+
});
|
|
19091
19174
|
}
|
|
19092
19175
|
return;
|
|
19093
19176
|
}
|
|
@@ -19102,6 +19185,61 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19102
19185
|
}
|
|
19103
19186
|
},
|
|
19104
19187
|
|
|
19188
|
+
/**
|
|
19189
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
19190
|
+
* @param {String} baseUrl - 基础 URL
|
|
19191
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
19192
|
+
* @returns {String} 拼接后的完整 URL
|
|
19193
|
+
**/
|
|
19194
|
+
buildWujieUrl: function buildWujieUrl(baseUrl, routeInfo) {
|
|
19195
|
+
var path = routeInfo.path,
|
|
19196
|
+
_routeInfo$params = routeInfo.params,
|
|
19197
|
+
params = _routeInfo$params === undefined ? {} : _routeInfo$params,
|
|
19198
|
+
_routeInfo$query = routeInfo.query,
|
|
19199
|
+
query = _routeInfo$query === undefined ? {} : _routeInfo$query;
|
|
19200
|
+
|
|
19201
|
+
|
|
19202
|
+
if (!path) {
|
|
19203
|
+
return baseUrl;
|
|
19204
|
+
}
|
|
19205
|
+
|
|
19206
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
19207
|
+
var fullPath = path;
|
|
19208
|
+
|
|
19209
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
19210
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
19211
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
19212
|
+
var paramValues = Object.values(params).filter(function (val) {
|
|
19213
|
+
return val !== undefined && val !== null;
|
|
19214
|
+
});
|
|
19215
|
+
if (paramValues.length > 0) {
|
|
19216
|
+
// 确保 path 不以 / 结尾
|
|
19217
|
+
var cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
19218
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
19219
|
+
}
|
|
19220
|
+
|
|
19221
|
+
// 2. 处理 query 参数
|
|
19222
|
+
var queryKeys = Object.keys(query);
|
|
19223
|
+
if (queryKeys.length > 0) {
|
|
19224
|
+
var queryString = queryKeys.map(function (key) {
|
|
19225
|
+
return encodeURIComponent(key) + '=' + encodeURIComponent(query[key]);
|
|
19226
|
+
}).join('&');
|
|
19227
|
+
fullPath += '?' + queryString;
|
|
19228
|
+
}
|
|
19229
|
+
|
|
19230
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
19231
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
19232
|
+
// 提取:'http://example.com/app#'
|
|
19233
|
+
var baseUrlPrefix = baseUrl;
|
|
19234
|
+
var hashIndex = baseUrl.indexOf('#');
|
|
19235
|
+
if (hashIndex > -1) {
|
|
19236
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
19237
|
+
}
|
|
19238
|
+
|
|
19239
|
+
// 4. 拼接最终 URL
|
|
19240
|
+
return baseUrlPrefix + fullPath;
|
|
19241
|
+
},
|
|
19242
|
+
|
|
19105
19243
|
/**
|
|
19106
19244
|
* @desc:删除iframe
|
|
19107
19245
|
* @author huangbo
|
|
@@ -19593,11 +19731,11 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].ge
|
|
|
19593
19731
|
|
|
19594
19732
|
var simplicityTop_component = Object(componentNormalizer["a" /* default */])(
|
|
19595
19733
|
src_simplicityTopvue_type_script_lang_js_,
|
|
19596
|
-
|
|
19597
|
-
|
|
19734
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_render,
|
|
19735
|
+
simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns,
|
|
19598
19736
|
false,
|
|
19599
19737
|
null,
|
|
19600
|
-
"
|
|
19738
|
+
"c03e4732",
|
|
19601
19739
|
null
|
|
19602
19740
|
|
|
19603
19741
|
)
|
package/package.json
CHANGED
|
@@ -1856,7 +1856,7 @@ export default {
|
|
|
1856
1856
|
**/
|
|
1857
1857
|
handleRefresh(arg) {
|
|
1858
1858
|
let i =
|
|
1859
|
-
arg && arg != true && arg !== 'pageData'
|
|
1859
|
+
arg && arg != true && arg !== 'pageData' && !(typeof arg === 'object' && arg.path)
|
|
1860
1860
|
? util.indexOfObj(this.tabs, arg, 'appCode,code,id,url')
|
|
1861
1861
|
: util.indexOfObj(this.tabs, this.activeName, 'id');
|
|
1862
1862
|
let tab = this.tabs[i];
|
|
@@ -1882,9 +1882,19 @@ export default {
|
|
|
1882
1882
|
if (arg && arg === 'pageData') {
|
|
1883
1883
|
WujieVue.$emit('pageData', tab);
|
|
1884
1884
|
} else {
|
|
1885
|
-
window.document
|
|
1886
|
-
|
|
1887
|
-
|
|
1885
|
+
// window.document
|
|
1886
|
+
// .querySelector(`iframe[name=${tab.appCode}]`)
|
|
1887
|
+
// .contentWindow.location.reload(true);
|
|
1888
|
+
let url = tab.url;
|
|
1889
|
+
// 如果传入了路由参数,需要更新 URL
|
|
1890
|
+
if (arg && typeof arg === 'object' && arg.path) {
|
|
1891
|
+
url = this.buildWujieUrl(tab.url, arg);
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
tab.url = '';
|
|
1895
|
+
this.$nextTick(() => {
|
|
1896
|
+
tab.url = util.handlerUrl(url);
|
|
1897
|
+
});
|
|
1888
1898
|
}
|
|
1889
1899
|
return;
|
|
1890
1900
|
}
|
|
@@ -1897,6 +1907,58 @@ export default {
|
|
|
1897
1907
|
}
|
|
1898
1908
|
}
|
|
1899
1909
|
},
|
|
1910
|
+
/**
|
|
1911
|
+
* @desc:构建 Wujie 子应用 URL(处理路由参数)
|
|
1912
|
+
* @param {String} baseUrl - 基础 URL
|
|
1913
|
+
* @param {Object} routeInfo - 路由信息 { path, params, query }
|
|
1914
|
+
* @returns {String} 拼接后的完整 URL
|
|
1915
|
+
**/
|
|
1916
|
+
buildWujieUrl(baseUrl, routeInfo) {
|
|
1917
|
+
const { path, params = {}, query = {} } = routeInfo;
|
|
1918
|
+
|
|
1919
|
+
if (!path) {
|
|
1920
|
+
return baseUrl;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
// 1. 处理 path + params(Vue Router 风格:params 作为路径参数)
|
|
1924
|
+
let fullPath = path;
|
|
1925
|
+
|
|
1926
|
+
// 如果 params 中有值,将其拼接到 path 后面
|
|
1927
|
+
// 例如:path='/aa/bb', params={action:'action', id:'ddd', did:'33333'}
|
|
1928
|
+
// 结果:'/aa/bb/action/ddd/33333'
|
|
1929
|
+
const paramValues = Object.values(params).filter(
|
|
1930
|
+
(val) => val !== undefined && val !== null
|
|
1931
|
+
);
|
|
1932
|
+
if (paramValues.length > 0) {
|
|
1933
|
+
// 确保 path 不以 / 结尾
|
|
1934
|
+
const cleanPath = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
1935
|
+
fullPath = cleanPath + '/' + paramValues.join('/');
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
// 2. 处理 query 参数
|
|
1939
|
+
const queryKeys = Object.keys(query);
|
|
1940
|
+
if (queryKeys.length > 0) {
|
|
1941
|
+
const queryString = queryKeys
|
|
1942
|
+
.map(
|
|
1943
|
+
(key) =>
|
|
1944
|
+
`${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`
|
|
1945
|
+
)
|
|
1946
|
+
.join('&');
|
|
1947
|
+
fullPath += '?' + queryString;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
// 3. 从 baseUrl 中提取基础部分(去掉 hash 路由部分)
|
|
1951
|
+
// 例如:baseUrl = 'http://example.com/app#/old/path'
|
|
1952
|
+
// 提取:'http://example.com/app#'
|
|
1953
|
+
let baseUrlPrefix = baseUrl;
|
|
1954
|
+
const hashIndex = baseUrl.indexOf('#');
|
|
1955
|
+
if (hashIndex > -1) {
|
|
1956
|
+
baseUrlPrefix = baseUrl.substring(0, hashIndex + 1); // 保留 #
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
// 4. 拼接最终 URL
|
|
1960
|
+
return baseUrlPrefix + fullPath;
|
|
1961
|
+
},
|
|
1900
1962
|
/**
|
|
1901
1963
|
* @desc:删除iframe
|
|
1902
1964
|
* @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
|