@jetlinks-web/components 2.5.3 → 2.5.5

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.
Files changed (78) hide show
  1. package/es/AMap/Map.js +1 -1
  2. package/es/CardSelect/CardSelect.js +1 -1
  3. package/es/CheckButton/CheckButton.js +1 -1
  4. package/es/ConfigProvider/index.js +2 -1
  5. package/es/DragModal/DragModal.js +19 -13
  6. package/es/DragModal/style/index.css +1 -0
  7. package/es/DragModal/style/index.less +1 -0
  8. package/es/EditTable/components/Search/search.js +28 -11
  9. package/es/EditTable/components/Search/sort.js +5 -4
  10. package/es/EditTable/style/body.less +8 -8
  11. package/es/EditTable/style/index.css +1 -1
  12. package/es/FullPage/FullPage.js +1 -1
  13. package/es/LocaleReciver/index.js +3 -1
  14. package/es/PermissionButton/index.js +13 -20
  15. package/es/ProTable/Alert.js +3 -3
  16. package/es/ProTable/Pagination.js +17 -1
  17. package/es/RadioButton/RadioButton.js +10 -7
  18. package/es/RadioButton/style/index.js +1 -0
  19. package/es/RadioButton/style/index.less +18 -0
  20. package/es/Search/Advanced/SaveHistory.js +1 -1
  21. package/es/Search/Advanced/index.js +1 -0
  22. package/es/Search/Item.js +1 -1
  23. package/es/Search/Search.js +6 -4
  24. package/es/Title/index.js +5 -0
  25. package/es/ValueItem/ValueItem.js +73 -51
  26. package/es/components.js +3 -2
  27. package/es/locale/en-US.js +3 -0
  28. package/es/locale/zh-CN.js +3 -0
  29. package/es/style/index.css +41 -1
  30. package/es/style/index.less +2 -0
  31. package/es/style.js +3 -1
  32. package/lib/AMap/Map.js +1 -1
  33. package/lib/CardSelect/CardSelect.js +1 -1
  34. package/lib/CheckButton/CheckButton.js +1 -1
  35. package/lib/ConfigProvider/index.js +2 -1
  36. package/lib/DragModal/DragModal.js +19 -13
  37. package/lib/DragModal/style/index.css +1 -0
  38. package/lib/DragModal/style/index.less +1 -0
  39. package/lib/EditTable/components/Search/search.js +28 -11
  40. package/lib/EditTable/components/Search/sort.js +5 -4
  41. package/lib/EditTable/style/body.less +8 -8
  42. package/lib/EditTable/style/index.css +1 -1
  43. package/lib/FullPage/FullPage.js +1 -1
  44. package/lib/LocaleReciver/index.js +3 -1
  45. package/lib/PermissionButton/index.js +12 -19
  46. package/lib/ProTable/Alert.js +3 -3
  47. package/lib/ProTable/Pagination.js +17 -1
  48. package/lib/RadioButton/RadioButton.js +10 -7
  49. package/lib/RadioButton/style/index.js +3 -0
  50. package/lib/RadioButton/style/index.less +18 -0
  51. package/lib/Search/Advanced/SaveHistory.js +1 -1
  52. package/lib/Search/Advanced/index.js +1 -0
  53. package/lib/Search/Item.js +1 -1
  54. package/lib/Search/Search.js +6 -4
  55. package/lib/Title/index.js +12 -0
  56. package/lib/ValueItem/ValueItem.js +73 -51
  57. package/lib/components.js +14 -1
  58. package/lib/locale/en-US.js +3 -0
  59. package/lib/locale/zh-CN.js +3 -0
  60. package/lib/style/index.css +41 -1
  61. package/lib/style/index.less +2 -0
  62. package/lib/style.js +3 -1
  63. package/package.json +2 -2
  64. package/es/ProTable/style/ProTable.less +0 -139
  65. package/es/Scrollbar/style/index.css +0 -61
  66. package/es/Scrollbar/style/index.less +0 -82
  67. package/es/Search/style/Item.less +0 -33
  68. package/es/Search/style/Search.less +0 -179
  69. package/es/Title/style/index.css +0 -23
  70. package/es/Title/style/index.less +0 -25
  71. package/lib/ProTable/style/ProTable.less +0 -139
  72. package/lib/Scrollbar/style/index.css +0 -61
  73. package/lib/Scrollbar/style/index.less +0 -82
  74. package/lib/Search/style/Item.less +0 -33
  75. package/lib/Search/style/Search.less +0 -179
  76. package/lib/Title/style/index.css +0 -23
  77. package/lib/Title/style/index.less +0 -25
  78. package/lib/style/components.less +0 -8
