@oinone/kunlun-vue-ui-antd 6.3.9 → 6.4.0

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 (71) hide show
  1. package/dist/oinone-kunlun-vue-ui-antd.css +1 -1
  2. package/dist/oinone-kunlun-vue-ui-antd.esm.js +2 -2
  3. package/dist/oinone-kunlun-vue-ui-antd.scss +1 -1
  4. package/dist/types/src/component/index.d.ts +1 -0
  5. package/dist/types/src/component/oio-button/oio-button.vue.d.ts +6 -0
  6. package/dist/types/src/component/oio-drawer/oio-drawer.vue.d.ts +43 -11
  7. package/dist/types/src/component/oio-gallery/oio-gallery.vue.d.ts +2 -0
  8. package/dist/types/src/component/oio-group/index.d.ts +1 -0
  9. package/dist/types/src/component/oio-group/oio-group.vue.d.ts +6 -0
  10. package/dist/types/src/component/oio-group/typing.d.ts +10 -0
  11. package/dist/types/src/component/oio-inner-popup/oio-inner-popup.vue.d.ts +0 -3
  12. package/dist/types/src/component/oio-input/oio-input-number.vue.d.ts +2 -1
  13. package/dist/types/src/component/oio-input/oio-input-password.vue.d.ts +6 -0
  14. package/dist/types/src/component/oio-input/oio-input-search.vue.d.ts +6 -0
  15. package/dist/types/src/component/oio-input/oio-input.vue.d.ts +12 -1
  16. package/dist/types/src/component/oio-list/index.d.ts +1 -0
  17. package/dist/types/src/component/oio-list/oio-list.vue.d.ts +80 -0
  18. package/dist/types/src/component/oio-modal/oio-modal.vue.d.ts +47 -10
  19. package/dist/types/src/component/oio-notification/index.d.ts +12 -1
  20. package/dist/types/src/component/oio-select/oio-select.vue.d.ts +14 -2
  21. package/dist/types/src/component/oio-tabs/oio-tabs.vue.d.ts +10 -3
  22. package/dist/types/src/component/oio-tooltip/oio-tooltip-help.vue.d.ts +0 -2
  23. package/dist/types/src/component/oio-tree/oio-tree.vue.d.ts +1 -1
  24. package/dist/types/src/index.d.ts +1 -0
  25. package/package.json +3 -3
  26. package/src/component/index.ts +1 -0
  27. package/src/component/oio-button/oio-button.vue +2 -2
  28. package/src/component/oio-button/style/a-button.scss +102 -13
  29. package/src/component/oio-checkbox/style/index.scss +21 -1
  30. package/src/component/oio-collapse/style/index.scss +2 -1
  31. package/src/component/oio-date-time-picker/style/index.scss +42 -41
  32. package/src/component/oio-date-time-range-picker/style/index.scss +5 -5
  33. package/src/component/oio-drawer/oio-drawer.vue +77 -18
  34. package/src/component/oio-drawer/style/index.scss +129 -10
  35. package/src/component/oio-drawer/style/parameters.scss +4 -0
  36. package/src/component/oio-form/style/index.scss +3 -2
  37. package/src/component/oio-gallery/oio-gallery.vue +2 -4
  38. package/src/component/oio-group/index.ts +1 -0
  39. package/src/component/oio-group/oio-group.vue +7 -1
  40. package/src/component/oio-group/style/index.scss +17 -4
  41. package/src/component/oio-group/typing.ts +10 -0
  42. package/src/component/oio-inner-popup/oio-inner-popup.vue +23 -12
  43. package/src/component/oio-inner-popup/style/index.scss +13 -25
  44. package/src/component/oio-input/oio-input-group.vue +1 -1
  45. package/src/component/oio-input/oio-input-number.vue +4 -1
  46. package/src/component/oio-input/oio-input-search.vue +6 -1
  47. package/src/component/oio-input/oio-input.vue +20 -7
  48. package/src/component/oio-list/index.ts +1 -0
  49. package/src/component/oio-list/oio-list-item.vue +17 -0
  50. package/src/component/oio-list/oio-list.vue +206 -0
  51. package/src/component/oio-list/style/index.scss +51 -0
  52. package/src/component/oio-list/style/parameters.scss +5 -0
  53. package/src/component/oio-modal/oio-modal.vue +89 -34
  54. package/src/component/oio-modal/style/index.scss +128 -72
  55. package/src/component/oio-modal/style/parameters.scss +4 -0
  56. package/src/component/oio-notification/index.ts +17 -2
  57. package/src/component/oio-pagination/style/index.scss +12 -11
  58. package/src/component/oio-radio/style/index.scss +38 -1
  59. package/src/component/oio-select/oio-select.vue +23 -10
  60. package/src/component/oio-select/style/a-select.scss +1 -1
  61. package/src/component/oio-select/style/index.scss +28 -11
  62. package/src/component/oio-spin/style/index.scss +1 -6
  63. package/src/component/oio-tabs/oio-tab.vue +1 -1
  64. package/src/component/oio-tabs/oio-tabs.vue +22 -2
  65. package/src/component/oio-tabs/style/index.scss +64 -0
  66. package/src/component/oio-tabs/use-tab-bar.ts +9 -10
  67. package/src/component/oio-tooltip/oio-tooltip-help.vue +1 -2
  68. package/src/component/oio-tree/oio-tree.vue +1 -2
  69. package/src/component/oio-tree/style/index.scss +4 -0
  70. package/src/index.ts +1 -0
  71. package/src/style/index.scss +1 -0
