@jetlinks-web/components 2.4.9 → 2.4.11

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/es/AMap/Map.js CHANGED
@@ -34,7 +34,7 @@ import { ref, computed, inject, } from 'vue';
34
34
  import { initAMapApiLoader, ElAmap } from '@vuemap/vue-amap';
35
35
  import { getAMapUiPromise } from '@jetlinks-web/utils';
36
36
  import { MapProps } from './util';
37
- import { MAPConfig } from "@jetlinks-web/constants";
37
+ import { MAPConfig } from "../utils/constants";
38
38
  import Empty from '../Empty';
39
39
  import '@vuemap/vue-amap/dist/style.css';
40
40
  const __sfc_main__ = _defineComponent({
@@ -1,6 +1,5 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import { configProviderProps } from 'ant-design-vue/es/config-provider/context';
3
- import "@jetlinks-web/constants";
4
3
  export var configProps = function configProps() {
5
4
  return _objectSpread(_objectSpread({}, configProviderProps()), {}, {
6
5
  IconConfig: {
@@ -241,7 +241,7 @@ const __sfc_main__ = Object.assign({
241
241
  if (props.dataSource.length * props.cellHeight) {
242
242
  _width = 17;
243
243
  }
244
- if (_optionalChain([tableBody, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.getViewScrollRef])) {
244
+ if (_optionalChain([tableBody, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.getViewScrollRef]) && props.dataSource.length) {
245
245
  const viewScrollDom = _optionalChain([tableBody, 'access', _4 => _4.value, 'optionalAccess', _5 => _5.getViewScrollRef, 'call', _6 => _6()]);
246
246
  const bodyContainer = viewScrollDom.querySelector('.jetlinks-edit-table-body-container');
247
247
  _width = viewScrollDom.offsetWidth - bodyContainer.offsetWidth;
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1732521729669"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1734058145743"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  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";
12
- const _withScopeId = n => (_pushScopeId("data-v-1732521730309"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1734058146991"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
package/es/Icon/icon.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { defineComponent, createVNode, watchEffect, createVNode as _createVNode } from 'vue';
2
+ import { defineComponent, createVNode, watchEffect, inject, createVNode as _createVNode } from 'vue';
3
3
  import * as aIcon from '@ant-design/icons-vue';
4
4
  import { createFromIconfontCN } from '@ant-design/icons-vue';
5
- import { useIcon } from '@jetlinks-web/hooks';
5
+ import { ComponentsEnum } from "../utils/constants";
6
6
  var MyIcon = createFromIconfontCN({
7
7
  scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
8
8
  });
@@ -20,7 +20,7 @@ export default defineComponent({
20
20
  setup: function setup(props, _ref) {
21
21
  var emit = _ref.emit,
22
22
  attrs = _ref.attrs;
23
- var config = useIcon();
23
+ var config = inject(ComponentsEnum.Icon, {});
24
24
  watchEffect(function () {
25
25
  var url = props.scriptUrl || config.scriptUrl;
26
26
  if (url) {
@@ -9,7 +9,7 @@ import { omit } from "lodash-es";
9
9
  import { buttonProps } from "ant-design-vue/es/button/button";
10
10
  import { usePermission } from '@jetlinks-web/hooks';
11
11
  import confirm from './confirm';
12
- import { PermissionButtonConfig } from "@jetlinks-web/constants";
12
+ import { PermissionButtonConfig } from "../utils/constants";
13
13
  var definedProps = _objectSpread({
14
14
  tooltip: {
15
15
  type: Object
@@ -242,6 +242,7 @@ var SiderMenu = function SiderMenu(props) {
242
242
  },
243
243
  'onUpdate:selectedKeys': handleSelect
244
244
  }, null);
245
+ console.log('context', context.fixSiderbar);
245
246
  return _createVNode(_Fragment, null, [context.fixSiderbar && _createVNode("div", {
246
247
  "style": {
247
248
  width: "".concat(sSideWidth.value, "px"),
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1732521731616"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1734058148932"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -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-1732521732811"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1734058149795"), 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-1732521732090"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1734058149050"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -43,7 +43,7 @@
43
43
  } */
44
44
  import { defineComponent as _defineComponent } from 'vue';
45
45
  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";
46
- const _withScopeId = n => (_pushScopeId("data-v-1732521732212"), n = n(), _popScopeId(), n);
46
+ const _withScopeId = n => (_pushScopeId("data-v-1734058149145"), n = n(), _popScopeId(), n);
47
47
  const _hoisted_1 = { class: "JSearch-content simple" };
48
48
  const _hoisted_2 = { class: "JSearch-items" };
49
49
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -52,7 +52,7 @@ import { reactive, ref, provide, watch, computed, inject } from 'vue';
52
52
  import { termsParamsFormat } from './util';
53
53
  import SearchItem from './Item.js';
54
54
  import { optionsMapKey } from './setting';
55
- import { SearchConfig } from '@jetlinks-web/constants';
55
+ import { SearchConfig } from '../utils/constants';
56
56
  const __sfc_main__ = _defineComponent({
57
57
  ...{
58
58
  name: 'JSearch',
@@ -76,7 +76,7 @@ const __sfc_main__ = _defineComponent({
76
76
  // 多选框
77
77
  mode: {
78
78
  type: String,
79
- default: '',
79
+ default: undefined,
80
80
  },
81
81
  placeholder: String,
82
82
  options: Array,
package/lib/AMap/Map.js CHANGED
@@ -34,7 +34,7 @@ import { ref, computed, inject, } from 'vue';
34
34
  import { initAMapApiLoader, ElAmap } from '@vuemap/vue-amap';
35
35
  import { getAMapUiPromise } from '@jetlinks-web/utils';
36
36
  import { MapProps } from './util';
37
- import { MAPConfig } from "@jetlinks-web/constants";
37
+ import { MAPConfig } from "../utils/constants";
38
38
  import Empty from '../Empty';
39
39
  import '@vuemap/vue-amap/dist/style.css';
40
40
  const __sfc_main__ = _defineComponent({
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.configProps = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
9
  var _context = require("ant-design-vue/es/config-provider/context");
10
- require("@jetlinks-web/constants");
11
10
  var configProps = exports.configProps = function configProps() {
12
11
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _context.configProviderProps)()), {}, {
13
12
  IconConfig: {
@@ -241,7 +241,7 @@ const __sfc_main__ = Object.assign({
241
241
  if (props.dataSource.length * props.cellHeight) {
242
242
  _width = 17;
243
243
  }
244
- if (_optionalChain([tableBody, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.getViewScrollRef])) {
244
+ if (_optionalChain([tableBody, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.getViewScrollRef]) && props.dataSource.length) {
245
245
  const viewScrollDom = _optionalChain([tableBody, 'access', _4 => _4.value, 'optionalAccess', _5 => _5.getViewScrollRef, 'call', _6 => _6()]);
246
246
  const bodyContainer = viewScrollDom.querySelector('.jetlinks-edit-table-body-container');
247
247
  _width = viewScrollDom.offsetWidth - bodyContainer.offsetWidth;
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1732521729695"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1734058145684"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  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";
12
- const _withScopeId = n => (_pushScopeId("data-v-1732521730288"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1734058146976"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
package/lib/Icon/icon.js CHANGED
@@ -10,7 +10,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
10
10
  var _vue = require("vue");
11
11
  var _iconsVue = _interopRequireWildcard(require("@ant-design/icons-vue/lib/icons"));
12
12
  var aIcon = _iconsVue;
13
- var _hooks = require("@jetlinks-web/hooks");
13
+ var _constants = require("../utils/constants");
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
16
  var MyIcon = (0, _iconsVue.createFromIconfontCN)({
@@ -30,7 +30,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
30
30
  setup: function setup(props, _ref) {
31
31
  var emit = _ref.emit,
32
32
  attrs = _ref.attrs;
33
- var config = (0, _hooks.useIcon)();
33
+ var config = (0, _vue.inject)(_constants.ComponentsEnum.Icon, {});
34
34
  (0, _vue.watchEffect)(function () {
35
35
  var url = props.scriptUrl || config.scriptUrl;
36
36
  if (url) {
@@ -15,7 +15,7 @@ var _lodashEs = require("lodash");
15
15
  var _button = require("ant-design-vue/es/button/button");
16
16
  var _hooks = require("@jetlinks-web/hooks");
17
17
  var _confirm = _interopRequireDefault(require("./confirm"));
18
- var _constants = require("@jetlinks-web/constants");
18
+ var _constants = require("../utils/constants");
19
19
  var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
20
20
  var definedProps = (0, _objectSpread2.default)({
21
21
  tooltip: {
@@ -251,6 +251,7 @@ var SiderMenu = function SiderMenu(props) {
251
251
  },
252
252
  'onUpdate:selectedKeys': handleSelect
253
253
  }, null);
254
+ console.log('context', context.fixSiderbar);
254
255
  return (0, _vue.createVNode)(_vue.Fragment, null, [context.fixSiderbar && (0, _vue.createVNode)("div", {
255
256
  "style": {
256
257
  width: "".concat(sSideWidth.value, "px"),
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1732521731605"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1734058148922"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -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-1732521732827"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1734058149772"), 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-1732521732004"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1734058148966"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -43,7 +43,7 @@
43
43
  } */
44
44
  import { defineComponent as _defineComponent } from 'vue';
45
45
  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";
46
- const _withScopeId = n => (_pushScopeId("data-v-1732521732188"), n = n(), _popScopeId(), n);
46
+ const _withScopeId = n => (_pushScopeId("data-v-1734058149125"), n = n(), _popScopeId(), n);
47
47
  const _hoisted_1 = { class: "JSearch-content simple" };
48
48
  const _hoisted_2 = { class: "JSearch-items" };
49
49
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -52,7 +52,7 @@ import { reactive, ref, provide, watch, computed, inject } from 'vue';
52
52
  import { termsParamsFormat } from './util';
53
53
  import SearchItem from './Item.js';
54
54
  import { optionsMapKey } from './setting';
55
- import { SearchConfig } from '@jetlinks-web/constants';
55
+ import { SearchConfig } from '../utils/constants';
56
56
  const __sfc_main__ = _defineComponent({
57
57
  ...{
58
58
  name: 'JSearch',
@@ -76,7 +76,7 @@ const __sfc_main__ = _defineComponent({
76
76
  // 多选框
77
77
  mode: {
78
78
  type: String,
79
- default: '',
79
+ default: undefined,
80
80
  },
81
81
  placeholder: String,
82
82
  options: Array,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.4.9",
3
+ "version": "2.4.11",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -153,8 +153,8 @@
153
153
  "webpack-merge": "^5.0.0",
154
154
  "webpackbar": "^5.0.2",
155
155
  "@jetlinks-web/constants": "^1.0.7",
156
- "@jetlinks-web/utils": "^1.2.5",
157
- "@jetlinks-web/hooks": "^1.0.18"
156
+ "@jetlinks-web/hooks": "^1.0.20",
157
+ "@jetlinks-web/utils": "^1.2.5"
158
158
  },
159
159
  "publishConfig": {
160
160
  "registry": "https://registry.npmjs.org/",