@deppon/deppon-template 2.3.9 → 2.4.1
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.
|
@@ -11,60 +11,35 @@
|
|
|
11
11
|
gap: 10px;
|
|
12
12
|
row-gap: 8px;
|
|
13
13
|
}
|
|
14
|
+
.field-tag-input .tag-input-input-row.has-error .tag-input-input-wrap .el-input__wrapper {
|
|
15
|
+
box-shadow: 0 0 0 1px var(--el-color-danger) inset !important;
|
|
16
|
+
}
|
|
14
17
|
.field-tag-input .tag-input-input-row .tag-input-input-wrap {
|
|
18
|
+
flex: 1 1 0%;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
}
|
|
21
|
+
.field-tag-input .tag-input-input-row .tag-input-tip-wrap {
|
|
22
|
+
flex: 2 1 0%;
|
|
23
|
+
min-width: 0;
|
|
15
24
|
display: flex;
|
|
16
|
-
align-items:
|
|
17
|
-
|
|
25
|
+
align-items: center;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
.field-tag-input .tag-input-input-row .tag-input-tip-wrap .el-tooltip__trigger {
|
|
29
|
+
display: block;
|
|
18
30
|
width: 100%;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-input {
|
|
23
|
-
width: 100% !important;
|
|
24
|
-
min-width: 0 !important;
|
|
25
|
-
}
|
|
26
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input,
|
|
27
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input-group,
|
|
28
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input-group--append {
|
|
29
|
-
width: 100% !important;
|
|
30
|
-
max-width: 100% !important;
|
|
31
|
-
}
|
|
32
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input-group {
|
|
33
|
-
display: flex !important;
|
|
34
|
-
align-items: stretch !important;
|
|
35
|
-
}
|
|
36
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input__wrapper {
|
|
37
|
-
flex: 1 1 auto !important;
|
|
38
|
-
min-width: 0 !important;
|
|
39
|
-
}
|
|
40
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input__inner {
|
|
41
|
-
min-width: 0 !important;
|
|
42
|
-
}
|
|
43
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .el-input-group__append {
|
|
44
|
-
flex: 0 0 auto !important;
|
|
45
|
-
padding: 0 !important;
|
|
46
|
-
border: none !important;
|
|
47
|
-
background: transparent !important;
|
|
48
|
-
}
|
|
49
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-add-btn {
|
|
50
|
-
border-top-left-radius: 0 !important;
|
|
51
|
-
border-bottom-left-radius: 0 !important;
|
|
52
|
-
border-color: var(--el-color-primary) !important;
|
|
53
|
-
background-color: var(--el-color-primary) !important;
|
|
54
|
-
color: #fff !important;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
overflow: hidden;
|
|
55
33
|
}
|
|
56
34
|
.field-tag-input .tag-input-input-row .tag-input-tip {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
text-
|
|
65
|
-
}
|
|
66
|
-
.field-tag-input .tag-input-input-row.has-error .tag-input-input-wrap .el-input__wrapper {
|
|
67
|
-
box-shadow: 0 0 0 1px var(--el-color-danger) inset !important;
|
|
35
|
+
display: block;
|
|
36
|
+
width: 100%;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
line-height: 1.4;
|
|
42
|
+
color: var(--el-text-color-secondary);
|
|
68
43
|
}
|
|
69
44
|
.field-tag-input .tag-input-add-error {
|
|
70
45
|
font-size: 12px;
|
package/es/pro-field/components/TagInput/FieldTagInput.vue_vue_type_script_setup_true_lang.vue.js
CHANGED
|
@@ -21,7 +21,7 @@ var _hoisted_3 = {
|
|
|
21
21
|
};
|
|
22
22
|
var _hoisted_4 = {
|
|
23
23
|
key: 0,
|
|
24
|
-
"class": "tag-input-tip"
|
|
24
|
+
"class": "tag-input-tip-wrap"
|
|
25
25
|
};
|
|
26
26
|
var _hoisted_5 = {
|
|
27
27
|
key: 0,
|
|
@@ -71,6 +71,8 @@ var script = {
|
|
|
71
71
|
var addError = ref('');
|
|
72
72
|
var readonlyRef = ref(null);
|
|
73
73
|
var readonlyOverflow = ref(false);
|
|
74
|
+
var tipRef = ref(null);
|
|
75
|
+
var tipOverflow = ref(false);
|
|
74
76
|
var checkReadonlyOverflow = function checkReadonlyOverflow() {
|
|
75
77
|
var el = readonlyRef.value;
|
|
76
78
|
if (!el) {
|
|
@@ -79,6 +81,18 @@ var script = {
|
|
|
79
81
|
}
|
|
80
82
|
readonlyOverflow.value = el.scrollWidth > el.clientWidth;
|
|
81
83
|
};
|
|
84
|
+
var checkTipOverflow = function checkTipOverflow() {
|
|
85
|
+
var el = tipRef.value;
|
|
86
|
+
if (!el) {
|
|
87
|
+
tipOverflow.value = false;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
tipOverflow.value = el.scrollWidth > el.clientWidth;
|
|
91
|
+
};
|
|
92
|
+
var runOverflowChecks = function runOverflowChecks() {
|
|
93
|
+
checkReadonlyOverflow();
|
|
94
|
+
checkTipOverflow();
|
|
95
|
+
};
|
|
82
96
|
var readonlyTooltipContent = computed(function () {
|
|
83
97
|
var _ref2, _displayText$value;
|
|
84
98
|
var v = (_ref2 = (_displayText$value = displayText.value) !== null && _displayText$value !== void 0 ? _displayText$value : props.emptyText) !== null && _ref2 !== void 0 ? _ref2 : '-';
|
|
@@ -88,16 +102,16 @@ var script = {
|
|
|
88
102
|
return s;
|
|
89
103
|
});
|
|
90
104
|
onMounted(function () {
|
|
91
|
-
nextTick(
|
|
92
|
-
window.addEventListener('resize',
|
|
105
|
+
nextTick(runOverflowChecks);
|
|
106
|
+
window.addEventListener('resize', runOverflowChecks);
|
|
93
107
|
});
|
|
94
108
|
onUnmounted(function () {
|
|
95
|
-
window.removeEventListener('resize',
|
|
109
|
+
window.removeEventListener('resize', runOverflowChecks);
|
|
96
110
|
});
|
|
97
111
|
watch(function () {
|
|
98
112
|
return [props.mode, props.text, props.fieldProps];
|
|
99
113
|
}, function () {
|
|
100
|
-
return nextTick(
|
|
114
|
+
return nextTick(runOverflowChecks);
|
|
101
115
|
}, {
|
|
102
116
|
deep: true
|
|
103
117
|
});
|
|
@@ -113,6 +127,9 @@ var script = {
|
|
|
113
127
|
var _props$fieldProps$tip, _props$fieldProps3;
|
|
114
128
|
return (_props$fieldProps$tip = (_props$fieldProps3 = props.fieldProps) === null || _props$fieldProps3 === void 0 ? void 0 : _props$fieldProps3.tip) !== null && _props$fieldProps$tip !== void 0 ? _props$fieldProps$tip : '';
|
|
115
129
|
});
|
|
130
|
+
watch(tip, function () {
|
|
131
|
+
return nextTick(checkTipOverflow);
|
|
132
|
+
});
|
|
116
133
|
var listLabel = computed(function () {
|
|
117
134
|
var _props$fieldProps$lis, _props$fieldProps4;
|
|
118
135
|
return (_props$fieldProps$lis = (_props$fieldProps4 = props.fieldProps) === null || _props$fieldProps4 === void 0 ? void 0 : _props$fieldProps4.listLabel) !== null && _props$fieldProps$lis !== void 0 ? _props$fieldProps$lis : '已配项';
|
|
@@ -418,7 +435,20 @@ var script = {
|
|
|
418
435
|
}, 8 /* PROPS */, ["loading", "disabled"]))];
|
|
419
436
|
}),
|
|
420
437
|
_: 3 /* FORWARDED */
|
|
421
|
-
}, 8 /* PROPS */, ["modelValue", "placeholder", "disabled"])]), tip.value ? (openBlock(), createElementBlock("
|
|
438
|
+
}, 8 /* PROPS */, ["modelValue", "placeholder", "disabled"])]), tip.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(ElTooltip), {
|
|
439
|
+
content: tip.value,
|
|
440
|
+
placement: "top",
|
|
441
|
+
disabled: !tipOverflow.value
|
|
442
|
+
}, {
|
|
443
|
+
"default": withCtx(function () {
|
|
444
|
+
return [createElementVNode("span", {
|
|
445
|
+
ref_key: "tipRef",
|
|
446
|
+
ref: tipRef,
|
|
447
|
+
"class": "tag-input-tip"
|
|
448
|
+
}, toDisplayString(tip.value), 513 /* TEXT, NEED_PATCH */)];
|
|
449
|
+
}),
|
|
450
|
+
_: 1 /* STABLE */
|
|
451
|
+
}, 8 /* PROPS */, ["content", "disabled"])])) : createCommentVNode("v-if", true)], 2 /* CLASS */), addError.value ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(addError.value), 1 /* TEXT */)) : createCommentVNode("v-if", true), createCommentVNode(" 标签列表:有数据时才显示 "), tagList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6, [listLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(listLabel.value) + "(" + toDisplayString(tagList.value.length) + "/" + toDisplayString(maxCount.value) + ") ", 1 /* TEXT */)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
422
452
|
"class": normalizeClass(["tag-input-list-content", {
|
|
423
453
|
'is-removing': removingIndex.value >= 0
|
|
424
454
|
}])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deppon/deppon-template",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"less": "^4.2.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@deppon/deppon-assets": "2.
|
|
47
|
-
"@deppon/deppon-request": "2.
|
|
48
|
-
"@deppon/deppon-router": "2.
|
|
49
|
-
"@deppon/deppon-ui": "2.
|
|
50
|
-
"@deppon/deppon-utils": "2.
|
|
46
|
+
"@deppon/deppon-assets": "2.4.1",
|
|
47
|
+
"@deppon/deppon-request": "2.4.1",
|
|
48
|
+
"@deppon/deppon-router": "2.4.1",
|
|
49
|
+
"@deppon/deppon-ui": "2.4.1",
|
|
50
|
+
"@deppon/deppon-utils": "2.4.1",
|
|
51
51
|
"dayjs": "^1.11.10",
|
|
52
52
|
"lodash-es": "^4.17.21",
|
|
53
53
|
"mitt": "^3.0.1"
|