@@ -1,9 +1,18 @@
1
1
  <script lang="ts">
2
2
  import { CastHelper, StringHelper } from '@oinone/kunlun-shared';
3
- import { OioCloseIcon, OioDrawerProps, PropRecordHelper, StyleHelper, useDrawer } from '@oinone/kunlun-vue-ui-common';
3
+ import {
4
+ OioCloseIcon,
5
+ OioDrawerProps,
6
+ OioIcon,
7
+ PopupDisplayAs,
8
+ PropRecordHelper,
9
+ useDrawer,
10
+ useInjectOioDefaultFormContext,
11
+ useProviderOioDefaultFormContext
12
+ } from '@oinone/kunlun-vue-ui-common';
4
13
  import { Drawer as ADrawer } from 'ant-design-vue';
5
14
  import { isBoolean } from 'lodash-es';
6
- import { createVNode, defineComponent } from 'vue';
15
+ import { createVNode, defineComponent, withModifiers } from 'vue';
7
16
  import { DEFAULT_PREFIX } from '../../theme';
8
17
  import { OioButton } from '../oio-button';
9
18
  import { OioSpin } from '../oio-spin';
@@ -14,15 +23,25 @@ export default defineComponent({
14
23
  components: {
15
24
  ADrawer,
16
25
  OioButton,
17
- OioSpin
26
+ OioSpin,
27
+ OioIcon
18
28
  },
19
29
  inheritAttrs: false,
20
30
  props: {
21
31
  ...OioDrawerProps
22
32
  },
23
33
  slots: ['default', 'title', 'header', 'footer', 'closeIcon'],
24
- emits: ['update:visible'],
34
+ emits: ['update:visible', 'update:displayAs'],
25
35
  setup(props, context) {
36
+ const formContext = useInjectOioDefaultFormContext();
37
+
38
+ useProviderOioDefaultFormContext({
39
+ ...formContext,
40
+ getTriggerContainer() {
41
+ return document.body;
42
+ }
43
+ });
44
+
26
45
  return {
27
46
  ...useDrawer(props, context)
28
47
  };
@@ -59,23 +78,63 @@ export default defineComponent({
59
78
  }
60
79
  const isOverrideTitle = !!slots.header;
61
80
  if (!isOverrideTitle) {
62
- let titleSlot = slots.title;
63
- if (!titleSlot) {
64
- titleSlot = () => [createVNode('span', {}, this.title || OioDrawerProps.title.default)];
65
- }
66
- if (this.help) {
67
- const titleChildren = titleSlot();
68
- titleSlot = () => {
69
- return [createVNode('span', {}, titleChildren), createVNode(OioTooltipHelp, { content: this.help })];
70
- };
71
- }
72
- slots.title = titleSlot;
81
+ const originalTitleSlot = slots.title;
82
+
83
+ // 默认标题插槽
84
+ const createDefaultTitle = () => [createVNode('span', {}, this.$translate(this.title || '抽屉'))];
85
+
86
+ slots.title = () => {
87
+ // 获取原始或默认的标题插槽
88
+ const originalSlot = [...(originalTitleSlot?.() || createDefaultTitle())];
89
+
90
+ if (this.help) {
91
+ originalSlot.push(
92
+ createVNode(OioTooltipHelp, {
93
+ content: this.help
94
+ })
95
+ );
96
+ }
97
+
98
+ // 控制图标
99
+ const controlIcons = [
100
+ this.showPopupToggle &&
101
+ !this.isFullScreen &&
102
+ createVNode(OioIcon, {
103
+ style: { cursor: 'pointer' },
104
+ icon: this.displayAs === PopupDisplayAs.drawer ? 'oinone-dialog' : 'oinone-drawer',
105
+ size: 16,
106
+ onClick: withModifiers(this.onDisplayAsSwitch, ['stop'])
107
+ }),
108
+ this.enabledFullScreen &&
109
+ createVNode(OioIcon, {
110
+ style: { cursor: 'pointer' },
111
+ icon: this.isFullScreen ? 'oinone-suoxiao1' : 'oinone-fangda2',
112
+ size: 16,
113
+ onClick: withModifiers(this.onFullSwitch, ['stop'])
114
+ })
115
+ ].filter(Boolean);
116
+
117
+ // 包装控制区域
118
+ if (controlIcons.length > 0) {
119
+ originalSlot.push(
120
+ createVNode(
121
+ 'div',
122
+ {
123
+ class: `${mainClassName}-title-extend`
124
+ },
125
+ controlIcons
126
+ )
127
+ );
128
+ }
129
+
130
+ return originalSlot;
131
+ };
73
132
  }
74
133
  if (!slots.closeIcon) {
75
134
  slots.closeIcon = () => [createVNode(OioCloseIcon)];
76
135
  }
77
136
 
78
- const classNames = [mainClassName, `${mainClassName}-wrapper`];
137
+ const classNames = [mainClassName, `${mainClassName}-wrapper`, ...this.modalDrawerClassName];
79
138
  if (this.widthClassSuffix) {
80
139
  classNames.push(`${mainClassName}-width-${this.widthClassSuffix}`);
81
140
  }
@@ -97,8 +156,8 @@ export default defineComponent({
97
156
  this.wrapperProps?.style
98
157
  ),
99
158
  placement: this.placement,
100
- width: StyleHelper.px(this.width),
101
- height: StyleHelper.px(this.height),
159
+ width: this.width,
160
+ height: this.height,
102
161
  mask: this.mask,
103
162
  maskClosable: this.maskClosable,
104
163
  zIndex: this.zIndex,
@@ -16,27 +16,45 @@ $footerHeight: 73px;
16
16
  display: none;
17
17
  }
18
18
  }
19
+
20
+ .ant-drawer-content {
21
+ background: var(--oio-background);
22
+ }
23
+
19
24
  &.no-mask {
20
- width: 100% !important;
25
+ width: 100%;
21
26
  }
22
27
 
23
28
  &.#{$drawerClassPrefix}-width-small .ant-drawer-content-wrapper {
24
- width: var($drawerParameterPrefix + -width-small) !important;
29
+ width: var($drawerParameterPrefix + -width-small);
25
30
  }
31
+
26
32
  &.#{$drawerClassPrefix}-width-medium .ant-drawer-content-wrapper {
27
- width: var($drawerParameterPrefix + -width-medium) !important;
33
+ width: var($drawerParameterPrefix + -width-medium);
28
34
  }
35
+
29
36
  &.#{$drawerClassPrefix}-width-large .ant-drawer-content-wrapper {
30
- width: var($drawerParameterPrefix + -width-large) !important;
37
+ width: var($drawerParameterPrefix + -width-large);
38
+ }
39
+
40
+ &.#{$drawerClassPrefix}-width-full .ant-drawer-content-wrapper {
41
+ width: 100vw;
31
42
  }
