@v2coding/ui 1.1.9 → 1.1.11

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.
@@ -123,7 +123,9 @@ const DefaultSetting = {
123
123
  version: '2.0',
124
124
  key: process.env.VUE_APP_AMAP_KEY // eslint-disable-line
125
125
 
126
- }
126
+ },
127
+ uploadType: 'oss',
128
+ uploadSignUrl: '/aliyun/oss'
127
129
  };
128
130
  var DefaultSetting$1 = DefaultSetting;
129
131
 
@@ -1933,6 +1935,43 @@ const DefaultVType = {
1933
1935
  pattern: /^(?=.*[a-zA-Z])(?=.*\d)[^]{6,20}$/,
1934
1936
  message: message || `请输入6-20位的${label},至少包含字母和字符串`
1935
1937
  };
1938
+ },
1939
+ complexCipher: _ref17 => {
1940
+ return {
1941
+ validator: (rule, value, callback) => {
1942
+ // 检查重复的数字
1943
+ const repeatingRegex = /(\d)\1{5,}/; // 匹配连续重复6次或以上的数字
1944
+ // 检查连续递增的数字
1945
+
1946
+ for (let i = 0; i < value.length - 1; i++) {
1947
+ if (Number(value[i + 1]) - Number(value[i]) === 1) {
1948
+ const sequenceStart = i;
1949
+ let sequenceEnd = i + 1; // 1 < 6 && 2 - 1 === 1
1950
+ // 2 < 6 && 3 - 2 === 1
1951
+ // 3 < 6 && 4 - 3 === 1
1952
+ // .....
1953
+
1954
+ while (sequenceEnd < value.length && Number(value[sequenceEnd]) - Number(value[sequenceEnd - 1]) === 1) {
1955
+ sequenceEnd++;
1956
+ }
1957
+
1958
+ if (sequenceEnd - sequenceStart >= 6) {
1959
+ // 至少需要6个数字才能构成连续序列
1960
+ callback(new Error('不能输入连续的数字'));
1961
+ return;
1962
+ }
1963
+
1964
+ i = sequenceEnd - 1; // 跳过已检查的序列
1965
+ }
1966
+ }
1967
+
1968
+ if (repeatingRegex.test(value)) {
1969
+ callback(new Error('不能连续输入任何一个重复的数字超过6个'));
1970
+ } else {
1971
+ callback();
1972
+ }
1973
+ }
1974
+ };
1936
1975
  }
1937
1976
  };
1938
1977
 
@@ -1944,7 +1983,6 @@ const initDefaultVType = () => {
1944
1983
  };
1945
1984
 
1946
1985
  initDefaultVType();
1947
- var VType$1 = VType;
1948
1986
 
