@deppon/deppon-template 2.3.3 → 2.3.4
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.
|
@@ -14,36 +14,30 @@
|
|
|
14
14
|
.field-tag-input .tag-input-input-row .tag-input-input-wrap {
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
align-items: stretch;
|
|
17
|
-
|
|
18
|
-
border: 1px solid var(--el-border-color, #dcdfe6);
|
|
19
|
-
background: var(--el-fill-color-blank, #fff);
|
|
20
|
-
transition: border-color 0.2s, box-shadow 0.2s;
|
|
21
|
-
}
|
|
22
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap:focus-within {
|
|
23
|
-
border-color: var(--el-color-primary);
|
|
24
|
-
box-shadow: 0 0 0 2px var(--el-color-primary-light-7, rgba(64, 158, 255, 0.2));
|
|
17
|
+
min-width: 240px;
|
|
25
18
|
}
|
|
26
19
|
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-input {
|
|
27
20
|
width: 200px;
|
|
28
|
-
border: none;
|
|
29
21
|
}
|
|
30
|
-
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-input .el-
|
|
22
|
+
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-input .el-input-group__append {
|
|
23
|
+
padding: 0;
|
|
31
24
|
border: none;
|
|
32
|
-
|
|
33
|
-
border-radius: var(--el-border-radius-base, 4px) 0 0 var(--el-border-radius-base, 4px);
|
|
25
|
+
background: transparent;
|
|
34
26
|
}
|
|
35
27
|
.field-tag-input .tag-input-input-row .tag-input-input-wrap .tag-input-add-btn {
|
|
36
|
-
border-radius: 0
|
|
37
|
-
border-left:
|
|
28
|
+
border-top-left-radius: 0;
|
|
29
|
+
border-bottom-left-radius: 0;
|
|
30
|
+
border-color: var(--el-color-primary);
|
|
31
|
+
background-color: var(--el-color-primary);
|
|
32
|
+
color: #fff;
|
|
38
33
|
}
|
|
39
34
|
.field-tag-input .tag-input-input-row .tag-input-tip {
|
|
40
35
|
color: var(--el-text-color-secondary);
|
|
41
36
|
font-size: 12px;
|
|
42
37
|
line-height: 32px;
|
|
43
38
|
}
|
|
44
|
-
.field-tag-input .tag-input-input-row.has-error .tag-input-input-wrap {
|
|
45
|
-
|
|
46
|
-
box-shadow: 0 0 0 2px var(--el-color-danger-light-7, rgba(245, 108, 108, 0.2));
|
|
39
|
+
.field-tag-input .tag-input-input-row.has-error .tag-input-input-wrap .el-input__wrapper {
|
|
40
|
+
box-shadow: 0 0 0 1px var(--el-color-danger) inset;
|
|
47
41
|
}
|
|
48
42
|
.field-tag-input .tag-input-add-error {
|
|
49
43
|
font-size: 12px;
|
package/es/pro-field/components/TagInput/FieldTagInput.vue_vue_type_script_setup_true_lang.vue.js
CHANGED
|
@@ -2,7 +2,7 @@ import '../../../_virtual/_rollup-plugin-inject-process-env.js';
|
|
|
2
2
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
3
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
4
4
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
5
|
-
import { ref, computed, onMounted, nextTick, onUnmounted, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, toDisplayString, createCommentVNode, normalizeClass, withKeys, withModifiers, createTextVNode, TransitionGroup, Fragment, renderList
|
|
5
|
+
import { ref, computed, onMounted, nextTick, onUnmounted, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, toDisplayString, createCommentVNode, normalizeClass, withKeys, withModifiers, renderSlot, createBlock, createTextVNode, TransitionGroup, Fragment, renderList } from 'vue';
|
|
6
6
|
import { ElTooltip, ElInput, ElButton, ElTag } from '@deppon/deppon-ui';
|
|
7
7
|
|
|
8
8
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -383,18 +383,30 @@ var script = {
|
|
|
383
383
|
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(function ($event) {
|
|
384
384
|
return !isDisabled.value && addItem();
|
|
385
385
|
}, ["prevent"]), ["enter"]))
|
|
386
|
-
}, null, 8 /* PROPS */, ["modelValue", "placeholder", "disabled"]), createVNode(unref(ElButton), {
|
|
387
|
-
type: "primary",
|
|
388
|
-
"class": "tag-input-add-btn",
|
|
389
|
-
loading: addLoading.value,
|
|
390
|
-
disabled: addLoading.value || isDisabled.value,
|
|
391
|
-
onClick: addItem
|
|
392
386
|
}, {
|
|
393
|
-
|
|
394
|
-
return [
|
|
387
|
+
append: withCtx(function () {
|
|
388
|
+
return [_ctx.$slots.append ? renderSlot(_ctx.$slots, "append", {
|
|
389
|
+
key: 0,
|
|
390
|
+
addItem: addItem,
|
|
391
|
+
inputValue: inputValue.value,
|
|
392
|
+
addLoading: addLoading.value,
|
|
393
|
+
disabled: addLoading.value || isDisabled.value
|
|
394
|
+
}) : (openBlock(), createBlock(unref(ElButton), {
|
|
395
|
+
key: 1,
|
|
396
|
+
type: "primary",
|
|
397
|
+
"class": "tag-input-add-btn",
|
|
398
|
+
loading: addLoading.value,
|
|
399
|
+
disabled: addLoading.value || isDisabled.value,
|
|
400
|
+
onClick: addItem
|
|
401
|
+
}, {
|
|
402
|
+
"default": withCtx(function () {
|
|
403
|
+
return [createTextVNode(toDisplayString(addButtonText.value), 1 /* TEXT */)];
|
|
404
|
+
}),
|
|
405
|
+
_: 1 /* STABLE */
|
|
406
|
+
}, 8 /* PROPS */, ["loading", "disabled"]))];
|
|
395
407
|
}),
|
|
396
|
-
_:
|
|
397
|
-
}, 8 /* PROPS */, ["
|
|
408
|
+
_: 3 /* FORWARDED */
|
|
409
|
+
}, 8 /* PROPS */, ["modelValue", "placeholder", "disabled"])]), tip.value ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(tip.value), 1 /* TEXT */)) : 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", {
|
|
398
410
|
"class": normalizeClass(["tag-input-list-content", {
|
|
399
411
|
'is-removing': removingIndex.value >= 0
|
|
400
412
|
}])
|
|
@@ -608,16 +608,17 @@ var script = {
|
|
|
608
608
|
// 获取 append 插槽组件
|
|
609
609
|
var getAppendSlotComponent = function getAppendSlotComponent(item) {
|
|
610
610
|
var _item$slots;
|
|
611
|
+
var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
611
612
|
var appendSlot = (_item$slots = item.slots) === null || _item$slots === void 0 ? void 0 : _item$slots.append;
|
|
612
613
|
if (!appendSlot) return null;
|
|
613
614
|
|
|
614
615
|
// 如果是函数,调用它并返回结果(应该是组件或 VNode)
|
|
615
616
|
if (typeof appendSlot === 'function') {
|
|
616
|
-
return appendSlot({
|
|
617
|
+
return appendSlot(_objectSpread({
|
|
617
618
|
item: item,
|
|
618
619
|
value: formModel[item.name],
|
|
619
620
|
formModel: formModel
|
|
620
|
-
});
|
|
621
|
+
}, slotProps));
|
|
621
622
|
}
|
|
622
623
|
|
|
623
624
|
// 否则直接返回(字符串组件名或组件对象)
|
|
@@ -1285,8 +1286,8 @@ var script = {
|
|
|
1285
1286
|
};
|
|
1286
1287
|
}), (_item$slots2 = item.slots) !== null && _item$slots2 !== void 0 && _item$slots2.append ? {
|
|
1287
1288
|
name: "append",
|
|
1288
|
-
fn: withCtx(function () {
|
|
1289
|
-
return [(openBlock(), createBlock(resolveDynamicComponent(getAppendSlotComponent(item))))];
|
|
1289
|
+
fn: withCtx(function (slotProps) {
|
|
1290
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(getAppendSlotComponent(item, slotProps))))];
|
|
1290
1291
|
}),
|
|
1291
1292
|
key: "0"
|
|
1292
1293
|
} : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["text", "value-type", "mode", "plain", "light", "value-enum", "label", "field-props", "form-item-props", "empty-text", "onUpdate:text"])) : (_item$slots3 = item.slots) !== null && _item$slots3 !== void 0 && _item$slots3["default"] ? renderSlot(_ctx.$slots, item.name, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deppon/deppon-template",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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.3.
|
|
47
|
-
"@deppon/deppon-request": "2.3.
|
|
48
|
-
"@deppon/deppon-router": "2.3.
|
|
49
|
-
"@deppon/deppon-ui": "2.3.
|
|
50
|
-
"@deppon/deppon-utils": "2.3.
|
|
46
|
+
"@deppon/deppon-assets": "2.3.4",
|
|
47
|
+
"@deppon/deppon-request": "2.3.4",
|
|
48
|
+
"@deppon/deppon-router": "2.3.4",
|
|
49
|
+
"@deppon/deppon-ui": "2.3.4",
|
|
50
|
+
"@deppon/deppon-utils": "2.3.4",
|
|
51
51
|
"dayjs": "^1.11.10",
|
|
52
52
|
"lodash-es": "^4.17.21",
|
|
53
53
|
"mitt": "^3.0.1"
|