43
+
32
44
  &.#{$drawerClassPrefix}-height-small .ant-drawer-content-wrapper {
33
- height: var($drawerParameterPrefix + -height-small) !important;
45
+ height: var($parameterPrefix + -modal-height-small);
34
46
  }
47
+
35
48
  &.#{$drawerClassPrefix}-height-medium .ant-drawer-content-wrapper {
36
- height: var($drawerParameterPrefix + -height-medium) !important;
49
+ height: var($parameterPrefix + -modal-height-medium);
37
50
  }
51
+
38
52
  &.#{$drawerClassPrefix}-height-large .ant-drawer-content-wrapper {
39
- height: var($drawerParameterPrefix + -height-large) !important;
53
+ height: var($parameterPrefix + -modal-height-large);
54
+ }
55
+
56
+ &.#{$drawerClassPrefix}-height-full .ant-drawer-content-wrapper {
57
+ height: 100vh;
40
58
  }
41
59
 
42
60
  & > .ant-drawer-content-wrapper {
@@ -54,7 +72,7 @@ $footerHeight: 73px;
54
72
  @include oio-scrollbar();
55
73
 
56
74
  height: calc(100% - #{$titleHeight});
57
- padding: 16px;
75
+ padding: var($parameterPrefix + -margin-md);
58
76
  overflow: auto;
59
77
 
60
78
  & > .ant-spin-nested-loading {
@@ -66,8 +84,47 @@ $footerHeight: 73px;
66
84
  }
67
85
  }
68
86
 
87
+ .ant-drawer-header {
88
+ background-color: var(--oio-background);
89
+ border-color: var(--oio-border-color);
90
+ padding: 16px;
91
+ }
92
+
93
+ .ant-drawer-header-title {
94
+ flex-direction: row-reverse;
95
+ }
96
+
97
+ .ant-drawer-title {
98
+ opacity: 0.85;
99
+ font-size: var($parameterPrefix + -font-size-lg);
100
+ color: var($parameterPrefix + -text-color);
101
+ line-height: 24px;
102
+ font-weight: var($parameterPrefix + -font-weight-bold);
103
+ position: relative;
104
+
105
+ .#{$drawerClassPrefix}-title-extend {
106
+ height: 24px;
107
+ flex: 1;
108
+ display: flex;
109
+ align-items: center;
110
+ column-gap: 16px;
111
+ position: absolute;
112
+ top: 0;
113
+ right: 16px;
114
+
115
+ .oio-icon {
116
+ width: 24px;
117
+ height: 24px;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ }
122
+ }
123
+ }
124
+
69
125
  .ant-drawer-close {
70
126
  padding: 0;
127
+ margin-right: 0;
71
128
  }
