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.
@@ -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="!Field.AsCheck"
6
- class="row no-wrap items-center full-width inline-block"
7
- >
8
- <span
9
- v-if="Field.ReadOnly"
10
- class="full-width"
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
- class="prefix"
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
- v-else
51
- popup-content-class="free-field-select-control"
52
- hide-bottom-space
53
- :modelValue="fieldData.value"
54
- @update:modelValue="selectChanged"
55
- :options="localOptions"
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
- :class="`field-label ${(Field.Label && Field.Label.trim().length)
74
- ? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
75
- v-if="Field.Label !== void 0"
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-bind="scope.itemProps"
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
- v-else
117
- class="free-field-select-ascheck row items-start no-wrap"
118
- >
119
- <span
120
- :class="`field-label ${(Field.Label && Field.Label.trim().length)
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
- class="checkbox-list row"
140
- :class="hasError ? 'free-field--error' : ''"
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
- v-for="(option, index) in Field.Options"
151
- :class="{
152
- checked: checked.includes(option.Value),
153
- 'with-inner-extra': option.InnerExtra?.length,
154
- }"
155
- :key="index"
156
- hide-bottom-space
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
- const params = props.Field.Info.Params || '';
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
- :class="`field-label ${(Field.Label && Field.Label.trim().length)
5
- ? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
6
- v-if="Field.Label !== void 0"
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
- <thead v-if="Field && Field.Options && Field.Options.Header">
21
- <tr>
22
- <td>{{Field.Options.Header}}</td>
23
- </tr>
24
- </thead>
25
- <tbody>
26
- <tr v-for="(row, index) in localData" :key="index">
27
- <td>
28
- {{row}}
29
- </td>
30
- </tr>
31
- </tbody>
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, ref, computed } from 'vue';
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
- :class="`field-label field-label-readonly ${(Field.Label && Field.Label.trim().length)
6
- ? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
7
- v-if="Field.Label"
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-model="range.min"
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
- :class="`field-label ${(Field.Label && Field.Label.trim().length)
28
- ? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
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-model="range.max"
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
- // eslint-disable-next-line no-underscore-dangle
60
+
61
61
  ? vm.__renderIFramePDFJS(h)
62
- // eslint-disable-next-line no-underscore-dangle
62
+
63
63
  : vm.__renderObject(h),
64
64
  ],
65
65
  );
@@ -69,7 +69,7 @@ export default {
69
69
  };
70
70
  },
71
71
  methods: {
72
- // eslint-disable-next-line no-underscore-dangle
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
- // eslint-disable-next-line no-underscore-dangle
92
+
93
93
  this.__renderIFrame(h),
94
94
  ],
95
95
  );
96
96
  },
97
97
 
98
- // eslint-disable-next-line no-underscore-dangle
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
- // eslint-disable-next-line no-unused-vars
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
- // eslint-disable-next-line no-underscore-dangle
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, ctx) {
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
- // eslint-disable-next-line no-underscore-dangle
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
- // eslint-disable-next-line no-underscore-dangle
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 || /^(([^<>()\[\]\\.,;:\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);
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?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/.test(d),
415
+ validatorUrl: (d) => /^(ht|f)tp(s?):\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-.?,'/\\+&amp;%$#_]*)?/.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])(?=.*[!@#$%^&*?\(\)]).*$/.test(d),
425
- validatorPwd4: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z]{2,})(?=.*[a-z]{2,})(?=.*[!@#$%^&*?\(\)]).*$/.test(d),
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-fe-core-modules",
3
- "version": "0.0.55",
3
+ "version": "0.1.2",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",