@@ -9,6 +9,7 @@ exports.destroyFns = exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
13
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
14
  var _vue = require("vue");
14
15
  var _antDesignVue = require("ant-design-vue");
@@ -18,6 +19,7 @@ var _button = require("ant-design-vue/es/button/button");
18
19
  var _hooks = require("@jetlinks-web/hooks");
19
20
  var _confirm = _interopRequireDefault(require("./confirm"));
20
21
  var _constants = require("../utils/constants");
22
+ var _LocaleReciver = require("../LocaleReciver");
21
23
  var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
22
24
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
23
25
  var definedProps = (0, _objectSpread2.default)({
@@ -49,20 +51,26 @@ var PermissionButton = (0, _vue.defineComponent)({
49
51
  props: definedProps,
50
52
  setup: function setup(props, _ref) {
51
53
  var slots = _ref.slots;
52
- var _usePermission = (0, _hooks.usePermission)(props.hasPermission),
54
+ var instance = (0, _vue.getCurrentInstance)();
55
+ var propsRef = (0, _vue.toRefs)(props);
56
+ var _usePermission = (0, _hooks.usePermission)(propsRef.hasPermission),
53
57
  hasPerm = _usePermission.hasPerm;
58
+ var _useLocaleReceiver = (0, _LocaleReciver.useLocaleReceiver)('PermissionButton'),
59
+ _useLocaleReceiver2 = (0, _slicedToArray2.default)(_useLocaleReceiver, 1),
60
+ contextLocale = _useLocaleReceiver2[0];
54
61
  var context = (0, _vue.inject)(_constants.PermissionButtonConfig, {
55
62
  components: undefined
56
63
  });
57
64
  var permission = (0, _vue.computed)(function () {
58
- if (!props.hasPermission || props.hasPermission === true) {
65
+ var hasOwnPrototype = Object.prototype.hasOwnProperty.call(instance.props, 'hasPermission');
66
+ if (props.hasPermission === true || !hasOwnPrototype) {
59
67
  return true;
60
68
  }
61
69
  return hasPerm.value;
62
70
  });
63
71
  var isPermission = (0, _vue.computed)(function () {
64
72
  if ('hasPermission' in props && permission.value) {
65
- return 'disabled' in props ? props.disabled : false;
73
+ return 'disabled' in props ? !!props.disabled : false;
66
74
  }
67
75
  return true;
68
76
  });
@@ -134,28 +142,13 @@ var PermissionButton = (0, _vue.defineComponent)({
134
142
  }) : undefined;
135
143
  // 无权限
136
144
  var noPermissionButton = !permission.value ? (0, _vue.h)(_antDesignVue.Tooltip, {
137
- title: noPermissionTitle || '暂无权限,请联系管理员'
145
+ title: noPermissionTitle || contextLocale.value.hasPermission
138
146
  }, {
139
147
  default: function _default() {
140
148
  return button;
141
149
  }
142
150
  }) : undefined;
143
- // 二次确认
144
- // const _popConfirm = popConfirm ?
145
- // h(Popconfirm,
146
- // Object.assign(
147
- // {overlayStyle: {width: '220px'}},
148
- // popConfirm,
149
- // {
150
- // disabled: !permission.value || buttonProps.disabled
151
- // }
152
- // ),
153
- // {default: () => tooltip ? _tooltip : button})
154
- // : undefined
155
151
  if (permission.value) {
156
- // if (hasPopConfirm.value) {
157
- // return _popConfirm
158
- // }
159
152
  if (hasTooltip.value) {
160
153
  return _tooltip;
161
154
  }
@@ -44,8 +44,8 @@ const __sfc_main__ = _defineComponent({
44
44
  const props = __props;
45
45
  const emits = __emit;
46
46
  const _message = computed(() => {
47
- let locale = contextLocale.value.alert.selectItem;
48
- [_optionalChain([props, 'access', _2 => _2.rowSelection, 'optionalAccess', _3 => _3.selectedRowKeys, 'optionalAccess', _4 => _4.length]) || 0].forEach((item, index) => {
47
+ let locale = _optionalChain([contextLocale, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.alert, 'optionalAccess', _4 => _4.selectItem]) || '';
48
+ [_optionalChain([props, 'access', _5 => _5.rowSelection, 'optionalAccess', _6 => _6.selectedRowKeys, 'optionalAccess', _7 => _7.length]) || 0].forEach((item, index) => {
49
49
  locale = locale.replace(`{${index}}`, item);
50
50
  });
51
51
  return locale;
@@ -66,7 +66,7 @@ const __sfc_main__ = _defineComponent({
66
66
  onClick: onClose
67
67
  }, {
68
68
  default: _withCtx(() => [
69
- _createTextVNode(_toDisplayString(_unref(contextLocale).alert.cancelChoose), 1 /* TEXT */)
69
+ _createTextVNode(_toDisplayString(_optionalChain([_unref, 'call', _8 => _8(contextLocale), 'access', _9 => _9.alert, 'optionalAccess', _10 => _10.cancelChoose])), 1 /* TEXT */)
70
70
  ]),
71
71
  _: 1 /* STABLE */
72
72
  })
@@ -1,3 +1,19 @@
1
+ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) {
2
+ const op = ops[i];
3
+ const fn = ops[i + 1];
4
+ i += 2;
5
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
6
+ return undefined;
7
+ }
8
+ if (op === 'access' || op === 'optionalAccess') {
9
+ lastAccessLHS = value;
10
+ value = fn(value);
11
+ }
12
+ else if (op === 'call' || op === 'optionalCall') {
13
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
14
+ lastAccessLHS = undefined;
15
+ }
16
+ } return value; }
1
17
  /* Analyzed bindings: {
2
18
  "Pagination": "setup-maybe-ref",
3
19
  "_paginationProps": "setup-maybe-ref",
@@ -36,7 +52,7 @@ const __sfc_main__ = _defineComponent({
36
52
  const minSize = props.pageIndex * props.pageSize + 1;
37
53
  const MaxSize = (props.pageIndex + 1) * props.pageSize;
38
54
  // return `第 ${minSize} - ${ MaxSize > num ? num : MaxSize } 条/总共 ${num} 条`
39
- let locale = contextLocale.value.pagination.total;
55
+ let locale = _optionalChain([contextLocale, 'access', _ => _.value, 'access', _2 => _2.pagination, 'optionalAccess', _3 => _3.total]) || '';
40
56
  [minSize, MaxSize > num ? num : MaxSize, num].forEach((item, index) => {
41
57
  locale = locale.replace(`{${index}}`, item);
42
58
  });
@@ -3,15 +3,18 @@
3
3
  "options": "props",
4
4
  "columns": "props",
5
5
  "defineOptions": "setup-const",
6
+ "ref": "setup-const",
7
+ "computed": "setup-const",
8
+ "watch": "setup-const",
6
9
  "props": "setup-reactive-const",
7
10
  "emit": "setup-const",
8
- "myValue": "setup-maybe-ref",
9
- "styles": "setup-maybe-ref",
11
+ "myValue": "setup-ref",
12
+ "styles": "setup-ref",
10
13
  "onClick": "setup-const"
11
14
  } */
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-1742388083459"), n = n(), _popScopeId(), n);
15
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
14
16
  const _hoisted_1 = ["onClick"];
17
+ import { ref, computed, watch } from 'vue';
15
18
  const __sfc_main__ = Object.assign({
16
19
  name: 'JRadioButton',
17
20
  }, {
@@ -51,13 +54,13 @@ const __sfc_main__ = Object.assign({
51
54
  });
52
55
  return (_ctx, _cache) => {
53
56
  return (_openBlock(), _createElementBlock("div", {
54
- class: "radio-button",
55
- style: _normalizeStyle(_unref(styles))
57
+ class: "j-radio-button",
58
+ style: _normalizeStyle(styles.value)
56
59
  }, [
57
60
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, (item) => {
58
61
  return (_openBlock(), _createElementBlock("div", {
59
62
  onClick: $event => (onClick(item)),
60
- class: _normalizeClass(["radio-button-item", { 'active': _unref(myValue) === item.value }])
63
+ class: _normalizeClass(["j-radio-button-item", { 'active': myValue.value === item.value }])
61
64
  }, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1));
62
65
  }), 256 /* UNKEYED_FRAGMENT */))
63
66
  ], 4 /* STYLE */));
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ require("./index.less");
@@ -0,0 +1,18 @@
1
+ .j-radio-button {
2
+ display: grid;
3
+ gap: 16px;
4
+
5
+ .j-radio-button-item {
6
+ padding: 6px 12px;
7
+ text-align: center;
8
+ height: 100%;
9
+ border-radius: 2px;
10
+ background-color: #f5f5f5;
11
+ cursor: pointer;
12
+
13
+ &.active {
14
+ color: #fff;
15
+ background-color: @primary-color;
16
+ }
17
+ }
18
+ }
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
25
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1742388084736"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1743503004249"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
@@ -373,6 +373,7 @@ const __sfc_main__ = _defineComponent({
373
373
  handleItems();
374
374
  __expose({
375
375
  setValues: handleDefaultValues,
376
+ reset
376
377
  });
377
378
  return (_ctx, _cache) => {
378
379
  return (_openBlock(), _createBlock(_unref(Form), {
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
82
  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";
83
- const _withScopeId = n => (_pushScopeId("data-v-1742388083795"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1743503003588"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -44,8 +44,7 @@
44
44
  "reset": "setup-const"
45
45
  } */
46
46
  import { defineComponent as _defineComponent } from 'vue';
47
- 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";
48
- const _withScopeId = n => (_pushScopeId("data-v-1742388083969"), n = n(), _popScopeId(), n);
47
+ 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 } from "vue";
49
48
  const _hoisted_1 = { class: "JSearch-content simple" };
50
49
  const _hoisted_2 = { class: "JSearch-items" };
51
50
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -99,7 +98,7 @@ const __sfc_main__ = _defineComponent({
99
98
  }
100
99
  },
101
100
  emits: ["search"],
102
- setup(__props, { emit: __emit }) {
101
+ setup(__props, { expose: __expose, emit: __emit }) {
103
102
  const props = __props;
104
103
  const [contextLocale] = useLocaleReceiver('Search');
105
104
  const columnOptionMap = ref(new Map());
@@ -184,6 +183,9 @@ const __sfc_main__ = _defineComponent({
184
183
  watch(() => props.columns, () => {
185
184
  handleItems();
186
185
  }, { immediate: true, deep: true });
186
+ __expose({
187
+ reset
188
+ });
187
189
  return (_ctx, _cache) => {
188
190
  return (_openBlock(), _createBlock(_unref(Form), {
189
191
  model: terms,
@@ -247,7 +249,7 @@ const __sfc_main__ = _defineComponent({
247
249
  type: "primary"
248
250
  }, {
249
251
  default: _withCtx(() => [
250
- _createTextVNode(_toDisplayString(__props.submitText || _unref(contextLocale).search.search + '123123'), 1 /* TEXT */)
252
+ _createTextVNode(_toDisplayString(__props.submitText || _unref(contextLocale).search.search), 1 /* TEXT */)
251
253
  ]),
252
254
  _: 1 /* STABLE */
253
255
  })
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _title = _interopRequireDefault(require("./title.js"));
9
+ _title.default.install = function (app) {
10
+ app.component(_title.default.name, _title.default);
11
+ };
12
+ var _default = exports.default = _title.default;
@@ -171,71 +171,93 @@ const __sfc_main__ = _defineComponent({
171
171
  valueFormat: __props.valueFormat || 'HH:mm:ss',
172
172
  allowClear: ""
173
173
  }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value", "valueFormat"]))
174
- : (_unref(typeMap).get(__props.itemType) === 'inputNumber')
174
+ : (__props.itemType === 'int')
175
175
  ? (_openBlock(), _createBlock(_unref(InputNumber), _mergeProps({
176
176
  key: 3,
177
177
  value: myValue.value,
178
178
  "onUpdate:value": _cache[4] || (_cache[4] = ($event) => ((myValue).value = $event)),
179
- allowClear: ""
179
+ precision: 0,
180
+ max: 2147483647,
181
+ min: -2147483648,
182
+ style: { "width": "100%" }
180
183
  }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"]))
181
- : (_unref(typeMap).get(__props.itemType) === 'object')
182
- ? (_openBlock(), _createBlock(_unref(Input), _mergeProps({
184
+ : (__props.itemType === 'long')
185
+ ? (_openBlock(), _createBlock(_unref(InputNumber), _mergeProps({
183
186
  key: 4,
184
187
  value: myValue.value,
185
- "onUpdate:value": _cache[6] || (_cache[6] = ($event) => ((myValue).value = $event)),
186
- allowClear: ""
187
- }, bindProps.value, { onChange: onChange }), {
188
- addonAfter: _withCtx(() => [
189
- _createVNode(_component_AIcon, {
190
- type: "FormOutlined",
191
- onClick: _cache[5] || (_cache[5] = ($event) => (modalVisible.value = true))
192
- })
193
- ]),
194
- _: 1 /* STABLE */
195
- }, 16 /* FULL_PROPS */, ["value"]))
196
- : (_unref(typeMap).get(__props.itemType) === 'file')
197
- ? (_openBlock(), _createBlock(_unref(Input), _mergeProps({
188
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => ((myValue).value = $event)),
189
+ max: 999999999999999,
190
+ min: -999999999999999,
191
+ precision: 0,
192
+ style: { "width": "100%" }
193
+ }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"]))
194
+ : (['float', 'double'].includes(__props.itemType))
195
+ ? (_openBlock(), _createBlock(_unref(InputNumber), _mergeProps({
198
196
  key: 5,
199
197
  value: myValue.value,
200
- "onUpdate:value": _cache[7] || (_cache[7] = ($event) => ((myValue).value = $event)),
201
- allowClear: "",
202
- placeholder: "请输入链接"
203
- }, bindProps.value, { onChange: onChange }), {
204
- addonAfter: _withCtx(() => [
205
- _createVNode(_unref(Upload), {
206
- action: __props.action,
207
- headers: __props.headers,
208
- showUploadList: false,
209
- name: "file",
210
- onChange: handleFileChange
211
- }, {
212
- default: _withCtx(() => [
213
- _createVNode(_component_AIcon, { type: "UploadOutlined" })
214
- ]),
215
- _: 1 /* STABLE */
216
- }, 8 /* PROPS */, ["action", "headers"])
217
- ]),
218
- _: 1 /* STABLE */
219
- }, 16 /* FULL_PROPS */, ["value"]))
220
- : (_unref(typeMap).get(__props.itemType) === 'password')
221
- ? (_openBlock(), _createBlock(_unref(InputPassword), _mergeProps({
198
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => ((myValue).value = $event)),
199
+ max: 999999999999999,
200
+ min: -999999999999999,
201
+ style: { "width": "100%" }
202
+ }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"]))
203
+ : (_unref(typeMap).get(__props.itemType) === 'object')
204
+ ? (_openBlock(), _createBlock(_unref(Input), _mergeProps({
222
205
  key: 6,
223
206
  value: myValue.value,
224
207
  "onUpdate:value": _cache[8] || (_cache[8] = ($event) => ((myValue).value = $event)),
225
- allowClear: "",
226
- type: "password"
227
- }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"]))
228
- : (_openBlock(), _createBlock(_unref(Input), _mergeProps({
229
- key: 7,
230
- value: myValue.value,
231
- "onUpdate:value": _cache[9] || (_cache[9] = ($event) => ((myValue).value = $event)),
232
- allowClear: "",
233
- type: "text"
234
- }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"])),
208
+ allowClear: ""
209
+ }, bindProps.value, { onChange: onChange }), {
210
+ addonAfter: _withCtx(() => [
211
+ _createVNode(_component_AIcon, {
212
+ type: "FormOutlined",
213
+ onClick: _cache[7] || (_cache[7] = ($event) => (modalVisible.value = true))
214
+ })
215
+ ]),
216
+ _: 1 /* STABLE */
217
+ }, 16 /* FULL_PROPS */, ["value"]))
218
+ : (_unref(typeMap).get(__props.itemType) === 'file')
219
+ ? (_openBlock(), _createBlock(_unref(Input), _mergeProps({
220
+ key: 7,
221
+ value: myValue.value,
222
+ "onUpdate:value": _cache[9] || (_cache[9] = ($event) => ((myValue).value = $event)),
223
+ allowClear: "",
224
+ placeholder: "请输入链接"
225
+ }, bindProps.value, { onChange: onChange }), {
226
+ addonAfter: _withCtx(() => [
227
+ _createVNode(_unref(Upload), {
228
+ action: __props.action,
229
+ headers: __props.headers,
230
+ showUploadList: false,
231
+ name: "file",
232
+ onChange: handleFileChange
233
+ }, {
234
+ default: _withCtx(() => [
235
+ _createVNode(_component_AIcon, { type: "UploadOutlined" })
236
+ ]),
237
+ _: 1 /* STABLE */
238
+ }, 8 /* PROPS */, ["action", "headers"])
239
+ ]),
240
+ _: 1 /* STABLE */
241
+ }, 16 /* FULL_PROPS */, ["value"]))
242
+ : (_unref(typeMap).get(__props.itemType) === 'password')
243
+ ? (_openBlock(), _createBlock(_unref(InputPassword), _mergeProps({
244
+ key: 8,
245
+ value: myValue.value,
246
+ "onUpdate:value": _cache[10] || (_cache[10] = ($event) => ((myValue).value = $event)),
247
+ allowClear: "",
248
+ type: "password"
249
+ }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"]))
250
+ : (_openBlock(), _createBlock(_unref(Input), _mergeProps({
251
+ key: 9,
252
+ value: myValue.value,
253
+ "onUpdate:value": _cache[11] || (_cache[11] = ($event) => ((myValue).value = $event)),
254
+ allowClear: "",
255
+ type: "text"
256
+ }, bindProps.value, { onChange: onChange }), null, 16 /* FULL_PROPS */, ["value"])),
235
257
  _createCommentVNode(" 代码编辑器弹窗 "),
236
258
  _createVNode(_unref(Modal), {
237
259
  visible: modalVisible.value,
238
- "onUpdate:visible": _cache[11] || (_cache[11] = ($event) => ((modalVisible).value = $event)),
260
+ "onUpdate:visible": _cache[13] || (_cache[13] = ($event) => ((modalVisible).value = $event)),
239
261
  zIndex: 1100,
240
262
  "cancel-text": "取消",
241
263
  "ok-text": "确认",
@@ -248,7 +270,7 @@ const __sfc_main__ = _defineComponent({
248
270
  _createElementVNode("div", _hoisted_2, [
249
271
  _createVNode(_unref(MonacoEditor), {
250
272
  modelValue: objectValue.value,
251
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => ((objectValue).value = $event))
273
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => ((objectValue).value = $event))
252
274
  }, null, 8 /* PROPS */, ["modelValue"])
253
275
  ])
254
276
  ]),
package/lib/components.js CHANGED
@@ -83,6 +83,12 @@ Object.defineProperty(exports, "FullPage", {
83
83
  return _FullPage.default;
84
84
  }
85
85
  });
86
+ Object.defineProperty(exports, "Map", {
87
+ enumerable: true,
88
+ get: function get() {
89
+ return _AMap.default;
90
+ }
91
+ });
86
92
  Object.defineProperty(exports, "Markdown", {
87
93
  enumerable: true,
88
94
  get: function get() {
@@ -137,13 +143,19 @@ Object.defineProperty(exports, "TimeFormat", {
137
143
  return _TimeFormat.default;
138
144
  }
139
145
  });
146
+ Object.defineProperty(exports, "Title", {
147
+ enumerable: true,
148
+ get: function get() {
149
+ return _Title.default;
150
+ }
151
+ });
140
152
  Object.defineProperty(exports, "ValueItem", {
141
153
  enumerable: true,
142
154
  get: function get() {
143
155
  return _ValueItem.default;
144
156
  }
145
157
  });
146
- require("./AMap");
158
+ var _AMap = _interopRequireDefault(require("./AMap"));
147
159
  var _BadgeStatus = _interopRequireDefault(require("./BadgeStatus"));
148
160
  var _CardSelect = _interopRequireDefault(require("./CardSelect"));
149
161
  var _CheckButton = _interopRequireDefault(require("./CheckButton"));
@@ -165,5 +177,6 @@ var _DragModal = _interopRequireDefault(require("./DragModal"));
165
177
  var _EditTable = _interopRequireDefault(require("./EditTable"));
166
178
  var _Markdown = _interopRequireDefault(require("./Markdown"));
167
179
  var _AutoComplete = _interopRequireDefault(require("./AutoComplete"));
180
+ var _Title = _interopRequireDefault(require("./Title"));
168
181
  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); }
169
182
  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; }
@@ -117,5 +117,8 @@ var _default = exports.default = {
117
117
  cancel: 'Cancel',
118
118
  confirm: 'Confirm',
119
119
  title: 'Edit'
120
+ },
121
+ PermissionButton: {
122
+ hasPermission: 'No permission, please contact the administrator'
120
123
  }
121
124
  };
@@ -117,5 +117,8 @@ var _default = exports.default = {
117
117
  cancel: '取消',
118
118
  confirm: '确定',
119
119
  title: '编辑'
120
+ },
121
+ PermissionButton: {
122
+ hasPermission: '暂无权限,请联系管理员'
120
123
  }
121
124
  };
@@ -4793,6 +4793,7 @@ span.ant-radio + * {
4793
4793
  .jetlinks-drag-modal .jetlinks-drag-modal-sprite .jetlinks-drag-modal-footer {
4794
4794
  border-top: 1px solid #f0f0f0;
4795
4795
  padding: 5px 15px;
4796
+ text-align: right;
4796
4797
  }
4797
4798
  .jetlinks-drag-modal .jetlinks-drag-modal-range {
4798
4799
  position: absolute;
@@ -4898,7 +4899,7 @@ span.ant-radio + * {
4898
4899
  padding: 0 12px;
4899
4900
  position: relative;
4900
4901
  }
4901
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .readonly-mask {
4902
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .readonly-mask {
4902
4903
  position: absolute;
4903
4904
  top: 0;
4904
4905
  left: 0;
@@ -5137,3 +5138,42 @@ span.ant-radio + * {
5137
5138
  .j-scrollbar-fade-leave-active {
5138
5139
  opacity: 0;
5139
5140
  }
5141
+ .j-title {
5142
+ display: flex;
5143
+ align-items: center;
5144
+ width: 100%;
5145
+ margin-bottom: 16px;
5146
+ }
5147
+ .j-title .j-title-content {
5148
+ position: relative;
5149
+ padding-left: 10px;
5150
+ color: rgba(0, 0, 0, 0.8);
5151
+ font-weight: 600;
5152
+ line-height: 1;
5153
+ }
5154
+ .j-title .j-title-content::before {
5155
+ position: absolute;
5156
+ top: 0;
5157
+ left: 0;
5158
+ width: 4px;
5159
+ height: 100%;
5160
+ background-color: #1890ff;
5161
+ border-radius: 0 3px 3px 0;
5162
+ content: ' ';
5163
+ }
5164
+ .j-radio-button {
5165
+ display: grid;
5166
+ gap: 16px;
5167
+ }
5168
+ .j-radio-button .j-radio-button-item {
5169
+ padding: 6px 12px;
5170
+ text-align: center;
5171
+ height: 100%;
5172
+ border-radius: 2px;
5173
+ background-color: #f5f5f5;
5174
+ cursor: pointer;
5175
+ }
5176
+ .j-radio-button .j-radio-button-item.active {
5177
+ color: #fff;
5178
+ background-color: #1890ff;
5179
+ }
@@ -9,3 +9,5 @@
9
9
  @import "../EditTable/style/index.less";
10
10
  @import "../MonacoEditor/style/index.less";
11
11
  @import '../Scrollbar/style/index.less';
12
+ @import '../Title/style/index.less';
13
+ @import '../RadioButton/style/index.less';
package/lib/style.js CHANGED
@@ -9,4 +9,6 @@ require("./CardSelect/style");
9
9
  require("./DragModal/style");
10
10
  require("./EditTable/style");
11
11
  require("./MonacoEditor/style");
12
- require("./Scrollbar/style");
12
+ require("./Scrollbar/style");
13
+ require("./Title/style");
14
+ require("./RadioButton/style");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -156,8 +156,8 @@
156
156
  "webpack-dev-server": "^4.0.0",
157
157
  "webpack-merge": "^5.0.0",
158
158
  "webpackbar": "^5.0.2",
159
- "@jetlinks-web/hooks": "^1.0.24",
160
159
  "@jetlinks-web/constants": "^1.0.9",
160
+ "@jetlinks-web/hooks": "^1.0.25",
161
161
  "@jetlinks-web/utils": "^1.2.8"
162
162
  },
163
163
  "publishConfig": {