72
129
 
73
130
  .ant-drawer-footer {
@@ -84,10 +141,72 @@ $footerHeight: 73px;
84
141
 
85
142
  &.ant-btn {
86
143
  height: var($parameterPrefix + -height);
87
- margin: var($parameterPrefix + -margin-xxs) 0 var($parameterPrefix + -margin-xxs)
88
- var($parameterPrefix + -margin-md);
144
+ margin: var($parameterPrefix + -margin-xxs) 0 var($parameterPrefix + -margin-xxs) var($parameterPrefix + -margin-md);
89
145
  }
90
146
  }
91
147
  }
92
148
  }
149
+
150
+ &.#{$drawerClassPrefix}-modal-mode {
151
+ @include oio-scrollbar();
152
+
153
+ position: fixed;
154
+ right: 0;
155
+ top: 0;
156
+ bottom: 0;
157
+ left: 0;
158
+ outline: 0;
159
+ overflow: auto;
160
+
161
+ .ant-drawer-mask {
162
+ height: 100%;
163
+ position: fixed;
164
+ bottom: 0;
165
+ left: 0;
166
+ right: 0;
167
+ top: 0;
168
+ z-index: 1000;
169
+ }
170
+
171
+ .ant-drawer-content {
172
+ height: unset;
173
+ }
174
+
175
+ .ant-drawer-content-wrapper {
176
+ position: relative;
177
+ height: unset;
178
+ top: 100px;
179
+ z-index: 1000;
180
+ margin: 0 auto;
181
+
182
+ .ant-drawer-content {
183
+ background-color: var(--oio-background);
184
+ border: 1px solid var(--oio-border-color);
185
+ box-shadow: var(--oio-box-shadow);
186
+ border-radius: var(--oio-border-radius);
187
+ }
188
+ }
189
+
190
+ & > .ant-drawer-content-wrapper {
191
+ opacity: 0;
192
+ transition: none;
193
+ }
194
+
195
+ &.ant-drawer-open > .ant-drawer-content-wrapper {
196
+ opacity: 1;
197
+ transition: none;
198
+ }
199
+
200
+ &.#{$drawerClassPrefix}-width-small .ant-drawer-content-wrapper {
201
+ width: var($modalParameterPrefix + -width-small);
202
+ }
203
+
204
+ &.#{$drawerClassPrefix}-width-medium .ant-drawer-content-wrapper {
205
+ width: var($modalParameterPrefix + -width-medium);
206
+ }
207
+
208
+ &.#{$drawerClassPrefix}-width-large .ant-drawer-content-wrapper {
209
+ width: var($modalParameterPrefix + -width-large);
210
+ }
211
+ }
93
212
  }
