@jetlinks-web/components 2.0.25 → 2.0.27

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.
@@ -6,7 +6,7 @@
6
6
  } */
7
7
  import { defineComponent as _defineComponent } from 'vue';
8
8
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
- const _withScopeId = n => (_pushScopeId("data-v-1715250764327"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1715679981327"), n = n(), _popScopeId(), n);
10
10
  const _hoisted_1 = { class: "full-page-warp-content" };
11
11
  import { ref } from 'vue';
12
12
  import { useElementBounding } from '@vueuse/core';
@@ -209,6 +209,7 @@ export default defineComponent({
209
209
  var subMenuItemRender = getSlot(slots, props, 'subMenuItemRender');
210
210
  var linksRender = getSlot(slots, props, 'linksRender');
211
211
  var logoRender = getSlot(slots, props, 'logoRender');
212
+ var historyRender = getSlot(slots, props, 'historyRender');
212
213
  var headerDom = computed(function () {
213
214
  return headerRender(_objectSpread(_objectSpread({}, props), {}, {
214
215
  menuItemRender: menuItemRender,
@@ -225,6 +226,7 @@ export default defineComponent({
225
226
  menuExtraRender: menuExtraRender,
226
227
  menuContentRender: menuContentRender,
227
228
  headerContentRender: headerContentRender,
229
+ logo: logoRender || props.logo,
228
230
  headerRender: customHeaderRender,
229
231
  theme: (props.theme || 'dark').toLocaleLowerCase().includes('dark') ? 'dark' : 'light'
230
232
  }), props.matchMenuKeys);
@@ -280,7 +282,7 @@ export default defineComponent({
280
282
  })])]);
281
283
  } else {
282
284
  var _slots$default3;
283
- var _slot2, _slot3, _slot4;
285
+ var _slot2, _slot3;
284
286
  return _createVNode(_Fragment, null, [_createVNode("div", {
285
287
  "class": className.value
286
288
  }, [_createVNode(Layout, null, {
@@ -308,7 +310,7 @@ export default defineComponent({
308
310
  padding: 0,
309
311
  height: '40px'
310
312
  }, props.pageHeaderStyle || {})
311
- }, _isSlot(_slot3 = _createVNode(Tabs, {
313
+ }, _isSlot(_slot2 = _createVNode(Tabs, {
312
314
  "hide-add": true,
313
315
  "type": "editable-card",
314
316
  "class": "history-tabs",
@@ -320,23 +322,23 @@ export default defineComponent({
320
322
  "onEdit": onTabEdit,
321
323
  "activeKey": props.historyActive,
322
324
  "onChange": onTabChange
323
- }, _isSlot(_slot2 = props.historyRoutes.map(function (item) {
324
- return _createVNode(Tabs.TabPane, {
325
- "key": item.name,
326
- "tab": item.label,
327
- "closable": true
328
- }, null);
329
- })) ? _slot2 : {
325
+ }, {
330
326
  default: function _default() {
331
- return [_slot2];
327
+ return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
328
+ return _createVNode(Tabs.TabPane, {
329
+ "key": item.name,
330
+ "tab": item.label,
331
+ "closable": true
332
+ }, null);
333
+ })];
332
334
  }
333
- })) ? _slot3 : {
335
+ })) ? _slot2 : {
334
336
  default: function _default() {
335
- return [_slot3];
337
+ return [_slot2];
336
338
  }
337
339
  }), _createVNode(LayoutContent, {
338
340
  "style": {
339
- height: "calc(100vh - 84px)",
341
+ flex: '1 1 0%',
340
342
  overflow: 'auto'
341
343
  }
342
344
  }, {
@@ -347,13 +349,13 @@ export default defineComponent({
347
349
  "style": _objectSpread({
348
350
  padding: '11px 24px'
349
351
  }, props.pageFooterStyle || {})
350
- }, _isSlot(_slot4 = _createVNode(Breadcrumb, {
352
+ }, _isSlot(_slot3 = _createVNode(Breadcrumb, {
351
353
  "routes": breadcrumb.value.routes
352
354
  }, {
353
355
  itemRender: breadcrumb.value.itemRender
354
- })) ? _slot4 : {
356
+ })) ? _slot3 : {
355
357
  default: function _default() {
356
- return [_slot4];
358
+ return [_slot3];
357
359
  }
358
360
  })];
359
361
  }
@@ -87,11 +87,10 @@ export var siderMenuProps = _objectSpread(_objectSpread(_objectSpread({}, defaul
87
87
  type: Function
88
88
  }
89
89
  });
90
- export var defaultRenderLogo = function defaultRenderLogo(logo, logoStyle, application, props, logoRender) {
90
+ export var defaultRenderLogo = function defaultRenderLogo(logo, logoStyle, application, props) {
91
91
  if (!logo) {
92
92
  return null;
93
93
  }
94
- console.log('logo', logo);
95
94
  if (typeof logo === 'function') {
96
95
  // @ts-ignore
97
96
  return logo();
@@ -131,7 +130,6 @@ export var defaultRenderLogo = function defaultRenderLogo(logo, logoStyle, appli
131
130
  };
132
131
  export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props) {
133
132
  var renderKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'menuHeaderRender';
134
- var logoRender = arguments.length > 2 ? arguments[2] : undefined;
135
133
  var _props$logo = props.logo,
136
134
  logo = _props$logo === void 0 ? 'http://demo.jetlinks.cn/static/logo.760eb65c.png' : _props$logo,
137
135
  logoStyle = props.logoStyle,
@@ -139,7 +137,7 @@ export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props)
139
137
  layout = props.layout,
140
138
  apps = props.apps,
141
139
  baseClassName = props.baseClassName;
142
- var logoDom = defaultRenderLogo(logo, logoStyle, apps, props, logoRender);
140
+ var logoDom = defaultRenderLogo(logo, logoStyle, apps, props);
143
141
  if (props.layoutType === LayoutType.CARD) {
144
142
  return _createVNode("a", null, [_createTextVNode(" "), logoDom]);
145
143
  }
@@ -97,7 +97,7 @@ export var TopNavHeader = function TopNavHeader(props) {
97
97
  // REMARK:: Any time render header title
98
98
  // layout === 'mix' ? 'headerTitleRender' : undefined,
99
99
  // layout !== 'side' ? 'headerTitleRender' : undefined,
100
- 'headerTitleRender', context.logoRender);
100
+ 'headerTitleRender');
101
101
  //
102
102
  var MenusData = props.layout === 'side' ? [] : menuData;
103
103
  if (props.layout === 'mix' && props.splitMenus) {
@@ -21,7 +21,7 @@
21
21
  } */
22
22
  import { defineComponent as _defineComponent } from 'vue';
23
23
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
24
- const _withScopeId = n => (_pushScopeId("data-v-1715250765671"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1715679982497"), n = n(), _popScopeId(), n);
25
25
  const _hoisted_1 = {
26
26
  key: 0,
27
27
  style: { "width": "240px" }
package/es/Search/Item.js CHANGED
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
78
  } */
79
79
  import { defineComponent as _defineComponent } from 'vue';
80
80
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
81
- const _withScopeId = n => (_pushScopeId("data-v-1715250765086"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1715679981884"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -36,7 +36,7 @@
36
36
  } */
37
37
  import { defineComponent as _defineComponent } from 'vue';
38
38
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
39
- const _withScopeId = n => (_pushScopeId("data-v-1715250765229"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1715679982063"), n = n(), _popScopeId(), n);
40
40
  const _hoisted_1 = { class: "JSearch-content simple" };
41
41
  const _hoisted_2 = { class: "JSearch-items" };
42
42
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -6,7 +6,7 @@
6
6
  } */
7
7
  import { defineComponent as _defineComponent } from 'vue';
8
8
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
- const _withScopeId = n => (_pushScopeId("data-v-1715250764340"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1715679981335"), n = n(), _popScopeId(), n);
10
10
  const _hoisted_1 = { class: "full-page-warp-content" };
11
11
  import { ref } from 'vue';
12
12
  import { useElementBounding } from '@vueuse/core';
@@ -218,6 +218,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
218
218
  var subMenuItemRender = (0, _util.getSlot)(slots, props, 'subMenuItemRender');
219
219
  var linksRender = (0, _util.getSlot)(slots, props, 'linksRender');
220
220
  var logoRender = (0, _util.getSlot)(slots, props, 'logoRender');
221
+ var historyRender = (0, _util.getSlot)(slots, props, 'historyRender');
221
222
  var headerDom = (0, _vue.computed)(function () {
222
223
  return headerRender((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
223
224
  menuItemRender: menuItemRender,
@@ -234,6 +235,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
234
235
  menuExtraRender: menuExtraRender,
235
236
  menuContentRender: menuContentRender,
236
237
  headerContentRender: headerContentRender,
238
+ logo: logoRender || props.logo,
237
239
  headerRender: customHeaderRender,
238
240
  theme: (props.theme || 'dark').toLocaleLowerCase().includes('dark') ? 'dark' : 'light'
239
241
  }), props.matchMenuKeys);
@@ -289,7 +291,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
289
291
  })])]);
290
292
  } else {
291
293
  var _slots$default3;
292
- var _slot2, _slot3, _slot4;
294
+ var _slot2, _slot3;
293
295
  return (0, _vue.createVNode)(_vue.Fragment, null, [(0, _vue.createVNode)("div", {
294
296
  "class": className.value
295
297
  }, [(0, _vue.createVNode)(_antDesignVue.Layout, null, {
@@ -317,7 +319,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
317
319
  padding: 0,
318
320
  height: '40px'
319
321
  }, props.pageHeaderStyle || {})
320
- }, _isSlot(_slot3 = (0, _vue.createVNode)(_antDesignVue.Tabs, {
322
+ }, _isSlot(_slot2 = (0, _vue.createVNode)(_antDesignVue.Tabs, {
321
323
  "hide-add": true,
322
324
  "type": "editable-card",
323
325
  "class": "history-tabs",
@@ -329,23 +331,23 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
329
331
  "onEdit": onTabEdit,
330
332
  "activeKey": props.historyActive,
331
333
  "onChange": onTabChange
332
- }, _isSlot(_slot2 = props.historyRoutes.map(function (item) {
333
- return (0, _vue.createVNode)(_antDesignVue.Tabs.TabPane, {
334
- "key": item.name,
335
- "tab": item.label,
336
- "closable": true
337
- }, null);
338
- })) ? _slot2 : {
334
+ }, {
339
335
  default: function _default() {
340
- return [_slot2];
336
+ return [historyRender ? historyRender() : props.historyRoutes.map(function (item) {
337
+ return (0, _vue.createVNode)(_antDesignVue.Tabs.TabPane, {
338
+ "key": item.name,
339
+ "tab": item.label,
340
+ "closable": true
341
+ }, null);
342
+ })];
341
343
  }
342
- })) ? _slot3 : {
344
+ })) ? _slot2 : {
343
345
  default: function _default() {
344
- return [_slot3];
346
+ return [_slot2];
345
347
  }
346
348
  }), (0, _vue.createVNode)(_antDesignVue.LayoutContent, {
347
349
  "style": {
348
- height: "calc(100vh - 84px)",
350
+ flex: '1 1 0%',
349
351
  overflow: 'auto'
350
352
  }
351
353
  }, {
@@ -356,13 +358,13 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
356
358
  "style": (0, _objectSpread2.default)({
357
359
  padding: '11px 24px'
358
360
  }, props.pageFooterStyle || {})
359
- }, _isSlot(_slot4 = (0, _vue.createVNode)(_antDesignVue.Breadcrumb, {
361
+ }, _isSlot(_slot3 = (0, _vue.createVNode)(_antDesignVue.Breadcrumb, {
360
362
  "routes": breadcrumb.value.routes
361
363
  }, {
362
364
  itemRender: breadcrumb.value.itemRender
363
- })) ? _slot4 : {
365
+ })) ? _slot3 : {
364
366
  default: function _default() {
365
- return [_slot4];
367
+ return [_slot3];
366
368
  }
367
369
  })];
368
370
  }
@@ -96,11 +96,10 @@ var siderMenuProps = exports.siderMenuProps = (0, _objectSpread2.default)((0, _o
96
96
  type: Function
97
97
  }
98
98
  });
99
- var defaultRenderLogo = exports.defaultRenderLogo = function defaultRenderLogo(logo, logoStyle, application, props, logoRender) {
99
+ var defaultRenderLogo = exports.defaultRenderLogo = function defaultRenderLogo(logo, logoStyle, application, props) {
100
100
  if (!logo) {
101
101
  return null;
102
102
  }
103
- console.log('logo', logo);
104
103
  if (typeof logo === 'function') {
105
104
  // @ts-ignore
106
105
  return logo();
@@ -140,7 +139,6 @@ var defaultRenderLogo = exports.defaultRenderLogo = function defaultRenderLogo(l
140
139
  };
141
140
  var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props) {
142
141
  var renderKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'menuHeaderRender';
143
- var logoRender = arguments.length > 2 ? arguments[2] : undefined;
144
142
  var _props$logo = props.logo,
145
143
  logo = _props$logo === void 0 ? 'http://demo.jetlinks.cn/static/logo.760eb65c.png' : _props$logo,
146
144
  logoStyle = props.logoStyle,
@@ -148,7 +146,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
148
146
  layout = props.layout,
149
147
  apps = props.apps,
150
148
  baseClassName = props.baseClassName;
151
- var logoDom = defaultRenderLogo(logo, logoStyle, apps, props, logoRender);
149
+ var logoDom = defaultRenderLogo(logo, logoStyle, apps, props);
152
150
  if (props.layoutType === _defaultSettings.LayoutType.CARD) {
153
151
  return (0, _vue.createVNode)("a", null, [(0, _vue.createTextVNode)(" "), logoDom]);
154
152
  }
@@ -102,7 +102,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
102
102
  // REMARK:: Any time render header title
103
103
  // layout === 'mix' ? 'headerTitleRender' : undefined,
104
104
  // layout !== 'side' ? 'headerTitleRender' : undefined,
105
- 'headerTitleRender', context.logoRender);
105
+ 'headerTitleRender');
106
106
  //
107
107
  var MenusData = props.layout === 'side' ? [] : menuData;
108
108
  if (props.layout === 'mix' && props.splitMenus) {
@@ -21,7 +21,7 @@
21
21
  } */
22
22
  import { defineComponent as _defineComponent } from 'vue';
23
23
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
24
- const _withScopeId = n => (_pushScopeId("data-v-1715250765689"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1715679982485"), n = n(), _popScopeId(), n);
25
25
  const _hoisted_1 = {
26
26
  key: 0,
27
27
  style: { "width": "240px" }
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
78
  } */
79
79
  import { defineComponent as _defineComponent } from 'vue';
80
80
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
81
- const _withScopeId = n => (_pushScopeId("data-v-1715250765161"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1715679981960"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -36,7 +36,7 @@
36
36
  } */
37
37
  import { defineComponent as _defineComponent } from 'vue';
38
38
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
39
- const _withScopeId = n => (_pushScopeId("data-v-1715250765257"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1715679982041"), n = n(), _popScopeId(), n);
40
40
  const _hoisted_1 = { class: "JSearch-content simple" };
41
41
  const _hoisted_2 = { class: "JSearch-items" };
42
42
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -136,7 +136,7 @@
136
136
  "webpackbar": "^5.0.2",
137
137
  "@jetlinks-web/constants": "^1.0.2",
138
138
  "@jetlinks-web/hooks": "^1.0.12",
139
- "@jetlinks-web/utils": "^1.0.6"
139
+ "@jetlinks-web/utils": "^1.0.7"
140
140
  },
141
141
  "publishConfig": {
142
142
  "registry": "https://registry.npmjs.org/",