@longhongguo/form-create-ant-design-vue 3.2.38 → 3.2.40
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/form-create.esm.js +2 -2
- package/dist/form-create.esm.js.map +1 -1
- package/dist/form-create.js +2 -2
- package/dist/form-create.js.map +1 -1
- package/package.json +2 -2
- package/src/core/api.js +60 -0
- package/src/core/manager.js +357 -271
package/src/core/manager.js
CHANGED
|
@@ -1,303 +1,389 @@
|
|
|
1
|
-
import getConfig from './config'
|
|
2
|
-
import mergeProps from '@form-create/utils/lib/mergeprops'
|
|
3
|
-
import is, {hasProperty} from '@form-create/utils/lib/type'
|
|
4
|
-
import extend from '@form-create/utils/lib/extend'
|
|
1
|
+
import getConfig from './config'
|
|
2
|
+
import mergeProps from '@form-create/utils/lib/mergeprops'
|
|
3
|
+
import is, { hasProperty } from '@form-create/utils/lib/type'
|
|
4
|
+
import extend from '@form-create/utils/lib/extend'
|
|
5
5
|
|
|
6
6
|
function isTooltip(info) {
|
|
7
|
-
|
|
7
|
+
return info.type === 'tooltip'
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function tidy(props, name) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
if (!hasProperty(props, name)) return
|
|
12
|
+
if (is.String(props[name])) {
|
|
13
|
+
props[name] = { [name]: props[name], show: true }
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function isFalse(val) {
|
|
18
|
-
|
|
18
|
+
return val === false
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function tidyBool(opt, name) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (hasProperty(opt, name) && !is.Object(opt[name])) {
|
|
23
|
+
opt[name] = { show: !!opt[name] }
|
|
24
|
+
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function tidyRule(rule) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const _rule = { ...rule }
|
|
29
|
+
delete _rule.children
|
|
30
|
+
return _rule
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export default {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
34
|
+
validate() {
|
|
35
|
+
const form = this.form()
|
|
36
|
+
if (form) {
|
|
37
|
+
return form.validate()
|
|
38
|
+
} else {
|
|
39
|
+
return new Promise((v) => v())
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
validateField(field) {
|
|
43
|
+
const form = this.form()
|
|
44
|
+
if (form) {
|
|
45
|
+
return form.validateFields(field)
|
|
46
|
+
} else {
|
|
47
|
+
return new Promise((v) => v())
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
clearValidateState(ctx) {
|
|
51
|
+
const fItem = this.vm.refs[ctx.wrapRef]
|
|
52
|
+
if (fItem) {
|
|
53
|
+
fItem.clearValidate()
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
tidyOptions(options) {
|
|
57
|
+
;['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(
|
|
58
|
+
(name) => {
|
|
59
|
+
tidyBool(options, name)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
return options
|
|
63
|
+
},
|
|
64
|
+
tidyRule({ prop }) {
|
|
65
|
+
tidy(prop, 'title')
|
|
66
|
+
tidy(prop, 'info')
|
|
67
|
+
return prop
|
|
68
|
+
},
|
|
69
|
+
mergeProp(ctx) {
|
|
70
|
+
const def = {
|
|
71
|
+
info: {
|
|
72
|
+
type: 'popover',
|
|
73
|
+
placement: 'topLeft',
|
|
74
|
+
icon: 'QuestionCircleOutlined'
|
|
75
|
+
},
|
|
76
|
+
title: {},
|
|
77
|
+
col: { span: 24 },
|
|
78
|
+
wrap: {}
|
|
79
|
+
}
|
|
80
|
+
;['info', 'wrap', 'col', 'title'].forEach((name) => {
|
|
81
|
+
ctx.prop[name] = mergeProps(
|
|
82
|
+
[this.options[name] || {}, ctx.prop[name] || {}],
|
|
83
|
+
def[name]
|
|
84
|
+
)
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
getDefaultOptions() {
|
|
88
|
+
return getConfig()
|
|
89
|
+
},
|
|
90
|
+
adapterValidate(validate, validator) {
|
|
91
|
+
validate.validator = (rule, value) => {
|
|
92
|
+
return new Promise((resolve, reject) => {
|
|
93
|
+
const callback = (err) => {
|
|
94
|
+
if (err) {
|
|
95
|
+
reject(err)
|
|
96
|
+
} else {
|
|
97
|
+
resolve()
|
|
98
|
+
}
|
|
97
99
|
}
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
type: 'form',
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
beforeRender() {
|
|
114
|
-
const {key, ref, $handle} = this;
|
|
115
|
-
const form = this.options.form;
|
|
116
|
-
extend(this.rule, {key, ref, class: [form.className, form.class, 'form-create', this.$handle.preview ? 'is-preview' : '']});
|
|
117
|
-
extend(this.rule.props, {
|
|
118
|
-
model: $handle.formData,
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
render(children) {
|
|
122
|
-
if (children.slotLen() && !this.$handle.preview) {
|
|
123
|
-
children.setSlot(undefined, () => this.makeFormBtn());
|
|
100
|
+
return validator(value, callback)
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
return validate
|
|
104
|
+
},
|
|
105
|
+
update() {
|
|
106
|
+
const form = this.options.form
|
|
107
|
+
this.rule = {
|
|
108
|
+
props: { ...form },
|
|
109
|
+
on: {
|
|
110
|
+
submit: (e) => {
|
|
111
|
+
e.preventDefault()
|
|
124
112
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
113
|
+
},
|
|
114
|
+
style: form.style,
|
|
115
|
+
type: 'form'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
beforeRender() {
|
|
119
|
+
const { key, ref, $handle } = this
|
|
120
|
+
const form = this.options.form
|
|
121
|
+
extend(this.rule, {
|
|
122
|
+
key,
|
|
123
|
+
ref,
|
|
124
|
+
class: [
|
|
125
|
+
form.className,
|
|
126
|
+
form.class,
|
|
127
|
+
'form-create',
|
|
128
|
+
this.$handle.preview ? 'is-preview' : ''
|
|
129
|
+
]
|
|
130
|
+
})
|
|
131
|
+
extend(this.rule.props, {
|
|
132
|
+
model: $handle.formData
|
|
133
|
+
})
|
|
134
|
+
},
|
|
135
|
+
render(children) {
|
|
136
|
+
if (children.slotLen() && !this.$handle.preview) {
|
|
137
|
+
children.setSlot(undefined, () => this.makeFormBtn())
|
|
138
|
+
}
|
|
139
|
+
return this.$r(
|
|
140
|
+
this.rule,
|
|
141
|
+
isFalse(this.options.row.show)
|
|
142
|
+
? children.getSlots()
|
|
143
|
+
: [this.makeRow(children)]
|
|
144
|
+
)
|
|
145
|
+
},
|
|
146
|
+
makeWrap(ctx, children) {
|
|
147
|
+
const rule = ctx.prop
|
|
148
|
+
const uni = `${this.key}${ctx.key}`
|
|
149
|
+
const col = rule.col
|
|
150
|
+
const isTitle = this.isTitle(rule) && rule.wrap.title !== false
|
|
151
|
+
const { layout, col: _col } = this.rule.props
|
|
152
|
+
const cls = rule.wrap.class
|
|
153
|
+
delete rule.wrap.class
|
|
154
|
+
delete rule.wrap.title
|
|
155
|
+
const item = isFalse(rule.wrap.show)
|
|
156
|
+
? children
|
|
157
|
+
: this.$r(
|
|
158
|
+
mergeProps([
|
|
159
|
+
rule.wrap,
|
|
160
|
+
{
|
|
161
|
+
props: {
|
|
138
162
|
...tidyRule(rule.wrap || {}),
|
|
163
|
+
hasFeedback: rule.hasFeedback || false,
|
|
139
164
|
name: ctx.id,
|
|
140
165
|
rules: ctx.injectValidate(),
|
|
141
|
-
...(layout !== 'horizontal'
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
...(layout !== 'horizontal'
|
|
167
|
+
? { labelCol: {}, wrapperCol: {} }
|
|
168
|
+
: {})
|
|
169
|
+
},
|
|
170
|
+
class: this.$render.mergeClass(
|
|
171
|
+
cls || rule.className,
|
|
172
|
+
'fc-form-item'
|
|
173
|
+
),
|
|
174
|
+
key: `${uni}fi`,
|
|
175
|
+
ref: ctx.wrapRef,
|
|
176
|
+
type: 'formItem'
|
|
177
|
+
}
|
|
178
|
+
]),
|
|
179
|
+
{
|
|
180
|
+
default: () => children,
|
|
181
|
+
...(isTitle ? { label: () => this.makeInfo(rule, uni, ctx) } : {})
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
return layout === 'inline' || isFalse(_col) || isFalse(col.show)
|
|
185
|
+
? item
|
|
186
|
+
: this.makeCol(rule, uni, [item])
|
|
187
|
+
},
|
|
188
|
+
isTitle(rule) {
|
|
189
|
+
if (this.options.form.title === false) return false
|
|
190
|
+
const title = rule.title
|
|
191
|
+
return !((!title.title && !title.native) || isFalse(title.show))
|
|
192
|
+
},
|
|
193
|
+
makeInfo(rule, uni, ctx) {
|
|
194
|
+
const titleProp = { ...rule.title }
|
|
195
|
+
const infoProp = { ...rule.info }
|
|
196
|
+
if (this.options.form.title === false) return false
|
|
197
|
+
if ((!titleProp.title && !titleProp.native) || isFalse(titleProp.show))
|
|
198
|
+
return
|
|
199
|
+
const isTip = isTooltip(infoProp)
|
|
200
|
+
const titleSlot = this.getSlot('title')
|
|
201
|
+
const children = [
|
|
202
|
+
titleSlot
|
|
203
|
+
? titleSlot({
|
|
204
|
+
title: ctx.refRule?.__$title?.value,
|
|
205
|
+
rule: ctx.rule,
|
|
206
|
+
options: this.options
|
|
207
|
+
})
|
|
208
|
+
: ctx.refRule?.__$title?.value
|
|
209
|
+
]
|
|
163
210
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
211
|
+
if (
|
|
212
|
+
!isFalse(infoProp.show) &&
|
|
213
|
+
(infoProp.info || infoProp.native) &&
|
|
214
|
+
!isFalse(infoProp.icon)
|
|
215
|
+
) {
|
|
216
|
+
const prop = {
|
|
217
|
+
type: infoProp.type || 'popover',
|
|
218
|
+
props: tidyRule(infoProp),
|
|
219
|
+
key: `${uni}pop`
|
|
220
|
+
}
|
|
170
221
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
222
|
+
delete prop.props.icon
|
|
223
|
+
delete prop.props.show
|
|
224
|
+
delete prop.props.info
|
|
225
|
+
delete prop.props.align
|
|
226
|
+
delete prop.props.native
|
|
176
227
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
228
|
+
const field = isTip ? 'title' : 'content'
|
|
229
|
+
if (infoProp.info && !hasProperty(prop.props, field)) {
|
|
230
|
+
prop.props[field] = ctx.refRule?.__$info?.value
|
|
231
|
+
}
|
|
232
|
+
children[infoProp.align !== 'left' ? 'unshift' : 'push'](
|
|
233
|
+
this.$r(mergeProps([infoProp, prop]), {
|
|
234
|
+
[titleProp.slot || 'default']: () =>
|
|
235
|
+
this.$r({
|
|
236
|
+
type:
|
|
237
|
+
infoProp.icon === true
|
|
238
|
+
? 'QuestionCircleOutlined'
|
|
239
|
+
: infoProp.icon || '',
|
|
240
|
+
props: {
|
|
241
|
+
type:
|
|
242
|
+
infoProp.icon === true
|
|
243
|
+
? 'QuestionCircleOutlined'
|
|
244
|
+
: infoProp.icon
|
|
245
|
+
},
|
|
246
|
+
key: `${uni}i`
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
)
|
|
250
|
+
}
|
|
189
251
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
252
|
+
const _prop = mergeProps([
|
|
253
|
+
titleProp,
|
|
254
|
+
{
|
|
255
|
+
props: tidyRule(titleProp),
|
|
256
|
+
key: `${uni}tit`,
|
|
257
|
+
class: 'fc-form-title',
|
|
258
|
+
type: titleProp.type || 'span'
|
|
259
|
+
}
|
|
260
|
+
])
|
|
196
261
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
262
|
+
delete _prop.props.show
|
|
263
|
+
delete _prop.props.title
|
|
264
|
+
delete _prop.props.native
|
|
200
265
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
266
|
+
return this.$r(_prop, children)
|
|
267
|
+
},
|
|
268
|
+
makeCol(rule, uni, children) {
|
|
269
|
+
const col = rule.col
|
|
270
|
+
return this.$r(
|
|
271
|
+
{
|
|
272
|
+
class: this.$render.mergeClass(col.class, 'fc-form-col'),
|
|
273
|
+
type: 'col',
|
|
274
|
+
props: col || { span: 24 },
|
|
275
|
+
key: `${uni}col`
|
|
276
|
+
},
|
|
277
|
+
children
|
|
278
|
+
)
|
|
279
|
+
},
|
|
280
|
+
makeRow(children) {
|
|
281
|
+
const row = this.options.row || {}
|
|
282
|
+
return this.$r(
|
|
283
|
+
{
|
|
284
|
+
type: 'row',
|
|
285
|
+
props: row,
|
|
286
|
+
class: this.$render.mergeClass(row.class, 'fc-form-row'),
|
|
287
|
+
key: `${this.key}row`
|
|
288
|
+
},
|
|
289
|
+
children
|
|
290
|
+
)
|
|
291
|
+
},
|
|
292
|
+
makeFormBtn() {
|
|
293
|
+
let vn = []
|
|
294
|
+
if (!isFalse(this.options.submitBtn.show)) {
|
|
295
|
+
vn.push(this.makeSubmitBtn())
|
|
296
|
+
}
|
|
297
|
+
if (!isFalse(this.options.resetBtn.show)) {
|
|
298
|
+
vn.push(this.makeResetBtn())
|
|
299
|
+
}
|
|
300
|
+
if (!vn.length) {
|
|
301
|
+
return
|
|
302
|
+
}
|
|
303
|
+
let { labelCol, wrapperCol, layout } = this.rule.props
|
|
304
|
+
if (layout !== 'horizontal') {
|
|
305
|
+
labelCol = wrapperCol = {}
|
|
306
|
+
}
|
|
307
|
+
const item = this.$r(
|
|
308
|
+
{
|
|
309
|
+
type: 'formItem',
|
|
310
|
+
class: 'fc-form-item fc-form-footer',
|
|
311
|
+
key: `${this.key}fb`,
|
|
312
|
+
props: {
|
|
313
|
+
labelCol,
|
|
314
|
+
wrapperCol,
|
|
315
|
+
label: ' ',
|
|
316
|
+
colon: false
|
|
235
317
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
key: `${this.key}fb`,
|
|
240
|
-
props: {
|
|
241
|
-
labelCol,
|
|
242
|
-
wrapperCol,
|
|
243
|
-
label: ' ', colon: false
|
|
244
|
-
}
|
|
245
|
-
}, vn);
|
|
318
|
+
},
|
|
319
|
+
vn
|
|
320
|
+
)
|
|
246
321
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
322
|
+
return layout === 'inline'
|
|
323
|
+
? item
|
|
324
|
+
: this.$r(
|
|
325
|
+
{
|
|
326
|
+
type: 'col',
|
|
327
|
+
class: 'fc-form-col',
|
|
328
|
+
props: { span: 24 },
|
|
329
|
+
key: `${this.key}fc`
|
|
330
|
+
},
|
|
331
|
+
[item]
|
|
332
|
+
)
|
|
333
|
+
},
|
|
256
334
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
335
|
+
makeResetBtn() {
|
|
336
|
+
const resetBtn = { ...this.options.resetBtn }
|
|
337
|
+
const innerText =
|
|
338
|
+
resetBtn.innerText || this.$handle.api.t('reset') || '重置'
|
|
339
|
+
delete resetBtn.innerText
|
|
340
|
+
delete resetBtn.click
|
|
341
|
+
delete resetBtn.col
|
|
342
|
+
delete resetBtn.show
|
|
343
|
+
return this.$r(
|
|
344
|
+
{
|
|
345
|
+
type: 'button',
|
|
346
|
+
props: resetBtn,
|
|
347
|
+
class: 'fc-reset-btn',
|
|
348
|
+
style: { width: resetBtn.width, marginLeft: '10px' },
|
|
349
|
+
on: {
|
|
350
|
+
click: () => {
|
|
351
|
+
const fApi = this.$handle.api
|
|
352
|
+
this.options.resetBtn.click
|
|
353
|
+
? this.options.resetBtn.click(fApi)
|
|
354
|
+
: fApi.resetFields()
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
key: `${this.key}b2`
|
|
358
|
+
},
|
|
359
|
+
[innerText]
|
|
360
|
+
)
|
|
361
|
+
},
|
|
362
|
+
makeSubmitBtn() {
|
|
363
|
+
const submitBtn = { ...this.options.submitBtn }
|
|
364
|
+
const innerText =
|
|
365
|
+
submitBtn.innerText || this.$handle.api.t('submit') || '提交'
|
|
366
|
+
delete submitBtn.innerText
|
|
367
|
+
delete submitBtn.click
|
|
368
|
+
delete submitBtn.col
|
|
369
|
+
delete submitBtn.show
|
|
370
|
+
return this.$r(
|
|
371
|
+
{
|
|
372
|
+
type: 'button',
|
|
373
|
+
props: submitBtn,
|
|
374
|
+
class: 'fc-submit-btn',
|
|
375
|
+
style: { width: submitBtn.width },
|
|
376
|
+
on: {
|
|
377
|
+
click: () => {
|
|
378
|
+
const fApi = this.$handle.api
|
|
379
|
+
this.options.submitBtn.click
|
|
380
|
+
? this.options.submitBtn.click(fApi)
|
|
381
|
+
: fApi.submit().catch(() => {})
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
key: `${this.key}b1`
|
|
385
|
+
},
|
|
386
|
+
[innerText]
|
|
387
|
+
)
|
|
388
|
+
}
|
|
303
389
|
}
|