@@ -3,3 +3,7 @@
3
3
  $drawerPrefix: $prefix + -drawer;
4
4
  $drawerParameterPrefix: $parameterPrefix + -drawer;
5
5
  $drawerClassPrefix: $drawerPrefix;
6
+
7
+ $modalPrefix: $prefix + -modal;
8
+ $modalParameterPrefix: $parameterPrefix + -modal;
9
+ $modalClassPrefix: $modalPrefix;
@@ -49,8 +49,8 @@
49
49
 
50
50
  & > label {
51
51
  font-size: var($parameterPrefix + -font-size);
52
- color: var($parameterPrefix + -text-color);
53
- font-weight: var($parameterPrefix + -font-weight);
52
+ color: var($parameterPrefix + -form-item-label-color);
53
+ font-weight: var($parameterPrefix + -form-item-label-weight);
54
54
  height: var($parameterPrefix + -height);
55
55
  line-height: var($parameterPrefix + -height);
56
56
  vertical-align: top;
@@ -78,6 +78,7 @@
78
78
  line-height: 18px;
79
79
  flex-basis: var(--oio-label-height);
80
80
  padding: 0;
81
+ width: 100%;
81
82
  margin-bottom: var($parameterPrefix + -margin-xs);
82
83
  white-space: nowrap;
83
84
  text-overflow: ellipsis;
@@ -63,13 +63,9 @@ export default defineComponent({
63
63
  style.maxWidth = defaultWidth;
64
64
  if (isObject(props.itemStyle)) {
65
65
  const hasWidth = !isNil(props.itemStyle?.width);
66
- const hasMinWidth = !isNil(props.itemStyle?.minWidth);
67
- const hasMaxWidth = !isNil(props.itemStyle?.maxWidth);
68
66
  if (hasWidth) {
69
67
  style.minWidth = CastHelper.cast(null);
70
68
  style.maxWidth = CastHelper.cast(null);
71
- } else if (hasMaxWidth && !hasMinWidth) {
72
- style.minWidth = CastHelper.cast(null);
73
69
  }
74
70
  style = {
75
71
  ...style,
@@ -80,7 +76,9 @@ export default defineComponent({
80
76
  });
81
77
 
82
78
  return {
79
+ cols,
83
80
  gutter,
81
+ flexBasic,
84
82
  flex,
85
83
  rowStyle,
86
84
  colStyle
@@ -1,2 +1,3 @@
1
+ export * from './typing';
1
2
  export { default as OioGroup } from './oio-group.vue';
2
3
  export { default as OioGroupHelp } from './oio-group-help.vue';
@@ -4,6 +4,7 @@ import { OioGroupProps, PropRecordHelper } from '@oinone/kunlun-vue-ui-common';
4
4
  import { createVNode, defineComponent, VNode } from 'vue';
5
5
  import { DEFAULT_PREFIX } from '../../theme';
6
6
  import OioGroupHelp from './oio-group-help.vue';
7
+ import { GroupStyle } from './typing';
7
8
 
8
9
  export default defineComponent({
9
10
  name: 'OioGroup',
@@ -29,7 +30,8 @@ export default defineComponent({
29
30
  helpIconColor,
30
31
  helpPlacement,
31
32
  helpBgColor,
32
- helpAdjustOverflow
33
+ helpAdjustOverflow,
34
+ bizStyle
33
35
  } = this;
34
36
  const slots = PropRecordHelper.collectionSlots($slots, [
35
37
  { origin: 'default', isNotNull: true },
@@ -40,6 +42,9 @@ export default defineComponent({
40
42
  if (border) {
41
43
  classList.push(`${DEFAULT_PREFIX}-group-border`);
42
44
  }
45
+
46
+ classList.push(`${DEFAULT_PREFIX}-group-${bizStyle || GroupStyle.style1}`);
47
+
43
48
  let hiddenTitle = title === false;
44
49
  let titleVNodes: VNode[] | undefined;
45
50
  if (slots.title) {
@@ -113,6 +118,7 @@ export default defineComponent({
113
118
  )
114
119
  ];
115
120
  titleClassList.push(`${DEFAULT_PREFIX}-group-title-flex-end`);
121
+ classList.push(`${DEFAULT_PREFIX}-group-toolbar-flex-end`);
116
122
  titleVNodes = [createVNode('div', { class: titleClassList }, titleVNodes)];
117
123
  } else {
118
124
  hiddenTitle = true;
@@ -2,7 +2,7 @@
2
2
 
3
3
  .#{$groupClassPrefix} {
4
4
  width: 100%;
5
- background: var(--oio-background);
5
+ background-color: var(--oio-background);
6
6
 
7
7
  &-border {
8
8
  border: var($parameterPrefix + -border-width) var(--oio-group-border-width) var($parameterPrefix + -border-color);
@@ -58,7 +58,7 @@
58
58
  text-overflow: ellipsis;
59
59
 
60
60
  & + .#{$groupClassPrefix}-description {
61
- margin-left: 12px;
61
+ margin-left: 8px;
62
62
  }
63
63
  }
64
64
 
@@ -73,15 +73,28 @@
73
73
  }
74
74
 
75
75
  &-description {
76
- color: var(--oio-text-color-secondary);
76
+ color: var(--oio-placeholder-color);
77
77
  font-size: var(--oio-font-size-sm);
78
- line-height: var(--oio-line-height-lg);
79
78
  max-width: 400px;
80
79
  white-space: nowrap;
81
80
  overflow: hidden;
82
81
  text-overflow: ellipsis;
83
82
  }
84
83
 
84
+ &-style1 {
85
+ .#{$groupClassPrefix}-title-wrapper:not(.#{$groupClassPrefix}-title-space-between),
86
+ .#{$groupClassPrefix}-title-space-between > .#{$groupClassPrefix}-title-content {
87
+ &::before {
88
+ content: '';
89
+ width: 3px;
90
+ height: var(--oio-font-size-lg);
91
+ display: block;
92
+ background-color: var(--oio-primary-color);
93
+ margin-right: 8px;
94
+ }
95
+ }
96
+ }
97
+
85
98
  &-content {
86
99
  padding: var(--oio-padding);
87
100
  }
@@ -0,0 +1,10 @@
1
+ export enum GroupStyle {
2
+ /**
3
+ * 标题带竖线
4
+ */
5
+ style1 = 'style1',
6
+ /**
7
+ * 简约
8
+ */
9
+ style2 = 'style2'
10
+ }
@@ -2,11 +2,13 @@
2
2
  import {
3
3
  ButtonType,
4
4
  DrawerPlacement,
5
+ OioCloseIcon,
5
6
  OioIcon,
6
7
  OioInnerPopupProps,
7
8
  PropRecordHelper,
8
- useResizableHandle,
9
- OioCloseIcon
9
+ useInjectOioDefaultFormContext,
10
+ useProviderOioDefaultFormContext,
11
+ useResizableHandle
10
12
  } from '@oinone/kunlun-vue-ui-common';
11
13
  import { isFunction, isString } from 'lodash-es';
12
14
  import {
@@ -48,7 +50,7 @@ function createHeader(children: VNode[]) {
48
50
  }
49
51
 
50
52
  function createBody(children: VNode[]) {
51
- return createVNode('div', { class: `${CLASS_NAME}-body` }, children);
53
+ return createVNode('div', { class: `${CLASS_NAME}-body oio-scrollbar` }, children);
52
54
  }
53
55
 
54
56
  function createFooter(children: VNode[]) {
@@ -69,6 +71,8 @@ export default defineComponent({
69
71
  ...OioInnerPopupProps
70
72
  },
71
73
  setup(props) {
74
+ const formContext = useInjectOioDefaultFormContext();
75
+
72
76
  const popupRef = ref<HTMLElement>();
73
77
 
74
78
  const resizable = computed(() => {
@@ -133,6 +137,13 @@ export default defineComponent({
133
137
  { immediate: true }
134
138
  );
135
139
 
140
+ useProviderOioDefaultFormContext({
141
+ ...formContext,
142
+ getTriggerContainer() {
143
+ return document.body;
144
+ }
145
+ });
146
+
136
147
  return {
137
148
  popupRef,
138
149
 
@@ -144,7 +155,8 @@ export default defineComponent({
144
155
  default: defaultSlot,
145
156
  title: titleSlot,
146
157
  header: headerSlot,
147
- footer: footerSlot
158
+ footer: footerSlot,
159
+ extraToolbar: extraToolbarSlot
148
160
  } = PropRecordHelper.collectionSlots(this.$slots, [
149
161
  {
150
162
  origin: 'default',
@@ -152,7 +164,8 @@ export default defineComponent({
152
164
  },
153
165
  'title',
154
166
  'header',
155
- 'footer'
167
+ 'footer',
168
+ 'extraToolbar'
156
169
  ]);
157
170
 
158
171
  const finalHeaderSlot: Slot | null | undefined = headerSlot || this.header;
@@ -166,7 +179,7 @@ export default defineComponent({
166
179
  let finalTitleSlot = titleSlot;
167
180
  if (!finalTitleSlot) {
168
181
  finalTitleSlot = () => [
169
- createVNode('span', { class: `${CLASS_NAME}-title` }, this.title || OioInnerPopupProps.title.default)
182
+ createVNode('span', { class: `${CLASS_NAME}-title` }, this.$translate(this.title || '标题'))
170
183
  ];
171
184
  }
172
185
  if (this.help) {
@@ -179,12 +192,10 @@ export default defineComponent({
179
192
  if (this.closable) {
180
193
  headerChildren.push(
181
194
  createVNode('div', { class: `${CLASS_NAME}-title-toolbar` }, [
182
- createVNode(
183
- OioCloseIcon,
184
- {
185
- onClick: this.cancelCallback
186
- },
187
- )
195
+ ...(extraToolbarSlot?.() || []),
196
+ createVNode(OioCloseIcon, {
197
+ onClick: this.cancelCallback
198
+ })
188
199
  ])
189
200
  );
190
201
  }
@@ -22,8 +22,7 @@ $innerPopupSmallWidth: 400px;
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  background-color: var(--oio-background);
25
- border: var($parameterPrefix + -border-width) var($parameterPrefix + -border-style)
26
- var($parameterPrefix + -border-color);
25
+ border: var($parameterPrefix + -border-width) var($parameterPrefix + -border-style) var($parameterPrefix + -border-color);
27
26
  border-radius: var($parameterPrefix + -border-radius, 4px);
28
27
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.05);
29
28
 
@@ -53,19 +52,8 @@ $innerPopupSmallWidth: 400px;
53
52
  align-items: center;
54
53
  column-gap: 8px;
55
54
 
56
- .#{$innerPopupClassPrefix}-title-icon-button {
57
- display: flex;
58
- justify-content: center;
59
- align-items: center;
60
- border-radius: 50%;
61
- width: 24px;
62
- height: 24px;
63
- background-color: var(--oio-icon-color);
55
+ .oio-close-icon {
64
56
  cursor: pointer;
65
-
66
- .oio-icon {
67
- font-size: 10px;
68
- }
69
57
  }
70
58
  }
71
59
 
@@ -77,7 +65,7 @@ $innerPopupSmallWidth: 400px;
77
65
  .#{$innerPopupClassPrefix}-body {
78
66
  padding: 16px;
79
67
  flex: 1 1px;
80
- overflow: scroll;
68
+ overflow: auto;
81
69
 
82
70
  & + .#{$innerPopupClassPrefix}-footer {
83
71
  border-top: 1px solid var(--oio-border-color);
@@ -108,11 +96,11 @@ $innerPopupSmallWidth: 400px;
108
96
 
109
97
  .#{$innerPopupClassPrefix} {
110
98
  @include mediaResponsive(
111
- flex-basis,
112
- $innerPopupDefaultWidth,
113
- $innerPopupLargeWidth,
114
- $innerPopupMediumWidth,
115
- $innerPopupSmallWidth
99
+ flex-basis,
100
+ $innerPopupDefaultWidth,
101
+ $innerPopupLargeWidth,
102
+ $innerPopupMediumWidth,
103
+ $innerPopupSmallWidth
116
104
  );
117
105
  }
118
106
  }
@@ -136,11 +124,11 @@ $innerPopupSmallWidth: 400px;
136
124
 
137
125
  .#{$innerPopupClassPrefix} {
138
126
  @include mediaResponsive(
139
- flex-basis,
140
- $innerPopupDefaultWidth,
141
- $innerPopupLargeWidth,
142
- $innerPopupMediumWidth,
143
- $innerPopupSmallWidth
127
+ flex-basis,
128
+ $innerPopupDefaultWidth,
129
+ $innerPopupLargeWidth,
130
+ $innerPopupMediumWidth,
131
+ $innerPopupSmallWidth
144
132
  );
145
133
  }
146
134
  }
@@ -33,7 +33,7 @@ export default defineComponent({
33
33
  ...PropRecordHelper.collectionBasicProps(this.$attrs, [`${DEFAULT_PREFIX}-input-group`]),
34
34
  compact: this.compact
35
35
  },
36
- this.$slots.default?.() || []
36
+ this.$slots
37
37
  );
38
38
  }
39
39
  });
@@ -25,7 +25,7 @@ export default defineComponent({
25
25
  ...OioInputNumberProps
26
26
  },
27
27
  slots: ['prepend', 'append', 'prefix', 'suffix'],
28
- emits: ['update:value', 'focus', 'blur'],
28
+ emits: ['update:value', 'change', 'focus', 'blur'],
29
29
  setup(props, context) {
30
30
  const origin = ref();
31
31
  const realValue = computed<BigNumber | undefined>(() => {
@@ -68,11 +68,13 @@ export default defineComponent({
68
68
  return false;
69
69
  }
70
70
  context.emit('update:value', val);
71
+ context.emit('change', val);
71
72
  return true;
72
73
  }
73
74
  let newVal = val.toString();
74
75
  if (newVal.endsWith('.') || newVal.endsWith('0')) {
75
76
  context.emit('update:value', newVal);
77
+ context.emit('change', newVal);
76
78
  return true;
77
79
  }
78
80
  const newNumberVal = new BigNumber(newVal);
@@ -84,6 +86,7 @@ export default defineComponent({
84
86
  return false;
85
87
  }
86
88
  context.emit('update:value', newVal);
89
+ context.emit('change', newVal);
87
90
  return true;
88
91
  };
89
92
 
@@ -1,6 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { BooleanHelper, CastHelper } from '@oinone/kunlun-shared';
3
- import { AInputSearchProps, InputSearchEvent, OioInputSearchProps, PropRecordHelper } from '@oinone/kunlun-vue-ui-common';
3
+ import {
4
+ AInputSearchProps,
5
+ InputSearchEvent,
6
+ OioInputSearchProps,
7
+ PropRecordHelper
8
+ } from '@oinone/kunlun-vue-ui-common';
4
9
  import { InputSearch as AInputSearch } from 'ant-design-vue';
5
10
  import { isBoolean, isEmpty } from 'lodash-es';
6
11
  import { computed, createVNode, defineComponent, ref } from 'vue';