@v2coding/ui 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v2coding-ui.esm.js +53 -10
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +61 -16
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -1935,6 +1935,43 @@ const DefaultVType = {
|
|
|
1935
1935
|
pattern: /^(?=.*[a-zA-Z])(?=.*\d)[^]{6,20}$/,
|
|
1936
1936
|
message: message || `请输入6-20位的${label},至少包含字母和字符串`
|
|
1937
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
|
+
};
|
|
1938
1975
|
}
|
|
1939
1976
|
};
|
|
1940
1977
|
|
|
@@ -1946,7 +1983,6 @@ const initDefaultVType = () => {
|
|
|
1946
1983
|
};
|
|
1947
1984
|
|
|
1948
1985
|
initDefaultVType();
|
|
1949
|
-
var VType$1 = VType;
|
|
1950
1986
|
|
|
1951
1987
|
var FieldMixin = {
|
|
1952
1988
|
inheritAttrs: false,
|
|
@@ -4595,7 +4631,7 @@ const Upload$1 = {
|
|
|
4595
4631
|
});
|
|
4596
4632
|
});
|
|
4597
4633
|
},
|
|
4598
|
-
aws: (url, params, file) => {
|
|
4634
|
+
aws: (url, params, file, transformRequest) => {
|
|
4599
4635
|
const getSignature = params => {
|
|
4600
4636
|
return Axios.getInstance().get(url, {
|
|
4601
4637
|
params,
|
|
@@ -4608,10 +4644,16 @@ const Upload$1 = {
|
|
|
4608
4644
|
return result;
|
|
4609
4645
|
}
|
|
4610
4646
|
|
|
4647
|
+
let data = result.data;
|
|
4648
|
+
|
|
4649
|
+
if (typeof transformRequest === 'function') {
|
|
4650
|
+
data = transformRequest(data);
|
|
4651
|
+
}
|
|
4652
|
+
|
|
4611
4653
|
const {
|
|
4612
4654
|
url,
|
|
4613
4655
|
putUrl
|
|
4614
|
-
} =
|
|
4656
|
+
} = data;
|
|
4615
4657
|
return Axios.getInstance().put(putUrl, file.file, {
|
|
4616
4658
|
headers: {
|
|
4617
4659
|
'Content-Type': 'multipart/form-data'
|
|
@@ -4961,7 +5003,8 @@ var script$o = {
|
|
|
4961
5003
|
labelText: {
|
|
4962
5004
|
type: String,
|
|
4963
5005
|
default: '浏览...'
|
|
4964
|
-
}
|
|
5006
|
+
},
|
|
5007
|
+
transformRequest: Function
|
|
4965
5008
|
},
|
|
4966
5009
|
|
|
4967
5010
|
data() {
|
|
@@ -5024,7 +5067,7 @@ var script$o = {
|
|
|
5024
5067
|
}, {
|
|
5025
5068
|
file,
|
|
5026
5069
|
filename: this.filename
|
|
5027
|
-
}).then(result => {
|
|
5070
|
+
}, this.transformRequest).then(result => {
|
|
5028
5071
|
var _result$data;
|
|
5029
5072
|
|
|
5030
5073
|
this.uploading = false;
|
|
@@ -5156,8 +5199,8 @@ var __vue_staticRenderFns__$o = [];
|
|
|
5156
5199
|
|
|
5157
5200
|
const __vue_inject_styles__$o = function (inject) {
|
|
5158
5201
|
if (!inject) return;
|
|
5159
|
-
inject("data-v-
|
|
5160
|
-
source: ".ui-file-upload-field[data-v-
|
|
5202
|
+
inject("data-v-1da245d4_0", {
|
|
5203
|
+
source: ".ui-file-upload-field[data-v-1da245d4]{width:100%}.ui-file-upload-field .uploader[data-v-1da245d4]{margin-bottom:5px}.ui-file-upload-field .uploader.disabled[data-v-1da245d4] .el-upload{cursor:not-allowed;pointer-events:none}.ui-file-upload-field .uploader.disabled[data-v-1da245d4] .el-upload .upload-btn{color:#888c94;background-color:#edeef0}.ui-file-upload-field .upload-btn[data-v-1da245d4]{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-1da245d4]:hover{background-color:#0d84ff}.ui-file-upload-field .files[data-v-1da245d4]{max-width:100%}.ui-file-upload-field .files .file[data-v-1da245d4]{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-1da245d4]{color:#606266;transition:all .3s;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-file-upload-field .files .file .close[data-v-1da245d4]{color:transparent;width:28px;text-align:center;visibility:hidden;transition:color .3s;font-weight:700}.ui-file-upload-field .files .file[data-v-1da245d4]:hover{background-color:#f5f7fa}.ui-file-upload-field .files .file:hover a[data-v-1da245d4]{color:var(--color-primary)}.ui-file-upload-field .files .file:hover .close[data-v-1da245d4]{color:#409eff;visibility:visible}",
|
|
5161
5204
|
map: undefined,
|
|
5162
5205
|
media: undefined
|
|
5163
5206
|
});
|
|
@@ -5165,7 +5208,7 @@ const __vue_inject_styles__$o = function (inject) {
|
|
|
5165
5208
|
/* scoped */
|
|
5166
5209
|
|
|
5167
5210
|
|
|
5168
|
-
const __vue_scope_id__$o = "data-v-
|
|
5211
|
+
const __vue_scope_id__$o = "data-v-1da245d4";
|
|
5169
5212
|
/* module identifier */
|
|
5170
5213
|
|
|
5171
5214
|
const __vue_module_identifier__$o = undefined;
|
|
@@ -7440,7 +7483,7 @@ var script$g = {
|
|
|
7440
7483
|
|
|
7441
7484
|
if (typeof vtype === 'string') {
|
|
7442
7485
|
const [type, ...args] = vtype.split(':');
|
|
7443
|
-
rule = VType
|
|
7486
|
+
rule = VType[type](this.$props, ...args);
|
|
7444
7487
|
}
|
|
7445
7488
|
|
|
7446
7489
|
rule && rules.push(rule);
|
|
@@ -13098,4 +13141,4 @@ var index = {
|
|
|
13098
13141
|
Components: ComponentList
|
|
13099
13142
|
};
|
|
13100
13143
|
|
|
13101
|
-
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 };
|
|
13144
|
+
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 };
|