@panpanzhao/component-ui 0.0.2 → 0.0.4
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/lib/component-ui.common.js +2914 -101
- package/lib/components/crud.js +83 -70
- package/lib/components/dialog.js +540 -0
- package/lib/components/form-dialog.js +50 -49
- package/lib/components/form-group.js +39 -39
- package/lib/components/form-input.js +58 -46
- package/lib/components/form-item.js +6 -6
- package/lib/components/form-view-dialog.js +46 -45
- package/lib/components/form-view-group.js +35 -35
- package/lib/components/form-view.js +11 -10
- package/lib/components/form.js +15 -14
- package/lib/components/formula.js +2655 -0
- package/lib/components/table-column.js +14 -14
- package/lib/components/table-editable.js +12 -12
- package/lib/components/table-search.js +6 -6
- package/lib/components/table.js +8 -8
- package/lib/index.js +1 -1
- package/lib/styles/code-mirror.css +1 -0
- package/lib/styles/component-ui.css +6 -1
- package/lib/styles/crud.css +0 -0
- package/lib/styles/dialog.css +1 -0
- package/lib/styles/form-dialog.css +0 -0
- package/lib/styles/form-group.css +0 -0
- package/lib/styles/form-input.css +0 -0
- package/lib/styles/form-item.css +0 -0
- package/lib/styles/form-view-dialog.css +0 -0
- package/lib/styles/form-view-group.css +0 -0
- package/lib/styles/form-view.css +0 -0
- package/lib/styles/formula.css +6 -0
- package/lib/styles/index.css +6 -1
- package/lib/styles/table-column.css +0 -0
- package/lib/styles/table-search.css +0 -0
- package/lib/utils/formula/doc.js +1547 -0
- package/lib/utils/formula/evalutor.js +17 -17
- package/lib/utils/helper.js +48 -0
- package/package.json +3 -3
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 58);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -119,281 +119,353 @@ module.exports = require("element-ui/lib/button");
|
|
|
119
119
|
/* 5 */
|
|
120
120
|
/***/ (function(module, exports) {
|
|
121
121
|
|
|
122
|
-
module.exports = require("
|
|
122
|
+
module.exports = require("element-ui/lib/input");
|
|
123
123
|
|
|
124
124
|
/***/ }),
|
|
125
125
|
/* 6 */
|
|
126
126
|
/***/ (function(module, exports) {
|
|
127
127
|
|
|
128
|
-
module.exports = require("
|
|
128
|
+
module.exports = require("element-ui/lib/tabs");
|
|
129
129
|
|
|
130
130
|
/***/ }),
|
|
131
131
|
/* 7 */
|
|
132
132
|
/***/ (function(module, exports) {
|
|
133
133
|
|
|
134
|
-
module.exports = require("element-ui/lib/
|
|
134
|
+
module.exports = require("element-ui/lib/tab-pane");
|
|
135
135
|
|
|
136
136
|
/***/ }),
|
|
137
137
|
/* 8 */
|
|
138
138
|
/***/ (function(module, exports) {
|
|
139
139
|
|
|
140
|
-
module.exports = require("element-ui/lib/
|
|
140
|
+
module.exports = require("element-ui/lib/collapse");
|
|
141
141
|
|
|
142
142
|
/***/ }),
|
|
143
143
|
/* 9 */
|
|
144
144
|
/***/ (function(module, exports) {
|
|
145
145
|
|
|
146
|
-
module.exports = require("element-ui/lib/
|
|
146
|
+
module.exports = require("element-ui/lib/collapse-item");
|
|
147
147
|
|
|
148
148
|
/***/ }),
|
|
149
149
|
/* 10 */
|
|
150
150
|
/***/ (function(module, exports) {
|
|
151
151
|
|
|
152
|
-
module.exports = require("
|
|
152
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/dialog");
|
|
153
153
|
|
|
154
154
|
/***/ }),
|
|
155
155
|
/* 11 */
|
|
156
156
|
/***/ (function(module, exports) {
|
|
157
157
|
|
|
158
|
-
module.exports = require("
|
|
158
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/form-input");
|
|
159
159
|
|
|
160
160
|
/***/ }),
|
|
161
161
|
/* 12 */
|
|
162
162
|
/***/ (function(module, exports) {
|
|
163
163
|
|
|
164
|
-
module.exports = require("
|
|
164
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/table-column");
|
|
165
165
|
|
|
166
166
|
/***/ }),
|
|
167
167
|
/* 13 */
|
|
168
168
|
/***/ (function(module, exports) {
|
|
169
169
|
|
|
170
|
-
module.exports = require("element-ui/lib/
|
|
170
|
+
module.exports = require("element-ui/lib/radio");
|
|
171
171
|
|
|
172
172
|
/***/ }),
|
|
173
173
|
/* 14 */
|
|
174
174
|
/***/ (function(module, exports) {
|
|
175
175
|
|
|
176
|
-
module.exports = require("
|
|
176
|
+
module.exports = require("element-ui/lib/table");
|
|
177
177
|
|
|
178
178
|
/***/ }),
|
|
179
179
|
/* 15 */
|
|
180
180
|
/***/ (function(module, exports) {
|
|
181
181
|
|
|
182
|
-
module.exports = require("
|
|
182
|
+
module.exports = require("codemirror");
|
|
183
183
|
|
|
184
184
|
/***/ }),
|
|
185
185
|
/* 16 */
|
|
186
186
|
/***/ (function(module, exports) {
|
|
187
187
|
|
|
188
|
-
module.exports = require("
|
|
188
|
+
module.exports = require("dayjs");
|
|
189
189
|
|
|
190
190
|
/***/ }),
|
|
191
191
|
/* 17 */
|
|
192
192
|
/***/ (function(module, exports) {
|
|
193
193
|
|
|
194
|
-
module.exports = require("element-ui/lib/
|
|
194
|
+
module.exports = require("element-ui/lib/link");
|
|
195
195
|
|
|
196
196
|
/***/ }),
|
|
197
197
|
/* 18 */
|
|
198
198
|
/***/ (function(module, exports) {
|
|
199
199
|
|
|
200
|
-
module.exports = require("element-ui/lib/
|
|
200
|
+
module.exports = require("element-ui/lib/form");
|
|
201
201
|
|
|
202
202
|
/***/ }),
|
|
203
203
|
/* 19 */
|
|
204
204
|
/***/ (function(module, exports) {
|
|
205
205
|
|
|
206
|
-
module.exports = require("
|
|
206
|
+
module.exports = require("element-ui/lib/row");
|
|
207
207
|
|
|
208
208
|
/***/ }),
|
|
209
209
|
/* 20 */
|
|
210
210
|
/***/ (function(module, exports) {
|
|
211
211
|
|
|
212
|
-
module.exports = require("element-ui/lib/
|
|
212
|
+
module.exports = require("element-ui/lib/col");
|
|
213
213
|
|
|
214
214
|
/***/ }),
|
|
215
215
|
/* 21 */
|
|
216
216
|
/***/ (function(module, exports) {
|
|
217
217
|
|
|
218
|
-
module.exports = require("
|
|
218
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/form-item");
|
|
219
219
|
|
|
220
220
|
/***/ }),
|
|
221
221
|
/* 22 */
|
|
222
222
|
/***/ (function(module, exports) {
|
|
223
223
|
|
|
224
|
-
module.exports = require("element-ui/lib/
|
|
224
|
+
module.exports = require("element-ui/lib/input-number");
|
|
225
225
|
|
|
226
226
|
/***/ }),
|
|
227
227
|
/* 23 */
|
|
228
228
|
/***/ (function(module, exports) {
|
|
229
229
|
|
|
230
|
-
module.exports = require("element-ui/lib/
|
|
230
|
+
module.exports = require("element-ui/lib/select");
|
|
231
231
|
|
|
232
232
|
/***/ }),
|
|
233
233
|
/* 24 */
|
|
234
234
|
/***/ (function(module, exports) {
|
|
235
235
|
|
|
236
|
-
module.exports = require("element-ui/lib/option
|
|
236
|
+
module.exports = require("element-ui/lib/option");
|
|
237
237
|
|
|
238
238
|
/***/ }),
|
|
239
239
|
/* 25 */
|
|
240
240
|
/***/ (function(module, exports) {
|
|
241
241
|
|
|
242
|
-
module.exports = require("element-ui/lib/
|
|
242
|
+
module.exports = require("element-ui/lib/option-group");
|
|
243
243
|
|
|
244
244
|
/***/ }),
|
|
245
245
|
/* 26 */
|
|
246
246
|
/***/ (function(module, exports) {
|
|
247
247
|
|
|
248
|
-
module.exports = require("element-ui/lib/radio-
|
|
248
|
+
module.exports = require("element-ui/lib/radio-group");
|
|
249
249
|
|
|
250
250
|
/***/ }),
|
|
251
251
|
/* 27 */
|
|
252
252
|
/***/ (function(module, exports) {
|
|
253
253
|
|
|
254
|
-
module.exports = require("element-ui/lib/
|
|
254
|
+
module.exports = require("element-ui/lib/radio-button");
|
|
255
255
|
|
|
256
256
|
/***/ }),
|
|
257
257
|
/* 28 */
|
|
258
258
|
/***/ (function(module, exports) {
|
|
259
259
|
|
|
260
|
-
module.exports = require("element-ui/lib/checkbox");
|
|
260
|
+
module.exports = require("element-ui/lib/checkbox-group");
|
|
261
261
|
|
|
262
262
|
/***/ }),
|
|
263
263
|
/* 29 */
|
|
264
264
|
/***/ (function(module, exports) {
|
|
265
265
|
|
|
266
|
-
module.exports = require("element-ui/lib/checkbox
|
|
266
|
+
module.exports = require("element-ui/lib/checkbox");
|
|
267
267
|
|
|
268
268
|
/***/ }),
|
|
269
269
|
/* 30 */
|
|
270
270
|
/***/ (function(module, exports) {
|
|
271
271
|
|
|
272
|
-
module.exports = require("element-ui/lib/
|
|
272
|
+
module.exports = require("element-ui/lib/checkbox-button");
|
|
273
273
|
|
|
274
274
|
/***/ }),
|
|
275
275
|
/* 31 */
|
|
276
276
|
/***/ (function(module, exports) {
|
|
277
277
|
|
|
278
|
-
module.exports = require("element-ui/lib/
|
|
278
|
+
module.exports = require("element-ui/lib/switch");
|
|
279
279
|
|
|
280
280
|
/***/ }),
|
|
281
281
|
/* 32 */
|
|
282
282
|
/***/ (function(module, exports) {
|
|
283
283
|
|
|
284
|
-
module.exports = require("element-ui/lib/
|
|
284
|
+
module.exports = require("element-ui/lib/cascader");
|
|
285
285
|
|
|
286
286
|
/***/ }),
|
|
287
287
|
/* 33 */
|
|
288
288
|
/***/ (function(module, exports) {
|
|
289
289
|
|
|
290
|
-
module.exports = require("element-ui/lib/
|
|
290
|
+
module.exports = require("element-ui/lib/slider");
|
|
291
291
|
|
|
292
292
|
/***/ }),
|
|
293
293
|
/* 34 */
|
|
294
294
|
/***/ (function(module, exports) {
|
|
295
295
|
|
|
296
|
-
module.exports = require("element-ui/lib/
|
|
296
|
+
module.exports = require("element-ui/lib/transfer");
|
|
297
297
|
|
|
298
298
|
/***/ }),
|
|
299
299
|
/* 35 */
|
|
300
300
|
/***/ (function(module, exports) {
|
|
301
301
|
|
|
302
|
-
module.exports = require("element-ui/lib/
|
|
302
|
+
module.exports = require("element-ui/lib/time-picker");
|
|
303
303
|
|
|
304
304
|
/***/ }),
|
|
305
305
|
/* 36 */
|
|
306
306
|
/***/ (function(module, exports) {
|
|
307
307
|
|
|
308
|
-
module.exports = require("element-ui/lib/
|
|
308
|
+
module.exports = require("element-ui/lib/date-picker");
|
|
309
309
|
|
|
310
310
|
/***/ }),
|
|
311
311
|
/* 37 */
|
|
312
312
|
/***/ (function(module, exports) {
|
|
313
313
|
|
|
314
|
-
module.exports = require("element-ui/lib/
|
|
314
|
+
module.exports = require("element-ui/lib/upload");
|
|
315
315
|
|
|
316
316
|
/***/ }),
|
|
317
317
|
/* 38 */
|
|
318
318
|
/***/ (function(module, exports) {
|
|
319
319
|
|
|
320
|
-
module.exports = require("element-ui/lib/
|
|
320
|
+
module.exports = require("element-ui/lib/form-item");
|
|
321
321
|
|
|
322
322
|
/***/ }),
|
|
323
323
|
/* 39 */
|
|
324
324
|
/***/ (function(module, exports) {
|
|
325
325
|
|
|
326
|
-
module.exports = require("element-ui/lib/descriptions
|
|
326
|
+
module.exports = require("element-ui/lib/descriptions");
|
|
327
327
|
|
|
328
328
|
/***/ }),
|
|
329
329
|
/* 40 */
|
|
330
330
|
/***/ (function(module, exports) {
|
|
331
331
|
|
|
332
|
-
module.exports = require("element-ui/lib/
|
|
332
|
+
module.exports = require("element-ui/lib/descriptions-item");
|
|
333
333
|
|
|
334
334
|
/***/ }),
|
|
335
335
|
/* 41 */
|
|
336
336
|
/***/ (function(module, exports) {
|
|
337
337
|
|
|
338
|
-
module.exports = require("element-ui/lib/
|
|
338
|
+
module.exports = require("element-ui/lib/pagination");
|
|
339
339
|
|
|
340
340
|
/***/ }),
|
|
341
341
|
/* 42 */
|
|
342
342
|
/***/ (function(module, exports) {
|
|
343
343
|
|
|
344
|
-
module.exports = require("element-ui/lib/dropdown
|
|
344
|
+
module.exports = require("element-ui/lib/dropdown");
|
|
345
345
|
|
|
346
346
|
/***/ }),
|
|
347
347
|
/* 43 */
|
|
348
348
|
/***/ (function(module, exports) {
|
|
349
349
|
|
|
350
|
-
module.exports = require("element-ui/lib/dropdown-
|
|
350
|
+
module.exports = require("element-ui/lib/dropdown-item");
|
|
351
351
|
|
|
352
352
|
/***/ }),
|
|
353
353
|
/* 44 */
|
|
354
354
|
/***/ (function(module, exports) {
|
|
355
355
|
|
|
356
|
-
module.exports = require("
|
|
356
|
+
module.exports = require("element-ui/lib/dropdown-menu");
|
|
357
357
|
|
|
358
358
|
/***/ }),
|
|
359
359
|
/* 45 */
|
|
360
360
|
/***/ (function(module, exports) {
|
|
361
361
|
|
|
362
|
-
module.exports = require("@panpanzhao/component-ui/lib/components/
|
|
362
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/form");
|
|
363
363
|
|
|
364
364
|
/***/ }),
|
|
365
365
|
/* 46 */
|
|
366
366
|
/***/ (function(module, exports) {
|
|
367
367
|
|
|
368
|
-
module.exports = require("
|
|
368
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/table");
|
|
369
369
|
|
|
370
370
|
/***/ }),
|
|
371
371
|
/* 47 */
|
|
372
372
|
/***/ (function(module, exports) {
|
|
373
373
|
|
|
374
|
-
module.exports = require("
|
|
374
|
+
module.exports = require("element-ui/lib/popover");
|
|
375
375
|
|
|
376
376
|
/***/ }),
|
|
377
377
|
/* 48 */
|
|
378
378
|
/***/ (function(module, exports) {
|
|
379
379
|
|
|
380
|
-
module.exports = require("
|
|
380
|
+
module.exports = require("async-validator");
|
|
381
381
|
|
|
382
382
|
/***/ }),
|
|
383
383
|
/* 49 */
|
|
384
384
|
/***/ (function(module, exports) {
|
|
385
385
|
|
|
386
|
-
module.exports = require("
|
|
386
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/table-search");
|
|
387
387
|
|
|
388
388
|
/***/ }),
|
|
389
389
|
/* 50 */
|
|
390
|
+
/***/ (function(module, exports) {
|
|
391
|
+
|
|
392
|
+
module.exports = require("element-ui/lib/message-box");
|
|
393
|
+
|
|
394
|
+
/***/ }),
|
|
395
|
+
/* 51 */
|
|
396
|
+
/***/ (function(module, exports) {
|
|
397
|
+
|
|
398
|
+
module.exports = require("element-ui/lib/tree");
|
|
399
|
+
|
|
400
|
+
/***/ }),
|
|
401
|
+
/* 52 */
|
|
402
|
+
/***/ (function(module, exports) {
|
|
403
|
+
|
|
404
|
+
module.exports = require("element-ui/lib/badge");
|
|
405
|
+
|
|
406
|
+
/***/ }),
|
|
407
|
+
/* 53 */
|
|
408
|
+
/***/ (function(module, exports) {
|
|
409
|
+
|
|
410
|
+
module.exports = require("@panpanzhao/component-ui/lib/utils/helper");
|
|
411
|
+
|
|
412
|
+
/***/ }),
|
|
413
|
+
/* 54 */
|
|
414
|
+
/***/ (function(module, exports) {
|
|
415
|
+
|
|
416
|
+
module.exports = require("element-ui/lib/message");
|
|
417
|
+
|
|
418
|
+
/***/ }),
|
|
419
|
+
/* 55 */
|
|
420
|
+
/***/ (function(module, exports) {
|
|
421
|
+
|
|
422
|
+
module.exports = require("element-ui/src/utils/popup");
|
|
423
|
+
|
|
424
|
+
/***/ }),
|
|
425
|
+
/* 56 */
|
|
426
|
+
/***/ (function(module, exports) {
|
|
427
|
+
|
|
428
|
+
module.exports = require("element-ui/src/mixins/migrating");
|
|
429
|
+
|
|
430
|
+
/***/ }),
|
|
431
|
+
/* 57 */
|
|
432
|
+
/***/ (function(module, exports) {
|
|
433
|
+
|
|
434
|
+
module.exports = require("element-ui/src/mixins/emitter");
|
|
435
|
+
|
|
436
|
+
/***/ }),
|
|
437
|
+
/* 58 */
|
|
390
438
|
/***/ (function(module, exports, __webpack_require__) {
|
|
391
439
|
|
|
392
|
-
module.exports = __webpack_require__(
|
|
440
|
+
module.exports = __webpack_require__(63);
|
|
393
441
|
|
|
394
442
|
|
|
395
443
|
/***/ }),
|
|
396
|
-
/*
|
|
444
|
+
/* 59 */
|
|
445
|
+
/***/ (function(module, exports) {
|
|
446
|
+
|
|
447
|
+
module.exports = require("codemirror/mode/javascript/javascript");
|
|
448
|
+
|
|
449
|
+
/***/ }),
|
|
450
|
+
/* 60 */
|
|
451
|
+
/***/ (function(module, exports) {
|
|
452
|
+
|
|
453
|
+
module.exports = require("codemirror/mode/htmlmixed/htmlmixed");
|
|
454
|
+
|
|
455
|
+
/***/ }),
|
|
456
|
+
/* 61 */
|
|
457
|
+
/***/ (function(module, exports) {
|
|
458
|
+
|
|
459
|
+
module.exports = require("codemirror/addon/mode/simple");
|
|
460
|
+
|
|
461
|
+
/***/ }),
|
|
462
|
+
/* 62 */
|
|
463
|
+
/***/ (function(module, exports) {
|
|
464
|
+
|
|
465
|
+
module.exports = require("codemirror/addon/mode/multiplex");
|
|
466
|
+
|
|
467
|
+
/***/ }),
|
|
468
|
+
/* 63 */
|
|
397
469
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
398
470
|
|
|
399
471
|
"use strict";
|
|
@@ -471,19 +543,19 @@ formvue_type_template_id_42f43bc0_render._withStripped = true
|
|
|
471
543
|
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=42f43bc0&
|
|
472
544
|
|
|
473
545
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
474
|
-
var form_ = __webpack_require__(
|
|
546
|
+
var form_ = __webpack_require__(18);
|
|
475
547
|
var form_default = /*#__PURE__*/__webpack_require__.n(form_);
|
|
476
548
|
|
|
477
549
|
// EXTERNAL MODULE: external "element-ui/lib/row"
|
|
478
|
-
var row_ = __webpack_require__(
|
|
550
|
+
var row_ = __webpack_require__(19);
|
|
479
551
|
var row_default = /*#__PURE__*/__webpack_require__.n(row_);
|
|
480
552
|
|
|
481
553
|
// EXTERNAL MODULE: external "element-ui/lib/col"
|
|
482
|
-
var col_ = __webpack_require__(
|
|
554
|
+
var col_ = __webpack_require__(20);
|
|
483
555
|
var col_default = /*#__PURE__*/__webpack_require__.n(col_);
|
|
484
556
|
|
|
485
557
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-item"
|
|
486
|
-
var form_item_ = __webpack_require__(
|
|
558
|
+
var form_item_ = __webpack_require__(21);
|
|
487
559
|
var form_item_default = /*#__PURE__*/__webpack_require__.n(form_item_);
|
|
488
560
|
|
|
489
561
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
@@ -812,7 +884,7 @@ Inputvue_type_template_id_24c10975_render._withStripped = true
|
|
|
812
884
|
// CONCATENATED MODULE: ./src/components/form/src/item/Input.vue?vue&type=template&id=24c10975&
|
|
813
885
|
|
|
814
886
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
815
|
-
var input_ = __webpack_require__(
|
|
887
|
+
var input_ = __webpack_require__(5);
|
|
816
888
|
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
817
889
|
|
|
818
890
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Input.vue?vue&type=script&lang=js&
|
|
@@ -910,7 +982,7 @@ InputNumbervue_type_template_id_7a2f5f6e_render._withStripped = true
|
|
|
910
982
|
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=7a2f5f6e&
|
|
911
983
|
|
|
912
984
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
913
|
-
var input_number_ = __webpack_require__(
|
|
985
|
+
var input_number_ = __webpack_require__(22);
|
|
914
986
|
var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
915
987
|
|
|
916
988
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/InputNumber.vue?vue&type=script&lang=js&
|
|
@@ -950,15 +1022,15 @@ var InputNumber_component = normalizeComponent(
|
|
|
950
1022
|
|
|
951
1023
|
/* harmony default export */ var InputNumber = (InputNumber_component.exports);
|
|
952
1024
|
// EXTERNAL MODULE: external "element-ui/lib/select"
|
|
953
|
-
var select_ = __webpack_require__(
|
|
1025
|
+
var select_ = __webpack_require__(23);
|
|
954
1026
|
var select_default = /*#__PURE__*/__webpack_require__.n(select_);
|
|
955
1027
|
|
|
956
1028
|
// EXTERNAL MODULE: external "element-ui/lib/option"
|
|
957
|
-
var option_ = __webpack_require__(
|
|
1029
|
+
var option_ = __webpack_require__(24);
|
|
958
1030
|
var option_default = /*#__PURE__*/__webpack_require__.n(option_);
|
|
959
1031
|
|
|
960
1032
|
// EXTERNAL MODULE: external "element-ui/lib/option-group"
|
|
961
|
-
var option_group_ = __webpack_require__(
|
|
1033
|
+
var option_group_ = __webpack_require__(25);
|
|
962
1034
|
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
|
|
963
1035
|
|
|
964
1036
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=626a2185&
|
|
@@ -1482,15 +1554,15 @@ var Select_component = normalizeComponent(
|
|
|
1482
1554
|
|
|
1483
1555
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1484
1556
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1485
|
-
var radio_group_ = __webpack_require__(
|
|
1557
|
+
var radio_group_ = __webpack_require__(26);
|
|
1486
1558
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1487
1559
|
|
|
1488
1560
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
1489
|
-
var radio_ = __webpack_require__(
|
|
1561
|
+
var radio_ = __webpack_require__(13);
|
|
1490
1562
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1491
1563
|
|
|
1492
1564
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1493
|
-
var radio_button_ = __webpack_require__(
|
|
1565
|
+
var radio_button_ = __webpack_require__(27);
|
|
1494
1566
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1495
1567
|
|
|
1496
1568
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Radio.vue?vue&type=script&lang=js&
|
|
@@ -1666,15 +1738,15 @@ var Radio_component = normalizeComponent(
|
|
|
1666
1738
|
|
|
1667
1739
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1668
1740
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1669
|
-
var checkbox_group_ = __webpack_require__(
|
|
1741
|
+
var checkbox_group_ = __webpack_require__(28);
|
|
1670
1742
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1671
1743
|
|
|
1672
1744
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1673
|
-
var checkbox_ = __webpack_require__(
|
|
1745
|
+
var checkbox_ = __webpack_require__(29);
|
|
1674
1746
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1675
1747
|
|
|
1676
1748
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1677
|
-
var checkbox_button_ = __webpack_require__(
|
|
1749
|
+
var checkbox_button_ = __webpack_require__(30);
|
|
1678
1750
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1679
1751
|
|
|
1680
1752
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/checkbox.vue?vue&type=script&lang=js&
|
|
@@ -1853,31 +1925,31 @@ var checkbox_component = normalizeComponent(
|
|
|
1853
1925
|
|
|
1854
1926
|
/* harmony default export */ var item_checkbox = (checkbox_component.exports);
|
|
1855
1927
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
1856
|
-
var switch_ = __webpack_require__(
|
|
1928
|
+
var switch_ = __webpack_require__(31);
|
|
1857
1929
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
1858
1930
|
|
|
1859
1931
|
// EXTERNAL MODULE: external "element-ui/lib/cascader"
|
|
1860
|
-
var cascader_ = __webpack_require__(
|
|
1932
|
+
var cascader_ = __webpack_require__(32);
|
|
1861
1933
|
var cascader_default = /*#__PURE__*/__webpack_require__.n(cascader_);
|
|
1862
1934
|
|
|
1863
1935
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
1864
|
-
var slider_ = __webpack_require__(
|
|
1936
|
+
var slider_ = __webpack_require__(33);
|
|
1865
1937
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
1866
1938
|
|
|
1867
1939
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
1868
|
-
var transfer_ = __webpack_require__(
|
|
1940
|
+
var transfer_ = __webpack_require__(34);
|
|
1869
1941
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
1870
1942
|
|
|
1871
1943
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
1872
|
-
var time_picker_ = __webpack_require__(
|
|
1944
|
+
var time_picker_ = __webpack_require__(35);
|
|
1873
1945
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
1874
1946
|
|
|
1875
1947
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
1876
|
-
var date_picker_ = __webpack_require__(
|
|
1948
|
+
var date_picker_ = __webpack_require__(36);
|
|
1877
1949
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
1878
1950
|
|
|
1879
1951
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
1880
|
-
var upload_ = __webpack_require__(
|
|
1952
|
+
var upload_ = __webpack_require__(37);
|
|
1881
1953
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
1882
1954
|
|
|
1883
1955
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -1952,11 +2024,11 @@ form_input.install = function (Vue) {
|
|
|
1952
2024
|
};
|
|
1953
2025
|
/* harmony default export */ var components_form_input = (form_input);
|
|
1954
2026
|
// EXTERNAL MODULE: external "element-ui/lib/form-item"
|
|
1955
|
-
var lib_form_item_ = __webpack_require__(
|
|
2027
|
+
var lib_form_item_ = __webpack_require__(38);
|
|
1956
2028
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item_);
|
|
1957
2029
|
|
|
1958
2030
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-input"
|
|
1959
|
-
var form_input_ = __webpack_require__(
|
|
2031
|
+
var form_input_ = __webpack_require__(11);
|
|
1960
2032
|
var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
1961
2033
|
|
|
1962
2034
|
// CONCATENATED MODULE: ./src/components/form/src/form-item.js
|
|
@@ -2190,19 +2262,19 @@ form_item.install = function (Vue) {
|
|
|
2190
2262
|
}
|
|
2191
2263
|
});
|
|
2192
2264
|
// EXTERNAL MODULE: external "element-ui/lib/tabs"
|
|
2193
|
-
var tabs_ = __webpack_require__(
|
|
2265
|
+
var tabs_ = __webpack_require__(6);
|
|
2194
2266
|
var tabs_default = /*#__PURE__*/__webpack_require__.n(tabs_);
|
|
2195
2267
|
|
|
2196
2268
|
// EXTERNAL MODULE: external "element-ui/lib/tab-pane"
|
|
2197
|
-
var tab_pane_ = __webpack_require__(
|
|
2269
|
+
var tab_pane_ = __webpack_require__(7);
|
|
2198
2270
|
var tab_pane_default = /*#__PURE__*/__webpack_require__.n(tab_pane_);
|
|
2199
2271
|
|
|
2200
2272
|
// EXTERNAL MODULE: external "element-ui/lib/collapse"
|
|
2201
|
-
var collapse_ = __webpack_require__(
|
|
2273
|
+
var collapse_ = __webpack_require__(8);
|
|
2202
2274
|
var collapse_default = /*#__PURE__*/__webpack_require__.n(collapse_);
|
|
2203
2275
|
|
|
2204
2276
|
// EXTERNAL MODULE: external "element-ui/lib/collapse-item"
|
|
2205
|
-
var collapse_item_ = __webpack_require__(
|
|
2277
|
+
var collapse_item_ = __webpack_require__(9);
|
|
2206
2278
|
var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
2207
2279
|
|
|
2208
2280
|
// CONCATENATED MODULE: ./src/components/form-group/src/index.js
|
|
@@ -2454,8 +2526,8 @@ src.install = function (Vue) {
|
|
|
2454
2526
|
Vue.component(src.name, src);
|
|
2455
2527
|
};
|
|
2456
2528
|
/* harmony default export */ var form_group = (src);
|
|
2457
|
-
// EXTERNAL MODULE: external "
|
|
2458
|
-
var dialog_ = __webpack_require__(
|
|
2529
|
+
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/dialog"
|
|
2530
|
+
var dialog_ = __webpack_require__(10);
|
|
2459
2531
|
var dialog_default = /*#__PURE__*/__webpack_require__.n(dialog_);
|
|
2460
2532
|
|
|
2461
2533
|
// EXTERNAL MODULE: external "element-ui/lib/button"
|
|
@@ -2480,7 +2552,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2480
2552
|
components: {
|
|
2481
2553
|
Form: components_form,
|
|
2482
2554
|
FormGroup: form_group,
|
|
2483
|
-
|
|
2555
|
+
Dialog: dialog_default.a,
|
|
2484
2556
|
Tool: {
|
|
2485
2557
|
components: {
|
|
2486
2558
|
elButton: button_default.a
|
|
@@ -2684,7 +2756,7 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
2684
2756
|
}
|
|
2685
2757
|
})
|
|
2686
2758
|
};
|
|
2687
|
-
return h(
|
|
2759
|
+
return h(dialog_default.a, babel_helper_vue_jsx_merge_props_default()([{}, param]), [h("template", {
|
|
2688
2760
|
"slot": "title",
|
|
2689
2761
|
"class": "dialog-title"
|
|
2690
2762
|
}, [this.renderTitle(h)]), h("template", {
|
|
@@ -2771,11 +2843,11 @@ srcvue_type_template_id_82a59c42_render._withStripped = true
|
|
|
2771
2843
|
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=82a59c42&
|
|
2772
2844
|
|
|
2773
2845
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
2774
|
-
var descriptions_ = __webpack_require__(
|
|
2846
|
+
var descriptions_ = __webpack_require__(39);
|
|
2775
2847
|
var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
|
|
2776
2848
|
|
|
2777
2849
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
|
|
2778
|
-
var descriptions_item_ = __webpack_require__(
|
|
2850
|
+
var descriptions_item_ = __webpack_require__(40);
|
|
2779
2851
|
var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
|
|
2780
2852
|
|
|
2781
2853
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=script&lang=js&
|
|
@@ -3117,7 +3189,7 @@ form_view_group_src.install = function (Vue) {
|
|
|
3117
3189
|
components: {
|
|
3118
3190
|
FormView: form_view,
|
|
3119
3191
|
FormViewGroup: form_view_group,
|
|
3120
|
-
|
|
3192
|
+
Dialog: dialog_default.a,
|
|
3121
3193
|
Tool: {
|
|
3122
3194
|
components: {
|
|
3123
3195
|
elButton: button_default.a
|
|
@@ -3287,7 +3359,7 @@ form_view_group_src.install = function (Vue) {
|
|
|
3287
3359
|
}
|
|
3288
3360
|
})
|
|
3289
3361
|
};
|
|
3290
|
-
return h(
|
|
3362
|
+
return h(dialog_default.a, babel_helper_vue_jsx_merge_props_default()([{}, param]), [h("template", {
|
|
3291
3363
|
"slot": "title",
|
|
3292
3364
|
"class": "dialog-title"
|
|
3293
3365
|
}, [this.renderTitle(h)]), h("template", {
|
|
@@ -3410,7 +3482,7 @@ tablevue_type_template_id_023195f2_render._withStripped = true
|
|
|
3410
3482
|
// CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=023195f2&
|
|
3411
3483
|
|
|
3412
3484
|
// EXTERNAL MODULE: external "element-ui/lib/table"
|
|
3413
|
-
var table_ = __webpack_require__(
|
|
3485
|
+
var table_ = __webpack_require__(14);
|
|
3414
3486
|
var table_default = /*#__PURE__*/__webpack_require__.n(table_);
|
|
3415
3487
|
|
|
3416
3488
|
// EXTERNAL MODULE: external "element-ui/lib/table-column"
|
|
@@ -3418,11 +3490,11 @@ var table_column_ = __webpack_require__(3);
|
|
|
3418
3490
|
var table_column_default = /*#__PURE__*/__webpack_require__.n(table_column_);
|
|
3419
3491
|
|
|
3420
3492
|
// EXTERNAL MODULE: external "element-ui/lib/pagination"
|
|
3421
|
-
var pagination_ = __webpack_require__(
|
|
3493
|
+
var pagination_ = __webpack_require__(41);
|
|
3422
3494
|
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
|
|
3423
3495
|
|
|
3424
3496
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-column"
|
|
3425
|
-
var components_table_column_ = __webpack_require__(
|
|
3497
|
+
var components_table_column_ = __webpack_require__(12);
|
|
3426
3498
|
var components_table_column_default = /*#__PURE__*/__webpack_require__.n(components_table_column_);
|
|
3427
3499
|
|
|
3428
3500
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=script&lang=js&
|
|
@@ -3953,7 +4025,7 @@ datevue_type_template_id_3d682315_render._withStripped = true
|
|
|
3953
4025
|
// CONCATENATED MODULE: ./src/components/table/src/column/date.vue?vue&type=template&id=3d682315&
|
|
3954
4026
|
|
|
3955
4027
|
// EXTERNAL MODULE: external "dayjs"
|
|
3956
|
-
var external_dayjs_ = __webpack_require__(
|
|
4028
|
+
var external_dayjs_ = __webpack_require__(16);
|
|
3957
4029
|
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_);
|
|
3958
4030
|
|
|
3959
4031
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/date.vue?vue&type=script&lang=js&
|
|
@@ -4140,19 +4212,19 @@ var dict_component = normalizeComponent(
|
|
|
4140
4212
|
|
|
4141
4213
|
/* harmony default export */ var dict = (dict_component.exports);
|
|
4142
4214
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown"
|
|
4143
|
-
var dropdown_ = __webpack_require__(
|
|
4215
|
+
var dropdown_ = __webpack_require__(42);
|
|
4144
4216
|
var dropdown_default = /*#__PURE__*/__webpack_require__.n(dropdown_);
|
|
4145
4217
|
|
|
4146
4218
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-item"
|
|
4147
|
-
var dropdown_item_ = __webpack_require__(
|
|
4219
|
+
var dropdown_item_ = __webpack_require__(43);
|
|
4148
4220
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
|
|
4149
4221
|
|
|
4150
4222
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-menu"
|
|
4151
|
-
var dropdown_menu_ = __webpack_require__(
|
|
4223
|
+
var dropdown_menu_ = __webpack_require__(44);
|
|
4152
4224
|
var dropdown_menu_default = /*#__PURE__*/__webpack_require__.n(dropdown_menu_);
|
|
4153
4225
|
|
|
4154
4226
|
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
4155
|
-
var link_ = __webpack_require__(
|
|
4227
|
+
var link_ = __webpack_require__(17);
|
|
4156
4228
|
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
4157
4229
|
|
|
4158
4230
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/operate.vue?vue&type=script&lang=js&
|
|
@@ -4531,11 +4603,11 @@ srcvue_type_template_id_43bcdd3e_render._withStripped = true
|
|
|
4531
4603
|
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=43bcdd3e&
|
|
4532
4604
|
|
|
4533
4605
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form"
|
|
4534
|
-
var components_form_ = __webpack_require__(
|
|
4606
|
+
var components_form_ = __webpack_require__(45);
|
|
4535
4607
|
var components_form_default = /*#__PURE__*/__webpack_require__.n(components_form_);
|
|
4536
4608
|
|
|
4537
4609
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table"
|
|
4538
|
-
var components_table_ = __webpack_require__(
|
|
4610
|
+
var components_table_ = __webpack_require__(46);
|
|
4539
4611
|
var components_table_default = /*#__PURE__*/__webpack_require__.n(components_table_);
|
|
4540
4612
|
|
|
4541
4613
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table-search/src/index.vue?vue&type=script&lang=js&
|
|
@@ -4683,11 +4755,11 @@ srcvue_type_template_id_1701e242_render._withStripped = true
|
|
|
4683
4755
|
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=1701e242&
|
|
4684
4756
|
|
|
4685
4757
|
// EXTERNAL MODULE: external "element-ui/lib/popover"
|
|
4686
|
-
var popover_ = __webpack_require__(
|
|
4758
|
+
var popover_ = __webpack_require__(47);
|
|
4687
4759
|
var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
|
|
4688
4760
|
|
|
4689
4761
|
// EXTERNAL MODULE: external "async-validator"
|
|
4690
|
-
var external_async_validator_ = __webpack_require__(
|
|
4762
|
+
var external_async_validator_ = __webpack_require__(48);
|
|
4691
4763
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
4692
4764
|
|
|
4693
4765
|
// CONCATENATED MODULE: ./src/components/table-editable/src/form-item.js
|
|
@@ -5386,11 +5458,11 @@ srcvue_type_template_id_65e4153e_render._withStripped = true
|
|
|
5386
5458
|
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=65e4153e&
|
|
5387
5459
|
|
|
5388
5460
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
5389
|
-
var table_search_ = __webpack_require__(
|
|
5461
|
+
var table_search_ = __webpack_require__(49);
|
|
5390
5462
|
var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
|
|
5391
5463
|
|
|
5392
5464
|
// EXTERNAL MODULE: external "element-ui/lib/message-box"
|
|
5393
|
-
var message_box_ = __webpack_require__(
|
|
5465
|
+
var message_box_ = __webpack_require__(50);
|
|
5394
5466
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
5395
5467
|
|
|
5396
5468
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js&
|
|
@@ -5635,7 +5707,2746 @@ crud_src.install = function (Vue) {
|
|
|
5635
5707
|
Vue.component(crud_src.name, crud_src);
|
|
5636
5708
|
};
|
|
5637
5709
|
/* harmony default export */ var crud = (crud_src);
|
|
5638
|
-
//
|
|
5710
|
+
// EXTERNAL MODULE: external "codemirror"
|
|
5711
|
+
var external_codemirror_ = __webpack_require__(15);
|
|
5712
|
+
var external_codemirror_default = /*#__PURE__*/__webpack_require__.n(external_codemirror_);
|
|
5713
|
+
|
|
5714
|
+
// EXTERNAL MODULE: external "codemirror/mode/javascript/javascript"
|
|
5715
|
+
var javascript_ = __webpack_require__(59);
|
|
5716
|
+
|
|
5717
|
+
// EXTERNAL MODULE: external "codemirror/mode/htmlmixed/htmlmixed"
|
|
5718
|
+
var htmlmixed_ = __webpack_require__(60);
|
|
5719
|
+
|
|
5720
|
+
// EXTERNAL MODULE: external "codemirror/addon/mode/simple"
|
|
5721
|
+
var simple_ = __webpack_require__(61);
|
|
5722
|
+
|
|
5723
|
+
// EXTERNAL MODULE: external "codemirror/addon/mode/multiplex"
|
|
5724
|
+
var multiplex_ = __webpack_require__(62);
|
|
5725
|
+
|
|
5726
|
+
// CONCATENATED MODULE: ./src/components/formula/src/codeMirror.js
|
|
5727
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
5728
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5729
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5730
|
+
|
|
5731
|
+
|
|
5732
|
+
|
|
5733
|
+
|
|
5734
|
+
|
|
5735
|
+
/* harmony default export */ var codeMirror = ({
|
|
5736
|
+
name: "CodeMirror",
|
|
5737
|
+
inheritAttrs: false,
|
|
5738
|
+
components: {},
|
|
5739
|
+
props: {
|
|
5740
|
+
className: String,
|
|
5741
|
+
value: String,
|
|
5742
|
+
options: Object,
|
|
5743
|
+
editorFactory: Function,
|
|
5744
|
+
editorDidMount: Function,
|
|
5745
|
+
on: {
|
|
5746
|
+
type: Object,
|
|
5747
|
+
default: function _default() {
|
|
5748
|
+
return {};
|
|
5749
|
+
}
|
|
5750
|
+
}
|
|
5751
|
+
},
|
|
5752
|
+
watch: {
|
|
5753
|
+
value: function value(val) {
|
|
5754
|
+
this.setValue(val);
|
|
5755
|
+
}
|
|
5756
|
+
},
|
|
5757
|
+
data: function data() {
|
|
5758
|
+
return {
|
|
5759
|
+
editor: null,
|
|
5760
|
+
unmounted: false
|
|
5761
|
+
};
|
|
5762
|
+
},
|
|
5763
|
+
mounted: function mounted() {
|
|
5764
|
+
var _this = this;
|
|
5765
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5766
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5767
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5768
|
+
case 0:
|
|
5769
|
+
if (!_this.unmounted) {
|
|
5770
|
+
_context.next = 2;
|
|
5771
|
+
break;
|
|
5772
|
+
}
|
|
5773
|
+
return _context.abrupt("return");
|
|
5774
|
+
case 2:
|
|
5775
|
+
_this.editor = _this.editorFactory && _this.editorFactory(_this.$refs.codeMirrorRef, external_codemirror_default.a, _this.options) || external_codemirror_default()(_this.$refs.codeMirrorRef, {
|
|
5776
|
+
value: _this.value || ''
|
|
5777
|
+
});
|
|
5778
|
+
_this.editorDidMount(external_codemirror_default.a, _this.editor);
|
|
5779
|
+
_this.editor.on('change', _this.handleChange);
|
|
5780
|
+
_this.editor.on('blur', _this.handleBlur);
|
|
5781
|
+
_this.editor.on('focus', _this.handleFocus);
|
|
5782
|
+
_this.$nextTick(function () {
|
|
5783
|
+
_this.editor.refresh();
|
|
5784
|
+
});
|
|
5785
|
+
case 8:
|
|
5786
|
+
case "end":
|
|
5787
|
+
return _context.stop();
|
|
5788
|
+
}
|
|
5789
|
+
}, _callee);
|
|
5790
|
+
}))();
|
|
5791
|
+
},
|
|
5792
|
+
beforeDestroy: function beforeDestroy() {
|
|
5793
|
+
this.unmounted = true;
|
|
5794
|
+
this.editor.off('change', this.handleChange);
|
|
5795
|
+
this.editor.off('blur', this.handleBlur);
|
|
5796
|
+
this.editor.off('focus', this.handleFocus);
|
|
5797
|
+
},
|
|
5798
|
+
methods: {
|
|
5799
|
+
setValue: function setValue(value) {
|
|
5800
|
+
var doc = this.editor.getDoc();
|
|
5801
|
+
if (value && value !== doc.getValue()) {
|
|
5802
|
+
var cursor = doc.getCursor();
|
|
5803
|
+
doc.setValue(value);
|
|
5804
|
+
doc.setCursor(cursor);
|
|
5805
|
+
}
|
|
5806
|
+
},
|
|
5807
|
+
handleChange: function handleChange(editor) {
|
|
5808
|
+
this.$emit("change", editor.getValue());
|
|
5809
|
+
},
|
|
5810
|
+
handleBlur: function handleBlur(editor) {
|
|
5811
|
+
this.$emit("blur", editor);
|
|
5812
|
+
},
|
|
5813
|
+
handleFocus: function handleFocus(editor) {
|
|
5814
|
+
this.$emit("focus", editor);
|
|
5815
|
+
}
|
|
5816
|
+
},
|
|
5817
|
+
render: function render(h) {
|
|
5818
|
+
return h("div", {
|
|
5819
|
+
"ref": "codeMirrorRef",
|
|
5820
|
+
"class": ["formula-codeMirror", this.className]
|
|
5821
|
+
});
|
|
5822
|
+
}
|
|
5823
|
+
});
|
|
5824
|
+
// CONCATENATED MODULE: ./src/components/formula/src/funcList.js
|
|
5825
|
+
function funcList_extends() { funcList_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return funcList_extends.apply(this, arguments); }
|
|
5826
|
+
|
|
5827
|
+
|
|
5828
|
+
|
|
5829
|
+
/* harmony default export */ var funcList = ({
|
|
5830
|
+
name: "FuncList",
|
|
5831
|
+
componentName: "FuncList",
|
|
5832
|
+
components: {
|
|
5833
|
+
elInput: input_default.a,
|
|
5834
|
+
elCollapse: collapse_default.a,
|
|
5835
|
+
elCollapseItem: collapse_item_default.a
|
|
5836
|
+
},
|
|
5837
|
+
props: {
|
|
5838
|
+
className: String,
|
|
5839
|
+
data: Array
|
|
5840
|
+
},
|
|
5841
|
+
data: function data() {
|
|
5842
|
+
return {
|
|
5843
|
+
filteredFuncs: [],
|
|
5844
|
+
activeFunc: null,
|
|
5845
|
+
searchVal: null
|
|
5846
|
+
};
|
|
5847
|
+
},
|
|
5848
|
+
created: function created() {
|
|
5849
|
+
this.filteredFuncs = this.data || [];
|
|
5850
|
+
},
|
|
5851
|
+
methods: {
|
|
5852
|
+
handleSearch: function handleSearch(val) {
|
|
5853
|
+
this.searchVal = val;
|
|
5854
|
+
var filtered = this.data.map(function (group) {
|
|
5855
|
+
return funcList_extends({}, group, {
|
|
5856
|
+
items: val ? group.items.filter(function (item) {
|
|
5857
|
+
return ~item.name.indexOf(val.toUpperCase());
|
|
5858
|
+
}) : group.items
|
|
5859
|
+
});
|
|
5860
|
+
}).filter(function (group) {
|
|
5861
|
+
return group.items.length;
|
|
5862
|
+
});
|
|
5863
|
+
console.log(filtered);
|
|
5864
|
+
this.filteredFuncs = filtered;
|
|
5865
|
+
},
|
|
5866
|
+
setActiveFunc: function setActiveFunc(item) {
|
|
5867
|
+
console.log(item);
|
|
5868
|
+
this.activeFunc = item;
|
|
5869
|
+
},
|
|
5870
|
+
onSelect: function onSelect(item) {
|
|
5871
|
+
this.$emit("select", item);
|
|
5872
|
+
}
|
|
5873
|
+
},
|
|
5874
|
+
render: function render(h) {
|
|
5875
|
+
var _this = this;
|
|
5876
|
+
var Param = {
|
|
5877
|
+
attrs: Object.assign({}, this.$attrs),
|
|
5878
|
+
on: Object.assign({}, this.$listeners),
|
|
5879
|
+
slots: this.$slots,
|
|
5880
|
+
scopedSlots: this.$scopedSlots
|
|
5881
|
+
};
|
|
5882
|
+
return h("div", {
|
|
5883
|
+
"class": ["FormulaEditor-FuncList", this.className]
|
|
5884
|
+
}, [h("div", {
|
|
5885
|
+
"class": "FormulaEditor-panel"
|
|
5886
|
+
}, [h("div", {
|
|
5887
|
+
"class": "FormulaEditor-panel-header"
|
|
5888
|
+
}, ["\u51FD\u6570"]), h("div", {
|
|
5889
|
+
"class": "FormulaEditor-panel-body"
|
|
5890
|
+
}, [h("div", {
|
|
5891
|
+
"class": "FormulaEditor-FuncList-searchBox"
|
|
5892
|
+
}, [h("el-input", {
|
|
5893
|
+
"attrs": {
|
|
5894
|
+
"value": this.searchVal,
|
|
5895
|
+
"prefix-icon": "el-icon-search",
|
|
5896
|
+
"clearable": true
|
|
5897
|
+
},
|
|
5898
|
+
"on": {
|
|
5899
|
+
"input": this.handleSearch
|
|
5900
|
+
}
|
|
5901
|
+
})]), h("div", {
|
|
5902
|
+
"class": ["FormulaEditor-FuncList-body"]
|
|
5903
|
+
}, [h("el-collapse", {
|
|
5904
|
+
"attrs": {
|
|
5905
|
+
"accordion": true
|
|
5906
|
+
}
|
|
5907
|
+
}, [this.filteredFuncs.map(function (group) {
|
|
5908
|
+
return h("el-collapse-item", {
|
|
5909
|
+
"attrs": {
|
|
5910
|
+
"name": group.groupName,
|
|
5911
|
+
"title": group.groupName
|
|
5912
|
+
}
|
|
5913
|
+
}, [group.items.map(function (item) {
|
|
5914
|
+
return h("div", {
|
|
5915
|
+
"class": ["FormulaEditor-FuncList-item", {
|
|
5916
|
+
'is-active': item.name === (_this.activeFunc && _this.activeFunc.name)
|
|
5917
|
+
}],
|
|
5918
|
+
"on": {
|
|
5919
|
+
"mouseenter": function mouseenter() {
|
|
5920
|
+
return _this.setActiveFunc(item);
|
|
5921
|
+
},
|
|
5922
|
+
"click": function click() {
|
|
5923
|
+
return _this.onSelect(item);
|
|
5924
|
+
}
|
|
5925
|
+
},
|
|
5926
|
+
"key": item.name
|
|
5927
|
+
}, [item.name]);
|
|
5928
|
+
})]);
|
|
5929
|
+
})])])])]), h("div", {
|
|
5930
|
+
"class": "FormulaEditor-panel"
|
|
5931
|
+
}, [h("div", {
|
|
5932
|
+
"class": "FormulaEditor-panel-header"
|
|
5933
|
+
}, [this.activeFunc && this.activeFunc.name || '']), h("div", {
|
|
5934
|
+
"class": "FormulaEditor-panel-body"
|
|
5935
|
+
}, [this.activeFunc ? h("div", {
|
|
5936
|
+
"class": ["FormulaEditor-FuncList-doc"]
|
|
5937
|
+
}, [h("pre", [h("code", [this.activeFunc.example])]), h("div", {
|
|
5938
|
+
"class": "FormulaEditor-FuncList-doc-desc"
|
|
5939
|
+
}, [this.activeFunc.description])]) : h("div")])])]);
|
|
5940
|
+
}
|
|
5941
|
+
});
|
|
5942
|
+
// EXTERNAL MODULE: external "element-ui/lib/tree"
|
|
5943
|
+
var tree_ = __webpack_require__(51);
|
|
5944
|
+
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
|
|
5945
|
+
|
|
5946
|
+
// EXTERNAL MODULE: external "element-ui/lib/badge"
|
|
5947
|
+
var badge_ = __webpack_require__(52);
|
|
5948
|
+
var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
5949
|
+
|
|
5950
|
+
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/helper"
|
|
5951
|
+
var helper_ = __webpack_require__(53);
|
|
5952
|
+
|
|
5953
|
+
// CONCATENATED MODULE: ./src/components/formula/src/variableList.js
|
|
5954
|
+
|
|
5955
|
+
|
|
5956
|
+
|
|
5957
|
+
|
|
5958
|
+
|
|
5959
|
+
|
|
5960
|
+
|
|
5961
|
+
|
|
5962
|
+
/* harmony default export */ var variableList = ({
|
|
5963
|
+
name: "VariableList",
|
|
5964
|
+
componentName: "VariableList",
|
|
5965
|
+
components: {
|
|
5966
|
+
elInput: input_default.a,
|
|
5967
|
+
elTabs: tabs_default.a,
|
|
5968
|
+
elTabPane: tab_pane_default.a,
|
|
5969
|
+
elTree: tree_default.a,
|
|
5970
|
+
elBadge: badge_default.a
|
|
5971
|
+
},
|
|
5972
|
+
props: {
|
|
5973
|
+
className: String,
|
|
5974
|
+
itemClassName: String,
|
|
5975
|
+
classPrefix: {
|
|
5976
|
+
type: String,
|
|
5977
|
+
default: "FormulaEditor-VariableList"
|
|
5978
|
+
},
|
|
5979
|
+
selectMode: String,
|
|
5980
|
+
data: Array,
|
|
5981
|
+
itemRender: Function,
|
|
5982
|
+
selfVariableName: String
|
|
5983
|
+
},
|
|
5984
|
+
data: function data() {
|
|
5985
|
+
return {
|
|
5986
|
+
searchVal: null,
|
|
5987
|
+
filterVars: []
|
|
5988
|
+
};
|
|
5989
|
+
},
|
|
5990
|
+
created: function created() {
|
|
5991
|
+
this.filterVars = this.data || [];
|
|
5992
|
+
},
|
|
5993
|
+
methods: {
|
|
5994
|
+
handleSearch: function handleSearch(val) {
|
|
5995
|
+
this.searchVal = val;
|
|
5996
|
+
var filtered = Object(helper_["findTree"])(this.data, function (i) {
|
|
5997
|
+
return ~i.label.indexOf(val);
|
|
5998
|
+
});
|
|
5999
|
+
this.filterVars = !val ? this.data : filtered ? [filtered] : [];
|
|
6000
|
+
},
|
|
6001
|
+
onSelect: function onSelect(item) {
|
|
6002
|
+
this.$emit("select", item);
|
|
6003
|
+
},
|
|
6004
|
+
handleTree: function handleTree(data, node) {
|
|
6005
|
+
this.onSelect(data);
|
|
6006
|
+
},
|
|
6007
|
+
renderSearchBox: function renderSearchBox(h) {
|
|
6008
|
+
return h("div", {
|
|
6009
|
+
"class": "FormulaEditor-VariableList-searchBox"
|
|
6010
|
+
}, [h("el-input", {
|
|
6011
|
+
"attrs": {
|
|
6012
|
+
"value": this.searchVal,
|
|
6013
|
+
"prefix-icon": "el-icon-search",
|
|
6014
|
+
"clearable": true
|
|
6015
|
+
},
|
|
6016
|
+
"on": {
|
|
6017
|
+
"input": this.handleSearch
|
|
6018
|
+
}
|
|
6019
|
+
})]);
|
|
6020
|
+
},
|
|
6021
|
+
renderItem: function renderItem(h, _ref) {
|
|
6022
|
+
var node = _ref.node,
|
|
6023
|
+
data = _ref.data,
|
|
6024
|
+
store = _ref.store;
|
|
6025
|
+
if (typeof this.itemRender === 'function') {
|
|
6026
|
+
return this.itemRender.call(this, h, {
|
|
6027
|
+
node: node,
|
|
6028
|
+
data: data,
|
|
6029
|
+
store: store
|
|
6030
|
+
});
|
|
6031
|
+
}
|
|
6032
|
+
return h("span", {
|
|
6033
|
+
"class": [this.classPrefix + "-item", this.itemClassName]
|
|
6034
|
+
}, [data.label && this.selfVariableName && data.value === this.selfVariableName && h("el-badge", {
|
|
6035
|
+
"attrs": {
|
|
6036
|
+
"value": "self"
|
|
6037
|
+
}
|
|
6038
|
+
}, [h("label", [data.label])]), data.label && (!this.selfVariableName || data.value !== this.selfVariableName) && h("label", [data.label]), data.tag ? h("span", {
|
|
6039
|
+
"class": this.classPrefix + "-item-tag"
|
|
6040
|
+
}, [data.tag]) : null]);
|
|
6041
|
+
},
|
|
6042
|
+
renderTab: function renderTab(h) {
|
|
6043
|
+
var _this = this;
|
|
6044
|
+
return h("el-tabs", {
|
|
6045
|
+
"class": [this.classPrefix + "-base " + this.classPrefix + "-tabs"]
|
|
6046
|
+
}, [this.filterVars.map(function (item, index) {
|
|
6047
|
+
return h("el-tab-pane", {
|
|
6048
|
+
"class": _this.classPrefix + "-tab",
|
|
6049
|
+
"key": index,
|
|
6050
|
+
"attrs": {
|
|
6051
|
+
"label": item.label
|
|
6052
|
+
}
|
|
6053
|
+
}, [h("VariableList", babel_helper_vue_jsx_merge_props_default()([{
|
|
6054
|
+
"attrs": {
|
|
6055
|
+
"classPrefix": _this.classPrefix + "-sub-",
|
|
6056
|
+
"className": _this.classPrefix + "-sub",
|
|
6057
|
+
"selectMode": item.selectMode,
|
|
6058
|
+
"data": item.children,
|
|
6059
|
+
"selfVariableName": _this.selfVariableName
|
|
6060
|
+
}
|
|
6061
|
+
}, {
|
|
6062
|
+
"on": {
|
|
6063
|
+
select: _this.onSelect
|
|
6064
|
+
}
|
|
6065
|
+
}]))]);
|
|
6066
|
+
})]);
|
|
6067
|
+
},
|
|
6068
|
+
renderTree: function renderTree(h) {
|
|
6069
|
+
return h("div", {
|
|
6070
|
+
"class": "FormulaEditor-VariableList-body"
|
|
6071
|
+
}, [this.renderSearchBox(h), h("el-tree", babel_helper_vue_jsx_merge_props_default()([{
|
|
6072
|
+
"class": [this.classPrefix + "-base", "is-scrollable"],
|
|
6073
|
+
"attrs": {
|
|
6074
|
+
"expand-on-click-node": false,
|
|
6075
|
+
"default-expand-all": true,
|
|
6076
|
+
"data": this.filterVars,
|
|
6077
|
+
"render-content": this.renderItem
|
|
6078
|
+
}
|
|
6079
|
+
}, {
|
|
6080
|
+
"on": {
|
|
6081
|
+
"node-click": this.handleTree
|
|
6082
|
+
}
|
|
6083
|
+
}]))]);
|
|
6084
|
+
},
|
|
6085
|
+
renderOption: function renderOption(h, _ref2) {
|
|
6086
|
+
var _this2 = this;
|
|
6087
|
+
var data = _ref2.data;
|
|
6088
|
+
if (Array.isArray(data.children)) {
|
|
6089
|
+
return h("div", {
|
|
6090
|
+
"class": "GroupedSelection-group"
|
|
6091
|
+
}, [h("div", {
|
|
6092
|
+
"class": "GroupedSelection-itemLabel"
|
|
6093
|
+
}, [this.renderItem(h, {
|
|
6094
|
+
data: data
|
|
6095
|
+
})]), h("div", {
|
|
6096
|
+
"class": "GroupedSelection-items"
|
|
6097
|
+
}, [data.children && data.children.map(function (child) {
|
|
6098
|
+
return _this2.renderOption(h, {
|
|
6099
|
+
data: child
|
|
6100
|
+
});
|
|
6101
|
+
})])]);
|
|
6102
|
+
}
|
|
6103
|
+
return h("div", {
|
|
6104
|
+
"class": ["GroupedSelection-item"],
|
|
6105
|
+
"on": {
|
|
6106
|
+
"click": function click() {
|
|
6107
|
+
return _this2.onSelect(data);
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
}, [h("div", {
|
|
6111
|
+
"class": "GroupedSelection-itemLabel"
|
|
6112
|
+
}, [this.renderItem(h, {
|
|
6113
|
+
data: data
|
|
6114
|
+
})])]);
|
|
6115
|
+
},
|
|
6116
|
+
renderContent: function renderContent(h) {
|
|
6117
|
+
var _this3 = this;
|
|
6118
|
+
if (this.selectMode === 'tree') {
|
|
6119
|
+
return this.renderTree(h);
|
|
6120
|
+
}
|
|
6121
|
+
return h("div", {
|
|
6122
|
+
"class": "FormulaEditor-VariableList-body"
|
|
6123
|
+
}, [this.renderSearchBox(h), h("div", {
|
|
6124
|
+
"class": ["GroupedSelection", this.classPrefix + "-base", 'is-scrollable']
|
|
6125
|
+
}, [this.filterVars.map(function (item) {
|
|
6126
|
+
return _this3.renderOption(h, {
|
|
6127
|
+
data: item
|
|
6128
|
+
});
|
|
6129
|
+
})])]);
|
|
6130
|
+
}
|
|
6131
|
+
},
|
|
6132
|
+
render: function render(h) {
|
|
6133
|
+
return h("div", {
|
|
6134
|
+
"class": ["FormulaEditor-VariableList", this.selectMode && "FormulaEditor-VariableList-" + this.selectMode, this.className]
|
|
6135
|
+
}, [this.selectMode === 'tabs' ? this.renderTab(h) : this.renderContent(h)]);
|
|
6136
|
+
}
|
|
6137
|
+
});
|
|
6138
|
+
// CONCATENATED MODULE: ./src/components/formula/src/plugin.js
|
|
6139
|
+
/**
|
|
6140
|
+
* @file 扩展 codemirror
|
|
6141
|
+
*/
|
|
6142
|
+
|
|
6143
|
+
/**
|
|
6144
|
+
* 遍历树
|
|
6145
|
+
* @param tree
|
|
6146
|
+
* @param iterator
|
|
6147
|
+
*/
|
|
6148
|
+
function eachTree(tree, iterator, level, paths) {
|
|
6149
|
+
if (level === void 0) {
|
|
6150
|
+
level = 1;
|
|
6151
|
+
}
|
|
6152
|
+
if (paths === void 0) {
|
|
6153
|
+
paths = [];
|
|
6154
|
+
}
|
|
6155
|
+
tree.map(function (item, index) {
|
|
6156
|
+
var currentPath = paths.concat(item);
|
|
6157
|
+
iterator(item, index, level, currentPath);
|
|
6158
|
+
if (item.children && item.children.splice) {
|
|
6159
|
+
eachTree(item.children, iterator, level + 1, currentPath);
|
|
6160
|
+
}
|
|
6161
|
+
});
|
|
6162
|
+
}
|
|
6163
|
+
function replaceStrByIndex(str, idx, key, replaceKey) {
|
|
6164
|
+
var from = str.slice(0, idx);
|
|
6165
|
+
var left = str.slice(idx);
|
|
6166
|
+
return from + left.replace(key, replaceKey);
|
|
6167
|
+
}
|
|
6168
|
+
function getRegExpByMode(evalMode, key) {
|
|
6169
|
+
var reg = evalMode ? "\\b" + key + "\\b" : "\\$\\{[^\\{\\}]*\\b" + key + "\\b[^\\{\\}]*\\}";
|
|
6170
|
+
return new RegExp(reg);
|
|
6171
|
+
}
|
|
6172
|
+
function plugin_editorFactory(dom, cm, props) {
|
|
6173
|
+
registerLaunguageMode(cm);
|
|
6174
|
+
return cm(dom, {
|
|
6175
|
+
value: props && props.value || '',
|
|
6176
|
+
autofocus: true,
|
|
6177
|
+
mode: props && props.evalMode ? 'text/formula' : 'text/formula-template'
|
|
6178
|
+
});
|
|
6179
|
+
}
|
|
6180
|
+
var FormulaPlugin = /*#__PURE__*/function () {
|
|
6181
|
+
function FormulaPlugin(editor, cm, getProps) {
|
|
6182
|
+
this.editor = editor;
|
|
6183
|
+
this.cm = cm;
|
|
6184
|
+
this.getProps = getProps;
|
|
6185
|
+
// editor.on('change', this.autoMarkText);
|
|
6186
|
+
this.autoMarkText();
|
|
6187
|
+
}
|
|
6188
|
+
var _proto = FormulaPlugin.prototype;
|
|
6189
|
+
_proto.autoMarkText = function autoMarkText() {
|
|
6190
|
+
var _this$getProps = this.getProps(),
|
|
6191
|
+
functions = _this$getProps.functions,
|
|
6192
|
+
variables = _this$getProps.variables,
|
|
6193
|
+
value = _this$getProps.value;
|
|
6194
|
+
if (value) {
|
|
6195
|
+
// todo functions 也需要自动替换
|
|
6196
|
+
this.autoMark(variables);
|
|
6197
|
+
this.focus(value);
|
|
6198
|
+
}
|
|
6199
|
+
}
|
|
6200
|
+
// 计算 `${`、`}` 括号的位置,如 ${a}+${b}, 结果是 [ { from: 0, to: 3 }, { from: 5, to: 8 } ]
|
|
6201
|
+
;
|
|
6202
|
+
_proto.computedBracesPosition = function computedBracesPosition(exp) {
|
|
6203
|
+
var braces = [];
|
|
6204
|
+
exp === null || exp === void 0 ? void 0 : exp.replace(/\$\{/g, function (val, offset) {
|
|
6205
|
+
if (val) {
|
|
6206
|
+
var charArr = exp.slice(offset + val.length).split('');
|
|
6207
|
+
var cache = ['${'];
|
|
6208
|
+
for (var index = 0; index < charArr.length; index++) {
|
|
6209
|
+
var char = charArr[index];
|
|
6210
|
+
if (char === '$' && charArr[index + 1] === '{') {
|
|
6211
|
+
cache.push('${');
|
|
6212
|
+
} else if (char === '}') {
|
|
6213
|
+
cache.pop();
|
|
6214
|
+
}
|
|
6215
|
+
if (cache.length === 0) {
|
|
6216
|
+
braces.push({
|
|
6217
|
+
begin: offset + 2,
|
|
6218
|
+
end: index + offset + 2
|
|
6219
|
+
});
|
|
6220
|
+
break;
|
|
6221
|
+
}
|
|
6222
|
+
}
|
|
6223
|
+
}
|
|
6224
|
+
return '';
|
|
6225
|
+
});
|
|
6226
|
+
return braces;
|
|
6227
|
+
}
|
|
6228
|
+
// 判断字符串是否在 ${} 中
|
|
6229
|
+
;
|
|
6230
|
+
_proto.checkStrIsInBraces = function checkStrIsInBraces(_ref, braces) {
|
|
6231
|
+
var from = _ref[0],
|
|
6232
|
+
to = _ref[1];
|
|
6233
|
+
var isIn = false;
|
|
6234
|
+
if (braces.length) {
|
|
6235
|
+
for (var index = 0; index < braces.length; index++) {
|
|
6236
|
+
var brace = braces[index];
|
|
6237
|
+
if (from >= brace.begin && to <= brace.end) {
|
|
6238
|
+
isIn = true;
|
|
6239
|
+
break;
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6242
|
+
}
|
|
6243
|
+
return isIn;
|
|
6244
|
+
};
|
|
6245
|
+
_proto.insertBraces = function insertBraces(originFrom, originTo) {
|
|
6246
|
+
var str = this.editor.getValue();
|
|
6247
|
+
var braces = this.computedBracesPosition(str);
|
|
6248
|
+
if (!this.checkStrIsInBraces([originFrom.ch, originTo.ch], braces)) {
|
|
6249
|
+
this.editor.setCursor({
|
|
6250
|
+
line: originFrom.line,
|
|
6251
|
+
ch: originFrom.ch
|
|
6252
|
+
});
|
|
6253
|
+
this.editor.replaceSelection('${');
|
|
6254
|
+
this.editor.setCursor({
|
|
6255
|
+
line: originTo.line,
|
|
6256
|
+
ch: originTo.ch + 2
|
|
6257
|
+
});
|
|
6258
|
+
this.editor.replaceSelection('}');
|
|
6259
|
+
}
|
|
6260
|
+
};
|
|
6261
|
+
_proto.insertContent = function insertContent(value, type) {
|
|
6262
|
+
var from = this.editor.getCursor();
|
|
6263
|
+
var _this$getProps2 = this.getProps(),
|
|
6264
|
+
evalMode = _this$getProps2.evalMode;
|
|
6265
|
+
if (type === 'variable') {
|
|
6266
|
+
this.editor.replaceSelection(value.key);
|
|
6267
|
+
var to = this.editor.getCursor();
|
|
6268
|
+
this.markText(from, to, value.name, 'cm-field');
|
|
6269
|
+
!evalMode && this.insertBraces(from, to);
|
|
6270
|
+
} else if (type === 'func') {
|
|
6271
|
+
this.editor.replaceSelection(value + "()");
|
|
6272
|
+
var _to = this.editor.getCursor();
|
|
6273
|
+
this.markText(from, {
|
|
6274
|
+
line: _to.line,
|
|
6275
|
+
ch: _to.ch - 2
|
|
6276
|
+
}, value, 'cm-func');
|
|
6277
|
+
this.editor.setCursor({
|
|
6278
|
+
line: _to.line,
|
|
6279
|
+
ch: _to.ch - 1
|
|
6280
|
+
});
|
|
6281
|
+
if (!evalMode) {
|
|
6282
|
+
this.insertBraces(from, _to);
|
|
6283
|
+
this.editor.setCursor({
|
|
6284
|
+
line: _to.line,
|
|
6285
|
+
ch: _to.ch + 1
|
|
6286
|
+
});
|
|
6287
|
+
}
|
|
6288
|
+
} else if (typeof value === 'string') {
|
|
6289
|
+
this.editor.replaceSelection(value);
|
|
6290
|
+
}
|
|
6291
|
+
this.editor.focus();
|
|
6292
|
+
};
|
|
6293
|
+
_proto.markText = function markText(from, to, label, className) {
|
|
6294
|
+
if (className === void 0) {
|
|
6295
|
+
className = 'cm-func';
|
|
6296
|
+
}
|
|
6297
|
+
var text = document.createElement('span');
|
|
6298
|
+
text.className = className;
|
|
6299
|
+
text.innerText = label;
|
|
6300
|
+
this.editor.markText(from, to, {
|
|
6301
|
+
atomic: true,
|
|
6302
|
+
replacedWith: text
|
|
6303
|
+
});
|
|
6304
|
+
};
|
|
6305
|
+
_proto.autoMark = function autoMark(variables) {
|
|
6306
|
+
var _this = this;
|
|
6307
|
+
if (!Array.isArray(variables) || !variables.length) {
|
|
6308
|
+
return;
|
|
6309
|
+
}
|
|
6310
|
+
var varMap = {};
|
|
6311
|
+
eachTree(variables, function (item) {
|
|
6312
|
+
if (item.value) {
|
|
6313
|
+
varMap[item.value] = item.label;
|
|
6314
|
+
}
|
|
6315
|
+
});
|
|
6316
|
+
var vars = Object.keys(varMap).sort(function (a, b) {
|
|
6317
|
+
return b.length - a.length;
|
|
6318
|
+
});
|
|
6319
|
+
var editor = this.editor;
|
|
6320
|
+
var lines = editor.lineCount();
|
|
6321
|
+
var _this$getProps3 = this.getProps(),
|
|
6322
|
+
_this$getProps3$evalM = _this$getProps3.evalMode,
|
|
6323
|
+
evalMode = _this$getProps3$evalM === void 0 ? true : _this$getProps3$evalM;
|
|
6324
|
+
var _loop = function _loop(line) {
|
|
6325
|
+
var content = editor.getLine(line);
|
|
6326
|
+
// 标记方法调用
|
|
6327
|
+
content.replace(/([A-Z]+)\s*\(/g, function (_, func, pos) {
|
|
6328
|
+
_this.markText({
|
|
6329
|
+
line: line,
|
|
6330
|
+
ch: pos
|
|
6331
|
+
}, {
|
|
6332
|
+
line: line,
|
|
6333
|
+
ch: pos + func.length
|
|
6334
|
+
}, func, 'cm-func');
|
|
6335
|
+
return _;
|
|
6336
|
+
});
|
|
6337
|
+
var REPLACE_KEY = 'AMIS_FORMULA_REPLACE_KEY';
|
|
6338
|
+
// 标记变量
|
|
6339
|
+
vars.forEach(function (v) {
|
|
6340
|
+
var from = 0;
|
|
6341
|
+
var idx = -1;
|
|
6342
|
+
while (~(idx = content.indexOf(v, from))) {
|
|
6343
|
+
var encode = replaceStrByIndex(content, idx, v, REPLACE_KEY);
|
|
6344
|
+
var reg = getRegExpByMode(evalMode, REPLACE_KEY);
|
|
6345
|
+
if (reg.test(encode)) {
|
|
6346
|
+
_this.markText({
|
|
6347
|
+
line: line,
|
|
6348
|
+
ch: idx
|
|
6349
|
+
}, {
|
|
6350
|
+
line: line,
|
|
6351
|
+
ch: idx + v.length
|
|
6352
|
+
}, varMap[v], 'cm-field');
|
|
6353
|
+
}
|
|
6354
|
+
from = idx + v.length;
|
|
6355
|
+
}
|
|
6356
|
+
});
|
|
6357
|
+
};
|
|
6358
|
+
for (var line = 0; line < lines; line++) {
|
|
6359
|
+
_loop(line);
|
|
6360
|
+
}
|
|
6361
|
+
}
|
|
6362
|
+
// 焦点放在最后
|
|
6363
|
+
;
|
|
6364
|
+
_proto.focus = function focus(value) {
|
|
6365
|
+
this.editor.setCursor({
|
|
6366
|
+
line: 0,
|
|
6367
|
+
ch: (value === null || value === void 0 ? void 0 : value.length) || 0
|
|
6368
|
+
});
|
|
6369
|
+
};
|
|
6370
|
+
_proto.dispose = function dispose() {};
|
|
6371
|
+
_proto.validate = function validate() {};
|
|
6372
|
+
return FormulaPlugin;
|
|
6373
|
+
}();
|
|
6374
|
+
var modeRegisted = false;
|
|
6375
|
+
function registerLaunguageMode(cm) {
|
|
6376
|
+
if (modeRegisted) {
|
|
6377
|
+
return;
|
|
6378
|
+
}
|
|
6379
|
+
modeRegisted = true;
|
|
6380
|
+
// 对应 evalMode
|
|
6381
|
+
cm.defineMode('formula', function (config, parserConfig) {
|
|
6382
|
+
var formula = cm.getMode(config, 'javascript');
|
|
6383
|
+
if (!parserConfig || !parserConfig.base) return formula;
|
|
6384
|
+
debugger;
|
|
6385
|
+
return cm.multiplexingMode(cm.getMode(config, parserConfig.base), {
|
|
6386
|
+
open: '${',
|
|
6387
|
+
close: '}',
|
|
6388
|
+
mode: formula
|
|
6389
|
+
});
|
|
6390
|
+
});
|
|
6391
|
+
cm.defineMIME('text/formula', {
|
|
6392
|
+
name: 'formula'
|
|
6393
|
+
});
|
|
6394
|
+
cm.defineMIME('text/formula-template', {
|
|
6395
|
+
name: 'formula',
|
|
6396
|
+
base: 'htmlmixed'
|
|
6397
|
+
});
|
|
6398
|
+
}
|
|
6399
|
+
// CONCATENATED MODULE: ./src/utils/formula/doc.js
|
|
6400
|
+
/**
|
|
6401
|
+
* 公式文档 请运行 `npm run genDoc` 自动生成
|
|
6402
|
+
*/
|
|
6403
|
+
/* harmony default export */ var doc = ([{
|
|
6404
|
+
name: "IF",
|
|
6405
|
+
description: "示例:IF(A, B, C)\n\n如果满足条件A,则返回B,否则返回C,支持多层嵌套IF函数。\n\n也可以用表达式如:A ? B : C",
|
|
6406
|
+
example: "IF(condition, consequent, alternate)",
|
|
6407
|
+
params: [{
|
|
6408
|
+
type: "expression",
|
|
6409
|
+
name: "condition",
|
|
6410
|
+
description: "条件表达式."
|
|
6411
|
+
}, {
|
|
6412
|
+
type: "any",
|
|
6413
|
+
name: "consequent",
|
|
6414
|
+
description: "条件判断通过的返回结果"
|
|
6415
|
+
}, {
|
|
6416
|
+
type: "any",
|
|
6417
|
+
name: "alternate",
|
|
6418
|
+
description: "条件判断不通过的返回结果"
|
|
6419
|
+
}],
|
|
6420
|
+
returns: {
|
|
6421
|
+
type: "any",
|
|
6422
|
+
description: "根据条件返回不同的结果"
|
|
6423
|
+
},
|
|
6424
|
+
namespace: "逻辑函数"
|
|
6425
|
+
}, {
|
|
6426
|
+
name: "AND",
|
|
6427
|
+
description: "条件全部符合,返回 true,否则返回 false\n\n示例:AND(语文成绩>80, 数学成绩>80)\n\n语文成绩和数学成绩都大于 80,则返回 true,否则返回 false\n\n也可以直接用表达式如:语文成绩>80 && 数学成绩>80",
|
|
6428
|
+
example: "AND(expression1, expression2, ...expressionN)",
|
|
6429
|
+
params: [{
|
|
6430
|
+
type: "...expression",
|
|
6431
|
+
name: "conditions",
|
|
6432
|
+
description: "条件表达式."
|
|
6433
|
+
}],
|
|
6434
|
+
returns: {
|
|
6435
|
+
type: "boolean",
|
|
6436
|
+
description: null
|
|
6437
|
+
},
|
|
6438
|
+
namespace: "逻辑函数"
|
|
6439
|
+
}, {
|
|
6440
|
+
name: "OR",
|
|
6441
|
+
description: "条件任意一个满足条件,返回 true,否则返回 false\n\n示例:OR(语文成绩>80, 数学成绩>80)\n\n语文成绩和数学成绩任意一个大于 80,则返回 true,否则返回 false\n\n也可以直接用表达式如:语文成绩>80 || 数学成绩>80",
|
|
6442
|
+
example: "OR(expression1, expression2, ...expressionN)",
|
|
6443
|
+
params: [{
|
|
6444
|
+
type: "...expression",
|
|
6445
|
+
name: "conditions",
|
|
6446
|
+
description: "条件表达式."
|
|
6447
|
+
}],
|
|
6448
|
+
returns: {
|
|
6449
|
+
type: "boolean",
|
|
6450
|
+
description: null
|
|
6451
|
+
},
|
|
6452
|
+
namespace: "逻辑函数"
|
|
6453
|
+
}, {
|
|
6454
|
+
name: "XOR",
|
|
6455
|
+
description: "异或处理,多个表达式组中存在奇数个真时认为真。",
|
|
6456
|
+
example: "XOR(condition1, condition2)",
|
|
6457
|
+
params: [{
|
|
6458
|
+
type: "expression",
|
|
6459
|
+
name: "condition1",
|
|
6460
|
+
description: "条件表达式1"
|
|
6461
|
+
}, {
|
|
6462
|
+
type: "expression",
|
|
6463
|
+
name: "condition2",
|
|
6464
|
+
description: "条件表达式2"
|
|
6465
|
+
}],
|
|
6466
|
+
returns: {
|
|
6467
|
+
type: "boolean",
|
|
6468
|
+
description: null
|
|
6469
|
+
},
|
|
6470
|
+
namespace: "逻辑函数"
|
|
6471
|
+
}, {
|
|
6472
|
+
name: "IFS",
|
|
6473
|
+
description: "判断函数集合,相当于多个 else if 合并成一个。\n\n示例:IFS(语文成绩 > 80, \"优秀\", 语文成绩 > 60, \"良\", \"继续努力\")\n\n如果语文成绩大于 80,则返回优秀,否则判断大于 60 分,则返回良,否则返回继续努力。",
|
|
6474
|
+
example: "IFS(condition1, result1, condition2, result2,...conditionN, resultN)",
|
|
6475
|
+
params: [{
|
|
6476
|
+
type: "...any",
|
|
6477
|
+
name: "args",
|
|
6478
|
+
description: "条件,返回值集合"
|
|
6479
|
+
}],
|
|
6480
|
+
returns: {
|
|
6481
|
+
type: "any",
|
|
6482
|
+
description: "第一个满足条件的结果,没有命中的返回 false。"
|
|
6483
|
+
},
|
|
6484
|
+
namespace: "逻辑函数"
|
|
6485
|
+
}, {
|
|
6486
|
+
name: "ABS",
|
|
6487
|
+
description: "返回传入数字的绝对值",
|
|
6488
|
+
example: "ABS(num)",
|
|
6489
|
+
params: [{
|
|
6490
|
+
type: "number",
|
|
6491
|
+
name: "num",
|
|
6492
|
+
description: "数值"
|
|
6493
|
+
}],
|
|
6494
|
+
returns: {
|
|
6495
|
+
type: "number",
|
|
6496
|
+
description: "传入数值的绝对值"
|
|
6497
|
+
},
|
|
6498
|
+
namespace: "数学函数"
|
|
6499
|
+
}, {
|
|
6500
|
+
name: "MAX",
|
|
6501
|
+
description: "获取最大值,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6502
|
+
example: "MAX(num1, num2, ...numN)",
|
|
6503
|
+
params: [{
|
|
6504
|
+
type: "...number",
|
|
6505
|
+
name: "num",
|
|
6506
|
+
description: "数值"
|
|
6507
|
+
}],
|
|
6508
|
+
returns: {
|
|
6509
|
+
type: "number",
|
|
6510
|
+
description: "所有传入值中最大的那个"
|
|
6511
|
+
},
|
|
6512
|
+
namespace: "数学函数"
|
|
6513
|
+
}, {
|
|
6514
|
+
name: "MIN",
|
|
6515
|
+
description: "获取最小值,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6516
|
+
example: "MIN(num1, num2, ...numN)",
|
|
6517
|
+
params: [{
|
|
6518
|
+
type: "...number",
|
|
6519
|
+
name: "num",
|
|
6520
|
+
description: "数值"
|
|
6521
|
+
}],
|
|
6522
|
+
returns: {
|
|
6523
|
+
type: "number",
|
|
6524
|
+
description: "所有传入值中最小的那个"
|
|
6525
|
+
},
|
|
6526
|
+
namespace: "数学函数"
|
|
6527
|
+
}, {
|
|
6528
|
+
name: "SUM",
|
|
6529
|
+
description: "求和,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6530
|
+
example: "SUM(num1, num2, ...numN)",
|
|
6531
|
+
params: [{
|
|
6532
|
+
type: "...number",
|
|
6533
|
+
name: "num",
|
|
6534
|
+
description: "数值"
|
|
6535
|
+
}],
|
|
6536
|
+
returns: {
|
|
6537
|
+
type: "number",
|
|
6538
|
+
description: "所有传入数值的总和"
|
|
6539
|
+
},
|
|
6540
|
+
namespace: "数学函数"
|
|
6541
|
+
}, {
|
|
6542
|
+
name: "INT",
|
|
6543
|
+
description: "将数值向下取整为最接近的整数",
|
|
6544
|
+
example: "INT(num)",
|
|
6545
|
+
params: [{
|
|
6546
|
+
type: "number",
|
|
6547
|
+
name: "num",
|
|
6548
|
+
description: "数值"
|
|
6549
|
+
}],
|
|
6550
|
+
returns: {
|
|
6551
|
+
type: "number",
|
|
6552
|
+
description: "数值对应的整形"
|
|
6553
|
+
},
|
|
6554
|
+
namespace: "数学函数"
|
|
6555
|
+
}, {
|
|
6556
|
+
name: "MOD",
|
|
6557
|
+
description: "返回两数相除的余数,参数 number 是被除数,divisor 是除数",
|
|
6558
|
+
example: "MOD(num, divisor)",
|
|
6559
|
+
params: [{
|
|
6560
|
+
type: "number",
|
|
6561
|
+
name: "num",
|
|
6562
|
+
description: "被除数"
|
|
6563
|
+
}, {
|
|
6564
|
+
type: "number",
|
|
6565
|
+
name: "divisor",
|
|
6566
|
+
description: "除数"
|
|
6567
|
+
}],
|
|
6568
|
+
returns: {
|
|
6569
|
+
type: "number",
|
|
6570
|
+
description: "两数相除的余数"
|
|
6571
|
+
},
|
|
6572
|
+
namespace: "数学函数"
|
|
6573
|
+
}, {
|
|
6574
|
+
name: "PI",
|
|
6575
|
+
description: "圆周率 3.1415...",
|
|
6576
|
+
example: "PI()",
|
|
6577
|
+
params: [],
|
|
6578
|
+
returns: {
|
|
6579
|
+
type: "number",
|
|
6580
|
+
description: "圆周率数值"
|
|
6581
|
+
},
|
|
6582
|
+
namespace: "数学函数"
|
|
6583
|
+
}, {
|
|
6584
|
+
name: "ROUND",
|
|
6585
|
+
description: "将数字四舍五入到指定的位数,可以设置小数位。",
|
|
6586
|
+
example: "ROUND(num[, numDigits = 2])",
|
|
6587
|
+
params: [{
|
|
6588
|
+
type: "number",
|
|
6589
|
+
name: "num",
|
|
6590
|
+
description: "要处理的数字"
|
|
6591
|
+
}, {
|
|
6592
|
+
type: "number",
|
|
6593
|
+
name: "numDigits",
|
|
6594
|
+
description: "小数位数"
|
|
6595
|
+
}],
|
|
6596
|
+
returns: {
|
|
6597
|
+
type: "number",
|
|
6598
|
+
description: "传入数值四舍五入后的结果"
|
|
6599
|
+
},
|
|
6600
|
+
namespace: "数学函数"
|
|
6601
|
+
}, {
|
|
6602
|
+
name: "FLOOR",
|
|
6603
|
+
description: "将数字向下取整到指定的位数,可以设置小数位。",
|
|
6604
|
+
example: "FLOOR(num[, numDigits=2])",
|
|
6605
|
+
params: [{
|
|
6606
|
+
type: "number",
|
|
6607
|
+
name: "num",
|
|
6608
|
+
description: "要处理的数字"
|
|
6609
|
+
}, {
|
|
6610
|
+
type: "number",
|
|
6611
|
+
name: "numDigits",
|
|
6612
|
+
description: "小数位数"
|
|
6613
|
+
}],
|
|
6614
|
+
returns: {
|
|
6615
|
+
type: "number",
|
|
6616
|
+
description: "传入数值向下取整后的结果"
|
|
6617
|
+
},
|
|
6618
|
+
namespace: "数学函数"
|
|
6619
|
+
}, {
|
|
6620
|
+
name: "CEIL",
|
|
6621
|
+
description: "将数字向上取整到指定的位数,可以设置小数位。",
|
|
6622
|
+
example: "CEIL(num[, numDigits=2])",
|
|
6623
|
+
params: [{
|
|
6624
|
+
type: "number",
|
|
6625
|
+
name: "num",
|
|
6626
|
+
description: "要处理的数字"
|
|
6627
|
+
}, {
|
|
6628
|
+
type: "number",
|
|
6629
|
+
name: "numDigits",
|
|
6630
|
+
description: "小数位数"
|
|
6631
|
+
}],
|
|
6632
|
+
returns: {
|
|
6633
|
+
type: "number",
|
|
6634
|
+
description: "传入数值向上取整后的结果"
|
|
6635
|
+
},
|
|
6636
|
+
namespace: "数学函数"
|
|
6637
|
+
}, {
|
|
6638
|
+
name: "SQRT",
|
|
6639
|
+
description: "开平方,参数 number 为非负数",
|
|
6640
|
+
example: "SQRT(num)",
|
|
6641
|
+
params: [{
|
|
6642
|
+
type: "number",
|
|
6643
|
+
name: "num",
|
|
6644
|
+
description: "要处理的数字"
|
|
6645
|
+
}],
|
|
6646
|
+
returns: {
|
|
6647
|
+
type: "number",
|
|
6648
|
+
description: "开平方的结果"
|
|
6649
|
+
},
|
|
6650
|
+
namespace: "数学函数"
|
|
6651
|
+
}, {
|
|
6652
|
+
name: "AVG",
|
|
6653
|
+
description: "返回所有参数的平均值,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6654
|
+
example: "AVG(num1, num2, ...numN)",
|
|
6655
|
+
params: [{
|
|
6656
|
+
type: "...number",
|
|
6657
|
+
name: "num",
|
|
6658
|
+
description: "要处理的数字"
|
|
6659
|
+
}],
|
|
6660
|
+
returns: {
|
|
6661
|
+
type: "number",
|
|
6662
|
+
description: "所有数值的平均值"
|
|
6663
|
+
},
|
|
6664
|
+
namespace: "数学函数"
|
|
6665
|
+
}, {
|
|
6666
|
+
name: "DEVSQ",
|
|
6667
|
+
description: "返回数据点与数据均值点之差(数据偏差)的平方和,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6668
|
+
example: "DEVSQ(num1, num2, ...numN)",
|
|
6669
|
+
params: [{
|
|
6670
|
+
type: "...number",
|
|
6671
|
+
name: "num",
|
|
6672
|
+
description: "要处理的数字"
|
|
6673
|
+
}],
|
|
6674
|
+
returns: {
|
|
6675
|
+
type: "number",
|
|
6676
|
+
description: "所有数值的平均值"
|
|
6677
|
+
},
|
|
6678
|
+
namespace: "数学函数"
|
|
6679
|
+
}, {
|
|
6680
|
+
name: "AVEDEV",
|
|
6681
|
+
description: "数据点到其算术平均值的绝对偏差的平均值",
|
|
6682
|
+
example: "AVEDEV(num1, num2, ...numN)",
|
|
6683
|
+
params: [{
|
|
6684
|
+
type: "...number",
|
|
6685
|
+
name: "num",
|
|
6686
|
+
description: "要处理的数字"
|
|
6687
|
+
}],
|
|
6688
|
+
returns: {
|
|
6689
|
+
type: "number",
|
|
6690
|
+
description: "所有数值的平均值"
|
|
6691
|
+
},
|
|
6692
|
+
namespace: "数学函数"
|
|
6693
|
+
}, {
|
|
6694
|
+
name: "HARMEAN",
|
|
6695
|
+
description: "数据点的调和平均值,如果只有一个参数且是数组,则计算这个数组内的值",
|
|
6696
|
+
example: "HARMEAN(num1, num2, ...numN)",
|
|
6697
|
+
params: [{
|
|
6698
|
+
type: "...number",
|
|
6699
|
+
name: "num",
|
|
6700
|
+
description: "要处理的数字"
|
|
6701
|
+
}],
|
|
6702
|
+
returns: {
|
|
6703
|
+
type: "number",
|
|
6704
|
+
description: "所有数值的平均值"
|
|
6705
|
+
},
|
|
6706
|
+
namespace: "数学函数"
|
|
6707
|
+
}, {
|
|
6708
|
+
name: "LARGE",
|
|
6709
|
+
description: "数据集中第 k 个最大值",
|
|
6710
|
+
example: "LARGE(array, k)",
|
|
6711
|
+
params: [{
|
|
6712
|
+
type: "array",
|
|
6713
|
+
name: "nums",
|
|
6714
|
+
description: "要处理的数字"
|
|
6715
|
+
}, {
|
|
6716
|
+
type: "number",
|
|
6717
|
+
name: "k",
|
|
6718
|
+
description: "第几大"
|
|
6719
|
+
}],
|
|
6720
|
+
returns: {
|
|
6721
|
+
type: "number",
|
|
6722
|
+
description: "所有数值的平均值"
|
|
6723
|
+
},
|
|
6724
|
+
namespace: "数学函数"
|
|
6725
|
+
}, {
|
|
6726
|
+
name: "UPPERMONEY",
|
|
6727
|
+
description: "将数值转为中文大写金额",
|
|
6728
|
+
example: "UPPERMONEY(num)",
|
|
6729
|
+
params: [{
|
|
6730
|
+
type: "number",
|
|
6731
|
+
name: "num",
|
|
6732
|
+
description: "要处理的数字"
|
|
6733
|
+
}],
|
|
6734
|
+
returns: {
|
|
6735
|
+
type: "string",
|
|
6736
|
+
description: "数值中文大写字符"
|
|
6737
|
+
},
|
|
6738
|
+
namespace: "数学函数"
|
|
6739
|
+
}, {
|
|
6740
|
+
name: "RAND",
|
|
6741
|
+
description: "返回大于等于 0 且小于 1 的均匀分布随机实数。每一次触发计算都会变化。\n\n示例:`RAND()*100`\n\n返回 0-100 之间的随机数",
|
|
6742
|
+
example: "RAND()",
|
|
6743
|
+
params: [],
|
|
6744
|
+
returns: {
|
|
6745
|
+
type: "number",
|
|
6746
|
+
description: "随机数"
|
|
6747
|
+
},
|
|
6748
|
+
namespace: "数学函数"
|
|
6749
|
+
}, {
|
|
6750
|
+
name: "LAST",
|
|
6751
|
+
description: "取数据最后一个",
|
|
6752
|
+
example: "LAST(array)",
|
|
6753
|
+
params: [{
|
|
6754
|
+
type: "...number",
|
|
6755
|
+
name: "arr",
|
|
6756
|
+
description: "要处理的数组"
|
|
6757
|
+
}],
|
|
6758
|
+
returns: {
|
|
6759
|
+
type: "any",
|
|
6760
|
+
description: "最后一个值"
|
|
6761
|
+
},
|
|
6762
|
+
namespace: "数学函数"
|
|
6763
|
+
}, {
|
|
6764
|
+
name: "LEFT",
|
|
6765
|
+
description: "返回传入文本左侧的指定长度字符串。",
|
|
6766
|
+
example: "LEFT(text, len)",
|
|
6767
|
+
params: [{
|
|
6768
|
+
type: "string",
|
|
6769
|
+
name: "text",
|
|
6770
|
+
description: "要处理的文本"
|
|
6771
|
+
}, {
|
|
6772
|
+
type: "number",
|
|
6773
|
+
name: "len",
|
|
6774
|
+
description: "要处理的长度"
|
|
6775
|
+
}],
|
|
6776
|
+
returns: {
|
|
6777
|
+
type: "string",
|
|
6778
|
+
description: "对应字符串"
|
|
6779
|
+
},
|
|
6780
|
+
namespace: "文本函数"
|
|
6781
|
+
}, {
|
|
6782
|
+
name: "RIGHT",
|
|
6783
|
+
description: "返回传入文本右侧的指定长度字符串。",
|
|
6784
|
+
example: "RIGHT(text, len)",
|
|
6785
|
+
params: [{
|
|
6786
|
+
type: "string",
|
|
6787
|
+
name: "text",
|
|
6788
|
+
description: "要处理的文本"
|
|
6789
|
+
}, {
|
|
6790
|
+
type: "number",
|
|
6791
|
+
name: "len",
|
|
6792
|
+
description: "要处理的长度"
|
|
6793
|
+
}],
|
|
6794
|
+
returns: {
|
|
6795
|
+
type: "string",
|
|
6796
|
+
description: "对应字符串"
|
|
6797
|
+
},
|
|
6798
|
+
namespace: "文本函数"
|
|
6799
|
+
}, {
|
|
6800
|
+
name: "LEN",
|
|
6801
|
+
description: "计算文本的长度",
|
|
6802
|
+
example: "LEN(text)",
|
|
6803
|
+
params: [{
|
|
6804
|
+
type: "string",
|
|
6805
|
+
name: "text",
|
|
6806
|
+
description: "要处理的文本"
|
|
6807
|
+
}],
|
|
6808
|
+
returns: {
|
|
6809
|
+
type: "number",
|
|
6810
|
+
description: "长度"
|
|
6811
|
+
},
|
|
6812
|
+
namespace: "文本函数"
|
|
6813
|
+
}, {
|
|
6814
|
+
name: "LENGTH",
|
|
6815
|
+
description: "计算文本集合中所有文本的长度",
|
|
6816
|
+
example: "LENGTH(textArr)",
|
|
6817
|
+
params: [{
|
|
6818
|
+
type: "Array<string>",
|
|
6819
|
+
name: "textArr",
|
|
6820
|
+
description: "要处理的文本集合"
|
|
6821
|
+
}],
|
|
6822
|
+
returns: {
|
|
6823
|
+
type: "Array<number>",
|
|
6824
|
+
description: "长度集合"
|
|
6825
|
+
},
|
|
6826
|
+
namespace: "文本函数"
|
|
6827
|
+
}, {
|
|
6828
|
+
name: "ISEMPTY",
|
|
6829
|
+
description: "判断文本是否为空",
|
|
6830
|
+
example: "ISEMPTY(text)",
|
|
6831
|
+
params: [{
|
|
6832
|
+
type: "string",
|
|
6833
|
+
name: "text",
|
|
6834
|
+
description: "要处理的文本"
|
|
6835
|
+
}],
|
|
6836
|
+
returns: {
|
|
6837
|
+
type: "boolean",
|
|
6838
|
+
description: "判断结果"
|
|
6839
|
+
},
|
|
6840
|
+
namespace: "文本函数"
|
|
6841
|
+
}, {
|
|
6842
|
+
name: "CONCATENATE",
|
|
6843
|
+
description: "将多个传入值连接成文本",
|
|
6844
|
+
example: "CONCATENATE(text1, text2, ...textN)",
|
|
6845
|
+
params: [{
|
|
6846
|
+
type: "...string",
|
|
6847
|
+
name: "text",
|
|
6848
|
+
description: "文本集合"
|
|
6849
|
+
}],
|
|
6850
|
+
returns: {
|
|
6851
|
+
type: "string",
|
|
6852
|
+
description: "连接后的文本"
|
|
6853
|
+
},
|
|
6854
|
+
namespace: "文本函数"
|
|
6855
|
+
}, {
|
|
6856
|
+
name: "CHAR",
|
|
6857
|
+
description: "返回计算机字符集的数字代码所对应的字符。\n\n`CHAR(97)` 等价于 \"a\"",
|
|
6858
|
+
example: "CHAR(code)",
|
|
6859
|
+
params: [{
|
|
6860
|
+
type: "number",
|
|
6861
|
+
name: "code",
|
|
6862
|
+
description: "编码值"
|
|
6863
|
+
}],
|
|
6864
|
+
returns: {
|
|
6865
|
+
type: "string",
|
|
6866
|
+
description: "指定位置的字符"
|
|
6867
|
+
},
|
|
6868
|
+
namespace: "文本函数"
|
|
6869
|
+
}, {
|
|
6870
|
+
name: "LOWER",
|
|
6871
|
+
description: "将传入文本转成小写",
|
|
6872
|
+
example: "LOWER(text)",
|
|
6873
|
+
params: [{
|
|
6874
|
+
type: "string",
|
|
6875
|
+
name: "text",
|
|
6876
|
+
description: "文本"
|
|
6877
|
+
}],
|
|
6878
|
+
returns: {
|
|
6879
|
+
type: "string",
|
|
6880
|
+
description: "结果文本"
|
|
6881
|
+
},
|
|
6882
|
+
namespace: "文本函数"
|
|
6883
|
+
}, {
|
|
6884
|
+
name: "UPPER",
|
|
6885
|
+
description: "将传入文本转成大写",
|
|
6886
|
+
example: "UPPER(text)",
|
|
6887
|
+
params: [{
|
|
6888
|
+
type: "string",
|
|
6889
|
+
name: "text",
|
|
6890
|
+
description: "文本"
|
|
6891
|
+
}],
|
|
6892
|
+
returns: {
|
|
6893
|
+
type: "string",
|
|
6894
|
+
description: "结果文本"
|
|
6895
|
+
},
|
|
6896
|
+
namespace: "文本函数"
|
|
6897
|
+
}, {
|
|
6898
|
+
name: "UPPERFIRST",
|
|
6899
|
+
description: "将传入文本首字母转成大写",
|
|
6900
|
+
example: "UPPERFIRST(text)",
|
|
6901
|
+
params: [{
|
|
6902
|
+
type: "string",
|
|
6903
|
+
name: "text",
|
|
6904
|
+
description: "文本"
|
|
6905
|
+
}],
|
|
6906
|
+
returns: {
|
|
6907
|
+
type: "string",
|
|
6908
|
+
description: "结果文本"
|
|
6909
|
+
},
|
|
6910
|
+
namespace: "文本函数"
|
|
6911
|
+
}, {
|
|
6912
|
+
name: "PADSTART",
|
|
6913
|
+
description: "向前补齐文本长度\n\n示例 `PADSTART(\"6\", 2, \"0\")`\n\n返回 `06`",
|
|
6914
|
+
example: "PADSTART(text)",
|
|
6915
|
+
params: [{
|
|
6916
|
+
type: "string",
|
|
6917
|
+
name: "text",
|
|
6918
|
+
description: "文本"
|
|
6919
|
+
}, {
|
|
6920
|
+
type: "number",
|
|
6921
|
+
name: "num",
|
|
6922
|
+
description: "目标长度"
|
|
6923
|
+
}, {
|
|
6924
|
+
type: "string",
|
|
6925
|
+
name: "pad",
|
|
6926
|
+
description: "用于补齐的文本"
|
|
6927
|
+
}],
|
|
6928
|
+
returns: {
|
|
6929
|
+
type: "string",
|
|
6930
|
+
description: "结果文本"
|
|
6931
|
+
},
|
|
6932
|
+
namespace: "文本函数"
|
|
6933
|
+
}, {
|
|
6934
|
+
name: "CAPITALIZE",
|
|
6935
|
+
description: "将文本转成标题\n\n示例 `CAPITALIZE(\"star\")`\n\n返回 `Star`",
|
|
6936
|
+
example: "CAPITALIZE(text)",
|
|
6937
|
+
params: [{
|
|
6938
|
+
type: "string",
|
|
6939
|
+
name: "text",
|
|
6940
|
+
description: "文本"
|
|
6941
|
+
}],
|
|
6942
|
+
returns: {
|
|
6943
|
+
type: "string",
|
|
6944
|
+
description: "结果文本"
|
|
6945
|
+
},
|
|
6946
|
+
namespace: "文本函数"
|
|
6947
|
+
}, {
|
|
6948
|
+
name: "ESCAPE",
|
|
6949
|
+
description: "对文本进行 HTML 转义\n\n示例 `ESCAPE(\"<star>&\")`\n\n返回 `<start>&`",
|
|
6950
|
+
example: "ESCAPE(text)",
|
|
6951
|
+
params: [{
|
|
6952
|
+
type: "string",
|
|
6953
|
+
name: "text",
|
|
6954
|
+
description: "文本"
|
|
6955
|
+
}],
|
|
6956
|
+
returns: {
|
|
6957
|
+
type: "string",
|
|
6958
|
+
description: "结果文本"
|
|
6959
|
+
},
|
|
6960
|
+
namespace: "文本函数"
|
|
6961
|
+
}, {
|
|
6962
|
+
name: "TRUNCATE",
|
|
6963
|
+
description: "对文本长度进行截断\n\n示例 `TRUNCATE(\"amis.baidu.com\", 6)`\n\n返回 `amis...`",
|
|
6964
|
+
example: "TRUNCATE(text, 6)",
|
|
6965
|
+
params: [{
|
|
6966
|
+
type: "string",
|
|
6967
|
+
name: "text",
|
|
6968
|
+
description: "文本"
|
|
6969
|
+
}, {
|
|
6970
|
+
type: "number",
|
|
6971
|
+
name: "text",
|
|
6972
|
+
description: "最长长度"
|
|
6973
|
+
}],
|
|
6974
|
+
returns: {
|
|
6975
|
+
type: "string",
|
|
6976
|
+
description: "结果文本"
|
|
6977
|
+
},
|
|
6978
|
+
namespace: "文本函数"
|
|
6979
|
+
}, {
|
|
6980
|
+
name: "BEFORELAST",
|
|
6981
|
+
description: "取在某个分隔符之前的所有字符串",
|
|
6982
|
+
example: "BEFORELAST(text, '.')",
|
|
6983
|
+
params: [{
|
|
6984
|
+
type: "string",
|
|
6985
|
+
name: "text",
|
|
6986
|
+
description: "文本"
|
|
6987
|
+
}, {
|
|
6988
|
+
type: "string",
|
|
6989
|
+
name: "delimiter",
|
|
6990
|
+
description: "结束文本"
|
|
6991
|
+
}],
|
|
6992
|
+
returns: {
|
|
6993
|
+
type: "string",
|
|
6994
|
+
description: "判断结果"
|
|
6995
|
+
},
|
|
6996
|
+
namespace: "文本函数"
|
|
6997
|
+
}, {
|
|
6998
|
+
name: "SPLIT",
|
|
6999
|
+
description: "将文本根据指定片段分割成数组\n\n示例:`SPLIT(\"a,b,c\", \",\")`\n\n返回 `[\"a\", \"b\", \"c\"]`",
|
|
7000
|
+
example: "SPLIT(text, ',')",
|
|
7001
|
+
params: [{
|
|
7002
|
+
type: "string",
|
|
7003
|
+
name: "text",
|
|
7004
|
+
description: "文本"
|
|
7005
|
+
}, {
|
|
7006
|
+
type: "string",
|
|
7007
|
+
name: "delimiter",
|
|
7008
|
+
description: "文本片段"
|
|
7009
|
+
}],
|
|
7010
|
+
returns: {
|
|
7011
|
+
type: "Array<string>",
|
|
7012
|
+
description: "文本集"
|
|
7013
|
+
},
|
|
7014
|
+
namespace: "文本函数"
|
|
7015
|
+
}, {
|
|
7016
|
+
name: "TRIM",
|
|
7017
|
+
description: "将文本去除前后空格",
|
|
7018
|
+
example: "TRIM(text)",
|
|
7019
|
+
params: [{
|
|
7020
|
+
type: "string",
|
|
7021
|
+
name: "text",
|
|
7022
|
+
description: "文本"
|
|
7023
|
+
}],
|
|
7024
|
+
returns: {
|
|
7025
|
+
type: "string",
|
|
7026
|
+
description: "处理后的文本"
|
|
7027
|
+
},
|
|
7028
|
+
namespace: "文本函数"
|
|
7029
|
+
}, {
|
|
7030
|
+
name: "STRIPTAG",
|
|
7031
|
+
description: "去除文本中的 HTML 标签\n\n示例:`STRIPTAG(\"<b>amis</b>\")`\n\n返回:`amis`",
|
|
7032
|
+
example: "STRIPTAG(text)",
|
|
7033
|
+
params: [{
|
|
7034
|
+
type: "string",
|
|
7035
|
+
name: "text",
|
|
7036
|
+
description: "文本"
|
|
7037
|
+
}],
|
|
7038
|
+
returns: {
|
|
7039
|
+
type: "string",
|
|
7040
|
+
description: "处理后的文本"
|
|
7041
|
+
},
|
|
7042
|
+
namespace: "文本函数"
|
|
7043
|
+
}, {
|
|
7044
|
+
name: "LINEBREAK",
|
|
7045
|
+
description: "将字符串中的换行转成 HTML `<br>`,用于简单换行的场景\n\n示例:`LINEBREAK(\"\\n\")`\n\n返回:`<br/>`",
|
|
7046
|
+
example: "LINEBREAK(text)",
|
|
7047
|
+
params: [{
|
|
7048
|
+
type: "string",
|
|
7049
|
+
name: "text",
|
|
7050
|
+
description: "文本"
|
|
7051
|
+
}],
|
|
7052
|
+
returns: {
|
|
7053
|
+
type: "string",
|
|
7054
|
+
description: "处理后的文本"
|
|
7055
|
+
},
|
|
7056
|
+
namespace: "文本函数"
|
|
7057
|
+
}, {
|
|
7058
|
+
name: "STARTSWITH",
|
|
7059
|
+
description: "判断字符串(text)是否以特定字符串(startString)开始,是则返回 True,否则返回 False",
|
|
7060
|
+
example: "STARTSWITH(text, '片段')",
|
|
7061
|
+
params: [{
|
|
7062
|
+
type: "string",
|
|
7063
|
+
name: "text",
|
|
7064
|
+
description: "文本"
|
|
7065
|
+
}, {
|
|
7066
|
+
type: "string",
|
|
7067
|
+
name: "startString",
|
|
7068
|
+
description: "起始文本"
|
|
7069
|
+
}],
|
|
7070
|
+
returns: {
|
|
7071
|
+
type: "string",
|
|
7072
|
+
description: "判断结果"
|
|
7073
|
+
},
|
|
7074
|
+
namespace: "文本函数"
|
|
7075
|
+
}, {
|
|
7076
|
+
name: "ENDSWITH",
|
|
7077
|
+
description: "判断字符串(text)是否以特定字符串(endString)结束,是则返回 True,否则返回 False",
|
|
7078
|
+
example: "ENDSWITH(text, '片段')",
|
|
7079
|
+
params: [{
|
|
7080
|
+
type: "string",
|
|
7081
|
+
name: "text",
|
|
7082
|
+
description: "文本"
|
|
7083
|
+
}, {
|
|
7084
|
+
type: "string",
|
|
7085
|
+
name: "endString",
|
|
7086
|
+
description: "结束文本"
|
|
7087
|
+
}],
|
|
7088
|
+
returns: {
|
|
7089
|
+
type: "string",
|
|
7090
|
+
description: "判断结果"
|
|
7091
|
+
},
|
|
7092
|
+
namespace: "文本函数"
|
|
7093
|
+
}, {
|
|
7094
|
+
name: "CONTAINS",
|
|
7095
|
+
description: "判断参数 1 中的文本是否包含参数 2 中的文本。",
|
|
7096
|
+
example: "CONTAINS(text, searchText)",
|
|
7097
|
+
params: [{
|
|
7098
|
+
type: "string",
|
|
7099
|
+
name: "text",
|
|
7100
|
+
description: "文本"
|
|
7101
|
+
}, {
|
|
7102
|
+
type: "string",
|
|
7103
|
+
name: "searchText",
|
|
7104
|
+
description: "搜索文本"
|
|
7105
|
+
}],
|
|
7106
|
+
returns: {
|
|
7107
|
+
type: "string",
|
|
7108
|
+
description: "判断结果"
|
|
7109
|
+
},
|
|
7110
|
+
namespace: "文本函数"
|
|
7111
|
+
}, {
|
|
7112
|
+
name: "REPLACE",
|
|
7113
|
+
description: "对文本进行全量替换。",
|
|
7114
|
+
example: "REPLACE(text, search, replace)",
|
|
7115
|
+
params: [{
|
|
7116
|
+
type: "string",
|
|
7117
|
+
name: "text",
|
|
7118
|
+
description: "要处理的文本"
|
|
7119
|
+
}, {
|
|
7120
|
+
type: "string",
|
|
7121
|
+
name: "search",
|
|
7122
|
+
description: "要被替换的文本"
|
|
7123
|
+
}, {
|
|
7124
|
+
type: "string",
|
|
7125
|
+
name: "replace",
|
|
7126
|
+
description: "要替换的文本"
|
|
7127
|
+
}],
|
|
7128
|
+
returns: {
|
|
7129
|
+
type: "string",
|
|
7130
|
+
description: "处理结果"
|
|
7131
|
+
},
|
|
7132
|
+
namespace: "文本函数"
|
|
7133
|
+
}, {
|
|
7134
|
+
name: "SEARCH",
|
|
7135
|
+
description: "对文本进行搜索,返回命中的位置",
|
|
7136
|
+
example: "SEARCH(text, search, 0)",
|
|
7137
|
+
params: [{
|
|
7138
|
+
type: "string",
|
|
7139
|
+
name: "text",
|
|
7140
|
+
description: "要处理的文本"
|
|
7141
|
+
}, {
|
|
7142
|
+
type: "string",
|
|
7143
|
+
name: "search",
|
|
7144
|
+
description: "用来搜索的文本"
|
|
7145
|
+
}, {
|
|
7146
|
+
type: "number",
|
|
7147
|
+
name: "start",
|
|
7148
|
+
description: "起始位置"
|
|
7149
|
+
}],
|
|
7150
|
+
returns: {
|
|
7151
|
+
type: "number",
|
|
7152
|
+
description: "命中的位置"
|
|
7153
|
+
},
|
|
7154
|
+
namespace: "文本函数"
|
|
7155
|
+
}, {
|
|
7156
|
+
name: "MID",
|
|
7157
|
+
description: "返回文本字符串中从指定位置开始的特定数目的字符",
|
|
7158
|
+
example: "MID(text, from, len)",
|
|
7159
|
+
params: [{
|
|
7160
|
+
type: "string",
|
|
7161
|
+
name: "text",
|
|
7162
|
+
description: "要处理的文本"
|
|
7163
|
+
}, {
|
|
7164
|
+
type: "number",
|
|
7165
|
+
name: "from",
|
|
7166
|
+
description: "起始位置"
|
|
7167
|
+
}, {
|
|
7168
|
+
type: "number",
|
|
7169
|
+
name: "len",
|
|
7170
|
+
description: "处理长度"
|
|
7171
|
+
}],
|
|
7172
|
+
returns: {
|
|
7173
|
+
type: "number",
|
|
7174
|
+
description: "命中的位置"
|
|
7175
|
+
},
|
|
7176
|
+
namespace: "文本函数"
|
|
7177
|
+
}, {
|
|
7178
|
+
name: "BASENAME",
|
|
7179
|
+
description: "返回路径中的文件名\n\n示例:`/home/amis/a.json`\n\n返回:a.json`",
|
|
7180
|
+
example: "BASENAME(text)",
|
|
7181
|
+
params: [{
|
|
7182
|
+
type: "string",
|
|
7183
|
+
name: "text",
|
|
7184
|
+
description: "要处理的文本"
|
|
7185
|
+
}],
|
|
7186
|
+
returns: {
|
|
7187
|
+
type: "string",
|
|
7188
|
+
description: "文件名"
|
|
7189
|
+
},
|
|
7190
|
+
namespace: "文本函数"
|
|
7191
|
+
}, {
|
|
7192
|
+
name: "DATE",
|
|
7193
|
+
description: "创建日期对象,可以通过特定格式的字符串,或者数值。\n\n需要注意的是,其中月份的数值是从0开始的,也就是说,\n如果是12月份,你应该传入数值11。",
|
|
7194
|
+
example: "DATE('2021-12-06 08:20:00')",
|
|
7195
|
+
params: [],
|
|
7196
|
+
returns: {
|
|
7197
|
+
type: "Date",
|
|
7198
|
+
description: "日期对象"
|
|
7199
|
+
},
|
|
7200
|
+
namespace: "日期函数"
|
|
7201
|
+
}, {
|
|
7202
|
+
name: "TIMESTAMP",
|
|
7203
|
+
description: "返回时间的时间戳",
|
|
7204
|
+
example: "TIMESTAMP(date, 'x')",
|
|
7205
|
+
params: [{
|
|
7206
|
+
type: "date",
|
|
7207
|
+
name: "date",
|
|
7208
|
+
description: "日期对象"
|
|
7209
|
+
}, {
|
|
7210
|
+
type: "string",
|
|
7211
|
+
name: "format",
|
|
7212
|
+
description: "时间戳格式,带毫秒传入 'x'。默认为 'X' 不带毫秒的。"
|
|
7213
|
+
}],
|
|
7214
|
+
returns: {
|
|
7215
|
+
type: "number",
|
|
7216
|
+
description: "时间戳"
|
|
7217
|
+
},
|
|
7218
|
+
namespace: "日期函数"
|
|
7219
|
+
}, {
|
|
7220
|
+
name: "TODAY",
|
|
7221
|
+
description: "返回今天的日期",
|
|
7222
|
+
example: "TODAY()",
|
|
7223
|
+
params: [],
|
|
7224
|
+
returns: {
|
|
7225
|
+
type: "number",
|
|
7226
|
+
description: "日期"
|
|
7227
|
+
},
|
|
7228
|
+
namespace: "日期函数"
|
|
7229
|
+
}, {
|
|
7230
|
+
name: "NOW",
|
|
7231
|
+
description: "返回现在的日期",
|
|
7232
|
+
example: "NOW()",
|
|
7233
|
+
params: [],
|
|
7234
|
+
returns: {
|
|
7235
|
+
type: "number",
|
|
7236
|
+
description: "日期"
|
|
7237
|
+
},
|
|
7238
|
+
namespace: "日期函数"
|
|
7239
|
+
}, {
|
|
7240
|
+
name: "WEEKDAY",
|
|
7241
|
+
description: "获取日期的星期几,\n\n示例:\n\nWEEKDAY('2023-02-27') 得到 1",
|
|
7242
|
+
example: "WEEKDAY(date)",
|
|
7243
|
+
params: [{
|
|
7244
|
+
type: "any",
|
|
7245
|
+
name: "date",
|
|
7246
|
+
description: "日期"
|
|
7247
|
+
}, {
|
|
7248
|
+
type: "number",
|
|
7249
|
+
name: "type",
|
|
7250
|
+
description: "星期定义类型,默认为1,1表示0至6代表星期一到星期日,2表示1至7代表星期一到星期日"
|
|
7251
|
+
}],
|
|
7252
|
+
returns: {
|
|
7253
|
+
type: "number",
|
|
7254
|
+
description: "星期几的数字标识"
|
|
7255
|
+
},
|
|
7256
|
+
namespace: "日期函数"
|
|
7257
|
+
}, {
|
|
7258
|
+
name: "WEEK",
|
|
7259
|
+
description: "获取年份的星期,即第几周\n\n示例:\n\nWEEK('2023-03-05') 得到 10",
|
|
7260
|
+
example: "WEEK(date)",
|
|
7261
|
+
params: [{
|
|
7262
|
+
type: "any",
|
|
7263
|
+
name: "date",
|
|
7264
|
+
description: "日期"
|
|
7265
|
+
}, {
|
|
7266
|
+
type: "boolean",
|
|
7267
|
+
name: "isISO",
|
|
7268
|
+
description: "是否ISO星期"
|
|
7269
|
+
}],
|
|
7270
|
+
returns: {
|
|
7271
|
+
type: "number",
|
|
7272
|
+
description: "星期几的数字标识"
|
|
7273
|
+
},
|
|
7274
|
+
namespace: "日期函数"
|
|
7275
|
+
}, {
|
|
7276
|
+
name: "DATETOSTR",
|
|
7277
|
+
description: "对日期、日期字符串、时间戳进行格式化\n\n示例:\n\nDATETOSTR('12/25/2022', 'YYYY-MM-DD') 得到 '2022.12.25'\nDATETOSTR(1676563200, 'YYYY.MM.DD') 得到 '2023.02.17'\nDATETOSTR(1676563200000, 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00'\nDATETOSTR(DATE('2021-12-21'), 'YYYY.MM.DD hh:mm:ss') 得到 '2021.12.21 08:00:00'",
|
|
7278
|
+
example: "DATETOSTR(date, 'YYYY-MM-DD')",
|
|
7279
|
+
params: [{
|
|
7280
|
+
type: "any",
|
|
7281
|
+
name: "date",
|
|
7282
|
+
description: "日期对象、日期字符串、时间戳"
|
|
7283
|
+
}, {
|
|
7284
|
+
type: "string",
|
|
7285
|
+
name: "format",
|
|
7286
|
+
description: "日期格式,默认为 \"YYYY-MM-DD HH:mm:ss\""
|
|
7287
|
+
}],
|
|
7288
|
+
returns: {
|
|
7289
|
+
type: "string",
|
|
7290
|
+
description: "日期字符串"
|
|
7291
|
+
},
|
|
7292
|
+
namespace: "日期函数"
|
|
7293
|
+
}, {
|
|
7294
|
+
name: "DATERANGESPLIT",
|
|
7295
|
+
description: "获取日期范围字符串中的开始时间、结束时间\n\n示例:\n\nDATERANGESPLIT('1676563200, 1676735999') 得到 [1676563200, 1676735999]\nDATERANGESPLIT('1676563200, 1676735999', undefined , 'YYYY.MM.DD hh:mm:ss') 得到 [2023.02.17 12:00:00, 2023.02.18 11:59:59]\nDATERANGESPLIT('1676563200, 1676735999', 0 , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00'\nDATERANGESPLIT('1676563200, 1676735999', 'start' , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.17 12:00:00'\nDATERANGESPLIT('1676563200, 1676735999', 1 , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.18 11:59:59'\nDATERANGESPLIT('1676563200, 1676735999', 'end' , 'YYYY.MM.DD hh:mm:ss') 得到 '2023.02.18 11:59:59'",
|
|
7296
|
+
example: "DATERANGESPLIT(date, 'YYYY-MM-DD')",
|
|
7297
|
+
params: [{
|
|
7298
|
+
type: "string",
|
|
7299
|
+
name: "date",
|
|
7300
|
+
description: "日期范围字符串"
|
|
7301
|
+
}, {
|
|
7302
|
+
type: "string",
|
|
7303
|
+
name: "key",
|
|
7304
|
+
description: "取值标识,0或'start'表示获取开始时间,1或'end'表示获取结束时间"
|
|
7305
|
+
}, {
|
|
7306
|
+
type: "string",
|
|
7307
|
+
name: "format",
|
|
7308
|
+
description: "日期格式,可选"
|
|
7309
|
+
}, {
|
|
7310
|
+
type: "string",
|
|
7311
|
+
name: "delimiter",
|
|
7312
|
+
description: "分隔符,可选,默认为','"
|
|
7313
|
+
}],
|
|
7314
|
+
returns: {
|
|
7315
|
+
type: "string",
|
|
7316
|
+
description: "日期字符串"
|
|
7317
|
+
},
|
|
7318
|
+
namespace: "日期函数"
|
|
7319
|
+
}, {
|
|
7320
|
+
name: "STARTOF",
|
|
7321
|
+
description: "返回日期的指定范围的开端",
|
|
7322
|
+
example: "STARTOF(date[unit = \"day\"])",
|
|
7323
|
+
params: [{
|
|
7324
|
+
type: "date",
|
|
7325
|
+
name: "date",
|
|
7326
|
+
description: "日期对象"
|
|
7327
|
+
}, {
|
|
7328
|
+
type: "string",
|
|
7329
|
+
name: "unit",
|
|
7330
|
+
description: "比如可以传入 'day'、'month'、'year' 或者 `week` 等等"
|
|
7331
|
+
}, {
|
|
7332
|
+
type: "string",
|
|
7333
|
+
name: "format",
|
|
7334
|
+
description: "日期格式,可选"
|
|
7335
|
+
}],
|
|
7336
|
+
returns: {
|
|
7337
|
+
type: "date",
|
|
7338
|
+
description: "新的日期对象"
|
|
7339
|
+
},
|
|
7340
|
+
namespace: "日期函数"
|
|
7341
|
+
}, {
|
|
7342
|
+
name: "ENDOF",
|
|
7343
|
+
description: "返回日期的指定范围的末尾",
|
|
7344
|
+
example: "ENDOF(date[unit = \"day\"])",
|
|
7345
|
+
params: [{
|
|
7346
|
+
type: "date",
|
|
7347
|
+
name: "date",
|
|
7348
|
+
description: "日期对象"
|
|
7349
|
+
}, {
|
|
7350
|
+
type: "string",
|
|
7351
|
+
name: "unit",
|
|
7352
|
+
description: "比如可以传入 'day'、'month'、'year' 或者 `week` 等等"
|
|
7353
|
+
}, {
|
|
7354
|
+
type: "string",
|
|
7355
|
+
name: "format",
|
|
7356
|
+
description: "日期格式,可选"
|
|
7357
|
+
}],
|
|
7358
|
+
returns: {
|
|
7359
|
+
type: "date",
|
|
7360
|
+
description: "新的日期对象"
|
|
7361
|
+
},
|
|
7362
|
+
namespace: "日期函数"
|
|
7363
|
+
}, {
|
|
7364
|
+
name: "YEAR",
|
|
7365
|
+
description: "返回日期的年份",
|
|
7366
|
+
example: "YEAR(date)",
|
|
7367
|
+
params: [{
|
|
7368
|
+
type: "date",
|
|
7369
|
+
name: "date",
|
|
7370
|
+
description: "日期对象"
|
|
7371
|
+
}],
|
|
7372
|
+
returns: {
|
|
7373
|
+
type: "number",
|
|
7374
|
+
description: "数值"
|
|
7375
|
+
},
|
|
7376
|
+
namespace: "日期函数"
|
|
7377
|
+
}, {
|
|
7378
|
+
name: "MONTH",
|
|
7379
|
+
description: "返回日期的月份,这里就是自然月份。",
|
|
7380
|
+
example: "MONTH(date)",
|
|
7381
|
+
params: [{
|
|
7382
|
+
type: "date",
|
|
7383
|
+
name: "date",
|
|
7384
|
+
description: "日期对象"
|
|
7385
|
+
}],
|
|
7386
|
+
returns: {
|
|
7387
|
+
type: "number",
|
|
7388
|
+
description: "数值"
|
|
7389
|
+
},
|
|
7390
|
+
namespace: "日期函数"
|
|
7391
|
+
}, {
|
|
7392
|
+
name: "DAY",
|
|
7393
|
+
description: "返回日期的天",
|
|
7394
|
+
example: "DAY(date)",
|
|
7395
|
+
params: [{
|
|
7396
|
+
type: "date",
|
|
7397
|
+
name: "date",
|
|
7398
|
+
description: "日期对象"
|
|
7399
|
+
}],
|
|
7400
|
+
returns: {
|
|
7401
|
+
type: "number",
|
|
7402
|
+
description: "数值"
|
|
7403
|
+
},
|
|
7404
|
+
namespace: "日期函数"
|
|
7405
|
+
}, {
|
|
7406
|
+
name: "HOUR",
|
|
7407
|
+
description: "返回日期的小时",
|
|
7408
|
+
example: "HOUR(date)",
|
|
7409
|
+
params: [{
|
|
7410
|
+
type: "date",
|
|
7411
|
+
name: "date",
|
|
7412
|
+
description: "日期对象"
|
|
7413
|
+
}],
|
|
7414
|
+
returns: {
|
|
7415
|
+
type: "number",
|
|
7416
|
+
description: "数值"
|
|
7417
|
+
},
|
|
7418
|
+
namespace: "日期函数"
|
|
7419
|
+
}, {
|
|
7420
|
+
name: "MINUTE",
|
|
7421
|
+
description: "返回日期的分",
|
|
7422
|
+
example: "MINUTE(date)",
|
|
7423
|
+
params: [{
|
|
7424
|
+
type: "date",
|
|
7425
|
+
name: "date",
|
|
7426
|
+
description: "日期对象"
|
|
7427
|
+
}],
|
|
7428
|
+
returns: {
|
|
7429
|
+
type: "number",
|
|
7430
|
+
description: "数值"
|
|
7431
|
+
},
|
|
7432
|
+
namespace: "日期函数"
|
|
7433
|
+
}, {
|
|
7434
|
+
name: "SECOND",
|
|
7435
|
+
description: "返回日期的秒",
|
|
7436
|
+
example: "SECOND(date)",
|
|
7437
|
+
params: [{
|
|
7438
|
+
type: "date",
|
|
7439
|
+
name: "date",
|
|
7440
|
+
description: "日期对象"
|
|
7441
|
+
}],
|
|
7442
|
+
returns: {
|
|
7443
|
+
type: "number",
|
|
7444
|
+
description: "数值"
|
|
7445
|
+
},
|
|
7446
|
+
namespace: "日期函数"
|
|
7447
|
+
}, {
|
|
7448
|
+
name: "YEARS",
|
|
7449
|
+
description: "返回两个日期相差多少年",
|
|
7450
|
+
example: "YEARS(endDate, startDate)",
|
|
7451
|
+
params: [{
|
|
7452
|
+
type: "date",
|
|
7453
|
+
name: "endDate",
|
|
7454
|
+
description: "日期对象"
|
|
7455
|
+
}, {
|
|
7456
|
+
type: "date",
|
|
7457
|
+
name: "startDate",
|
|
7458
|
+
description: "日期对象"
|
|
7459
|
+
}],
|
|
7460
|
+
returns: {
|
|
7461
|
+
type: "number",
|
|
7462
|
+
description: "数值"
|
|
7463
|
+
},
|
|
7464
|
+
namespace: "日期函数"
|
|
7465
|
+
}, {
|
|
7466
|
+
name: "MINUTES",
|
|
7467
|
+
description: "返回两个日期相差多少分钟",
|
|
7468
|
+
example: "MINUTES(endDate, startDate)",
|
|
7469
|
+
params: [{
|
|
7470
|
+
type: "date",
|
|
7471
|
+
name: "endDate",
|
|
7472
|
+
description: "日期对象"
|
|
7473
|
+
}, {
|
|
7474
|
+
type: "date",
|
|
7475
|
+
name: "startDate",
|
|
7476
|
+
description: "日期对象"
|
|
7477
|
+
}],
|
|
7478
|
+
returns: {
|
|
7479
|
+
type: "number",
|
|
7480
|
+
description: "数值"
|
|
7481
|
+
},
|
|
7482
|
+
namespace: "日期函数"
|
|
7483
|
+
}, {
|
|
7484
|
+
name: "DAYS",
|
|
7485
|
+
description: "返回两个日期相差多少天",
|
|
7486
|
+
example: "DAYS(endDate, startDate)",
|
|
7487
|
+
params: [{
|
|
7488
|
+
type: "date",
|
|
7489
|
+
name: "endDate",
|
|
7490
|
+
description: "日期对象"
|
|
7491
|
+
}, {
|
|
7492
|
+
type: "date",
|
|
7493
|
+
name: "startDate",
|
|
7494
|
+
description: "日期对象"
|
|
7495
|
+
}],
|
|
7496
|
+
returns: {
|
|
7497
|
+
type: "number",
|
|
7498
|
+
description: "数值"
|
|
7499
|
+
},
|
|
7500
|
+
namespace: "日期函数"
|
|
7501
|
+
}, {
|
|
7502
|
+
name: "HOURS",
|
|
7503
|
+
description: "返回两个日期相差多少小时",
|
|
7504
|
+
example: "HOURS(endDate, startDate)",
|
|
7505
|
+
params: [{
|
|
7506
|
+
type: "date",
|
|
7507
|
+
name: "endDate",
|
|
7508
|
+
description: "日期对象"
|
|
7509
|
+
}, {
|
|
7510
|
+
type: "date",
|
|
7511
|
+
name: "startDate",
|
|
7512
|
+
description: "日期对象"
|
|
7513
|
+
}],
|
|
7514
|
+
returns: {
|
|
7515
|
+
type: "number",
|
|
7516
|
+
description: "数值"
|
|
7517
|
+
},
|
|
7518
|
+
namespace: "日期函数"
|
|
7519
|
+
}, {
|
|
7520
|
+
name: "DATEMODIFY",
|
|
7521
|
+
description: "修改日期,对日期进行加减天、月份、年等操作\n\n示例:\n\nDATEMODIFY(A, -2, 'month')\n\n对日期 A 进行往前减2月的操作。",
|
|
7522
|
+
example: "DATEMODIFY(date, 2, 'days')",
|
|
7523
|
+
params: [{
|
|
7524
|
+
type: "date",
|
|
7525
|
+
name: "date",
|
|
7526
|
+
description: "日期对象"
|
|
7527
|
+
}, {
|
|
7528
|
+
type: "number",
|
|
7529
|
+
name: "num",
|
|
7530
|
+
description: "数值"
|
|
7531
|
+
}, {
|
|
7532
|
+
type: "string",
|
|
7533
|
+
name: "unit",
|
|
7534
|
+
description: "单位:支持年、月、天等等"
|
|
7535
|
+
}],
|
|
7536
|
+
returns: {
|
|
7537
|
+
type: "date",
|
|
7538
|
+
description: "日期对象"
|
|
7539
|
+
},
|
|
7540
|
+
namespace: "日期函数"
|
|
7541
|
+
}, {
|
|
7542
|
+
name: "STRTODATE",
|
|
7543
|
+
description: "将字符日期转成日期对象,可以指定日期格式。\n\n示例:STRTODATE('2021/12/6', 'YYYY/MM/DD')",
|
|
7544
|
+
example: "STRTODATE(value[, format=\"\"])",
|
|
7545
|
+
params: [{
|
|
7546
|
+
type: "string",
|
|
7547
|
+
name: "value",
|
|
7548
|
+
description: "日期字符"
|
|
7549
|
+
}, {
|
|
7550
|
+
type: "string",
|
|
7551
|
+
name: "format",
|
|
7552
|
+
description: "日期格式"
|
|
7553
|
+
}],
|
|
7554
|
+
returns: {
|
|
7555
|
+
type: "date",
|
|
7556
|
+
description: "日期对象"
|
|
7557
|
+
},
|
|
7558
|
+
namespace: "日期函数"
|
|
7559
|
+
}, {
|
|
7560
|
+
name: "ISBEFORE",
|
|
7561
|
+
description: "判断两个日期,是否第一个日期在第二个日期的前面",
|
|
7562
|
+
example: "ISBEFORE(a, b)",
|
|
7563
|
+
params: [{
|
|
7564
|
+
type: "date",
|
|
7565
|
+
name: "a",
|
|
7566
|
+
description: "第一个日期"
|
|
7567
|
+
}, {
|
|
7568
|
+
type: "date",
|
|
7569
|
+
name: "b",
|
|
7570
|
+
description: "第二个日期"
|
|
7571
|
+
}, {
|
|
7572
|
+
type: "string",
|
|
7573
|
+
name: "unit",
|
|
7574
|
+
description: "单位,默认是 'day', 即之比较到天"
|
|
7575
|
+
}],
|
|
7576
|
+
returns: {
|
|
7577
|
+
type: "boolean",
|
|
7578
|
+
description: "判断结果"
|
|
7579
|
+
},
|
|
7580
|
+
namespace: "日期函数"
|
|
7581
|
+
}, {
|
|
7582
|
+
name: "ISAFTER",
|
|
7583
|
+
description: "判断两个日期,是否第一个日期在第二个日期的后面",
|
|
7584
|
+
example: "ISAFTER(a, b)",
|
|
7585
|
+
params: [{
|
|
7586
|
+
type: "date",
|
|
7587
|
+
name: "a",
|
|
7588
|
+
description: "第一个日期"
|
|
7589
|
+
}, {
|
|
7590
|
+
type: "date",
|
|
7591
|
+
name: "b",
|
|
7592
|
+
description: "第二个日期"
|
|
7593
|
+
}, {
|
|
7594
|
+
type: "string",
|
|
7595
|
+
name: "unit",
|
|
7596
|
+
description: "单位,默认是 'day', 即之比较到天"
|
|
7597
|
+
}],
|
|
7598
|
+
returns: {
|
|
7599
|
+
type: "boolean",
|
|
7600
|
+
description: "判断结果"
|
|
7601
|
+
},
|
|
7602
|
+
namespace: "日期函数"
|
|
7603
|
+
}, {
|
|
7604
|
+
name: "BETWEENRANGE",
|
|
7605
|
+
description: "判断日期是否在指定范围内\n\n示例:BETWEENRANGE('2021/12/6', ['2021/12/5','2021/12/7'])",
|
|
7606
|
+
example: "BETWEENRANGE(date, [start, end])",
|
|
7607
|
+
params: [{
|
|
7608
|
+
type: "any",
|
|
7609
|
+
name: "date",
|
|
7610
|
+
description: "第一个日期"
|
|
7611
|
+
}, {
|
|
7612
|
+
type: "Array<any>",
|
|
7613
|
+
name: "daterange",
|
|
7614
|
+
description: "日期范围"
|
|
7615
|
+
}, {
|
|
7616
|
+
type: "string",
|
|
7617
|
+
name: "unit",
|
|
7618
|
+
description: "单位,默认是 'day', 即之比较到天"
|
|
7619
|
+
}, {
|
|
7620
|
+
type: "string",
|
|
7621
|
+
name: "inclusivity",
|
|
7622
|
+
description: "包容性规则,默认为'[]'。[ 表示包含、( 表示排除,如果使用包容性参数,则必须传入两个指示符,如'()'表示左右范围都排除"
|
|
7623
|
+
}],
|
|
7624
|
+
returns: {
|
|
7625
|
+
type: "boolean",
|
|
7626
|
+
description: "判断结果"
|
|
7627
|
+
},
|
|
7628
|
+
namespace: "日期函数"
|
|
7629
|
+
}, {
|
|
7630
|
+
name: "ISSAMEORBEFORE",
|
|
7631
|
+
description: "判断两个日期,是否第一个日期在第二个日期的前面或者相等",
|
|
7632
|
+
example: "ISSAMEORBEFORE(a, b)",
|
|
7633
|
+
params: [{
|
|
7634
|
+
type: "date",
|
|
7635
|
+
name: "a",
|
|
7636
|
+
description: "第一个日期"
|
|
7637
|
+
}, {
|
|
7638
|
+
type: "date",
|
|
7639
|
+
name: "b",
|
|
7640
|
+
description: "第二个日期"
|
|
7641
|
+
}, {
|
|
7642
|
+
type: "string",
|
|
7643
|
+
name: "unit",
|
|
7644
|
+
description: "单位,默认是 'day', 即之比较到天"
|
|
7645
|
+
}],
|
|
7646
|
+
returns: {
|
|
7647
|
+
type: "boolean",
|
|
7648
|
+
description: "判断结果"
|
|
7649
|
+
},
|
|
7650
|
+
namespace: "日期函数"
|
|
7651
|
+
}, {
|
|
7652
|
+
name: "ISSAMEORAFTER",
|
|
7653
|
+
description: "判断两个日期,是否第一个日期在第二个日期的后面或者相等",
|
|
7654
|
+
example: "ISSAMEORAFTER(a, b)",
|
|
7655
|
+
params: [{
|
|
7656
|
+
type: "date",
|
|
7657
|
+
name: "a",
|
|
7658
|
+
description: "第一个日期"
|
|
7659
|
+
}, {
|
|
7660
|
+
type: "date",
|
|
7661
|
+
name: "b",
|
|
7662
|
+
description: "第二个日期"
|
|
7663
|
+
}, {
|
|
7664
|
+
type: "string",
|
|
7665
|
+
name: "unit",
|
|
7666
|
+
description: "单位,默认是 'day', 即之比较到天"
|
|
7667
|
+
}],
|
|
7668
|
+
returns: {
|
|
7669
|
+
type: "boolean",
|
|
7670
|
+
description: "判断结果"
|
|
7671
|
+
},
|
|
7672
|
+
namespace: "日期函数"
|
|
7673
|
+
}, {
|
|
7674
|
+
name: "COUNT",
|
|
7675
|
+
description: "返回数组的长度",
|
|
7676
|
+
example: "COUNT(arr)",
|
|
7677
|
+
params: [{
|
|
7678
|
+
type: "Array<any>",
|
|
7679
|
+
name: "arr",
|
|
7680
|
+
description: "数组"
|
|
7681
|
+
}],
|
|
7682
|
+
returns: {
|
|
7683
|
+
type: "boolean",
|
|
7684
|
+
description: "结果"
|
|
7685
|
+
},
|
|
7686
|
+
namespace: "数组"
|
|
7687
|
+
}, {
|
|
7688
|
+
name: "ARRAYMAP",
|
|
7689
|
+
description: "数组做数据转换,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。",
|
|
7690
|
+
example: "ARRAYMAP(arr, item => item)",
|
|
7691
|
+
params: [{
|
|
7692
|
+
type: "Array<any>",
|
|
7693
|
+
name: "arr",
|
|
7694
|
+
description: "数组"
|
|
7695
|
+
}, {
|
|
7696
|
+
type: "Array<any>",
|
|
7697
|
+
name: "iterator",
|
|
7698
|
+
description: "箭头函数"
|
|
7699
|
+
}],
|
|
7700
|
+
returns: {
|
|
7701
|
+
type: "boolean",
|
|
7702
|
+
description: "结果"
|
|
7703
|
+
},
|
|
7704
|
+
namespace: "数组"
|
|
7705
|
+
}, {
|
|
7706
|
+
name: "ARRAYFILTER",
|
|
7707
|
+
description: "数据做数据过滤,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n将第二个箭头函数返回为 false 的成员过滤掉。",
|
|
7708
|
+
example: "ARRAYFILTER(arr, item => item)",
|
|
7709
|
+
params: [{
|
|
7710
|
+
type: "Array<any>",
|
|
7711
|
+
name: "arr",
|
|
7712
|
+
description: "数组"
|
|
7713
|
+
}, {
|
|
7714
|
+
type: "Array<any>",
|
|
7715
|
+
name: "iterator",
|
|
7716
|
+
description: "箭头函数"
|
|
7717
|
+
}],
|
|
7718
|
+
returns: {
|
|
7719
|
+
type: "boolean",
|
|
7720
|
+
description: "结果"
|
|
7721
|
+
},
|
|
7722
|
+
namespace: "数组"
|
|
7723
|
+
}, {
|
|
7724
|
+
name: "ARRAYFINDINDEX",
|
|
7725
|
+
description: "数据做数据查找,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n找出第二个箭头函数返回为 true 的成员的索引。\n\n示例:\n\nARRAYFINDINDEX([0, 2, false], item => item === 2) 得到 1",
|
|
7726
|
+
example: "ARRAYFINDINDEX(arr, item => item === 2)",
|
|
7727
|
+
params: [{
|
|
7728
|
+
type: "Array<any>",
|
|
7729
|
+
name: "arr",
|
|
7730
|
+
description: "数组"
|
|
7731
|
+
}, {
|
|
7732
|
+
type: "Array<any>",
|
|
7733
|
+
name: "iterator",
|
|
7734
|
+
description: "箭头函数"
|
|
7735
|
+
}],
|
|
7736
|
+
returns: {
|
|
7737
|
+
type: "number",
|
|
7738
|
+
description: "结果"
|
|
7739
|
+
},
|
|
7740
|
+
namespace: "数组"
|
|
7741
|
+
}, {
|
|
7742
|
+
name: "ARRAYFIND",
|
|
7743
|
+
description: "数据做数据查找,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n找出第二个箭头函数返回为 true 的成员。\n\n示例:\n\nARRAYFIND([0, 2, false], item => item === 2) 得到 2",
|
|
7744
|
+
example: "ARRAYFIND(arr, item => item === 2)",
|
|
7745
|
+
params: [{
|
|
7746
|
+
type: "Array<any>",
|
|
7747
|
+
name: "arr",
|
|
7748
|
+
description: "数组"
|
|
7749
|
+
}, {
|
|
7750
|
+
type: "Array<any>",
|
|
7751
|
+
name: "iterator",
|
|
7752
|
+
description: "箭头函数"
|
|
7753
|
+
}],
|
|
7754
|
+
returns: {
|
|
7755
|
+
type: "any",
|
|
7756
|
+
description: "结果"
|
|
7757
|
+
},
|
|
7758
|
+
namespace: "数组"
|
|
7759
|
+
}, {
|
|
7760
|
+
name: "ARRAYSOME",
|
|
7761
|
+
description: "数据做数据遍历判断,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n判断第二个箭头函数是否存在返回为 true 的成员。\n\n示例:\n\nARRAYSOME([0, 2, false], item => item === 2) 得到 true",
|
|
7762
|
+
example: "ARRAYSOME(arr, item => item === 2)",
|
|
7763
|
+
params: [{
|
|
7764
|
+
type: "Array<any>",
|
|
7765
|
+
name: "arr",
|
|
7766
|
+
description: "数组"
|
|
7767
|
+
}, {
|
|
7768
|
+
type: "Array<any>",
|
|
7769
|
+
name: "iterator",
|
|
7770
|
+
description: "箭头函数"
|
|
7771
|
+
}],
|
|
7772
|
+
returns: {
|
|
7773
|
+
type: "boolean",
|
|
7774
|
+
description: "结果"
|
|
7775
|
+
},
|
|
7776
|
+
namespace: "数组"
|
|
7777
|
+
}, {
|
|
7778
|
+
name: "ARRAYEVERY",
|
|
7779
|
+
description: "数据做数据遍历判断,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。\n判断第二个箭头函数返回是否都为 true。\n\n示例:\n\nARRAYEVERY([0, 2, false], item => item === 2) 得到 false",
|
|
7780
|
+
example: "ARRAYEVERY(arr, item => item === 2)",
|
|
7781
|
+
params: [{
|
|
7782
|
+
type: "Array<any>",
|
|
7783
|
+
name: "arr",
|
|
7784
|
+
description: "数组"
|
|
7785
|
+
}, {
|
|
7786
|
+
type: "Array<any>",
|
|
7787
|
+
name: "iterator",
|
|
7788
|
+
description: "箭头函数"
|
|
7789
|
+
}],
|
|
7790
|
+
returns: {
|
|
7791
|
+
type: "boolean",
|
|
7792
|
+
description: "结果"
|
|
7793
|
+
},
|
|
7794
|
+
namespace: "数组"
|
|
7795
|
+
}, {
|
|
7796
|
+
name: "ARRAYINCLUDES",
|
|
7797
|
+
description: "判断数据中是否存在指定元素\n\n示例:\n\nARRAYINCLUDES([0, 2, false], 2) 得到 true",
|
|
7798
|
+
example: "ARRAYINCLUDES(arr, 2)",
|
|
7799
|
+
params: [{
|
|
7800
|
+
type: "Array<any>",
|
|
7801
|
+
name: "arr",
|
|
7802
|
+
description: "数组"
|
|
7803
|
+
}, {
|
|
7804
|
+
type: "any",
|
|
7805
|
+
name: "item",
|
|
7806
|
+
description: "元素"
|
|
7807
|
+
}],
|
|
7808
|
+
returns: {
|
|
7809
|
+
type: "any",
|
|
7810
|
+
description: "结果"
|
|
7811
|
+
},
|
|
7812
|
+
namespace: "数组"
|
|
7813
|
+
}, {
|
|
7814
|
+
name: "COMPACT",
|
|
7815
|
+
description: "数组过滤掉 false、null、0 和 \"\"\n\n示例:\n\nCOMPACT([0, 1, false, 2, '', 3]) 得到 [1, 2, 3]",
|
|
7816
|
+
example: "COMPACT(arr)",
|
|
7817
|
+
params: [{
|
|
7818
|
+
type: "Array<any>",
|
|
7819
|
+
name: "arr",
|
|
7820
|
+
description: "数组"
|
|
7821
|
+
}],
|
|
7822
|
+
returns: {
|
|
7823
|
+
type: "Array<any>",
|
|
7824
|
+
description: "结果"
|
|
7825
|
+
},
|
|
7826
|
+
namespace: "数组"
|
|
7827
|
+
}, {
|
|
7828
|
+
name: "JOIN",
|
|
7829
|
+
description: "数组转成字符串\n\n示例:\n\nJOIN(['a', 'b', 'c'], '=') 得到 'a=b=c'",
|
|
7830
|
+
example: "JOIN(arr, string)",
|
|
7831
|
+
params: [{
|
|
7832
|
+
type: "Array<any>",
|
|
7833
|
+
name: "arr",
|
|
7834
|
+
description: "数组"
|
|
7835
|
+
}, {
|
|
7836
|
+
type: "String",
|
|
7837
|
+
name: "separator",
|
|
7838
|
+
description: "分隔符"
|
|
7839
|
+
}],
|
|
7840
|
+
returns: {
|
|
7841
|
+
type: "String",
|
|
7842
|
+
description: "结果"
|
|
7843
|
+
},
|
|
7844
|
+
namespace: "数组"
|
|
7845
|
+
}, {
|
|
7846
|
+
name: "CONCAT",
|
|
7847
|
+
description: "数组合并\n\n示例:\n\nCONCAT(['a', 'b', 'c'], ['1'], ['3']) 得到 ['a', 'b', 'c', '1', '3']",
|
|
7848
|
+
example: "CONCAT(['a', 'b', 'c'], ['1'], ['3'])",
|
|
7849
|
+
params: [{
|
|
7850
|
+
type: "Array<any>",
|
|
7851
|
+
name: "arr",
|
|
7852
|
+
description: "数组"
|
|
7853
|
+
}],
|
|
7854
|
+
returns: {
|
|
7855
|
+
type: "Array<any>",
|
|
7856
|
+
description: "结果"
|
|
7857
|
+
},
|
|
7858
|
+
namespace: "数组"
|
|
7859
|
+
}, {
|
|
7860
|
+
name: "UNIQ",
|
|
7861
|
+
description: "数组去重,第二个参数「field」,可指定根据该字段去重\n\n示例:\n\nUNIQ([{a: '1'}, {b: '2'}, {a: '1'}], 'id')",
|
|
7862
|
+
example: "UNIQ([{a: '1'}, {b: '2'}, {a: '1'}], 'x')",
|
|
7863
|
+
params: [{
|
|
7864
|
+
type: "Array<any>",
|
|
7865
|
+
name: "arr",
|
|
7866
|
+
description: "数组"
|
|
7867
|
+
}, {
|
|
7868
|
+
type: "string",
|
|
7869
|
+
name: "field",
|
|
7870
|
+
description: "字段"
|
|
7871
|
+
}],
|
|
7872
|
+
returns: {
|
|
7873
|
+
type: "Array<any>",
|
|
7874
|
+
description: "结果"
|
|
7875
|
+
},
|
|
7876
|
+
namespace: "数组"
|
|
7877
|
+
}, {
|
|
7878
|
+
name: "ENCODEJSON",
|
|
7879
|
+
description: "将JS对象转换成JSON字符串\n\n示例:\n\nENCODEJSON({name: 'amis'}) 得到 '{\"name\":\"amis\"}'",
|
|
7880
|
+
example: "ENCODEJSON({name: 'amis'})",
|
|
7881
|
+
params: [{
|
|
7882
|
+
type: "object",
|
|
7883
|
+
name: "obj",
|
|
7884
|
+
description: "JS对象"
|
|
7885
|
+
}],
|
|
7886
|
+
returns: {
|
|
7887
|
+
type: "string",
|
|
7888
|
+
description: "结果"
|
|
7889
|
+
},
|
|
7890
|
+
namespace: "编码"
|
|
7891
|
+
}, {
|
|
7892
|
+
name: "DECODEJSON",
|
|
7893
|
+
description: "解析JSON编码数据,返回JS对象\n\n示例:\n\nDECODEJSON('{\\\"name\\\": \"amis\"}') 得到 {name: 'amis'}",
|
|
7894
|
+
example: "DECODEJSON('{\\\"name\\\": \"amis\"}')",
|
|
7895
|
+
params: [{
|
|
7896
|
+
type: "string",
|
|
7897
|
+
name: "str",
|
|
7898
|
+
description: "字符串"
|
|
7899
|
+
}],
|
|
7900
|
+
returns: {
|
|
7901
|
+
type: "object",
|
|
7902
|
+
description: "结果"
|
|
7903
|
+
},
|
|
7904
|
+
namespace: "编码"
|
|
7905
|
+
}, {
|
|
7906
|
+
name: "GET",
|
|
7907
|
+
description: "根据对象或者数组的path路径获取值。 如果解析 value 是 undefined 会以 defaultValue 取代\n\n示例:\n\nGET([0, 2, {name: 'amis', age: 18}], 1) 得到 2\nGET([0, 2, {name: 'amis', age: 18}], '2.name') 得到 'amis'\nGET({arr: [{name: 'amis', age: 18}]}, 'arr[0].name') 得到 'amis'\nGET({arr: [{name: 'amis', age: 18}]}, 'arr.0.name') 得到 'amis'\nGET({arr: [{name: 'amis', age: 18}]}, 'arr.1.name', 'not-found') 得到 'not-found'",
|
|
7908
|
+
example: "GET(arr, 2)",
|
|
7909
|
+
params: [{
|
|
7910
|
+
type: "any",
|
|
7911
|
+
name: "obj",
|
|
7912
|
+
description: "对象或数组"
|
|
7913
|
+
}, {
|
|
7914
|
+
type: "string",
|
|
7915
|
+
name: "path",
|
|
7916
|
+
description: "路径"
|
|
7917
|
+
}, {
|
|
7918
|
+
type: "any",
|
|
7919
|
+
name: "defaultValue",
|
|
7920
|
+
description: "如果解析不到则返回该值"
|
|
7921
|
+
}],
|
|
7922
|
+
returns: {
|
|
7923
|
+
type: "any",
|
|
7924
|
+
description: "结果"
|
|
7925
|
+
},
|
|
7926
|
+
namespace: "其他"
|
|
7927
|
+
}, {
|
|
7928
|
+
name: "ISTYPE",
|
|
7929
|
+
description: "判断是否为类型支持:string, number, array, date, plain-object。",
|
|
7930
|
+
example: "ISTYPE([{a: '1'}, {b: '2'}, {a: '1'}], 'array')",
|
|
7931
|
+
params: [{
|
|
7932
|
+
type: "string",
|
|
7933
|
+
name: "判断对象",
|
|
7934
|
+
description: null
|
|
7935
|
+
}],
|
|
7936
|
+
returns: {
|
|
7937
|
+
type: "boolean",
|
|
7938
|
+
description: "结果"
|
|
7939
|
+
},
|
|
7940
|
+
namespace: "其他"
|
|
7941
|
+
}]);
|
|
7942
|
+
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
7943
|
+
var message_ = __webpack_require__(54);
|
|
7944
|
+
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
7945
|
+
|
|
7946
|
+
// CONCATENATED MODULE: ./src/components/formula/src/index.js
|
|
7947
|
+
|
|
7948
|
+
|
|
7949
|
+
|
|
7950
|
+
|
|
7951
|
+
|
|
7952
|
+
|
|
7953
|
+
|
|
7954
|
+
|
|
7955
|
+
|
|
7956
|
+
/* harmony default export */ var formula_src = ({
|
|
7957
|
+
name: "Formula",
|
|
7958
|
+
componentName: "Formula",
|
|
7959
|
+
components: {
|
|
7960
|
+
CodeMirrorEditor: codeMirror,
|
|
7961
|
+
FuncList: funcList,
|
|
7962
|
+
VariableList: variableList
|
|
7963
|
+
},
|
|
7964
|
+
props: {
|
|
7965
|
+
value: String,
|
|
7966
|
+
evalMode: {
|
|
7967
|
+
type: Boolean,
|
|
7968
|
+
default: function _default() {
|
|
7969
|
+
return true;
|
|
7970
|
+
}
|
|
7971
|
+
},
|
|
7972
|
+
/**
|
|
7973
|
+
* 变量展现模式,可选值:'tabs' | 'tree'
|
|
7974
|
+
*/
|
|
7975
|
+
variableMode: {
|
|
7976
|
+
type: String,
|
|
7977
|
+
default: "tabs"
|
|
7978
|
+
},
|
|
7979
|
+
functions: Array,
|
|
7980
|
+
variables: Array,
|
|
7981
|
+
functionClassName: String,
|
|
7982
|
+
variableClassName: String,
|
|
7983
|
+
/**
|
|
7984
|
+
* 当前输入项字段 name: 用于避免循环绑定自身导致无限渲染
|
|
7985
|
+
*/
|
|
7986
|
+
selfVariableName: String
|
|
7987
|
+
},
|
|
7988
|
+
data: function data() {
|
|
7989
|
+
return {
|
|
7990
|
+
focused: false,
|
|
7991
|
+
editorPlugin: null
|
|
7992
|
+
};
|
|
7993
|
+
},
|
|
7994
|
+
computed: {
|
|
7995
|
+
functionList: function functionList() {
|
|
7996
|
+
var funcs = [];
|
|
7997
|
+
doc.forEach(function (item) {
|
|
7998
|
+
var namespace = item.namespace || 'Others';
|
|
7999
|
+
var exists = funcs.find(function (item) {
|
|
8000
|
+
return item.groupName === namespace;
|
|
8001
|
+
});
|
|
8002
|
+
if (!exists) {
|
|
8003
|
+
exists = {
|
|
8004
|
+
groupName: namespace,
|
|
8005
|
+
items: []
|
|
8006
|
+
};
|
|
8007
|
+
funcs.push(exists);
|
|
8008
|
+
}
|
|
8009
|
+
exists.items.push(item);
|
|
8010
|
+
});
|
|
8011
|
+
var customFunctions = Array.isArray(this.functions) ? this.functions : [];
|
|
8012
|
+
return [].concat(funcs, customFunctions);
|
|
8013
|
+
}
|
|
8014
|
+
},
|
|
8015
|
+
methods: {
|
|
8016
|
+
editorFactory: function editorFactory(dom, cm) {
|
|
8017
|
+
return plugin_editorFactory(dom, cm, this.$props);
|
|
8018
|
+
},
|
|
8019
|
+
handleEditorMounted: function handleEditorMounted(cm, editor) {
|
|
8020
|
+
var _this = this;
|
|
8021
|
+
this.editorPlugin = new FormulaPlugin(editor, cm, function () {
|
|
8022
|
+
return _this.$props;
|
|
8023
|
+
});
|
|
8024
|
+
},
|
|
8025
|
+
// type:'variable' | 'func'
|
|
8026
|
+
insertValue: function insertValue(value, type) {
|
|
8027
|
+
if (!this.editorPlugin) {
|
|
8028
|
+
return;
|
|
8029
|
+
}
|
|
8030
|
+
this.editorPlugin.insertContent(value, type);
|
|
8031
|
+
},
|
|
8032
|
+
handleFunctionSelect: function handleFunctionSelect(item) {
|
|
8033
|
+
if (!this.editorPlugin) {
|
|
8034
|
+
return;
|
|
8035
|
+
}
|
|
8036
|
+
this.editorPlugin.insertContent("" + item.name, 'func');
|
|
8037
|
+
},
|
|
8038
|
+
handleVariableSelect: function handleVariableSelect(item) {
|
|
8039
|
+
var _this$$props = this.$props,
|
|
8040
|
+
evalMode = _this$$props.evalMode,
|
|
8041
|
+
selfVariableName = _this$$props.selfVariableName;
|
|
8042
|
+
if (!(item.value && this.editorPlugin)) {
|
|
8043
|
+
return;
|
|
8044
|
+
}
|
|
8045
|
+
if (selfVariableName && selfVariableName === item.value) {
|
|
8046
|
+
message_default.a.warning("\u4E0D\u80FD\u4F7F\u7528\u5F53\u524D\u53D8\u91CF[" + selfVariableName + "]\uFF0C\u907F\u514D\u5FAA\u73AF\u5F15\u7528\u3002");
|
|
8047
|
+
return;
|
|
8048
|
+
}
|
|
8049
|
+
this.editorPlugin.insertContent({
|
|
8050
|
+
key: item.value,
|
|
8051
|
+
name: item.label
|
|
8052
|
+
}, 'variable');
|
|
8053
|
+
},
|
|
8054
|
+
handleChange: function handleChange(value) {
|
|
8055
|
+
this.$emit("change", value);
|
|
8056
|
+
},
|
|
8057
|
+
handleFocus: function handleFocus() {
|
|
8058
|
+
this.focused = true;
|
|
8059
|
+
},
|
|
8060
|
+
handleBlur: function handleBlur() {
|
|
8061
|
+
this.focused = false;
|
|
8062
|
+
},
|
|
8063
|
+
handleValClick: function handleValClick() {
|
|
8064
|
+
this.handleVariableSelect({
|
|
8065
|
+
value: "name",
|
|
8066
|
+
label: "名称"
|
|
8067
|
+
});
|
|
8068
|
+
}
|
|
8069
|
+
},
|
|
8070
|
+
beforeDestroy: function beforeDestroy() {
|
|
8071
|
+
this.editorPlugin && this.editorPlugin.dispose();
|
|
8072
|
+
},
|
|
8073
|
+
render: function render(h) {
|
|
8074
|
+
var mirrorParam = {
|
|
8075
|
+
attrs: Object.assign({
|
|
8076
|
+
className: "FormulaEditor-editor",
|
|
8077
|
+
value: this.value,
|
|
8078
|
+
editorFactory: this.editorFactory,
|
|
8079
|
+
editorDidMount: this.handleEditorMounted
|
|
8080
|
+
}, this.$attrs),
|
|
8081
|
+
on: Object.assign({
|
|
8082
|
+
change: this.handleChange,
|
|
8083
|
+
focus: this.handleFocus,
|
|
8084
|
+
blur: this.handleBlur
|
|
8085
|
+
}, this.$listeners),
|
|
8086
|
+
slots: this.$slots,
|
|
8087
|
+
scopedSlots: this.$scopedSlots
|
|
8088
|
+
};
|
|
8089
|
+
return h("div", {
|
|
8090
|
+
"class": ["FormulaEditor", {
|
|
8091
|
+
"is-focused": this.focused
|
|
8092
|
+
}]
|
|
8093
|
+
}, [h("section", {
|
|
8094
|
+
"class": ["FormulaEditor-content"]
|
|
8095
|
+
}, [h("header", {
|
|
8096
|
+
"class": "FormulaEditor-header"
|
|
8097
|
+
}, ["\u8868\u8FBE\u5F0F"]), h(codeMirror, babel_helper_vue_jsx_merge_props_default()([{}, mirrorParam]))]), h("section", {
|
|
8098
|
+
"class": "FormulaEditor-settings"
|
|
8099
|
+
}, [h("div", {
|
|
8100
|
+
"class": "FormulaEditor-panel"
|
|
8101
|
+
}, [this.variableMode !== 'tabs' ? h("div", {
|
|
8102
|
+
"class": "FormulaEditor-panel-header"
|
|
8103
|
+
}, ["\u53D8\u91CF"]) : null, h("div", {
|
|
8104
|
+
"class": ["FormulaEditor-panel-body", this.variableMode && "FormulaEditor-panel-body--" + this.variableMode]
|
|
8105
|
+
}, [h(variableList, babel_helper_vue_jsx_merge_props_default()([{
|
|
8106
|
+
"class": ["FormulaEditor-VariableList", "FormulaEditor-VariableList-root", this.variableClassName],
|
|
8107
|
+
"attrs": {
|
|
8108
|
+
"classPrefix": this.classPrefix,
|
|
8109
|
+
"selectMode": this.variableMode,
|
|
8110
|
+
"selfVariableName": this.selfVariableName,
|
|
8111
|
+
"data": this.variables
|
|
8112
|
+
}
|
|
8113
|
+
}, {
|
|
8114
|
+
"on": {
|
|
8115
|
+
select: this.handleVariableSelect
|
|
8116
|
+
}
|
|
8117
|
+
}]))])]), h(funcList, babel_helper_vue_jsx_merge_props_default()([{
|
|
8118
|
+
"attrs": {
|
|
8119
|
+
"className": this.functionClassName,
|
|
8120
|
+
"data": this.functionList
|
|
8121
|
+
}
|
|
8122
|
+
}, {
|
|
8123
|
+
"on": {
|
|
8124
|
+
select: this.handleFunctionSelect
|
|
8125
|
+
}
|
|
8126
|
+
}]))])]);
|
|
8127
|
+
}
|
|
8128
|
+
});
|
|
8129
|
+
// CONCATENATED MODULE: ./src/components/formula/index.js
|
|
8130
|
+
|
|
8131
|
+
/* istanbul ignore next */
|
|
8132
|
+
formula_src.install = function (Vue) {
|
|
8133
|
+
Vue.component(formula_src.name, formula_src);
|
|
8134
|
+
};
|
|
8135
|
+
/* harmony default export */ var formula = (formula_src);
|
|
8136
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/src/index.vue?vue&type=template&id=f33d57c0&
|
|
8137
|
+
var srcvue_type_template_id_f33d57c0_render = function render() {
|
|
8138
|
+
var _vm = this,
|
|
8139
|
+
_c = _vm._self._c
|
|
8140
|
+
return _c(
|
|
8141
|
+
"transition",
|
|
8142
|
+
{
|
|
8143
|
+
attrs: { name: "dialog-fade" },
|
|
8144
|
+
on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave },
|
|
8145
|
+
},
|
|
8146
|
+
[
|
|
8147
|
+
_c(
|
|
8148
|
+
"div",
|
|
8149
|
+
{
|
|
8150
|
+
directives: [
|
|
8151
|
+
{
|
|
8152
|
+
name: "show",
|
|
8153
|
+
rawName: "v-show",
|
|
8154
|
+
value: _vm.visible,
|
|
8155
|
+
expression: "visible",
|
|
8156
|
+
},
|
|
8157
|
+
],
|
|
8158
|
+
staticClass: "el-dialog__wrapper",
|
|
8159
|
+
on: {
|
|
8160
|
+
click: function ($event) {
|
|
8161
|
+
if ($event.target !== $event.currentTarget) return null
|
|
8162
|
+
return _vm.handleWrapperClick.apply(null, arguments)
|
|
8163
|
+
},
|
|
8164
|
+
},
|
|
8165
|
+
},
|
|
8166
|
+
[
|
|
8167
|
+
_c(
|
|
8168
|
+
"div",
|
|
8169
|
+
{
|
|
8170
|
+
key: _vm.key,
|
|
8171
|
+
ref: "dialog",
|
|
8172
|
+
class: [
|
|
8173
|
+
"el-dialog",
|
|
8174
|
+
{
|
|
8175
|
+
"is-scroll": _vm.scroll,
|
|
8176
|
+
"is-fullscreen": _vm.fullscreen,
|
|
8177
|
+
"el-dialog--center": _vm.center,
|
|
8178
|
+
},
|
|
8179
|
+
_vm.customClass,
|
|
8180
|
+
],
|
|
8181
|
+
style: _vm.style,
|
|
8182
|
+
attrs: {
|
|
8183
|
+
role: "dialog",
|
|
8184
|
+
"aria-modal": "true",
|
|
8185
|
+
"aria-label": _vm.title || "dialog",
|
|
8186
|
+
},
|
|
8187
|
+
},
|
|
8188
|
+
[
|
|
8189
|
+
_c(
|
|
8190
|
+
"div",
|
|
8191
|
+
{ staticClass: "el-dialog__header" },
|
|
8192
|
+
[
|
|
8193
|
+
_vm._t("title", function () {
|
|
8194
|
+
return [
|
|
8195
|
+
_c("span", { staticClass: "el-dialog__title" }, [
|
|
8196
|
+
_vm._v(_vm._s(_vm.title)),
|
|
8197
|
+
]),
|
|
8198
|
+
]
|
|
8199
|
+
}),
|
|
8200
|
+
_vm.showClose
|
|
8201
|
+
? _c(
|
|
8202
|
+
"button",
|
|
8203
|
+
{
|
|
8204
|
+
staticClass: "el-dialog__headerbtn",
|
|
8205
|
+
attrs: { type: "button", "aria-label": "Close" },
|
|
8206
|
+
on: { click: _vm.handleClose },
|
|
8207
|
+
},
|
|
8208
|
+
[
|
|
8209
|
+
_c("i", {
|
|
8210
|
+
staticClass:
|
|
8211
|
+
"el-dialog__close el-icon el-icon-close",
|
|
8212
|
+
}),
|
|
8213
|
+
]
|
|
8214
|
+
)
|
|
8215
|
+
: _vm._e(),
|
|
8216
|
+
],
|
|
8217
|
+
2
|
|
8218
|
+
),
|
|
8219
|
+
_vm.rendered
|
|
8220
|
+
? _c(
|
|
8221
|
+
"div",
|
|
8222
|
+
{ staticClass: "el-dialog__body" },
|
|
8223
|
+
[_vm._t("default")],
|
|
8224
|
+
2
|
|
8225
|
+
)
|
|
8226
|
+
: _vm._e(),
|
|
8227
|
+
_vm.$slots.footer
|
|
8228
|
+
? _c(
|
|
8229
|
+
"div",
|
|
8230
|
+
{ staticClass: "el-dialog__footer" },
|
|
8231
|
+
[_vm._t("footer")],
|
|
8232
|
+
2
|
|
8233
|
+
)
|
|
8234
|
+
: _vm._e(),
|
|
8235
|
+
]
|
|
8236
|
+
),
|
|
8237
|
+
]
|
|
8238
|
+
),
|
|
8239
|
+
]
|
|
8240
|
+
)
|
|
8241
|
+
}
|
|
8242
|
+
var srcvue_type_template_id_f33d57c0_staticRenderFns = []
|
|
8243
|
+
srcvue_type_template_id_f33d57c0_render._withStripped = true
|
|
8244
|
+
|
|
8245
|
+
|
|
8246
|
+
// CONCATENATED MODULE: ./src/components/dialog/src/index.vue?vue&type=template&id=f33d57c0&
|
|
8247
|
+
|
|
8248
|
+
// EXTERNAL MODULE: external "element-ui/src/utils/popup"
|
|
8249
|
+
var popup_ = __webpack_require__(55);
|
|
8250
|
+
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
8251
|
+
|
|
8252
|
+
// EXTERNAL MODULE: external "element-ui/src/mixins/migrating"
|
|
8253
|
+
var migrating_ = __webpack_require__(56);
|
|
8254
|
+
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
8255
|
+
|
|
8256
|
+
// EXTERNAL MODULE: external "element-ui/src/mixins/emitter"
|
|
8257
|
+
var emitter_ = __webpack_require__(57);
|
|
8258
|
+
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
8259
|
+
|
|
8260
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/dialog/src/index.vue?vue&type=script&lang=js&
|
|
8261
|
+
|
|
8262
|
+
|
|
8263
|
+
|
|
8264
|
+
/* harmony default export */ var dialog_srcvue_type_script_lang_js_ = ({
|
|
8265
|
+
name: 'Dialog',
|
|
8266
|
+
mixins: [popup_default.a, emitter_default.a, migrating_default.a],
|
|
8267
|
+
props: {
|
|
8268
|
+
title: {
|
|
8269
|
+
type: String,
|
|
8270
|
+
default: ''
|
|
8271
|
+
},
|
|
8272
|
+
modal: {
|
|
8273
|
+
type: Boolean,
|
|
8274
|
+
default: true
|
|
8275
|
+
},
|
|
8276
|
+
scroll: {
|
|
8277
|
+
type: Boolean,
|
|
8278
|
+
default: true
|
|
8279
|
+
},
|
|
8280
|
+
modalAppendToBody: {
|
|
8281
|
+
type: Boolean,
|
|
8282
|
+
default: true
|
|
8283
|
+
},
|
|
8284
|
+
appendToBody: {
|
|
8285
|
+
type: Boolean,
|
|
8286
|
+
default: false
|
|
8287
|
+
},
|
|
8288
|
+
lockScroll: {
|
|
8289
|
+
type: Boolean,
|
|
8290
|
+
default: true
|
|
8291
|
+
},
|
|
8292
|
+
closeOnClickModal: {
|
|
8293
|
+
type: Boolean,
|
|
8294
|
+
default: true
|
|
8295
|
+
},
|
|
8296
|
+
closeOnPressEscape: {
|
|
8297
|
+
type: Boolean,
|
|
8298
|
+
default: true
|
|
8299
|
+
},
|
|
8300
|
+
showClose: {
|
|
8301
|
+
type: Boolean,
|
|
8302
|
+
default: true
|
|
8303
|
+
},
|
|
8304
|
+
width: String,
|
|
8305
|
+
fullscreen: Boolean,
|
|
8306
|
+
customClass: {
|
|
8307
|
+
type: String,
|
|
8308
|
+
default: ''
|
|
8309
|
+
},
|
|
8310
|
+
top: {
|
|
8311
|
+
type: String,
|
|
8312
|
+
default: '15vh'
|
|
8313
|
+
},
|
|
8314
|
+
beforeClose: Function,
|
|
8315
|
+
center: {
|
|
8316
|
+
type: Boolean,
|
|
8317
|
+
default: false
|
|
8318
|
+
},
|
|
8319
|
+
destroyOnClose: Boolean
|
|
8320
|
+
},
|
|
8321
|
+
data: function data() {
|
|
8322
|
+
return {
|
|
8323
|
+
closed: false,
|
|
8324
|
+
key: 0
|
|
8325
|
+
};
|
|
8326
|
+
},
|
|
8327
|
+
watch: {
|
|
8328
|
+
visible: function visible(val) {
|
|
8329
|
+
var _this = this;
|
|
8330
|
+
if (val) {
|
|
8331
|
+
this.closed = false;
|
|
8332
|
+
this.$emit('open');
|
|
8333
|
+
this.$el.addEventListener('scroll', this.updatePopper);
|
|
8334
|
+
this.$nextTick(function () {
|
|
8335
|
+
_this.$refs.dialog.scrollTop = 0;
|
|
8336
|
+
});
|
|
8337
|
+
if (this.appendToBody) {
|
|
8338
|
+
document.body.appendChild(this.$el);
|
|
8339
|
+
}
|
|
8340
|
+
} else {
|
|
8341
|
+
this.$el.removeEventListener('scroll', this.updatePopper);
|
|
8342
|
+
if (!this.closed) this.$emit('close');
|
|
8343
|
+
if (this.destroyOnClose) {
|
|
8344
|
+
this.$nextTick(function () {
|
|
8345
|
+
_this.key++;
|
|
8346
|
+
});
|
|
8347
|
+
}
|
|
8348
|
+
}
|
|
8349
|
+
}
|
|
8350
|
+
},
|
|
8351
|
+
computed: {
|
|
8352
|
+
style: function style() {
|
|
8353
|
+
var style = {};
|
|
8354
|
+
if (!this.fullscreen) {
|
|
8355
|
+
style.marginTop = this.top;
|
|
8356
|
+
if (this.width) {
|
|
8357
|
+
style.width = this.width;
|
|
8358
|
+
}
|
|
8359
|
+
if (this.scroll) {
|
|
8360
|
+
style.maxHeight = "calc(100vh - " + this.top + " * 2)";
|
|
8361
|
+
}
|
|
8362
|
+
}
|
|
8363
|
+
return style;
|
|
8364
|
+
}
|
|
8365
|
+
},
|
|
8366
|
+
methods: {
|
|
8367
|
+
getMigratingConfig: function getMigratingConfig() {
|
|
8368
|
+
return {
|
|
8369
|
+
props: {
|
|
8370
|
+
'size': 'size is removed.'
|
|
8371
|
+
}
|
|
8372
|
+
};
|
|
8373
|
+
},
|
|
8374
|
+
handleWrapperClick: function handleWrapperClick() {
|
|
8375
|
+
if (!this.closeOnClickModal) return;
|
|
8376
|
+
this.handleClose();
|
|
8377
|
+
},
|
|
8378
|
+
handleClose: function handleClose() {
|
|
8379
|
+
if (typeof this.beforeClose === 'function') {
|
|
8380
|
+
this.beforeClose(this.hide);
|
|
8381
|
+
} else {
|
|
8382
|
+
this.hide();
|
|
8383
|
+
}
|
|
8384
|
+
},
|
|
8385
|
+
hide: function hide(cancel) {
|
|
8386
|
+
if (cancel !== false) {
|
|
8387
|
+
this.$emit('update:visible', false);
|
|
8388
|
+
this.$emit('close');
|
|
8389
|
+
this.closed = true;
|
|
8390
|
+
}
|
|
8391
|
+
},
|
|
8392
|
+
updatePopper: function updatePopper() {
|
|
8393
|
+
this.broadcast('ElSelectDropdown', 'updatePopper');
|
|
8394
|
+
this.broadcast('ElDropdownMenu', 'updatePopper');
|
|
8395
|
+
},
|
|
8396
|
+
afterEnter: function afterEnter() {
|
|
8397
|
+
this.$emit('opened');
|
|
8398
|
+
},
|
|
8399
|
+
afterLeave: function afterLeave() {
|
|
8400
|
+
this.$emit('closed');
|
|
8401
|
+
}
|
|
8402
|
+
},
|
|
8403
|
+
mounted: function mounted() {
|
|
8404
|
+
if (this.visible) {
|
|
8405
|
+
this.rendered = true;
|
|
8406
|
+
this.open();
|
|
8407
|
+
if (this.appendToBody) {
|
|
8408
|
+
document.body.appendChild(this.$el);
|
|
8409
|
+
}
|
|
8410
|
+
}
|
|
8411
|
+
},
|
|
8412
|
+
destroyed: function destroyed() {
|
|
8413
|
+
// if appendToBody is true, remove DOM node after destroy
|
|
8414
|
+
if (this.appendToBody && this.$el && this.$el.parentNode) {
|
|
8415
|
+
this.$el.parentNode.removeChild(this.$el);
|
|
8416
|
+
}
|
|
8417
|
+
}
|
|
8418
|
+
});
|
|
8419
|
+
// CONCATENATED MODULE: ./src/components/dialog/src/index.vue?vue&type=script&lang=js&
|
|
8420
|
+
/* harmony default export */ var components_dialog_srcvue_type_script_lang_js_ = (dialog_srcvue_type_script_lang_js_);
|
|
8421
|
+
// CONCATENATED MODULE: ./src/components/dialog/src/index.vue
|
|
8422
|
+
|
|
8423
|
+
|
|
8424
|
+
|
|
8425
|
+
|
|
8426
|
+
|
|
8427
|
+
/* normalize component */
|
|
8428
|
+
|
|
8429
|
+
var dialog_src_component = normalizeComponent(
|
|
8430
|
+
components_dialog_srcvue_type_script_lang_js_,
|
|
8431
|
+
srcvue_type_template_id_f33d57c0_render,
|
|
8432
|
+
srcvue_type_template_id_f33d57c0_staticRenderFns,
|
|
8433
|
+
false,
|
|
8434
|
+
null,
|
|
8435
|
+
null,
|
|
8436
|
+
null
|
|
8437
|
+
|
|
8438
|
+
)
|
|
8439
|
+
|
|
8440
|
+
/* harmony default export */ var dialog_src = (dialog_src_component.exports);
|
|
8441
|
+
// CONCATENATED MODULE: ./src/components/dialog/index.js
|
|
8442
|
+
|
|
8443
|
+
dialog_src.install = function (Vue) {
|
|
8444
|
+
Vue.component(dialog_src.name, dialog_src);
|
|
8445
|
+
};
|
|
8446
|
+
/* harmony default export */ var dialog = (dialog_src);
|
|
8447
|
+
// CONCATENATED MODULE: ./src/index.js
|
|
8448
|
+
|
|
8449
|
+
|
|
5639
8450
|
|
|
5640
8451
|
|
|
5641
8452
|
|
|
@@ -5649,7 +8460,7 @@ crud_src.install = function (Vue) {
|
|
|
5649
8460
|
|
|
5650
8461
|
|
|
5651
8462
|
|
|
5652
|
-
var components = [components_form, components_form_input, components_form_item, form_group, form_dialog, form_view, form_view_group, form_view_dialog, components_table, components_table_column, table_search, table_editable, crud];
|
|
8463
|
+
var components = [components_form, components_form_input, components_form_item, form_group, form_dialog, form_view, form_view_group, form_view_dialog, components_table, components_table_column, table_search, table_editable, crud, formula, dialog];
|
|
5653
8464
|
var install = function install(Vue, opts) {
|
|
5654
8465
|
if (opts === void 0) {
|
|
5655
8466
|
opts = {};
|
|
@@ -5682,7 +8493,9 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
5682
8493
|
TableColumn: components_table_column,
|
|
5683
8494
|
TableSearch: table_search,
|
|
5684
8495
|
TableEditable: table_editable,
|
|
5685
|
-
Crud: crud
|
|
8496
|
+
Crud: crud,
|
|
8497
|
+
Formula: formula,
|
|
8498
|
+
Dialog: dialog
|
|
5686
8499
|
});
|
|
5687
8500
|
|
|
5688
8501
|
/***/ })
|