优化
This commit is contained in:
@@ -110,7 +110,7 @@ const saving = ref(false);
|
||||
* 3. 请求后端接口,新增或更新地址
|
||||
*/
|
||||
function save() {
|
||||
validate(async (valid, errors) => {
|
||||
validate((valid, errors) => {
|
||||
if (valid) {
|
||||
ui.showLoading(t("保存中"));
|
||||
|
||||
|
||||
@@ -166,11 +166,7 @@ function reload() {
|
||||
*/
|
||||
function onInit(e: UniNativeViewInitEvent) {
|
||||
svgRenderer = new CoolSvg(e.detail.element);
|
||||
|
||||
// 立即加载 SVG 内容
|
||||
if (svgRenderer != null) {
|
||||
reload();
|
||||
}
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,9 +97,7 @@ export class Form {
|
||||
};
|
||||
|
||||
// 验证整个表单
|
||||
validate = (
|
||||
callback: (valid: boolean, errors: ClFormValidateError[]) => void | Promise<void>
|
||||
): void => {
|
||||
validate = (callback: (valid: boolean, errors: ClFormValidateError[]) => void): void => {
|
||||
this.formRef.value!.validate(callback);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user