1949
1987
  var FieldMixin = {
1950
1988
  inheritAttrs: false,
@@ -4723,12 +4761,7 @@ Font.whitelist = ['Arial', 'FangSong', 'HeiTi', 'Microsoft'];
4723
4761
  Quill.register(Font, true);
4724
4762
  const defaultConfig = {
4725
4763
  upload: {
4726
- url: _ref => {
4727
- let {
4728
- type
4729
- } = _ref;
4730
- return type === 'oss' ? '/aliyun/oss' : '/api/oss/upload';
4731
- },
4764
+ url: () => getSetting().uploadSignUrl,
4732
4765
  // 必填参数 图片上传地址
4733
4766
  accept: 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon',
4734
4767
  // 可选 可上传的图片格式
@@ -4803,10 +4836,10 @@ const RichField$1 = {
4803
4836
 
4804
4837
  },
4805
4838
  methods: {
4806
- onChange(_ref2) {
4839
+ onChange(_ref) {
4807
4840
  let {
4808
4841
  html
4809
- } = _ref2;
4842
+ } = _ref;
4810
4843
  this.emitChange(html);
4811
4844
  }
4812
4845
 
@@ -4840,12 +4873,12 @@ var __vue_staticRenderFns__$p = [];
4840
4873
 
4841
4874
  const __vue_inject_styles__$p = function (inject) {
4842
4875
  if (!inject) return;
4843
- inject("data-v-4eb4343e_0", {
4876
+ inject("data-v-0cd7b8c6_0", {
4844
4877
  source: ".quill-editor .ql-font span[data-value=Arial]::before{content:\"Arial\"!important;font-family:Arial,serif}.quill-editor .ql-font span[data-value=FangSong]::before{content:\"仿宋\"!important;font-family:\"仿宋_GB2312\",FangSong_GB2312,\"宋体\",SimSun,STFangsong,STSong,serif}.quill-editor .ql-font span[data-value=HeiTi]::before{content:\"黑体\"!important;font-family:\"黑体\",SimHei,\"微软正黑体\",\"Microsoft JhengHei\",STHeiti,serif}.quill-editor .ql-font span[data-value=Microsoft]::before{content:\"微软雅黑\"!important;font-family:\"微软雅黑\",\"Microsoft YaHei\",serif}.quill-editor .ql-font-Arial{font-family:Arial,serif}.quill-editor .ql-font-FangSong{font-family:\"仿宋_GB2312\",FangSong_GB2312,\"宋体\",SimSun,STFangsong,STSong,serif}.quill-editor .ql-font-HeiTi{font-family:\"黑体\",SimHei,\"微软正黑体\",\"Microsoft JhengHei\",STHeiti,serif}.quill-editor .ql-font-Microsoft{font-family:\"微软雅黑\",\"Microsoft YaHei\",serif}",
4845
4878
  map: undefined,
4846
4879
  media: undefined
4847
- }), inject("data-v-4eb4343e_1", {
4848
- source: ".quill-editor[data-v-4eb4343e]{width:100%;display:flex;align-items:initial!important;flex-direction:column}.quill-editor .ql-toolbar[data-v-4eb4343e]{flex:none}.quill-editor .ql-container[data-v-4eb4343e]{flex:auto;height:initial;display:flex;flex-direction:column}.quill-editor .ql-container .ql-editor[data-v-4eb4343e]{flex:auto}.quill-editor[data-v-4eb4343e] .ql-editor{min-height:200px}",
4880
+ }), inject("data-v-0cd7b8c6_1", {
4881
+ source: ".quill-editor[data-v-0cd7b8c6]{width:100%;display:flex;align-items:initial!important;flex-direction:column}.quill-editor .ql-toolbar[data-v-0cd7b8c6]{flex:none}.quill-editor .ql-container[data-v-0cd7b8c6]{flex:auto;height:initial;display:flex;flex-direction:column}.quill-editor .ql-container .ql-editor[data-v-0cd7b8c6]{flex:auto}.quill-editor[data-v-0cd7b8c6] .ql-editor{min-height:200px}",
4849
4882
  map: undefined,
4850
4883
  media: undefined
4851
4884
  });
@@ -4853,7 +4886,7 @@ const __vue_inject_styles__$p = function (inject) {
4853
4886
  /* scoped */
4854
4887
 
4855
4888
 
4856
- const __vue_scope_id__$p = "data-v-4eb4343e";
4889
+ const __vue_scope_id__$p = "data-v-0cd7b8c6";
4857
4890
  /* module identifier */
4858
4891
 
4859
4892
  const __vue_module_identifier__$p = undefined;
@@ -4893,7 +4926,11 @@ var script$o = {
4893
4926
  props: {
4894
4927
  url: {
4895
4928
  type: String,
4896
- default: '/aliyun/oss'
4929
+ default: () => {
4930
+ var _getSetting;
4931
+
4932
+ return (_getSetting = getSetting()) === null || _getSetting === void 0 ? void 0 : _getSetting.uploadSignUrl;
4933
+ }
4897
4934
  },
4898
4935
  params: Object,
4899
4936
  filename: {
@@ -4903,7 +4940,11 @@ var script$o = {
4903
4940
  uploadType: {
4904
4941
  type: String,
4905
4942
  validator: val => ['oss', 'aws', 'default'].includes(val),
4906
- default: 'oss'
4943
+ default: () => {
4944
+ var _getSetting2;
4945
+
4946
+ return (_getSetting2 = getSetting()) === null || _getSetting2 === void 0 ? void 0 : _getSetting2.uploadType;
4947
+ }
4907
4948
  },
4908
4949
  limit: {
4909
4950
  type: Number,
@@ -5151,8 +5192,8 @@ var __vue_staticRenderFns__$o = [];
5151
5192
 
5152
5193
  const __vue_inject_styles__$o = function (inject) {
5153
5194
  if (!inject) return;
5154
- inject("data-v-6b56a02a_0", {
5155
- source: ".ui-file-upload-field[data-v-6b56a02a]{width:100%}.ui-file-upload-field .uploader[data-v-6b56a02a]{margin-bottom:5px}.ui-file-upload-field .uploader.disabled[data-v-6b56a02a] .el-upload{cursor:not-allowed;pointer-events:none}.ui-file-upload-field .uploader.disabled[data-v-6b56a02a] .el-upload .upload-btn{color:#888c94;background-color:#edeef0}.ui-file-upload-field .upload-btn[data-v-6b56a02a]{padding:5px 10px;line-height:1;background-color:#409eff;color:#fff;font-size:12px;transition:background-color .3s}.ui-file-upload-field .upload-btn[data-v-6b56a02a]:hover{background-color:#0d84ff}.ui-file-upload-field .files[data-v-6b56a02a]{max-width:100%}.ui-file-upload-field .files .file[data-v-6b56a02a]{color:#606266;font-size:14px;transition:all .3s;cursor:pointer;display:grid;grid-template-columns:14px auto 28px;align-items:center;max-width:100%}.ui-file-upload-field .files .file a[data-v-6b56a02a]{color:#606266;transition:all .3s;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-file-upload-field .files .file .close[data-v-6b56a02a]{color:transparent;width:28px;text-align:center;visibility:hidden;transition:color .3s;font-weight:700}.ui-file-upload-field .files .file[data-v-6b56a02a]:hover{background-color:#f5f7fa}.ui-file-upload-field .files .file:hover a[data-v-6b56a02a]{color:var(--color-primary)}.ui-file-upload-field .files .file:hover .close[data-v-6b56a02a]{color:#409eff;visibility:visible}",
5195
+ inject("data-v-4cd7ae62_0", {
5196
+ source: ".ui-file-upload-field[data-v-4cd7ae62]{width:100%}.ui-file-upload-field .uploader[data-v-4cd7ae62]{margin-bottom:5px}.ui-file-upload-field .uploader.disabled[data-v-4cd7ae62] .el-upload{cursor:not-allowed;pointer-events:none}.ui-file-upload-field .uploader.disabled[data-v-4cd7ae62] .el-upload .upload-btn{color:#888c94;background-color:#edeef0}.ui-file-upload-field .upload-btn[data-v-4cd7ae62]{padding:5px 10px;line-height:1;background-color:#409eff;color:#fff;font-size:12px;transition:background-color .3s}.ui-file-upload-field .upload-btn[data-v-4cd7ae62]:hover{background-color:#0d84ff}.ui-file-upload-field .files[data-v-4cd7ae62]{max-width:100%}.ui-file-upload-field .files .file[data-v-4cd7ae62]{color:#606266;font-size:14px;transition:all .3s;cursor:pointer;display:grid;grid-template-columns:14px auto 28px;align-items:center;max-width:100%}.ui-file-upload-field .files .file a[data-v-4cd7ae62]{color:#606266;transition:all .3s;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-file-upload-field .files .file .close[data-v-4cd7ae62]{color:transparent;width:28px;text-align:center;visibility:hidden;transition:color .3s;font-weight:700}.ui-file-upload-field .files .file[data-v-4cd7ae62]:hover{background-color:#f5f7fa}.ui-file-upload-field .files .file:hover a[data-v-4cd7ae62]{color:var(--color-primary)}.ui-file-upload-field .files .file:hover .close[data-v-4cd7ae62]{color:#409eff;visibility:visible}",
5156
5197
  map: undefined,
5157
5198
  media: undefined
5158
5199
  });
@@ -5160,7 +5201,7 @@ const __vue_inject_styles__$o = function (inject) {
5160
5201
  /* scoped */
5161
5202
 
5162
5203
 
5163
- const __vue_scope_id__$o = "data-v-6b56a02a";
5204
+ const __vue_scope_id__$o = "data-v-4cd7ae62";
5164
5205
  /* module identifier */
5165
5206
 
5166
5207
  const __vue_module_identifier__$o = undefined;
@@ -5187,14 +5228,6 @@ var script$n = {
5187
5228
  type: Boolean,
5188
5229
  default: true
5189
5230
  },
5190
- url: {
5191
- type: String,
5192
- default: '/aliyun/oss'
5193
- },
5194
- uploadType: {
5195
- type: String,
5196
- default: 'oss'
5197
- },
5198
5231
  labelText: {
5199
5232
  type: String,
5200
5233
  default: '上传图片'
@@ -5268,8 +5301,8 @@ var __vue_staticRenderFns__$n = [];
5268
5301
 
5269
5302
  const __vue_inject_styles__$n = function (inject) {
5270
5303
  if (!inject) return;
5271
- inject("data-v-eb4c28a6_0", {
5272
- source: ".ui-image-upload-field[data-v-eb4c28a6]{width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.ui-image-upload-field .uploader.disabled[data-v-eb4c28a6] .el-upload{cursor:not-allowed;pointer-events:none}.ui-image-upload-field .uploader.disabled[data-v-eb4c28a6] .el-upload .upload-btn{background:#edeef0;color:#888c94}.ui-image-upload-field .item[data-v-eb4c28a6]{position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden;width:140px;height:140px;margin-bottom:10px;margin-right:10px;border:1px dashed #d0d2d7;padding:8px;border-radius:2px;box-sizing:border-box}.ui-image-upload-field .item .remove[data-v-eb4c28a6]{position:absolute;top:0;right:0;width:24px;height:24px;background-color:rgba(0,0,0,.7);border-radius:0 0 0 22px;cursor:pointer}.ui-image-upload-field .item .remove .el-icon-close[data-v-eb4c28a6]{position:absolute;top:4px;right:4px;color:#fff;font-size:14px}.ui-image-upload-field .item.upload-btn[data-v-eb4c28a6]{background:#f7f8f9;display:flex;flex-direction:column;align-items:center;justify-content:center;border:none;color:#409eff}.ui-image-upload-field .item.upload-btn>.el-icon-plus[data-v-eb4c28a6]{font-size:1.6em}.ui-image-upload-field .item.upload-btn>span[data-v-eb4c28a6]{font-size:16px;line-height:1.2;margin-top:5px}.ui-image-upload-field .item:hover .modal[data-v-eb4c28a6]{visibility:visible}.ui-image-upload-field[data-v-eb4c28a6] .preview{display:inline-block;width:auto;max-width:60%;left:50%;transform:translateX(-50%)}",
5304
+ inject("data-v-4f959319_0", {
5305
+ source: ".ui-image-upload-field[data-v-4f959319]{width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.ui-image-upload-field .uploader.disabled[data-v-4f959319] .el-upload{cursor:not-allowed;pointer-events:none}.ui-image-upload-field .uploader.disabled[data-v-4f959319] .el-upload .upload-btn{background:#edeef0;color:#888c94}.ui-image-upload-field .item[data-v-4f959319]{position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden;width:140px;height:140px;margin-bottom:10px;margin-right:10px;border:1px dashed #d0d2d7;padding:8px;border-radius:2px;box-sizing:border-box}.ui-image-upload-field .item .remove[data-v-4f959319]{position:absolute;top:0;right:0;width:24px;height:24px;background-color:rgba(0,0,0,.7);border-radius:0 0 0 22px;cursor:pointer}.ui-image-upload-field .item .remove .el-icon-close[data-v-4f959319]{position:absolute;top:4px;right:4px;color:#fff;font-size:14px}.ui-image-upload-field .item.upload-btn[data-v-4f959319]{background:#f7f8f9;display:flex;flex-direction:column;align-items:center;justify-content:center;border:none;color:#409eff}.ui-image-upload-field .item.upload-btn>.el-icon-plus[data-v-4f959319]{font-size:1.6em}.ui-image-upload-field .item.upload-btn>span[data-v-4f959319]{font-size:16px;line-height:1.2;margin-top:5px}.ui-image-upload-field .item:hover .modal[data-v-4f959319]{visibility:visible}.ui-image-upload-field[data-v-4f959319] .preview{display:inline-block;width:auto;max-width:60%;left:50%;transform:translateX(-50%)}",
5273
5306
  map: undefined,
5274
5307
  media: undefined
5275
5308
  });
@@ -5277,7 +5310,7 @@ const __vue_inject_styles__$n = function (inject) {
5277
5310
  /* scoped */
5278
5311
 
5279
5312
 
5280
- const __vue_scope_id__$n = "data-v-eb4c28a6";
5313
+ const __vue_scope_id__$n = "data-v-4f959319";
5281
5314
  /* module identifier */
5282
5315
 
5283
5316
  const __vue_module_identifier__$n = undefined;
@@ -7443,7 +7476,7 @@ var script$g = {
7443
7476
 
7444
7477
  if (typeof vtype === 'string') {
7445
7478
  const [type, ...args] = vtype.split(':');
7446
- rule = VType$1[type](this.$props, ...args);
7479
+ rule = VType[type](this.$props, ...args);
7447
7480
  }
7448
7481
 
7449
7482
  rule && rules.push(rule);
@@ -13101,4 +13134,4 @@ var index = {
13101
13134
  Components: ComponentList
13102
13135
  };
13103
13136
 
13104
- export { arrays as Arrays, Axios, Date$1 as Dates, FieldMixin, Files, mixin as HistoryMixin, Objects, Router, Store, Strings, Upload, addFieldType, index as default, getAMap, onReady };
13137
+ export { arrays as Arrays, Axios, Date$1 as Dates, FieldMixin, Files, mixin as HistoryMixin, Objects, Router, Store, Strings, Upload, addFieldType, addVType, index as default, getAMap, onReady };