free-fe-core-modules 0.0.55 → 0.1.2
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/components/Basic/EIcon.vue +4 -14
- package/components/Dialog/index.js +1 -1
- package/free-field/Fields/AgreementCheck.js +3 -3
- package/free-field/Fields/DateRange.js +4 -3
- package/free-field/Fields/DynamicList.js +1 -2
- package/free-field/Fields/File.vue +46 -152
- package/free-field/Fields/FileList.vue +47 -156
- package/free-field/Fields/FixedList.vue +17 -49
- package/free-field/Fields/FreeFieldList.vue +17 -64
- package/free-field/Fields/Image.vue +50 -128
- package/free-field/Fields/ImageList.vue +42 -107
- package/free-field/Fields/Number.js +0 -1
- package/free-field/Fields/Permission.vue +8 -20
- package/free-field/Fields/Search.vue +51 -109
- package/free-field/Fields/Select.vue +49 -130
- package/free-field/Fields/SingleList.vue +19 -28
- package/free-field/Fields/YearRange.vue +22 -36
- package/free-field/Fields/pdfviewer.js +5 -6
- package/free-field/composible/fieldWrapper.js +1 -2
- package/free-field/composible/useUploader.js +5 -5
- package/index.js +8 -9
- package/package.json +1 -1
- package/view/dict/index.vue +27 -66
|
@@ -1,107 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span :class="(Field && Field.AsCheck) ? 'free-field-select' :
|
|
3
3
|
'free-field-select simple-field row'">
|
|
4
|
-
<span
|
|
5
|
-
v-if="
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
<span
|
|
13
|
-
:class="`field-label field-label-readonly ${(Field.Label && Field.Label.trim().length)
|
|
14
|
-
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
|
|
15
|
-
v-if="Field.Label !== void 0"
|
|
16
|
-
>
|
|
17
|
-
<q-tooltip
|
|
18
|
-
v-if="Field.Description"
|
|
19
|
-
anchor="top right"
|
|
20
|
-
>{{$t(Field.Description)}}</q-tooltip>
|
|
21
|
-
{{$t(Field.Label) || ''}}
|
|
22
|
-
<span
|
|
23
|
-
v-if="Field.Required"
|
|
24
|
-
class="required-mark"
|
|
25
|
-
>*</span>
|
|
4
|
+
<span v-if="!Field.AsCheck" class="row no-wrap items-center full-width inline-block">
|
|
5
|
+
<span v-if="Field.ReadOnly" class="full-width">
|
|
6
|
+
<span :class="`field-label field-label-readonly ${(Field.Label && Field.Label.trim().length)
|
|
7
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`" v-if="Field.Label !== void 0">
|
|
8
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ $t(Field.Description) }}</q-tooltip>
|
|
9
|
+
{{ $t(Field.Label) || '' }}
|
|
10
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
26
11
|
</span>
|
|
27
12
|
<span class="readonly-content">
|
|
28
|
-
<span
|
|
29
|
-
|
|
30
|
-
v-if="Field.Info && Field.Info.Prefix"
|
|
31
|
-
>
|
|
32
|
-
{{Field.Info.Prefix}}
|
|
13
|
+
<span class="prefix" v-if="Field.Info && Field.Info.Prefix">
|
|
14
|
+
{{ Field.Info.Prefix }}
|
|
33
15
|
</span>
|
|
34
16
|
<div v-if="Field.Info && Field.Info.Chip">
|
|
35
17
|
<q-chip v-bind="Field.Info.ChipOptions || {}" v-for="(opt, idx) in readonlyContent || []" :key="idx">
|
|
36
|
-
{{opt}}
|
|
18
|
+
{{ opt }}
|
|
37
19
|
</q-chip>
|
|
38
20
|
</div>
|
|
39
21
|
<span v-else :style="(Field.Info && Field.Info.Style) ? Field.Info.Style : ''">
|
|
40
|
-
{{readonlyContent}}
|
|
22
|
+
{{ readonlyContent }}
|
|
41
23
|
</span>
|
|
42
|
-
<span
|
|
43
|
-
class="postfix"
|
|
44
|
-
v-if="Field.Info && Field.Info.Postfix"
|
|
45
|
-
>{{Field.OptiInfons.Postfix}}</span>
|
|
24
|
+
<span class="postfix" v-if="Field.Info && Field.Info.Postfix">{{ Field.OptiInfons.Postfix }}</span>
|
|
46
25
|
</span>
|
|
47
26
|
</span>
|
|
48
27
|
|
|
49
|
-
<q-select
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
|
|
55
|
-
:
|
|
56
|
-
option-value="Value"
|
|
57
|
-
option-label="Label"
|
|
58
|
-
map-options
|
|
59
|
-
emit-value
|
|
60
|
-
:label="Field.Placeholder || $t(getModule('core-modules').config['defaultSelectFieldPlaceholder'])"
|
|
61
|
-
:multiple="Field.Multiple"
|
|
62
|
-
:readonly="Field.ReadOnly"
|
|
63
|
-
ref="fieldToValid"
|
|
64
|
-
:use-input="Field && (Field.UseInput || (Field.Info?.CanFilter))"
|
|
65
|
-
@filter="filterFunc"
|
|
66
|
-
:use-chips="Field && (Field.UseChip || (Field.Info && Field.Info.Chip))"
|
|
67
|
-
v-bind="inputControlSettings"
|
|
68
|
-
:rules="Field.Rules"
|
|
69
|
-
:new-value-mode="Field?.NewValueMode ? 'add' : undefined"
|
|
70
|
-
>
|
|
28
|
+
<q-select v-else popup-content-class="free-field-select-control" hide-bottom-space :modelValue="fieldData.value"
|
|
29
|
+
@update:modelValue="selectChanged" :options="localOptions" option-value="Value" option-label="Label" map-options
|
|
30
|
+
emit-value :label="Field.Placeholder || $t(getModule('core-modules').config['defaultSelectFieldPlaceholder'])"
|
|
31
|
+
:multiple="Field.Multiple" :readonly="Field.ReadOnly" ref="fieldToValid"
|
|
32
|
+
:use-input="Field && (Field.UseInput || (Field.Info?.CanFilter))" @filter="filterFunc"
|
|
33
|
+
:use-chips="Field && (Field.UseChip || (Field.Info && Field.Info.Chip))" v-bind="inputControlSettings"
|
|
34
|
+
:rules="Field.Rules" :new-value-mode="Field?.NewValueMode ? 'add' : undefined">
|
|
71
35
|
<template v-slot:before>
|
|
72
|
-
<span
|
|
73
|
-
:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<q-tooltip
|
|
78
|
-
v-if="Field.Description"
|
|
79
|
-
anchor="top right"
|
|
80
|
-
>{{$t(Field.Description)}}</q-tooltip>
|
|
81
|
-
{{$t(Field.Label) || ''}}
|
|
82
|
-
<span
|
|
83
|
-
v-if="Field.Required"
|
|
84
|
-
class="required-mark"
|
|
85
|
-
>*</span>
|
|
36
|
+
<span :class="`field-label ${(Field.Label && Field.Label.trim().length)
|
|
37
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`" v-if="Field.Label !== void 0">
|
|
38
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ $t(Field.Description) }}</q-tooltip>
|
|
39
|
+
{{ $t(Field.Label) || '' }}
|
|
40
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
86
41
|
</span>
|
|
87
42
|
</template>
|
|
88
43
|
|
|
89
44
|
<template v-slot:option="scope">
|
|
90
|
-
<q-item
|
|
91
|
-
v-
|
|
92
|
-
v-on="scope.itemEvents"
|
|
93
|
-
>
|
|
94
|
-
<q-item-section
|
|
95
|
-
avatar
|
|
96
|
-
v-if="scope.opt.Icon"
|
|
97
|
-
>
|
|
45
|
+
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
|
|
46
|
+
<q-item-section avatar v-if="scope.opt.Icon">
|
|
98
47
|
<e-icon :name="scope.opt.Icon" />
|
|
99
48
|
</q-item-section>
|
|
100
49
|
|
|
101
50
|
<q-item-section>
|
|
102
|
-
<q-item-label v-html="scope.opt.Label" />
|
|
51
|
+
<q-item-label v-dompurify-html="scope.opt.Label" />
|
|
103
52
|
<q-tooltip v-if="scope.opt.Tooltip">
|
|
104
|
-
{{scope.opt.Tooltip}}
|
|
53
|
+
{{ scope.opt.Tooltip }}
|
|
105
54
|
</q-tooltip>
|
|
106
55
|
<!-- <q-item-label caption v-if="scope.opt.Description" class="ellipsis">
|
|
107
56
|
{{ scope.opt.Description }}
|
|
@@ -112,63 +61,33 @@
|
|
|
112
61
|
</q-select>
|
|
113
62
|
<slot name="warning"></slot>
|
|
114
63
|
</span>
|
|
115
|
-
<span
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
|
|
122
|
-
v-if="Field.Label !== void 0"
|
|
123
|
-
>
|
|
124
|
-
<q-tooltip
|
|
125
|
-
v-if="Field.Description"
|
|
126
|
-
anchor="top right"
|
|
127
|
-
>{{$t(Field.Description)}}</q-tooltip>
|
|
128
|
-
{{$t(Field.Label) || ''}}
|
|
129
|
-
<span
|
|
130
|
-
v-if="Field.Required"
|
|
131
|
-
class="required-mark"
|
|
132
|
-
>*</span>
|
|
64
|
+
<span v-else class="free-field-select-ascheck row items-start no-wrap">
|
|
65
|
+
<span :class="`field-label ${(Field.Label && Field.Label.trim().length)
|
|
66
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`" v-if="Field.Label !== void 0">
|
|
67
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ $t(Field.Description) }}</q-tooltip>
|
|
68
|
+
{{ $t(Field.Label) || '' }}
|
|
69
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
133
70
|
</span>
|
|
134
71
|
<span class="column items-start no-wrap">
|
|
135
72
|
<div>
|
|
136
73
|
<slot name="warning"></slot>
|
|
137
74
|
</div>
|
|
138
|
-
<div
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
>
|
|
142
|
-
|
|
143
|
-
<div
|
|
144
|
-
class="free-field--error-tag"
|
|
145
|
-
v-if="hasError"
|
|
146
|
-
>
|
|
75
|
+
<div class="checkbox-list row" :class="hasError ? 'free-field--error' : ''">
|
|
76
|
+
|
|
77
|
+
<div class="free-field--error-tag" v-if="hasError">
|
|
147
78
|
<e-icon name="error"></e-icon>
|
|
148
79
|
</div>
|
|
149
|
-
<q-checkbox
|
|
150
|
-
|
|
151
|
-
:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
:label="option.Label || ''"
|
|
158
|
-
v-model="checked"
|
|
159
|
-
:val="option.Value"
|
|
160
|
-
:disable="Field.ReadOnly"
|
|
161
|
-
@update:modelValue="checkChanged(option.Value)"
|
|
162
|
-
:checked-icon="checkedIcon(option)"
|
|
163
|
-
>
|
|
164
|
-
<q-tooltip v-if="option.opt?.Tooltip"
|
|
165
|
-
anchor="bottom middle">
|
|
166
|
-
{{$t(option.opt.Tooltip) || ''}}
|
|
80
|
+
<q-checkbox v-for="(option, index) in Field.Options" :class="{
|
|
81
|
+
checked: checked.includes(option.Value),
|
|
82
|
+
'with-inner-extra': option.InnerExtra?.length,
|
|
83
|
+
}" :key="index" hide-bottom-space :label="option.Label || ''" v-model="checked" :val="option.Value"
|
|
84
|
+
:disable="Field.ReadOnly" @update:modelValue="checkChanged(option.Value)"
|
|
85
|
+
:checked-icon="checkedIcon(option)">
|
|
86
|
+
<q-tooltip v-if="option.opt?.Tooltip" anchor="bottom middle">
|
|
87
|
+
{{ $t(option.opt.Tooltip) || '' }}
|
|
167
88
|
</q-tooltip>
|
|
168
89
|
<div class="option-inner-extra" v-if="option.InnerExtra?.length">
|
|
169
|
-
<free-field
|
|
170
|
-
v-for="(fld, idx) in option.InnerExtra || []" :key="idx"
|
|
171
|
-
:Field="fld"
|
|
90
|
+
<free-field v-for="(fld, idx) in option.InnerExtra || []" :key="idx" :Field="fld"
|
|
172
91
|
:values="data"></free-field>
|
|
173
92
|
</div>
|
|
174
93
|
</q-checkbox>
|
|
@@ -180,8 +99,8 @@
|
|
|
180
99
|
|
|
181
100
|
<script>
|
|
182
101
|
import { ref, computed, defineComponent, getCurrentInstance, watchEffect } from 'vue';
|
|
183
|
-
import { useFreeField, freeFieldProps } from '../composible/useFreeField';
|
|
184
|
-
import { useFormValidator} from '../../composible/useFormValidator';
|
|
102
|
+
import { useFreeField, freeFieldProps } from '../composible/useFreeField.js';
|
|
103
|
+
import { useFormValidator} from '../../composible/useFormValidator.js';
|
|
185
104
|
|
|
186
105
|
const NUM_ICONS = [
|
|
187
106
|
'①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩',
|
|
@@ -445,7 +364,7 @@ export default defineComponent({
|
|
|
445
364
|
}
|
|
446
365
|
|
|
447
366
|
const paramObj = {};
|
|
448
|
-
|
|
367
|
+
let params = props.Field.Info.Params || '';
|
|
449
368
|
if (params.length > 0) {
|
|
450
369
|
if (typeof params === 'string') {
|
|
451
370
|
params = params.split(',');
|
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="free-field-single-list row" v-if="Field">
|
|
3
|
-
<span
|
|
4
|
-
:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<q-tooltip
|
|
9
|
-
v-if="Field.Description"
|
|
10
|
-
anchor="top right"
|
|
11
|
-
>{{Field.Description}}</q-tooltip>
|
|
12
|
-
{{Field.Label || ''}}
|
|
13
|
-
<span
|
|
14
|
-
v-if="Field.Required"
|
|
15
|
-
class="required-mark"
|
|
16
|
-
>*</span>
|
|
3
|
+
<span :class="`field-label ${(Field.Label && Field.Label.trim().length)
|
|
4
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`" v-if="Field.Label !== void 0">
|
|
5
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ Field.Description }}</q-tooltip>
|
|
6
|
+
{{ Field.Label || '' }}
|
|
7
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
17
8
|
</span>
|
|
18
9
|
|
|
19
10
|
<table flat>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
<thead v-if="Field && Field.Options && Field.Options.Header">
|
|
12
|
+
<tr>
|
|
13
|
+
<td>{{ Field.Options.Header }}</td>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
<tbody>
|
|
17
|
+
<tr v-for="(row, index) in localData" :key="index">
|
|
18
|
+
<td>
|
|
19
|
+
{{ row }}
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
</tbody>
|
|
32
23
|
</table>
|
|
33
24
|
</div>
|
|
34
25
|
</template>
|
|
35
26
|
|
|
36
27
|
<script>
|
|
37
|
-
import { defineComponent,
|
|
38
|
-
import { useFreeField, freeFieldProps } from '../composible/useFreeField';
|
|
28
|
+
import { defineComponent, computed } from 'vue';
|
|
29
|
+
import { useFreeField, freeFieldProps } from '../composible/useFreeField.js';
|
|
39
30
|
|
|
40
31
|
export default defineComponent({
|
|
41
32
|
name: 'InputFieldSingleList',
|
|
@@ -1,48 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span class="free-field-year-range simple-field">
|
|
3
3
|
<span v-if="Field.ReadOnly">
|
|
4
|
-
<span
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
<q-tooltip v-if="Field.Description" anchor="top right">{{Field.Description}}</q-tooltip>
|
|
10
|
-
{{Field.Label || ''}}
|
|
4
|
+
<span :class="`field-label field-label-readonly ${(Field.Label && Field.Label.trim().length)
|
|
5
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`" v-if="Field.Label">
|
|
6
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ Field.Description }}</q-tooltip>
|
|
7
|
+
{{ Field.Label || '' }}
|
|
11
8
|
<span v-if="Field.Required" class="required-mark">*</span>
|
|
12
9
|
</span>
|
|
13
|
-
<span class="readonly-content">{{fieldData.value}}</span>
|
|
10
|
+
<span class="readonly-content">{{ fieldData.value }}</span>
|
|
14
11
|
</span>
|
|
15
12
|
<span v-else class="row items-center no-wrap">
|
|
16
|
-
<q-select
|
|
17
|
-
v-
|
|
18
|
-
hide-bottom-space
|
|
19
|
-
:options="minYearOptions"
|
|
20
|
-
:readonly="Field.ReadOnly"
|
|
21
|
-
@update:modelValue="rangeChanged"
|
|
22
|
-
v-bind="inputControlSettings"
|
|
23
|
-
ref="input_field_validator_first"
|
|
24
|
-
>
|
|
13
|
+
<q-select v-model="range.min" hide-bottom-space :options="minYearOptions" :readonly="Field.ReadOnly"
|
|
14
|
+
@update:modelValue="rangeChanged" v-bind="inputControlSettings" ref="input_field_validator_first">
|
|
25
15
|
<template v-slot:before v-if="Field.Label !== void 0">
|
|
26
|
-
<span
|
|
27
|
-
:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<q-tooltip v-if="Field.Description" anchor="top right">{{Field.Description}}</q-tooltip>
|
|
31
|
-
{{Field.Label || ''}}
|
|
16
|
+
<span :class="`field-label ${(Field.Label && Field.Label.trim().length)
|
|
17
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`">
|
|
18
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{ Field.Description }}</q-tooltip>
|
|
19
|
+
{{ Field.Label || '' }}
|
|
32
20
|
<span v-if="Field.Required" class="required-mark">*</span>
|
|
33
21
|
</span>
|
|
34
22
|
</template>
|
|
35
23
|
</q-select>
|
|
36
|
-
<span class="free-field-range-separator">{{`${Field.Separator || '~'}`}}</span>
|
|
37
|
-
<q-select
|
|
38
|
-
v-
|
|
39
|
-
hide-bottom-space
|
|
40
|
-
:options="maxYearOptions"
|
|
41
|
-
:readonly="Field.ReadOnly"
|
|
42
|
-
@update:modelValue="rangeChanged"
|
|
43
|
-
v-bind="inputControlSettings"
|
|
44
|
-
ref="input_field_validator_second"
|
|
45
|
-
/>
|
|
24
|
+
<span class="free-field-range-separator">{{ `${Field.Separator || '~'}` }}</span>
|
|
25
|
+
<q-select v-model="range.max" hide-bottom-space :options="maxYearOptions" :readonly="Field.ReadOnly"
|
|
26
|
+
@update:modelValue="rangeChanged" v-bind="inputControlSettings" ref="input_field_validator_second" />
|
|
46
27
|
</span>
|
|
47
28
|
|
|
48
29
|
<slot name="warning"></slot>
|
|
@@ -50,9 +31,9 @@
|
|
|
50
31
|
</template>
|
|
51
32
|
|
|
52
33
|
<script>
|
|
53
|
-
import { defineComponent, ref } from 'vue';
|
|
54
|
-
import { useFreeField, freeFieldProps } from '../composible/useFreeField';
|
|
55
|
-
import { useFormValidator} from '../../composible/useFormValidator';
|
|
34
|
+
import { defineComponent, ref, watch, watchEffect, computed } from 'vue';
|
|
35
|
+
import { useFreeField, freeFieldProps } from '../composible/useFreeField.js';
|
|
36
|
+
import { useFormValidator} from '../../composible/useFormValidator.js';
|
|
56
37
|
|
|
57
38
|
export default defineComponent({
|
|
58
39
|
name: 'InputFieldYearRange',
|
|
@@ -96,6 +77,11 @@ export default defineComponent({
|
|
|
96
77
|
const min = ref('');
|
|
97
78
|
const max = ref('');
|
|
98
79
|
|
|
80
|
+
const range = ref({
|
|
81
|
+
min: min,
|
|
82
|
+
max: max,
|
|
83
|
+
});
|
|
84
|
+
|
|
99
85
|
const rangeChanged = () => {
|
|
100
86
|
setFieldData([min.value, max.value].join(props.Field.Separator || '~'), emit);
|
|
101
87
|
};
|
|
@@ -57,9 +57,9 @@ export default {
|
|
|
57
57
|
},
|
|
58
58
|
[
|
|
59
59
|
($q.platform.is.electron || props.type === 'pdfjs')
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
? vm.__renderIFramePDFJS(h)
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
: vm.__renderObject(h),
|
|
64
64
|
],
|
|
65
65
|
);
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
};
|
|
70
70
|
},
|
|
71
71
|
methods: {
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
__renderObject(h) {
|
|
74
74
|
return h(
|
|
75
75
|
'object',
|
|
@@ -89,13 +89,13 @@ export default {
|
|
|
89
89
|
},
|
|
90
90
|
[
|
|
91
91
|
// browser object not supported, try iframe
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
this.__renderIFrame(h),
|
|
94
94
|
],
|
|
95
95
|
);
|
|
96
96
|
},
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
__renderIFrame(h) {
|
|
100
100
|
return h(
|
|
101
101
|
'iframe',
|
|
@@ -108,7 +108,6 @@ export default {
|
|
|
108
108
|
);
|
|
109
109
|
},
|
|
110
110
|
|
|
111
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
112
111
|
__renderIFramePDFJS(h) {
|
|
113
112
|
return h(
|
|
114
113
|
'iframe',
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
|
|
32
32
|
const localField = computed(() => {
|
|
33
33
|
const lField = Object.clone(props.Field);
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
lField.Rules = lField.Rules || [];
|
|
36
36
|
for (let i = 0; i < lField.Rules.length; i += 1) {
|
|
37
37
|
const rule = lField.Rules[i];
|
|
@@ -70,7 +70,6 @@ export default defineComponent({
|
|
|
70
70
|
`;
|
|
71
71
|
|
|
72
72
|
try {
|
|
73
|
-
// eslint-disable-next-line no-eval
|
|
74
73
|
return eval(funcStr);
|
|
75
74
|
} catch (ex) {
|
|
76
75
|
console.error(ex)
|
|
@@ -8,7 +8,7 @@ function fileSizeStrToNumber (s) {
|
|
|
8
8
|
const sizeMatch = s.match(/^([0-9]*)(k|m|g*)(b*)/);
|
|
9
9
|
|
|
10
10
|
if (sizeMatch) {
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
// const [tmp, num, unit] = sizeMatch;
|
|
13
13
|
const num = sizeMatch[1];
|
|
14
14
|
const unit = sizeMatch[2];
|
|
@@ -58,7 +58,7 @@ function fileSizeNumberToStr (s) {
|
|
|
58
58
|
return `${sizeNum.toFixed(2)}${unit}`;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
function _getFileType (f) {
|
|
63
63
|
if (!f) return {};
|
|
64
64
|
|
|
@@ -100,7 +100,7 @@ function _getFileType (f) {
|
|
|
100
100
|
return {};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export function useUploader(props
|
|
103
|
+
export function useUploader(props) {
|
|
104
104
|
const { proxy:vm } = getCurrentInstance();
|
|
105
105
|
|
|
106
106
|
const showPreview = ref(false);
|
|
@@ -169,7 +169,7 @@ export function useUploader(props, ctx) {
|
|
|
169
169
|
|
|
170
170
|
switch (fType) {
|
|
171
171
|
case 'image':
|
|
172
|
-
|
|
172
|
+
|
|
173
173
|
type = file.id || (file.__img ? file.__img.src : '');
|
|
174
174
|
break;
|
|
175
175
|
case 'audio':
|
|
@@ -269,7 +269,7 @@ export function useUploader(props, ctx) {
|
|
|
269
269
|
if (file.id) {
|
|
270
270
|
url = vm.$filter('serverImage', file.id);
|
|
271
271
|
} else {
|
|
272
|
-
|
|
272
|
+
|
|
273
273
|
url = file.__img ? file.__img.src : '';
|
|
274
274
|
}
|
|
275
275
|
break;
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
2
|
import { date as quasarDate } from 'quasar';
|
|
3
3
|
import config from '@/config';
|
|
4
|
-
import useAppStore from '@/stores/app';
|
|
4
|
+
// import useAppStore from '@/stores/app';
|
|
5
5
|
import MsgDialog from './components/Dialog/index';
|
|
6
6
|
|
|
7
7
|
import EIcon from './components/Basic/EIcon.vue';
|
|
8
|
-
import StickyButtons from './components/StickyButtons';
|
|
9
|
-
import SelectLocales from './components/SelectLocales';
|
|
8
|
+
import StickyButtons from './components/StickyButtons/index.vue';
|
|
9
|
+
import SelectLocales from './components/SelectLocales/index.vue';
|
|
10
10
|
import SummaryHead from './components/Basic/SummaryHead.vue';
|
|
11
11
|
import SlidingCarousel from './components/SlidingCarousel/index.vue';
|
|
12
12
|
import SlidingNews from './components/SlidingNews/index.vue';
|
|
@@ -185,7 +185,6 @@ const filters = {
|
|
|
185
185
|
}
|
|
186
186
|
desc = step.Description.find((s) => s.Status === (status || stepStatus || '').toString());
|
|
187
187
|
desc = desc ? desc.Description : '';
|
|
188
|
-
desc = desc;
|
|
189
188
|
}
|
|
190
189
|
|
|
191
190
|
desc = desc || '未知状态';
|
|
@@ -196,10 +195,10 @@ const filters = {
|
|
|
196
195
|
export default (app, root) => {
|
|
197
196
|
root.use(MsgDialog);
|
|
198
197
|
|
|
199
|
-
const appStore = useAppStore();
|
|
198
|
+
// const appStore = useAppStore();
|
|
200
199
|
|
|
201
200
|
const validatorMobilePhone = (d) => !d || /^(0|86|17951)?(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])[0-9]{8}$/.test(d);
|
|
202
|
-
const validatorEmail = (d) => !d || /^(([^<>()
|
|
201
|
+
const validatorEmail = (d) => !d || /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(d);
|
|
203
202
|
return {
|
|
204
203
|
config: {
|
|
205
204
|
backendDependencies: ["core-modules"],
|
|
@@ -413,7 +412,7 @@ export default (app, root) => {
|
|
|
413
412
|
validatorOnlyNIZ: (d) => /^([0]|-[1-9][0-9]+)$/.test(d.toString()),
|
|
414
413
|
|
|
415
414
|
//
|
|
416
|
-
validatorUrl: (d) => /^(ht|f)tp(s?)
|
|
415
|
+
validatorUrl: (d) => /^(ht|f)tp(s?):\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-.?,'/\\+&%$#_]*)?/.test(d),
|
|
417
416
|
validatorOfficePhone: (d) => /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}$/.test(d),
|
|
418
417
|
validatorChinaZip: (d) => /^[1-9]{1}(\d+){5}$/.test(d),
|
|
419
418
|
|
|
@@ -421,8 +420,8 @@ export default (app, root) => {
|
|
|
421
420
|
validatorPwd0: (d) => /^.*(?=.{6,16}).*$/.test(d),
|
|
422
421
|
validatorPwd1: (d) => /^.{6,16}$/.test(d),
|
|
423
422
|
validatorPwd2: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z])(?=.*[a-z]).*$/.test(d),
|
|
424
|
-
validatorPwd3: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[
|
|
425
|
-
validatorPwd4: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z]{2,})(?=.*[a-z]{2,})(?=.*[
|
|
423
|
+
validatorPwd3: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*?()]).*$/.test(d),
|
|
424
|
+
validatorPwd4: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z]{2,})(?=.*[a-z]{2,})(?=.*[!@#$%^&*?()]).*$/.test(d),
|
|
426
425
|
},
|
|
427
426
|
}
|
|
428
427
|
};
|