zova-ui-vuetify 5.1.65 → 5.1.67
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/.gitignore +3 -3
- package/.vscode/zova.code-snippets +11 -0
- package/package.json +40 -43
- package/package.original.json +1 -1
- package/src/suite/a-home/modules/home-login/src/page/login/controller.tsx +2 -2
- package/src/suite/a-home/modules/home-login/src/page/login/render.tsx +8 -8
- package/src/suite/a-vuetify/modules/vuetify-adapter/src/.metadata/index.ts +9 -2
- package/src/suite/a-vuetify/modules/vuetify-adapter/src/config/config.ts +20 -0
- package/src/suite/a-vuetify/modules/vuetify-adapter/src/monkeySys.ts +5 -29
- package/src/suite/a-vuetify/modules/vuetify-form/src/bean/behavior.formField.tsx +10 -11
- package/src/suite/a-vuetify/modules/vuetify-form/src/component/formFieldCaptcha/controller.tsx +11 -10
package/.gitignore
CHANGED
|
@@ -46,9 +46,9 @@ yarn-error.log*
|
|
|
46
46
|
*.njsproj
|
|
47
47
|
*.sln
|
|
48
48
|
|
|
49
|
-
#
|
|
50
|
-
env/.env*.
|
|
51
|
-
/src/front/config/config/config*.
|
|
49
|
+
# local .env files
|
|
50
|
+
env/.env*.local
|
|
51
|
+
/src/front/config/config/config*.local.ts
|
|
52
52
|
/src/front/typing/modules.d.ts
|
|
53
53
|
**/.metadata/modules.d.ts
|
|
54
54
|
# /package.json
|
|
@@ -112,6 +112,17 @@
|
|
|
112
112
|
],
|
|
113
113
|
"description": "aop.actionsync"
|
|
114
114
|
},
|
|
115
|
+
"aop.actionrender": {
|
|
116
|
+
"scope": "typescript,typescriptreact",
|
|
117
|
+
"prefix": "aopactionrender",
|
|
118
|
+
"body": [
|
|
119
|
+
"protected render: AopActionRender<ClassSome> = (_args, next, _receiver) => {",
|
|
120
|
+
" const result = next();",
|
|
121
|
+
" return result;",
|
|
122
|
+
"}"
|
|
123
|
+
],
|
|
124
|
+
"description": "aop.actionrender"
|
|
125
|
+
},
|
|
115
126
|
"aopmethod.get": {
|
|
116
127
|
"scope": "typescript,typescriptreact",
|
|
117
128
|
"prefix": "aopmethodget",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-ui-vuetify",
|
|
3
|
-
"version": "5.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "5.1.67",
|
|
4
|
+
"gitHead": "a247f88a55c663d313296039f874560ee5a13e01",
|
|
5
5
|
"description": "A vue3 vuetify framework with ioc",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ioc",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"@cabloy/compose": "^2.1.4",
|
|
59
59
|
"@cabloy/deps": "^1.1.4",
|
|
60
60
|
"@cabloy/json5": "^1.1.5",
|
|
61
|
-
"@cabloy/logger": "^1.1.
|
|
61
|
+
"@cabloy/logger": "^1.1.10",
|
|
62
62
|
"@cabloy/module-info": "^2.0.0",
|
|
63
|
-
"@cabloy/utils": "^2.1.
|
|
63
|
+
"@cabloy/utils": "^2.1.15",
|
|
64
64
|
"@cabloy/vue-router": "^4.4.16",
|
|
65
|
-
"@cabloy/word-utils": "^2.1.
|
|
65
|
+
"@cabloy/word-utils": "^2.1.9",
|
|
66
66
|
"@cabloy/zod-openapi": "^1.1.5",
|
|
67
67
|
"@date-io/luxon": "^3.2.0",
|
|
68
68
|
"@fontsource/roboto": "^5.2.10",
|
|
@@ -88,37 +88,35 @@
|
|
|
88
88
|
"vue-router": "npm:@cabloy/vue-router@^4.4.16",
|
|
89
89
|
"vuetify": "^4.0.5",
|
|
90
90
|
"zod": "^4.3.6",
|
|
91
|
-
"zova": "^5.1.
|
|
92
|
-
"zova-jsx": "^1.1.
|
|
93
|
-
"zova-module-a-action": "^5.1.
|
|
94
|
-
"zova-module-a-
|
|
95
|
-
"zova-module-a-
|
|
96
|
-
"zova-module-a-
|
|
97
|
-
"zova-module-a-
|
|
98
|
-
"zova-module-a-
|
|
99
|
-
"zova-module-a-
|
|
100
|
-
"zova-module-a-
|
|
101
|
-
"zova-module-a-
|
|
102
|
-
"zova-module-a-
|
|
103
|
-
"zova-module-a-
|
|
104
|
-
"zova-module-a-
|
|
105
|
-
"zova-module-a-
|
|
106
|
-
"zova-module-a-
|
|
107
|
-
"zova-module-a-
|
|
108
|
-
"zova-module-a-
|
|
109
|
-
"zova-module-a-
|
|
110
|
-
"zova-module-a-
|
|
111
|
-
"zova-module-a-
|
|
112
|
-
"zova-module-a-
|
|
113
|
-
"zova-module-a-
|
|
114
|
-
"zova-module-a-
|
|
115
|
-
"zova-module-a-
|
|
116
|
-
"zova-module-a-
|
|
117
|
-
"zova-module-a-
|
|
118
|
-
"zova-module-a-
|
|
119
|
-
"zova-module-
|
|
120
|
-
"zova-module-a-zod": "^5.1.11",
|
|
121
|
-
"zova-module-a-zova": "^5.1.28",
|
|
91
|
+
"zova": "^5.1.44",
|
|
92
|
+
"zova-jsx": "^1.1.26",
|
|
93
|
+
"zova-module-a-action": "^5.1.12",
|
|
94
|
+
"zova-module-a-api": "^5.1.9",
|
|
95
|
+
"zova-module-a-app": "^5.1.10",
|
|
96
|
+
"zova-module-a-bean": "^5.1.12",
|
|
97
|
+
"zova-module-a-behavior": "^5.1.11",
|
|
98
|
+
"zova-module-a-behaviors": "^5.1.9",
|
|
99
|
+
"zova-module-a-boundary": "^5.1.9",
|
|
100
|
+
"zova-module-a-fetch": "^5.1.9",
|
|
101
|
+
"zova-module-a-form": "^5.1.10",
|
|
102
|
+
"zova-module-a-icon": "^5.1.12",
|
|
103
|
+
"zova-module-a-interceptor": "^5.1.15",
|
|
104
|
+
"zova-module-a-logger": "^5.1.10",
|
|
105
|
+
"zova-module-a-meta": "^5.1.9",
|
|
106
|
+
"zova-module-a-model": "^5.1.12",
|
|
107
|
+
"zova-module-a-openapi": "^5.1.12",
|
|
108
|
+
"zova-module-a-pinia": "^5.1.9",
|
|
109
|
+
"zova-module-a-router": "^5.1.13",
|
|
110
|
+
"zova-module-a-routerstack": "^5.1.10",
|
|
111
|
+
"zova-module-a-routertabs": "^5.1.14",
|
|
112
|
+
"zova-module-a-ssr": "^5.1.11",
|
|
113
|
+
"zova-module-a-ssrhmr": "^5.1.10",
|
|
114
|
+
"zova-module-a-ssrserver": "^5.1.9",
|
|
115
|
+
"zova-module-a-style": "^5.1.13",
|
|
116
|
+
"zova-module-a-table": "^5.1.10",
|
|
117
|
+
"zova-module-a-zod": "^5.1.12",
|
|
118
|
+
"zova-module-a-zova": "^5.1.30",
|
|
119
|
+
"zova-module-basic-actions": "^5.1.10",
|
|
122
120
|
"zova-module-demo-basic": "workspace:^",
|
|
123
121
|
"zova-module-home-api": "workspace:^",
|
|
124
122
|
"zova-module-home-base": "workspace:^",
|
|
@@ -129,15 +127,14 @@
|
|
|
129
127
|
"zova-module-home-login": "workspace:^",
|
|
130
128
|
"zova-module-home-passport": "workspace:^",
|
|
131
129
|
"zova-module-home-theme": "workspace:^",
|
|
132
|
-
"zova-module-rest-
|
|
133
|
-
"zova-module-rest-resource": "^5.1.11",
|
|
130
|
+
"zova-module-rest-resource": "^5.1.12",
|
|
134
131
|
"zova-module-vuetify-adapter": "workspace:^",
|
|
135
132
|
"zova-module-vuetify-form": "workspace:^",
|
|
136
|
-
"zova-suite-a-cabloy": "^5.1.
|
|
133
|
+
"zova-suite-a-cabloy": "^5.1.13"
|
|
137
134
|
},
|
|
138
135
|
"devDependencies": {
|
|
139
136
|
"@cabloy/cli": "^3.1.9",
|
|
140
|
-
"@cabloy/lint": "^5.1.
|
|
137
|
+
"@cabloy/lint": "^5.1.8",
|
|
141
138
|
"@cabloy/openapi-typescript": "^7.9.2",
|
|
142
139
|
"@quasar/app-vite": "npm:@cabloy/quasar-app-vite@^2.5.9",
|
|
143
140
|
"@types/luxon": "^3.7.1",
|
|
@@ -149,7 +146,7 @@
|
|
|
149
146
|
"less": "^4.6.4",
|
|
150
147
|
"oxfmt": "^0.45.0",
|
|
151
148
|
"oxlint": "^1.60.0",
|
|
152
|
-
"quasar-app-extension-zova": "^1.2.
|
|
149
|
+
"quasar-app-extension-zova": "^1.2.20",
|
|
153
150
|
"sass-embedded": "^1.99.0",
|
|
154
151
|
"typescript": "^5.9.3",
|
|
155
152
|
"unplugin-fonts": "^1.4.0",
|
|
@@ -157,8 +154,8 @@
|
|
|
157
154
|
"vite-plugin-fake-server-turbo": "^3.0.18",
|
|
158
155
|
"vite-plugin-vuetify": "^2.1.3",
|
|
159
156
|
"vue-tsc": "^3.2.6",
|
|
160
|
-
"zova-openapi": "^1.1.
|
|
161
|
-
"zova-vite": "^1.1.
|
|
157
|
+
"zova-openapi": "^1.1.9",
|
|
158
|
+
"zova-vite": "^1.1.20"
|
|
162
159
|
},
|
|
163
160
|
"packageManager": "pnpm@10.19.0",
|
|
164
161
|
"pnpm": {
|
package/package.original.json
CHANGED
|
@@ -27,11 +27,11 @@ export class ControllerPageLogin extends BeanControllerPageBase {
|
|
|
27
27
|
return this.$passport.schemaLogin;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
async
|
|
30
|
+
async submitLogin(data: TypeFormOnSubmitData<ApiApiHomeUserPassportloginRequestBody>) {
|
|
31
31
|
await this.$passport.login().mutateAsync(data.value);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
async
|
|
34
|
+
async loginGitHub() {
|
|
35
35
|
const apiUrl = this.$passport.getOauthLoginUrl('auth-github', 'github', 'default');
|
|
36
36
|
window.location.assign(apiUrl);
|
|
37
37
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VBtn, VCard, VCol, VDivider, VRow } from 'vuetify/components';
|
|
2
2
|
import { BeanRenderBase } from 'zova';
|
|
3
3
|
import { Render } from 'zova-module-a-bean';
|
|
4
|
-
import { ZForm,
|
|
4
|
+
import { ZForm, ZFormFieldBlank, ZFormFieldPreset } from 'zova-module-a-form';
|
|
5
5
|
import { $iconName } from 'zova-module-a-icon';
|
|
6
6
|
|
|
7
7
|
import { $useLocale } from '../../.metadata/locales.js';
|
|
@@ -60,17 +60,17 @@ export class RenderPageLogin extends BeanRenderBase {
|
|
|
60
60
|
data={this.user}
|
|
61
61
|
schema={this.schema}
|
|
62
62
|
onSubmitData={data => {
|
|
63
|
-
return this.
|
|
63
|
+
return this.submitLogin(data);
|
|
64
64
|
}}
|
|
65
65
|
onShowError={({ error }) => {
|
|
66
66
|
// eslint-disable-next-line no-alert
|
|
67
67
|
window.alert(error.message);
|
|
68
68
|
}}
|
|
69
69
|
>
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
<
|
|
70
|
+
<ZFormFieldPreset name="username" iconPrefix=":daisy:person" label={this.scope.locale.YourUsername()}></ZFormFieldPreset>
|
|
71
|
+
<ZFormFieldPreset name="password" inputType="password" iconPrefix=":daisy:lock" label={this.scope.locale.YourPassword()}></ZFormFieldPreset>
|
|
72
|
+
<ZFormFieldPreset name="captcha"></ZFormFieldPreset>
|
|
73
|
+
<ZFormFieldBlank
|
|
74
74
|
slotDefault={$$form => {
|
|
75
75
|
return (
|
|
76
76
|
<div class="d-flex justify-center">
|
|
@@ -80,7 +80,7 @@ export class RenderPageLogin extends BeanRenderBase {
|
|
|
80
80
|
</div>
|
|
81
81
|
);
|
|
82
82
|
}}
|
|
83
|
-
></
|
|
83
|
+
></ZFormFieldBlank>
|
|
84
84
|
</ZForm>
|
|
85
85
|
);
|
|
86
86
|
}
|
|
@@ -92,7 +92,7 @@ export class RenderPageLogin extends BeanRenderBase {
|
|
|
92
92
|
color="secondary"
|
|
93
93
|
prependIcon={$iconName(':auth:github')}
|
|
94
94
|
nativeOnClick={() => {
|
|
95
|
-
this.
|
|
95
|
+
this.loginGitHub();
|
|
96
96
|
}}
|
|
97
97
|
>
|
|
98
98
|
{this.scope.locale.LoginGitHub()}
|
|
@@ -142,6 +142,10 @@ declare module 'zova' {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
/** meta: end */
|
|
145
|
+
/** config: begin */
|
|
146
|
+
export * from '../config/config.js';
|
|
147
|
+
import { config } from '../config/config.js';
|
|
148
|
+
/** config: end */
|
|
145
149
|
/** monkey: begin */
|
|
146
150
|
export * from '../monkey.js';
|
|
147
151
|
/** monkey: end */
|
|
@@ -149,7 +153,7 @@ export * from '../monkey.js';
|
|
|
149
153
|
export * from '../monkeySys.js';
|
|
150
154
|
/** monkeySys: end */
|
|
151
155
|
/** scope: begin */
|
|
152
|
-
import { BeanScopeBase, type BeanScopeUtil } from 'zova';
|
|
156
|
+
import { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';
|
|
153
157
|
import { Scope } from 'zova-module-a-bean';
|
|
154
158
|
|
|
155
159
|
@Scope()
|
|
@@ -157,6 +161,7 @@ export class ScopeModuleVuetifyAdapter extends BeanScopeBase {}
|
|
|
157
161
|
|
|
158
162
|
export interface ScopeModuleVuetifyAdapter {
|
|
159
163
|
util: BeanScopeUtil;
|
|
164
|
+
config: TypeModuleConfig<typeof config>;
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
import 'zova';
|
|
@@ -165,7 +170,9 @@ declare module 'zova' {
|
|
|
165
170
|
'vuetify-adapter': ScopeModuleVuetifyAdapter;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
|
-
|
|
173
|
+
export interface IBeanScopeConfig {
|
|
174
|
+
'vuetify-adapter': ReturnType<typeof config>;
|
|
175
|
+
}
|
|
169
176
|
|
|
170
177
|
|
|
171
178
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ZovaSys } from 'zova';
|
|
2
|
+
|
|
3
|
+
import { VTextField } from 'vuetify/components';
|
|
4
|
+
import { IResourceProviders } from 'zova-module-a-openapi';
|
|
5
|
+
|
|
6
|
+
export const config = (_sys: ZovaSys) => {
|
|
7
|
+
const resourceProviders: IResourceProviders = {
|
|
8
|
+
behaviors: {
|
|
9
|
+
FormField: 'vuetify-form:formField',
|
|
10
|
+
FormFieldLayout: 'vuetify-form:formFieldLayout',
|
|
11
|
+
},
|
|
12
|
+
formFields: {
|
|
13
|
+
Input: VTextField,
|
|
14
|
+
Captcha: 'vuetify-form:formFieldCaptcha',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
resourceProviders,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { IMonkeySysInitialize } from 'zova';
|
|
2
|
-
import type { IOpenapiOptionsResourceMeta } from 'zova-module-a-openapi';
|
|
3
2
|
|
|
4
|
-
import { VTextField } from 'vuetify/components';
|
|
5
3
|
import { BeanSimple, deepExtend } from 'zova';
|
|
6
4
|
|
|
5
|
+
import { __ThisModule__ } from './.metadata/this.js';
|
|
7
6
|
import { SysAppBar } from './bean/sys.appBar.jsx';
|
|
8
7
|
import { SysIcon } from './bean/sys.icon.js';
|
|
9
8
|
import { SysMain } from './bean/sys.main.js';
|
|
@@ -28,32 +27,9 @@ export class MonkeySys extends BeanSimple implements IMonkeySysInitialize {
|
|
|
28
27
|
// appBar
|
|
29
28
|
const sysAppBar = await this.bean._newBean(SysAppBar, false);
|
|
30
29
|
await sysAppBar.initialize();
|
|
31
|
-
// config
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
form: {
|
|
37
|
-
provider: {
|
|
38
|
-
components: {
|
|
39
|
-
text: VTextField,
|
|
40
|
-
captcha: 'vuetify-form:formFieldCaptcha',
|
|
41
|
-
},
|
|
42
|
-
behaviors: {
|
|
43
|
-
formField: 'vuetify-form:formField',
|
|
44
|
-
formFieldLayout: 'vuetify-form:formFieldLayout',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
table: {
|
|
49
|
-
provider: {
|
|
50
|
-
components: {},
|
|
51
|
-
actions: {},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
// rest
|
|
56
|
-
const scopeRestConfig = this.sys.util.getModuleConfigSafe('a-openapi');
|
|
57
|
-
scopeRestConfig.resourceMeta = deepExtend({}, scopeRestConfig.base, configCustom, scopeRestConfig.resourceMeta);
|
|
30
|
+
// config
|
|
31
|
+
const configSelf = this.sys.util.getModuleConfigSafe(__ThisModule__);
|
|
32
|
+
const configOpenapi = this.sys.util.getModuleConfigSafe('a-openapi');
|
|
33
|
+
configOpenapi.resourceProviders = deepExtend({}, configOpenapi.resourceProviders, configSelf.resourceProviders);
|
|
58
34
|
}
|
|
59
35
|
}
|
|
@@ -3,8 +3,8 @@ import type { ControllerFormField, IFormFieldRenderContext, IFormFieldRenderCont
|
|
|
3
3
|
import { isEmptyObject, isNil } from '@cabloy/utils';
|
|
4
4
|
import { VNode } from 'vue';
|
|
5
5
|
import z from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Use } from 'zova';
|
|
7
|
+
import { isJsxComponent } from 'zova-jsx';
|
|
8
8
|
import { BeanBehaviorBase, Behavior, IDecoratorBehaviorOptions, NextBehavior } from 'zova-module-a-behavior';
|
|
9
9
|
|
|
10
10
|
export interface IBehaviorPropsInputFormField extends IFormFieldRenderContext {}
|
|
@@ -24,22 +24,21 @@ export class BehaviorFormField extends BeanBehaviorBase<IBehaviorOptionsFormFiel
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
private _patchProps(renderContext: IFormFieldRenderContext) {
|
|
27
|
+
const $$form = this.$$formField.$$form;
|
|
27
28
|
const formMeta = this.$$formField.formMeta;
|
|
28
29
|
const field = this.$$formField.field;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
? cast(renderContext.propsBucket.renderProvider)?.name
|
|
32
|
-
: renderContext.propsBucket.renderProvider;
|
|
30
|
+
const needPatch = !isJsxComponent(renderContext.propsBucket.render) || $$form.isComponentFormField(renderContext.propsBucket.renderProvider);
|
|
31
|
+
if (!needPatch) return;
|
|
33
32
|
// propsPatch
|
|
34
|
-
|
|
35
|
-
// input
|
|
36
|
-
if (componentName === 'VTextField') {
|
|
37
|
-
propsPatch = this._patchProps_input(formMeta, field, renderContext, propsPatch);
|
|
38
|
-
}
|
|
33
|
+
const propsPatch = this._patchProps_general(formMeta, field, renderContext);
|
|
39
34
|
// merge
|
|
40
35
|
if (!isEmptyObject(propsPatch)) {
|
|
41
36
|
renderContext.props = Object.assign({}, propsPatch, renderContext.props);
|
|
42
37
|
}
|
|
38
|
+
// input
|
|
39
|
+
if (componentName === 'VTextField') {
|
|
40
|
+
propsPatch = this._patchProps_input(formMeta, field, renderContext, propsPatch);
|
|
41
|
+
}
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
private _patchProps_general(formMeta: IFormMeta | undefined, field: TypeFormField, renderContext: IFormFieldRenderContext) {
|
package/src/suite/a-vuetify/modules/vuetify-form/src/component/formFieldCaptcha/controller.tsx
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { VTextField } from 'vuetify/components';
|
|
2
2
|
import { BeanControllerBase, ClientOnly, IComponentOptions, TypeEventOff, Use } from 'zova';
|
|
3
3
|
import { Controller } from 'zova-module-a-bean';
|
|
4
|
-
import { ControllerForm,
|
|
5
|
-
import { ICaptchaData
|
|
4
|
+
import { ControllerForm, IFormFieldPresetOptions, IFormFieldRenderContextProps, ZFormField } from 'zova-module-a-form';
|
|
5
|
+
import { ICaptchaData } from 'zova-module-a-openapi';
|
|
6
6
|
import { ToolV } from 'zova-module-a-zod';
|
|
7
7
|
|
|
8
|
-
export interface ControllerFormFieldCaptchaProps extends
|
|
9
|
-
captcha?: ICaptchaOptions;
|
|
10
|
-
}
|
|
8
|
+
export interface ControllerFormFieldCaptchaProps extends IFormFieldPresetOptions {}
|
|
11
9
|
|
|
12
10
|
@Controller()
|
|
13
11
|
export class ControllerFormFieldCaptcha extends BeanControllerBase {
|
|
14
|
-
static $propsDefault = {
|
|
15
|
-
|
|
12
|
+
static $propsDefault = {
|
|
13
|
+
preset: {
|
|
14
|
+
Captcha: { scene: 'captcha-simple:simple' },
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
static $componentOptions: IComponentOptions = { inheritAttrs: false, deepExtendDefault: true };
|
|
16
18
|
|
|
17
19
|
eventFormSubmission: TypeEventOff;
|
|
18
20
|
captchaData?: ICaptchaData;
|
|
@@ -46,7 +48,7 @@ export class ControllerFormFieldCaptcha extends BeanControllerBase {
|
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
get captchaScene() {
|
|
49
|
-
return this.$props.captcha
|
|
51
|
+
return this.$props.preset!.captcha!.scene!;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
private async createCaptchaData() {
|
|
@@ -81,7 +83,6 @@ export class ControllerFormFieldCaptcha extends BeanControllerBase {
|
|
|
81
83
|
return (
|
|
82
84
|
<ZFormField
|
|
83
85
|
{...this.$props}
|
|
84
|
-
render="text"
|
|
85
86
|
slotDefault={({ props }, $$formField) => {
|
|
86
87
|
const propsNew: IFormFieldRenderContextProps = {
|
|
87
88
|
...props,
|
|
@@ -91,7 +92,7 @@ export class ControllerFormFieldCaptcha extends BeanControllerBase {
|
|
|
91
92
|
if (this.captchaData) {
|
|
92
93
|
this.captchaData.token = token;
|
|
93
94
|
}
|
|
94
|
-
$$formField.
|
|
95
|
+
$$formField.setValue({
|
|
95
96
|
id: this.captchaData?.id,
|
|
96
97
|
token,
|
|
97
98
|
});
|