vxe-pc-ui 4.9.26 → 4.9.28
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/form/src/form-config-item.js +7 -6
- package/es/form/src/form-item.js +8 -7
- package/es/form/src/form.js +7 -1
- package/es/form/src/itemInfo.js +1 -0
- package/es/form/src/render.js +55 -10
- package/es/form/style.css +83 -7
- package/es/form/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/notice-bar/src/notice-bar.js +21 -6
- package/es/notice-bar/style.css +9 -2
- package/es/notice-bar/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree/style.css +1 -0
- package/es/tree/style.min.css +1 -1
- package/es/ui/index.js +3 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-form/style.css +83 -7
- package/es/vxe-form/style.min.css +1 -1
- package/es/vxe-notice-bar/style.css +9 -2
- package/es/vxe-notice-bar/style.min.css +1 -1
- package/es/vxe-tree/style.css +1 -0
- package/es/vxe-tree/style.min.css +1 -1
- package/lib/form/src/form-config-item.js +3 -3
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +6 -6
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +9 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +1 -0
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/form/src/render.js +68 -13
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/style/style.css +83 -7
- package/lib/form/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +111 -28
- package/lib/index.umd.min.js +1 -1
- package/lib/notice-bar/src/notice-bar.js +24 -6
- package/lib/notice-bar/src/notice-bar.min.js +1 -1
- package/lib/notice-bar/style/style.css +9 -2
- package/lib/notice-bar/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree/style/style.css +1 -0
- package/lib/tree/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-form/style/style.css +83 -7
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-notice-bar/style/style.css +9 -2
- package/lib/vxe-notice-bar/style/style.min.css +1 -1
- package/lib/vxe-tree/style/style.css +1 -0
- package/lib/vxe-tree/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/form/src/form-config-item.ts +7 -6
- package/packages/form/src/form-item.ts +8 -7
- package/packages/form/src/form.ts +7 -1
- package/packages/form/src/itemInfo.ts +1 -0
- package/packages/form/src/render.ts +53 -7
- package/packages/notice-bar/src/notice-bar.ts +21 -5
- package/packages/ui/index.ts +2 -1
- package/styles/components/form.scss +103 -15
- package/styles/components/notice-bar.scss +14 -2
- package/styles/components/tree.scss +1 -0
- package/styles/theme/base.scss +4 -0
- package/types/components/form.d.ts +22 -1
- package/types/components/notice-bar.d.ts +20 -3
- package/types/ui/global-icon.d.ts +1 -0
- /package/es/icon/{iconfont.1757663302345.ttf → iconfont.1757756204543.ttf} +0 -0
- /package/es/icon/{iconfont.1757663302345.woff → iconfont.1757756204543.woff} +0 -0
- /package/es/icon/{iconfont.1757663302345.woff2 → iconfont.1757756204543.woff2} +0 -0
- /package/es/{iconfont.1757663302345.ttf → iconfont.1757756204543.ttf} +0 -0
- /package/es/{iconfont.1757663302345.woff → iconfont.1757756204543.woff} +0 -0
- /package/es/{iconfont.1757663302345.woff2 → iconfont.1757756204543.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1757663302345.ttf → iconfont.1757756204543.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1757663302345.woff → iconfont.1757756204543.woff} +0 -0
- /package/lib/icon/style/{iconfont.1757663302345.woff2 → iconfont.1757756204543.woff2} +0 -0
- /package/lib/{iconfont.1757663302345.ttf → iconfont.1757756204543.ttf} +0 -0
- /package/lib/{iconfont.1757663302345.woff → iconfont.1757756204543.woff} +0 -0
- /package/lib/{iconfont.1757663302345.woff2 → iconfont.1757756204543.woff2} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getIcon, getI18n, formats, renderer } from '../../ui'
|
|
1
|
+
import { h, VNode } from 'vue'
|
|
2
|
+
import { getIcon, getI18n, formats, renderer, renderEmptyElement } from '../../ui'
|
|
3
3
|
import { eqEmptyValue, getFuncText, isEnableConf } from '../../ui/src/utils'
|
|
4
4
|
import { toCssUnit } from '../../ui/src/dom'
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -32,14 +32,18 @@ function renderSuffixIcon (titleSuffix: VxeFormItemPropTypes.TitleSuffix) {
|
|
|
32
32
|
])
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export
|
|
35
|
+
export function getItemClass ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo, isGroup?: boolean) {
|
|
36
36
|
const formProps = $xeForm.props
|
|
37
37
|
const formReactData = $xeForm.reactData
|
|
38
38
|
const $xeGrid = $xeForm.xeGrid
|
|
39
39
|
|
|
40
|
+
const { computeSize, computeValidOpts } = $xeForm.getComputeMaps()
|
|
40
41
|
const { data, rules, readonly, disabled, span: allSpan, titleBackground: allTitleBackground, titleBold: allTitleBold, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, vertical: allVertical, padding: allPadding } = formProps
|
|
41
42
|
const { collapseAll } = formReactData
|
|
42
43
|
const { folding, field, itemRender, showError, className, vertical, padding, children, showContent } = item
|
|
44
|
+
const vSize = computeSize.value
|
|
45
|
+
const validOpts = computeValidOpts.value
|
|
46
|
+
const { showErrorMessage, showMessage, showErrorIcon } = validOpts
|
|
43
47
|
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null
|
|
44
48
|
const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
|
|
45
49
|
const span = item.span || allSpan
|
|
@@ -65,9 +69,11 @@ export const getItemClass = ($xeForm: VxeFormConstructor & VxeFormPrivateMethods
|
|
|
65
69
|
'vxe-form--item',
|
|
66
70
|
item.id,
|
|
67
71
|
span ? `vxe-form--item-col_${span} is--span` : '',
|
|
72
|
+
`${(XEUtils.isBoolean(showErrorMessage) ? showErrorMessage : showMessage) ? 'show' : 'hide'}--err-msg`,
|
|
68
73
|
className ? (XEUtils.isFunction(className) ? className(params) : className) : '',
|
|
69
74
|
itemClassName ? (XEUtils.isFunction(itemClassName) ? itemClassName(params) : itemClassName) : '',
|
|
70
75
|
{
|
|
76
|
+
[`size--${vSize}`]: vSize,
|
|
71
77
|
'is--colon': titleColon,
|
|
72
78
|
'is--tbg': titleBackground,
|
|
73
79
|
'is--bold': titleBold,
|
|
@@ -79,12 +85,13 @@ export const getItemClass = ($xeForm: VxeFormConstructor & VxeFormPrivateMethods
|
|
|
79
85
|
'is--required': isRequired,
|
|
80
86
|
'is--hidden': folding && collapseAll,
|
|
81
87
|
'is--active': isActiveItem($xeForm, item),
|
|
88
|
+
'err--icon': showErrorIcon,
|
|
82
89
|
'is--error': showError
|
|
83
90
|
}
|
|
84
91
|
]
|
|
85
92
|
}
|
|
86
93
|
|
|
87
|
-
export
|
|
94
|
+
export function getItemContentClass ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo, isGroup?: boolean) {
|
|
88
95
|
const formProps = $xeForm.props
|
|
89
96
|
const $xeGrid = $xeForm.xeGrid
|
|
90
97
|
|
|
@@ -224,10 +231,47 @@ export function renderTitle ($xeForm: VxeFormConstructor & VxeFormPrivateMethods
|
|
|
224
231
|
class: 'vxe-form--item-title-postfix'
|
|
225
232
|
}, fixVNs)
|
|
226
233
|
])
|
|
227
|
-
:
|
|
234
|
+
: renderEmptyElement($xeForm)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function renderItemErrorIcon ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo) {
|
|
238
|
+
const { computeValidOpts } = $xeForm.getComputeMaps()
|
|
239
|
+
const validOpts = computeValidOpts.value
|
|
240
|
+
const { showErrorIcon, errorIcon } = validOpts
|
|
241
|
+
const { errRule, showIconMsg } = item
|
|
242
|
+
if (!showErrorIcon) {
|
|
243
|
+
return renderEmptyElement($xeForm)
|
|
244
|
+
}
|
|
245
|
+
return h('div', {
|
|
246
|
+
key: 'emi',
|
|
247
|
+
class: ['vxe-form-item--valid-error-icon-wrapper', {
|
|
248
|
+
'is--show': showIconMsg,
|
|
249
|
+
'is--hide': !showIconMsg
|
|
250
|
+
}]
|
|
251
|
+
}, [
|
|
252
|
+
h('span', {
|
|
253
|
+
class: 'vxe-form-item--valid-error-icon-btn',
|
|
254
|
+
onClick (evnt) {
|
|
255
|
+
$xeForm.handleValidIconEvent(evnt, { item })
|
|
256
|
+
}
|
|
257
|
+
}, [
|
|
258
|
+
h('i', {
|
|
259
|
+
class: errorIcon || getIcon().FORM_VALID_ERROR_ICON
|
|
260
|
+
})
|
|
261
|
+
]),
|
|
262
|
+
h('div', {
|
|
263
|
+
class: 'vxe-form-item--valid-error-icon-msg-tip'
|
|
264
|
+
}, errRule
|
|
265
|
+
? [
|
|
266
|
+
h('div', {
|
|
267
|
+
class: `vxe-form-item--valid-error-icon-msg vxe-form-item--valid-error-icon-theme-${validOpts.theme || 'normal'}`
|
|
268
|
+
}, errRule.content || errRule.message)
|
|
269
|
+
]
|
|
270
|
+
: [])
|
|
271
|
+
])
|
|
228
272
|
}
|
|
229
273
|
|
|
230
|
-
export
|
|
274
|
+
export function renderItemContent ($xeForm: VxeFormConstructor & VxeFormPrivateMethods, item: VxeFormDefines.ItemInfo) {
|
|
231
275
|
const formProps = $xeForm.props
|
|
232
276
|
const formReactData = $xeForm.reactData
|
|
233
277
|
const formInternalData = $xeForm.internalData
|
|
@@ -242,6 +286,7 @@ export const renderItemContent = ($xeForm: VxeFormConstructor & VxeFormPrivateMe
|
|
|
242
286
|
const validSlot = slots ? slots.valid : null
|
|
243
287
|
const collapseOpts = computeCollapseOpts.value
|
|
244
288
|
const validOpts = computeValidOpts.value
|
|
289
|
+
const { showErrorMessage, showMessage } = validOpts
|
|
245
290
|
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null
|
|
246
291
|
|
|
247
292
|
const itemValue = XEUtils.get(data, field)
|
|
@@ -308,7 +353,7 @@ export const renderItemContent = ($xeForm: VxeFormConstructor & VxeFormPrivateMe
|
|
|
308
353
|
])
|
|
309
354
|
)
|
|
310
355
|
}
|
|
311
|
-
if (errRule &&
|
|
356
|
+
if (errRule && (XEUtils.isBoolean(showErrorMessage) ? showErrorMessage : showMessage)) {
|
|
312
357
|
const validParams = { ...params, rule: errRule }
|
|
313
358
|
contentVNs.push(
|
|
314
359
|
h('div', {
|
|
@@ -334,6 +379,7 @@ export const renderItemContent = ($xeForm: VxeFormConstructor & VxeFormPrivateMe
|
|
|
334
379
|
)
|
|
335
380
|
}
|
|
336
381
|
return h('div', {
|
|
382
|
+
key: 'ct',
|
|
337
383
|
class: 'vxe-form--item-inner'
|
|
338
384
|
}, contentVNs)
|
|
339
385
|
}
|
|
@@ -29,6 +29,8 @@ export default defineVxeComponent({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
emits: [
|
|
32
|
+
'start',
|
|
33
|
+
'end'
|
|
32
34
|
] as VxeNoticeBarEmits,
|
|
33
35
|
setup (props, context) {
|
|
34
36
|
const { slots, emit } = context
|
|
@@ -43,6 +45,7 @@ export default defineVxeComponent({
|
|
|
43
45
|
const refContentElem = ref<HTMLDivElement>()
|
|
44
46
|
|
|
45
47
|
const reactData = reactive<NoticeBarReactData>({
|
|
48
|
+
animationStatus: false,
|
|
46
49
|
animationDuration: 0
|
|
47
50
|
})
|
|
48
51
|
|
|
@@ -97,11 +100,21 @@ export default defineVxeComponent({
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
|
|
103
|
+
const animationStartEvent = (evnt: AnimationEvent) => {
|
|
104
|
+
reactData.animationStatus = true
|
|
105
|
+
dispatchEvent('start', { status: true }, evnt)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const animationEndEvent = (evnt: AnimationEvent) => {
|
|
109
|
+
reactData.animationStatus = false
|
|
110
|
+
dispatchEvent('end', { status: false }, evnt)
|
|
111
|
+
}
|
|
112
|
+
|
|
100
113
|
Object.assign($xeNoticeBar, noticeBarMethods, noticeBarPrivateMethods)
|
|
101
114
|
|
|
102
115
|
const renderVN = () => {
|
|
103
|
-
const { vertical, duration, direction } = props
|
|
104
|
-
const { animationDuration } = reactData
|
|
116
|
+
const { vertical, duration, direction, loop } = props
|
|
117
|
+
const { animationDuration, animationStatus } = reactData
|
|
105
118
|
const vSize = computeSize.value
|
|
106
119
|
const noticeText = computeNoticeText.value
|
|
107
120
|
const defaultSlot = slots.default
|
|
@@ -111,7 +124,8 @@ export default defineVxeComponent({
|
|
|
111
124
|
return h('div', {
|
|
112
125
|
ref: refElem,
|
|
113
126
|
class: ['vxe-notice-bar', `is--${vertical ? 'vertical' : 'horizontal'}`, `dir--${direction || 'left'}`, {
|
|
114
|
-
[`size--${vSize}`]: vSize
|
|
127
|
+
[`size--${vSize}`]: vSize,
|
|
128
|
+
'is--loop': loop
|
|
115
129
|
}]
|
|
116
130
|
}, [
|
|
117
131
|
prefixSlot
|
|
@@ -127,10 +141,12 @@ export default defineVxeComponent({
|
|
|
127
141
|
class: 'vxe-notice-bar--inner'
|
|
128
142
|
}, [
|
|
129
143
|
h('div', {
|
|
130
|
-
class: 'vxe-notice-bar--wrapper',
|
|
144
|
+
class: ['vxe-notice-bar--wrapper', `is--${animationStatus ? 'progress' : 'end'}`],
|
|
131
145
|
style: {
|
|
132
146
|
animationDuration: duration ? toCssUnit(duration, 's') : `${animationDuration}s`
|
|
133
|
-
}
|
|
147
|
+
},
|
|
148
|
+
onAnimationstart: animationStartEvent,
|
|
149
|
+
onAnimationend: animationEndEvent
|
|
134
150
|
}, defaultSlot ? defaultSlot({}) : noticeText)
|
|
135
151
|
])
|
|
136
152
|
]),
|
package/packages/ui/index.ts
CHANGED
|
@@ -137,7 +137,7 @@ setConfig({
|
|
|
137
137
|
// size: null,
|
|
138
138
|
// colon: false,
|
|
139
139
|
validConfig: {
|
|
140
|
-
|
|
140
|
+
showErrorMessage: true,
|
|
141
141
|
autoPos: true,
|
|
142
142
|
theme: 'beautify'
|
|
143
143
|
},
|
|
@@ -508,6 +508,7 @@ setIcon({
|
|
|
508
508
|
FORM_SUFFIX: iconPrefix + 'question-circle-fill',
|
|
509
509
|
FORM_FOLDING: iconPrefix + 'arrow-up rotate180',
|
|
510
510
|
FORM_UNFOLDING: iconPrefix + 'arrow-up',
|
|
511
|
+
FORM_VALID_ERROR_ICON: iconPrefix + 'warning-circle-fill',
|
|
511
512
|
|
|
512
513
|
// form-design
|
|
513
514
|
FORM_DESIGN_STYLE_SETTING: iconPrefix + 'layout',
|
|
@@ -169,21 +169,60 @@
|
|
|
169
169
|
width: 100%;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
.vxe-form-item--valid-error-icon-wrapper {
|
|
173
|
+
visibility: hidden;
|
|
174
|
+
position: relative;
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
padding-left: 0.5em;
|
|
177
|
+
color: var(--vxe-ui-form-validate-error-color);
|
|
178
|
+
&.is--hide {
|
|
179
|
+
.vxe-form-item--valid-error-icon-msg-tip {
|
|
180
|
+
width: 0;
|
|
181
|
+
padding: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
.vxe-form-item--valid-error-icon-btn {
|
|
186
|
+
position: relative;
|
|
187
|
+
user-select: none;
|
|
188
|
+
z-index: 6;
|
|
189
|
+
cursor: help;
|
|
190
|
+
}
|
|
191
|
+
.vxe-form-item--valid-error-icon-msg-tip {
|
|
192
|
+
position: absolute;
|
|
193
|
+
top: 50%;
|
|
194
|
+
right: 0.8em;
|
|
195
|
+
display: block;
|
|
196
|
+
max-width: 24em;
|
|
197
|
+
padding: 0.4em;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
z-index: 5;
|
|
200
|
+
transform: translateY(-50%);
|
|
201
|
+
}
|
|
202
|
+
.vxe-form-item--valid-error-icon-msg {
|
|
203
|
+
border-radius: var(--vxe-ui-base-border-radius);
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
text-overflow: ellipsis;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
box-shadow: 2px 2px 4px -2px rgba(0,0,0,.5);
|
|
208
|
+
}
|
|
209
|
+
.vxe-form-item--valid-error-icon-theme-beautify {
|
|
210
|
+
padding: 0.2em 0.6em 0.25em 0.6em;
|
|
211
|
+
color: #fff;
|
|
212
|
+
background-color: var(--vxe-ui-status-error-color);
|
|
213
|
+
.vxe-form-item--valid-error-msg {
|
|
214
|
+
background: transparent;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
.vxe-form-item--valid-error-icon-theme-normal {
|
|
218
|
+
padding: 0 0.6em;
|
|
219
|
+
color: var(--vxe-ui-table-validate-error-color);
|
|
220
|
+
border: 1px solid var(--vxe-ui-table-validate-error-color);
|
|
221
|
+
background-color: var(--vxe-ui-table-validate-error-background-color);
|
|
222
|
+
}
|
|
223
|
+
|
|
172
224
|
.vxe-form--item {
|
|
173
225
|
&.is--padding {
|
|
174
|
-
&.is--vertical {
|
|
175
|
-
& > .vxe-form--item-title {
|
|
176
|
-
padding: 0 0.6em;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
&:not(.is--vertical) {
|
|
180
|
-
& > .vxe-form--item-title {
|
|
181
|
-
padding: 0.6em;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
& > .vxe-form--item-content {
|
|
185
|
-
padding: 0.6em;
|
|
186
|
-
}
|
|
187
226
|
& > .vxe-form--group-content {
|
|
188
227
|
padding: 0;
|
|
189
228
|
}
|
|
@@ -256,9 +295,16 @@
|
|
|
256
295
|
}
|
|
257
296
|
}
|
|
258
297
|
&.is--error {
|
|
298
|
+
&.show--err-msg {
|
|
299
|
+
& > .vxe-form--item-content {
|
|
300
|
+
padding-top: 0;
|
|
301
|
+
padding-bottom: 1.3em;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
259
304
|
& > .vxe-form--item-content {
|
|
260
|
-
|
|
261
|
-
|
|
305
|
+
& > .vxe-form-item--valid-error-icon-wrapper {
|
|
306
|
+
visibility: visible;
|
|
307
|
+
}
|
|
262
308
|
}
|
|
263
309
|
.vxe-input,
|
|
264
310
|
.vxe-number-input,
|
|
@@ -429,6 +475,48 @@
|
|
|
429
475
|
}
|
|
430
476
|
}
|
|
431
477
|
|
|
478
|
+
|
|
479
|
+
.vxe-form--item {
|
|
480
|
+
&.is--padding {
|
|
481
|
+
& > .vxe-form--item-title {
|
|
482
|
+
padding: 0 var(--vxe-ui-form-item-padding-default);
|
|
483
|
+
}
|
|
484
|
+
& > .vxe-form--item-content {
|
|
485
|
+
padding: 0 var(--vxe-ui-form-item-padding-default);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
&.size--medium {
|
|
489
|
+
&.is--padding {
|
|
490
|
+
& > .vxe-form--item-title {
|
|
491
|
+
padding: 0 var(--vxe-ui-form-item-padding-medium);
|
|
492
|
+
}
|
|
493
|
+
& > .vxe-form--item-content {
|
|
494
|
+
padding: 0 var(--vxe-ui-form-item-padding-medium);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
&.size--small {
|
|
499
|
+
&.is--padding {
|
|
500
|
+
& > .vxe-form--item-title {
|
|
501
|
+
padding: 0 var(--vxe-ui-form-item-padding-small);
|
|
502
|
+
}
|
|
503
|
+
& > .vxe-form--item-content {
|
|
504
|
+
padding: 0 var(--vxe-ui-form-item-padding-small);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
&.size--mini {
|
|
509
|
+
&.is--padding {
|
|
510
|
+
& > .vxe-form--item-title {
|
|
511
|
+
padding: 0 var(--vxe-ui-form-item-padding-mini);
|
|
512
|
+
}
|
|
513
|
+
& > .vxe-form--item-content {
|
|
514
|
+
padding: 0 var(--vxe-ui-form-item-padding-mini);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
432
520
|
.vxe-form {
|
|
433
521
|
.vxe-form--item-title {
|
|
434
522
|
&.align--center {
|
|
@@ -28,19 +28,31 @@
|
|
|
28
28
|
animation-play-state: running;
|
|
29
29
|
}
|
|
30
30
|
.vxe-notice-bar {
|
|
31
|
+
&.is--loop {
|
|
32
|
+
.vxe-notice-bar--wrapper {
|
|
33
|
+
animation-iteration-count: infinite;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
31
36
|
&.is--horizontal {
|
|
32
37
|
&.dir--left {
|
|
33
38
|
.vxe-notice-bar--wrapper {
|
|
34
|
-
padding-left: 100%;
|
|
35
39
|
animation-name: scrollLeftText;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
&.dir--right {
|
|
39
43
|
.vxe-notice-bar--wrapper {
|
|
40
|
-
padding-left: 100%;
|
|
41
44
|
animation-name: scrollRightText;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
47
|
+
&.dir--left,
|
|
48
|
+
&.dir--right {
|
|
49
|
+
.vxe-notice-bar--wrapper {
|
|
50
|
+
padding-left: 100%;
|
|
51
|
+
&.is--end {
|
|
52
|
+
padding-left: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
44
56
|
.vxe-notice-bar--wrapper {
|
|
45
57
|
&:hover {
|
|
46
58
|
animation-play-state: paused;
|
package/styles/theme/base.scss
CHANGED
|
@@ -104,6 +104,10 @@
|
|
|
104
104
|
--vxe-ui-form-item-min-height-small: 48px;
|
|
105
105
|
--vxe-ui-form-item-min-height-mini: 44px;
|
|
106
106
|
--vxe-ui-form-validate-error-color: var(--vxe-ui-status-error-color);
|
|
107
|
+
--vxe-ui-form-item-padding-default: 8px;
|
|
108
|
+
--vxe-ui-form-item-padding-medium: 7px;
|
|
109
|
+
--vxe-ui-form-item-padding-small: 6px;
|
|
110
|
+
--vxe-ui-form-item-padding-mini: 5px;
|
|
107
111
|
--vxe-ui-form-validate-error-background-color: inherit;
|
|
108
112
|
|
|
109
113
|
/*form-design*/
|
|
@@ -68,11 +68,28 @@ export namespace VxeFormPropTypes {
|
|
|
68
68
|
export type PreventSubmit = boolean
|
|
69
69
|
export type ValidConfig = {
|
|
70
70
|
autoPos?: boolean
|
|
71
|
-
|
|
71
|
+
/**
|
|
72
|
+
* 当校验不通过时在对应项显示错误提示
|
|
73
|
+
*/
|
|
74
|
+
showErrorMessage?: boolean
|
|
75
|
+
/**
|
|
76
|
+
* 当校验不通过时在对应项显示错误图标
|
|
77
|
+
*/
|
|
78
|
+
showErrorIcon?: boolean
|
|
79
|
+
/**
|
|
80
|
+
* 自定义错误图标
|
|
81
|
+
*/
|
|
82
|
+
errorIcon?: boolean
|
|
72
83
|
/**
|
|
73
84
|
* 提示消息主题样式
|
|
74
85
|
*/
|
|
75
86
|
theme?: 'normal' | 'beautify' | ''
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 已废弃,被 showErrorMessage 替换
|
|
90
|
+
* @deprecated
|
|
91
|
+
*/
|
|
92
|
+
showMessage?: boolean
|
|
76
93
|
}
|
|
77
94
|
|
|
78
95
|
/**
|
|
@@ -236,6 +253,9 @@ export interface FormPrivateMethods {
|
|
|
236
253
|
item: VxeFormDefines.ItemInfo
|
|
237
254
|
}): void
|
|
238
255
|
handleTitleTipLeaveEvent(): void
|
|
256
|
+
handleValidIconEvent(evnt: Event, params: {
|
|
257
|
+
item: VxeFormDefines.ItemInfo
|
|
258
|
+
}): void
|
|
239
259
|
}
|
|
240
260
|
export interface VxeFormPrivateMethods extends FormPrivateMethods { }
|
|
241
261
|
|
|
@@ -287,6 +307,7 @@ export namespace VxeFormDefines {
|
|
|
287
307
|
params: any
|
|
288
308
|
// 渲染属性
|
|
289
309
|
showError: boolean
|
|
310
|
+
showIconMsg: boolean
|
|
290
311
|
errRule: any
|
|
291
312
|
slots: VxeFormItemPropTypes.Slots
|
|
292
313
|
children: ItemInfo[]
|
|
@@ -47,6 +47,7 @@ export interface NoticeBarPrivateComputed {
|
|
|
47
47
|
export interface VxeNoticeBarPrivateComputed extends NoticeBarPrivateComputed { }
|
|
48
48
|
|
|
49
49
|
export interface NoticeBarReactData {
|
|
50
|
+
animationStatus: boolean
|
|
50
51
|
animationDuration: number
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -59,19 +60,35 @@ export interface NoticeBarPrivateMethods { }
|
|
|
59
60
|
export interface VxeNoticeBarPrivateMethods extends NoticeBarPrivateMethods { }
|
|
60
61
|
|
|
61
62
|
export type VxeNoticeBarEmits = [
|
|
63
|
+
'start',
|
|
64
|
+
'end'
|
|
62
65
|
]
|
|
63
66
|
|
|
64
67
|
export namespace VxeNoticeBarDefines {
|
|
65
68
|
export interface NoticeBarEventParams extends VxeComponentEventParams {
|
|
66
69
|
$noticeBar: VxeNoticeBarConstructor
|
|
67
70
|
}
|
|
71
|
+
|
|
72
|
+
export interface StartEventParams {
|
|
73
|
+
status: boolean
|
|
74
|
+
}
|
|
75
|
+
export interface EndEventParams extends StartEventParams {}
|
|
68
76
|
}
|
|
69
77
|
|
|
70
|
-
export type VxeNoticeBarEventProps = {
|
|
78
|
+
export type VxeNoticeBarEventProps = {
|
|
79
|
+
onStart?: VxeNoticeBarEvents.Start
|
|
80
|
+
onEnd?: VxeNoticeBarEvents.End
|
|
81
|
+
}
|
|
71
82
|
|
|
72
|
-
export interface VxeNoticeBarListeners {
|
|
83
|
+
export interface VxeNoticeBarListeners {
|
|
84
|
+
start?: VxeNoticeBarEvents.Start
|
|
85
|
+
end?: VxeNoticeBarEvents.End
|
|
86
|
+
}
|
|
73
87
|
|
|
74
|
-
export namespace VxeNoticeBarEvents {
|
|
88
|
+
export namespace VxeNoticeBarEvents {
|
|
89
|
+
export type Start = (params: VxeNoticeBarDefines.StartEventParams) => void
|
|
90
|
+
export type End = (params: VxeNoticeBarDefines.EndEventParams) => void
|
|
91
|
+
}
|
|
75
92
|
|
|
76
93
|
export namespace VxeNoticeBarSlotTypes {
|
|
77
94
|
export interface DefaultSlotParams {}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|