@nutui/nutui 4.0.0-beta.21 → 4.0.0-beta.22
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/nutui.es.js +1 -1
- package/dist/nutui.umd.js +2 -2
- package/dist/packages/_es/Sku.js +5 -6
- package/dist/packages/_es/Textarea.js +24 -4
- package/dist/packages/uploader/index.scss +2 -1
- package/dist/smartips/web-types.json +7 -7
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +56 -56
- package/dist/styles/themes/jdb.scss +56 -56
- package/dist/styles/themes/jddkh.scss +56 -56
- package/dist/styles/themes/jdt.scss +56 -56
- package/dist/types/__VUE/textarea/index.vue.d.ts +5 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/packages/_es/Sku.js
CHANGED
|
@@ -266,7 +266,10 @@ const _hoisted_1$1 = {
|
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "nut-sku-operate"
|
|
268
268
|
};
|
|
269
|
-
const _hoisted_2$1 =
|
|
269
|
+
const _hoisted_2$1 = {
|
|
270
|
+
key: 0,
|
|
271
|
+
class: "nut-sku-operate-desc"
|
|
272
|
+
};
|
|
270
273
|
const _hoisted_3 = {
|
|
271
274
|
key: 1,
|
|
272
275
|
class: "nut-sku-operate-btn"
|
|
@@ -274,11 +277,7 @@ const _hoisted_3 = {
|
|
|
274
277
|
const _hoisted_4 = ["onClick"];
|
|
275
278
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
276
279
|
return _ctx.btnOptions.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_1$1, [
|
|
277
|
-
_ctx.btnExtraText ? (openBlock(), createElementBlock("view",
|
|
278
|
-
key: 0,
|
|
279
|
-
class: "nut-sku-operate-desc",
|
|
280
|
-
innerHTML: _ctx.btnExtraText
|
|
281
|
-
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
280
|
+
_ctx.btnExtraText ? (openBlock(), createElementBlock("view", _hoisted_2$1, toDisplayString(_ctx.btnExtraText), 1)) : createCommentVNode("", true),
|
|
282
281
|
renderSlot(_ctx.$slots, "operate-btn"),
|
|
283
282
|
!_ctx.getSlots("operate-btn") ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
284
283
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.btnOptions, (btn, i) => {
|
|
@@ -103,8 +103,14 @@ const _sfc_main = create({
|
|
|
103
103
|
emit("change", value, event);
|
|
104
104
|
};
|
|
105
105
|
const change = (event) => {
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
if (!event.target.composing) {
|
|
107
|
+
const input = event.target;
|
|
108
|
+
let value = input.value;
|
|
109
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
110
|
+
value = value.slice(0, Number(props.maxLength));
|
|
111
|
+
}
|
|
112
|
+
emitChange(input.value, event);
|
|
113
|
+
}
|
|
108
114
|
};
|
|
109
115
|
const focus = (event) => {
|
|
110
116
|
if (props.disabled)
|
|
@@ -123,6 +129,15 @@ const _sfc_main = create({
|
|
|
123
129
|
emitChange(value, event);
|
|
124
130
|
emit("blur", { value, event });
|
|
125
131
|
};
|
|
132
|
+
const startComposing = ({ target }) => {
|
|
133
|
+
target.composing = true;
|
|
134
|
+
};
|
|
135
|
+
const endComposing = ({ target }) => {
|
|
136
|
+
if (target.composing) {
|
|
137
|
+
target.composing = false;
|
|
138
|
+
target.dispatchEvent(new Event("input"));
|
|
139
|
+
}
|
|
140
|
+
};
|
|
126
141
|
return {
|
|
127
142
|
textareaRef,
|
|
128
143
|
classes,
|
|
@@ -130,7 +145,9 @@ const _sfc_main = create({
|
|
|
130
145
|
change,
|
|
131
146
|
focus,
|
|
132
147
|
blur,
|
|
133
|
-
translate
|
|
148
|
+
translate,
|
|
149
|
+
startComposing,
|
|
150
|
+
endComposing
|
|
134
151
|
};
|
|
135
152
|
}
|
|
136
153
|
});
|
|
@@ -156,7 +173,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
156
173
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
157
174
|
maxlength: _ctx.maxLength,
|
|
158
175
|
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
159
|
-
autofocus: _ctx.autofocus
|
|
176
|
+
autofocus: _ctx.autofocus,
|
|
177
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
178
|
+
onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
179
|
+
onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.startComposing && _ctx.startComposing(...args))
|
|
160
180
|
}, null, 44, _hoisted_1),
|
|
161
181
|
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
162
182
|
], 2);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.0.0-beta.
|
|
5
|
+
"version": "4.0.0-beta.22",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -1580,7 +1580,7 @@
|
|
|
1580
1580
|
},
|
|
1581
1581
|
{
|
|
1582
1582
|
"name": "custom-bg-img",
|
|
1583
|
-
"default": "
|
|
1583
|
+
"default": "-",
|
|
1584
1584
|
"description": "自定义图片(建议使用雪碧图实现,使用抽奖功能必须使用雪碧图)",
|
|
1585
1585
|
"value": {
|
|
1586
1586
|
"type": "string",
|
|
@@ -3998,7 +3998,7 @@
|
|
|
3998
3998
|
"default": "`[0, 12]`",
|
|
3999
3999
|
"description": "出现位置的偏移量",
|
|
4000
4000
|
"value": {
|
|
4001
|
-
"type": "
|
|
4001
|
+
"type": "number | string",
|
|
4002
4002
|
"kind": "expression"
|
|
4003
4003
|
}
|
|
4004
4004
|
},
|
|
@@ -4025,7 +4025,7 @@
|
|
|
4025
4025
|
"default": "`0.3`",
|
|
4026
4026
|
"description": "动画时长,单位秒",
|
|
4027
4027
|
"value": {
|
|
4028
|
-
"type": "
|
|
4028
|
+
"type": "number | string",
|
|
4029
4029
|
"kind": "expression"
|
|
4030
4030
|
}
|
|
4031
4031
|
},
|
|
@@ -6221,7 +6221,7 @@
|
|
|
6221
6221
|
"events": [],
|
|
6222
6222
|
"attributes": [
|
|
6223
6223
|
{
|
|
6224
|
-
"name": "
|
|
6224
|
+
"name": "v-model",
|
|
6225
6225
|
"default": "`false`",
|
|
6226
6226
|
"description": "是否展示引导弹出层",
|
|
6227
6227
|
"value": {
|
|
@@ -6480,7 +6480,7 @@
|
|
|
6480
6480
|
{
|
|
6481
6481
|
"name": "auto-upload",
|
|
6482
6482
|
"default": "`true`",
|
|
6483
|
-
"description": "
|
|
6483
|
+
"description": "是否在选取文件后立即进行上传,`false` 时需要手动执行 ref submit 方法进行上传",
|
|
6484
6484
|
"value": {
|
|
6485
6485
|
"type": "boolean",
|
|
6486
6486
|
"kind": "expression"
|
|
@@ -6543,7 +6543,7 @@
|
|
|
6543
6543
|
{
|
|
6544
6544
|
"name": "list-type",
|
|
6545
6545
|
"default": "`\"picture\"`",
|
|
6546
|
-
"description": "上传列表的内建样式,支持两种基础样式 picture
|
|
6546
|
+
"description": "上传列表的内建样式,支持两种基础样式 `picture`、`list`",
|
|
6547
6547
|
"value": {
|
|
6548
6548
|
"type": "string",
|
|
6549
6549
|
"kind": "expression"
|