@jetlinks-web/components 2.3.0 → 2.3.1

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.
@@ -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-1725345293616"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1725526196668"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -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-1725345293925"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1725526195909"), 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';
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
5
5
  import { h, defineComponent, computed } from "vue";
6
- import { Button, Tooltip, Popconfirm } from 'ant-design-vue';
6
+ import { Button, Tooltip, Modal } from 'ant-design-vue';
7
7
  import "ant-design-vue/es";
8
8
  import { omit } from "lodash-es";
9
9
  import { buttonProps } from "ant-design-vue/es/button/button";
@@ -33,8 +33,6 @@ var PermissionButton = defineComponent({
33
33
  props: definedProps,
34
34
  setup: function setup(props, _ref) {
35
35
  var slots = _ref.slots;
36
- var popConfirm = props.popConfirm,
37
- tooltip = props.tooltip;
38
36
  var _usePermission = usePermission(props.hasPermission),
39
37
  hasPerm = _usePermission.hasPerm;
40
38
  var permission = computed(function () {
@@ -49,11 +47,9 @@ var PermissionButton = defineComponent({
49
47
  }
50
48
  return true;
51
49
  });
52
- var hasPopConfirm = computed(function () {
53
- return !!popConfirm;
54
- }); // 是否包含确认弹窗
50
+ // const hasPopConfirm = computed(() => !!props.popConfirm) // 是否包含确认弹窗
55
51
  var hasTooltip = computed(function () {
56
- return !!tooltip;
52
+ return !!props.tooltip;
57
53
  }); // 是否包含文字提示
58
54
  return function () {
59
55
  var popConfirm = props.popConfirm,
@@ -61,6 +57,20 @@ var PermissionButton = defineComponent({
61
57
  hasPermission = props.hasPermission,
62
58
  noPermissionTitle = props.noPermissionTitle,
63
59
  buttonProps = _objectWithoutProperties(props, _excluded);
60
+ if (popConfirm) {
61
+ buttonProps.onClick = function () {
62
+ Modal.confirm({
63
+ title: popConfirm.title,
64
+ content: popConfirm.content,
65
+ onOk: function onOk() {
66
+ return popConfirm.onConfirm();
67
+ },
68
+ onCancel: function onCancel() {
69
+ popConfirm.onCancel();
70
+ }
71
+ });
72
+ };
73
+ }
64
74
  var button = !slots.button ? h(Button, _objectSpread(_objectSpread({}, buttonProps), {}, {
65
75
  disabled: isPermission.value
66
76
  }), {
@@ -90,21 +100,21 @@ var PermissionButton = defineComponent({
90
100
  }
91
101
  }) : undefined;
92
102
  // 二次确认
93
- var _popConfirm = popConfirm ? h(Popconfirm, _extends({
94
- overlayStyle: {
95
- width: '220px'
96
- }
97
- }, popConfirm, {
98
- disabled: !permission.value || buttonProps.disabled
99
- }), {
100
- default: function _default() {
101
- return tooltip ? _tooltip : button;
102
- }
103
- }) : undefined;
103
+ // const _popConfirm = popConfirm ?
104
+ // h(Popconfirm,
105
+ // Object.assign(
106
+ // {overlayStyle: {width: '220px'}},
107
+ // popConfirm,
108
+ // {
109
+ // disabled: !permission.value || buttonProps.disabled
110
+ // }
111
+ // ),
112
+ // {default: () => tooltip ? _tooltip : button})
113
+ // : undefined
104
114
  if (permission.value) {
105
- if (hasPopConfirm.value) {
106
- return _popConfirm;
107
- }
115
+ // if (hasPopConfirm.value) {
116
+ // return _popConfirm
117
+ // }
108
118
  if (hasTooltip.value) {
109
119
  return _tooltip;
110
120
  }
@@ -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-1725345294479"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1725526197817"), 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-1725345295640"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1725526198917"), 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-1725345294732"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1725526198084"), 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-1725345294853"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1725526198189"), 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';
@@ -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-1725345293592"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1725526196639"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -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-1725345293934"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1725526195900"), 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';
@@ -40,8 +40,6 @@ var PermissionButton = (0, _vue.defineComponent)({
40
40
  props: definedProps,
41
41
  setup: function setup(props, _ref) {
42
42
  var slots = _ref.slots;
43
- var popConfirm = props.popConfirm,
44
- tooltip = props.tooltip;
45
43
  var _usePermission = (0, _hooks.usePermission)(props.hasPermission),
46
44
  hasPerm = _usePermission.hasPerm;
47
45
  var permission = (0, _vue.computed)(function () {
@@ -56,11 +54,9 @@ var PermissionButton = (0, _vue.defineComponent)({
56
54
  }
57
55
  return true;
58
56
  });
59
- var hasPopConfirm = (0, _vue.computed)(function () {
60
- return !!popConfirm;
61
- }); // 是否包含确认弹窗
57
+ // const hasPopConfirm = computed(() => !!props.popConfirm) // 是否包含确认弹窗
62
58
  var hasTooltip = (0, _vue.computed)(function () {
63
- return !!tooltip;
59
+ return !!props.tooltip;
64
60
  }); // 是否包含文字提示
65
61
  return function () {
66
62
  var popConfirm = props.popConfirm,
@@ -68,6 +64,20 @@ var PermissionButton = (0, _vue.defineComponent)({
68
64
  hasPermission = props.hasPermission,
69
65
  noPermissionTitle = props.noPermissionTitle,
70
66
  buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
67
+ if (popConfirm) {
68
+ buttonProps.onClick = function () {
69
+ _antDesignVue.Modal.confirm({
70
+ title: popConfirm.title,
71
+ content: popConfirm.content,
72
+ onOk: function onOk() {
73
+ return popConfirm.onConfirm();
74
+ },
75
+ onCancel: function onCancel() {
76
+ popConfirm.onCancel();
77
+ }
78
+ });
79
+ };
80
+ }
71
81
  var button = !slots.button ? (0, _vue.h)(_antDesignVue.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, buttonProps), {}, {
72
82
  disabled: isPermission.value
73
83
  }), {
@@ -97,21 +107,21 @@ var PermissionButton = (0, _vue.defineComponent)({
97
107
  }
98
108
  }) : undefined;
99
109
  // 二次确认
100
- var _popConfirm = popConfirm ? (0, _vue.h)(_antDesignVue.Popconfirm, (0, _extends2.default)({
101
- overlayStyle: {
102
- width: '220px'
103
- }
104
- }, popConfirm, {
105
- disabled: !permission.value || buttonProps.disabled
106
- }), {
107
- default: function _default() {
108
- return tooltip ? _tooltip : button;
109
- }
110
- }) : undefined;
110
+ // const _popConfirm = popConfirm ?
111
+ // h(Popconfirm,
112
+ // Object.assign(
113
+ // {overlayStyle: {width: '220px'}},
114
+ // popConfirm,
115
+ // {
116
+ // disabled: !permission.value || buttonProps.disabled
117
+ // }
118
+ // ),
119
+ // {default: () => tooltip ? _tooltip : button})
120
+ // : undefined
111
121
  if (permission.value) {
112
- if (hasPopConfirm.value) {
113
- return _popConfirm;
114
- }
122
+ // if (hasPopConfirm.value) {
123
+ // return _popConfirm
124
+ // }
115
125
  if (hasTooltip.value) {
116
126
  return _tooltip;
117
127
  }
@@ -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-1725345294465"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1725526197806"), 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-1725345295629"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1725526198895"), 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-1725345294677"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1725526197992"), 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-1725345294831"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1725526198169"), 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.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -152,9 +152,9 @@
152
152
  "webpack-dev-server": "^4.0.0",
153
153
  "webpack-merge": "^5.0.0",
154
154
  "webpackbar": "^5.0.2",
155
- "@jetlinks-web/constants": "^1.0.2",
156
- "@jetlinks-web/utils": "^1.2.0",
157
- "@jetlinks-web/hooks": "^1.0.15"
155
+ "@jetlinks-web/constants": "^1.0.3",
156
+ "@jetlinks-web/hooks": "^1.0.16",
157
+ "@jetlinks-web/utils": "^1.2.1"
158
158
  },
159
159
  "publishConfig": {
160
160
  "registry": "https://registry.npmjs.org/",