whistle.mockbubu 2.2.0-beta.3 → 2.2.0-beta.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.mockbubu",
3
- "version": "2.2.0-beta.3",
3
+ "version": "2.2.0-beta.4",
4
4
  "description": "mock response data",
5
5
  "scripts": {
6
6
  "lint": "eslint . --ext .js",
package/public/js/app.js CHANGED
@@ -1993,7 +1993,23 @@ const __default__ = {
1993
1993
  const handleTabClick = tab => {
1994
1994
  localStorage.setItem(STORAGE_KEY, tab.name);
1995
1995
  };
1996
+
1997
+ // fullUrl 从 url + query 重建完整 URL(含 query 参数)
1998
+ // query 对于已保存文件在 session 加载后填充,对缓存数据在轮询时填充
1999
+ const fullUrl = (0,vue__WEBPACK_IMPORTED_MODULE_6__.computed)(() => {
2000
+ const url = props.currentRow?.url;
2001
+ if (!url) return '';
2002
+ const query = props.currentRow?.query;
2003
+ if (!query || Object.keys(query).length === 0) return url;
2004
+ return `${url}?${new URLSearchParams(query).toString()}`;
2005
+ });
1996
2006
  const overviewItems = [{
2007
+ key: 'id',
2008
+ label: 'File ID'
2009
+ }, {
2010
+ key: 'method',
2011
+ label: 'Method'
2012
+ }, {
1997
2013
  key: 'ruleValue',
1998
2014
  label: 'Mock Mode'
1999
2015
  }, {
@@ -2043,6 +2059,7 @@ const __default__ = {
2043
2059
  STORAGE_KEY,
2044
2060
  activeTabName,
2045
2061
  handleTabClick,
2062
+ fullUrl,
2046
2063
  overviewItems,
2047
2064
  handeMockVersionChange,
2048
2065
  handleFileSaved,
@@ -5090,7 +5107,7 @@ var render = function render() {
5090
5107
  staticClass: "el-icon-warning-outline"
5091
5108
  })])] : _vm._e(), _vm._v(" " + _vm._s(item.label) + " ")], 2), _c("div", {
5092
5109
  staticClass: "request-detail__value"
5093
- }, [_vm._v(_vm._s(_vm.currentRow[item.key]))])]);
5110
+ }, [_vm._v(_vm._s(item.key === "url" ? _setup.fullUrl : _vm.currentRow[item.key]))])]);
5094
5111
  }), 0), _c("el-tab-pane", {
5095
5112
  staticClass: "request-detail__tab-pane",
5096
5113
  attrs: {