resolver-egretimp-plus 0.0.295 → 0.0.297
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/dist/h5/index.js +1 -1
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/index.scss +1 -0
- package/dist/theme/element/src/components/tag.scss +6 -0
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/theme/element/components/index.scss +1 -0
- package/src/theme/element/components/tag.scss +6 -0
- package/src/utils/render.jsx +8 -8
package/package.json
CHANGED
package/src/utils/render.jsx
CHANGED
|
@@ -669,7 +669,7 @@ function generateFormItemPc (config, lang, compProps, params,) {
|
|
|
669
669
|
}
|
|
670
670
|
props = {
|
|
671
671
|
...props,
|
|
672
|
-
...getFormItemExtendProps(config, lang, params)
|
|
672
|
+
...getFormItemExtendProps(config, lang, params, compProps)
|
|
673
673
|
}
|
|
674
674
|
// labelWidth 需要特殊处理
|
|
675
675
|
if (hasOwn(props, 'labelWidth')) {
|
|
@@ -727,7 +727,7 @@ function generateFormItemH5(config, lang, compProps, params = {}) {
|
|
|
727
727
|
messageInstance,
|
|
728
728
|
hidemessage: config?.hidemessage == '1' ? true : false,
|
|
729
729
|
hideasterisk: config?.hideasterisk == '1' ? true : false,
|
|
730
|
-
...getFormItemExtendProps(config, lang, params),
|
|
730
|
+
...getFormItemExtendProps(config, lang, params, compProps),
|
|
731
731
|
}
|
|
732
732
|
// labelWidth 需要特殊处理
|
|
733
733
|
if (hasOwn(config, 'labelWidth')) {
|
|
@@ -771,7 +771,7 @@ export function generateFormItemPolyfill(config, lang, compProps, _isH5, params)
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
function getFormItemExtendProps(config, lang, params) {
|
|
774
|
+
function getFormItemExtendProps(config, lang, params, compProps) {
|
|
775
775
|
const prop = config.dynamicHireRelat || ''
|
|
776
776
|
// const propAttr = config.dynamicHireRelat ? config.dynamicHireRelat?.split('->') : []
|
|
777
777
|
// const prop = propAttr.join('->')
|
|
@@ -783,7 +783,7 @@ function getFormItemExtendProps(config, lang, params) {
|
|
|
783
783
|
}
|
|
784
784
|
return {
|
|
785
785
|
prop,
|
|
786
|
-
rules: getFormItemRule(config, lang, params),
|
|
786
|
+
rules: getFormItemRule(config, lang, params, compProps),
|
|
787
787
|
class: {
|
|
788
788
|
[`vertical-${config['label-vertical'] || config['labelVertical'] || 'center'}`]: true,
|
|
789
789
|
'content-right': config.contentRight,
|
|
@@ -794,7 +794,7 @@ function getFormItemExtendProps(config, lang, params) {
|
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
function getFormItemRule(config, lang, params) {
|
|
797
|
+
function getFormItemRule(config, lang, params, compProps) {
|
|
798
798
|
const required = config.requiredFlag === '1'
|
|
799
799
|
const onlyRequiredFlag = config.onlyRequiredFlag
|
|
800
800
|
let trigger = ['blur', 'change']
|
|
@@ -805,7 +805,7 @@ function getFormItemRule(config, lang, params) {
|
|
|
805
805
|
const rules = [{
|
|
806
806
|
// required,
|
|
807
807
|
validator: (rule, value, callback) => {
|
|
808
|
-
if (
|
|
808
|
+
if (compProps?.disabled && config.alongValidate != '1') {
|
|
809
809
|
callback()
|
|
810
810
|
return
|
|
811
811
|
}
|
|
@@ -855,7 +855,7 @@ function getFormItemRule(config, lang, params) {
|
|
|
855
855
|
if (regexPattern?.length) {
|
|
856
856
|
rules.push({
|
|
857
857
|
validator: (rule, value, callback) => {
|
|
858
|
-
if (
|
|
858
|
+
if (compProps?.disabled && config.alongValidate != '1') {
|
|
859
859
|
callback()
|
|
860
860
|
return
|
|
861
861
|
}
|
|
@@ -893,7 +893,7 @@ function getFormItemRule(config, lang, params) {
|
|
|
893
893
|
if (isFunction(validator)) {
|
|
894
894
|
rules.push({
|
|
895
895
|
validator: (rule, value, callback) => {
|
|
896
|
-
if (
|
|
896
|
+
if (compProps?.disabled && config.alongValidate != '1') {
|
|
897
897
|
callback()
|
|
898
898
|
return
|
|
899
899
|
}
|