qidian-vue-ui 2.0.18 → 2.0.19
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.
|
@@ -128,6 +128,11 @@ const QdServiceTableEditCell = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
const {
|
|
129
129
|
t
|
|
130
130
|
} = useConfig("form");
|
|
131
|
+
const validationStatus = computed(() => {
|
|
132
|
+
const status = attrs.status;
|
|
133
|
+
if (status === "error" || status === "warning" || status === "success") return status;
|
|
134
|
+
return void 0;
|
|
135
|
+
});
|
|
131
136
|
const reIfRender = computed(() => {
|
|
132
137
|
const ifRender = props.formItem.ifRender;
|
|
133
138
|
if (isEmpty(ifRender)) return true;
|
|
@@ -152,11 +157,8 @@ const QdServiceTableEditCell = /* @__PURE__ */ defineComponent({
|
|
|
152
157
|
...props.lazy && props.active ? {
|
|
153
158
|
autofocus: true
|
|
154
159
|
} : {},
|
|
155
|
-
...
|
|
156
|
-
status:
|
|
157
|
-
} : {},
|
|
158
|
-
...attrs.tips ? {
|
|
159
|
-
tips: attrs.tips
|
|
160
|
+
...validationStatus.value ? {
|
|
161
|
+
status: validationStatus.value
|
|
160
162
|
} : {}
|
|
161
163
|
};
|
|
162
164
|
});
|
|
@@ -174,14 +176,20 @@ const QdServiceTableEditCell = /* @__PURE__ */ defineComponent({
|
|
|
174
176
|
delete rendererAttrs.status;
|
|
175
177
|
delete rendererAttrs.tips;
|
|
176
178
|
delete rendererAttrs.onChange;
|
|
177
|
-
|
|
179
|
+
const status = validationStatus.value;
|
|
180
|
+
return h("div", {
|
|
178
181
|
...rendererAttrs,
|
|
179
|
-
class: "qd-service-table__cell-editor",
|
|
182
|
+
class: ["qd-service-table__cell-editor", "t-form__controls", status ? `t-is-${status}` : void 0, status === "success" ? "t-form--success-border" : void 0],
|
|
183
|
+
onFocusin: props.activate
|
|
184
|
+
}, [h("div", {
|
|
185
|
+
class: "t-form__controls-content"
|
|
186
|
+
}, [h(_sfc_main, {
|
|
180
187
|
config: component.value,
|
|
181
188
|
context: currentContext.value,
|
|
182
|
-
crudMode: props.formItem.crudMode
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
crudMode: props.formItem.crudMode
|
|
190
|
+
})]), attrs.tips ? h("div", {
|
|
191
|
+
class: ["t-tips", status ? `t-is-${status}` : "t-is-default"]
|
|
192
|
+
}, attrs.tips) : void 0]);
|
|
185
193
|
};
|
|
186
194
|
}
|
|
187
195
|
});
|