@v2coding/ui 0.1.18 → 0.1.21
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/README.md +4 -0
- package/dist/v2coding-ui.esm.js +22 -38
- package/dist/v2coding-ui.min.js +2 -2
- package/dist/v2coding-ui.ssr.js +26 -48
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -535,14 +535,9 @@ const getSetting = () => {
|
|
|
535
535
|
return Objects.merge({}, setting);
|
|
536
536
|
};
|
|
537
537
|
|
|
538
|
-
const isFormErrorResponse = result => {
|
|
539
|
-
return result.code === 'FAILURE_PARAM_ERROR';
|
|
540
|
-
};
|
|
541
538
|
/**
|
|
542
539
|
* 自动解析 get/post 请求并提示信息(解析返回信息中的 message/data 字段)
|
|
543
540
|
*/
|
|
544
|
-
|
|
545
|
-
|
|
546
541
|
var AxiosWithMessage = {
|
|
547
542
|
methods: {
|
|
548
543
|
getWithMessage() {
|
|
@@ -553,22 +548,15 @@ var AxiosWithMessage = {
|
|
|
553
548
|
|
|
554
549
|
const {
|
|
555
550
|
success = false,
|
|
556
|
-
data,
|
|
557
551
|
message
|
|
558
552
|
} = result;
|
|
559
553
|
|
|
560
554
|
if (success) {
|
|
561
555
|
message && this.$nextTick(() => this.$message({
|
|
562
556
|
message,
|
|
563
|
-
type:
|
|
564
|
-
}));
|
|
565
|
-
} else if (isFormErrorResponse(result)) {
|
|
566
|
-
const err = Object.values(data);
|
|
567
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
568
|
-
dangerouslyUseHTMLString: true,
|
|
569
|
-
message: err.join(';<br/>')
|
|
557
|
+
type: 'success'
|
|
570
558
|
}));
|
|
571
|
-
}
|
|
559
|
+
}
|
|
572
560
|
|
|
573
561
|
return result;
|
|
574
562
|
});
|
|
@@ -582,22 +570,15 @@ var AxiosWithMessage = {
|
|
|
582
570
|
|
|
583
571
|
const {
|
|
584
572
|
success = false,
|
|
585
|
-
data,
|
|
586
573
|
message = `操作${success ? '成功' : '失败'}`
|
|
587
574
|
} = result;
|
|
588
575
|
|
|
589
576
|
if (success) {
|
|
590
577
|
message && this.$nextTick(() => this.$message({
|
|
591
578
|
message,
|
|
592
|
-
type:
|
|
593
|
-
}));
|
|
594
|
-
} else if (isFormErrorResponse(result)) {
|
|
595
|
-
const err = Object.values(data);
|
|
596
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
597
|
-
dangerouslyUseHTMLString: true,
|
|
598
|
-
message: err.join(';<br/>')
|
|
579
|
+
type: 'success'
|
|
599
580
|
}));
|
|
600
|
-
}
|
|
581
|
+
}
|
|
601
582
|
|
|
602
583
|
return result;
|
|
603
584
|
});
|
|
@@ -611,22 +592,15 @@ var AxiosWithMessage = {
|
|
|
611
592
|
|
|
612
593
|
const {
|
|
613
594
|
success = false,
|
|
614
|
-
data,
|
|
615
595
|
message
|
|
616
596
|
} = result;
|
|
617
597
|
|
|
618
598
|
if (success) {
|
|
619
599
|
message && this.$nextTick(() => this.$message({
|
|
620
600
|
message,
|
|
621
|
-
type:
|
|
622
|
-
}));
|
|
623
|
-
} else if (isFormErrorResponse(result)) {
|
|
624
|
-
const err = Object.values(data);
|
|
625
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
626
|
-
dangerouslyUseHTMLString: true,
|
|
627
|
-
message: err.join(';<br/>')
|
|
601
|
+
type: 'success'
|
|
628
602
|
}));
|
|
629
|
-
}
|
|
603
|
+
}
|
|
630
604
|
|
|
631
605
|
return result;
|
|
632
606
|
});
|
|
@@ -4787,7 +4761,7 @@ var script$p = {
|
|
|
4787
4761
|
},
|
|
4788
4762
|
|
|
4789
4763
|
getFileName(url) {
|
|
4790
|
-
const pathname = new URL(url).pathname;
|
|
4764
|
+
const pathname = decodeURI(new URL(url).pathname);
|
|
4791
4765
|
return pathname.substring(pathname.lastIndexOf('/') + 1);
|
|
4792
4766
|
}
|
|
4793
4767
|
|
|
@@ -4861,8 +4835,8 @@ var __vue_staticRenderFns__$o = [];
|
|
|
4861
4835
|
|
|
4862
4836
|
const __vue_inject_styles__$p = function (inject) {
|
|
4863
4837
|
if (!inject) return;
|
|
4864
|
-
inject("data-v-
|
|
4865
|
-
source: ".ui-file-upload-field[data-v-
|
|
4838
|
+
inject("data-v-adbfc424_0", {
|
|
4839
|
+
source: ".ui-file-upload-field[data-v-adbfc424]{width:100%}.ui-file-upload-field .uploader[data-v-adbfc424]{margin-bottom:5px}.ui-file-upload-field .uploader.disabled[data-v-adbfc424] .el-upload{cursor:not-allowed;pointer-events:none}.ui-file-upload-field .uploader.disabled[data-v-adbfc424] .el-upload .upload-btn{color:#888c94;background-color:#edeef0}.ui-file-upload-field .upload-btn[data-v-adbfc424]{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-adbfc424]:hover{background-color:#0d84ff}.ui-file-upload-field .files[data-v-adbfc424]{max-width:100%}.ui-file-upload-field .files .file[data-v-adbfc424]{color:#606266;font-size:14px;transition:all .3s;cursor:pointer;display:flex;align-items:center;max-width:100%}.ui-file-upload-field .files .file a[data-v-adbfc424]{flex:1;color:#606266;transition:all .3s;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-file-upload-field .files .file .close[data-v-adbfc424]{color:transparent;width:28px;text-align:center;visibility:hidden;transition:color .3s;font-weight:700}.ui-file-upload-field .files .file[data-v-adbfc424]:hover{background-color:#f5f7fa}.ui-file-upload-field .files .file:hover a[data-v-adbfc424]{color:var(--color-primary)}.ui-file-upload-field .files .file:hover .close[data-v-adbfc424]{color:#409eff;visibility:visible}",
|
|
4866
4840
|
map: undefined,
|
|
4867
4841
|
media: undefined
|
|
4868
4842
|
});
|
|
@@ -4870,7 +4844,7 @@ const __vue_inject_styles__$p = function (inject) {
|
|
|
4870
4844
|
/* scoped */
|
|
4871
4845
|
|
|
4872
4846
|
|
|
4873
|
-
const __vue_scope_id__$p = "data-v-
|
|
4847
|
+
const __vue_scope_id__$p = "data-v-adbfc424";
|
|
4874
4848
|
/* module identifier */
|
|
4875
4849
|
|
|
4876
4850
|
const __vue_module_identifier__$p = undefined;
|
|
@@ -10612,9 +10586,19 @@ var ColumnType$1 = ColumnType;
|
|
|
10612
10586
|
const DefaultTypes = {
|
|
10613
10587
|
default: _ref => {
|
|
10614
10588
|
let {
|
|
10615
|
-
cellValue
|
|
10589
|
+
cellValue,
|
|
10590
|
+
attrs,
|
|
10591
|
+
props
|
|
10616
10592
|
} = _ref;
|
|
10617
|
-
|
|
10593
|
+
const fallback = attrs.fallback || props.fallback;
|
|
10594
|
+
const isEmpty = (attrs === null || attrs === void 0 ? void 0 : attrs.isEmpty) || Objects.isEmpty;
|
|
10595
|
+
let isEmptyValue = false;
|
|
10596
|
+
|
|
10597
|
+
if (typeof isEmpty === 'function') {
|
|
10598
|
+
isEmptyValue = isEmpty(cellValue);
|
|
10599
|
+
}
|
|
10600
|
+
|
|
10601
|
+
return isEmptyValue ? fallback : cellValue;
|
|
10618
10602
|
},
|
|
10619
10603
|
date: _ref2 => {
|
|
10620
10604
|
let {
|