@nutui/nutui 4.0.1-beta.1 → 4.0.1-beta.3
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 +10 -17
- package/dist/nutui.umd.js +2 -158
- package/dist/packages/_es/Address.js +3 -0
- package/dist/packages/_es/Audio.js +6 -0
- package/dist/packages/_es/AudioOperate.js +1 -0
- package/dist/packages/_es/Avatar.js +2 -0
- package/dist/packages/_es/AvatarGroup.js +1 -0
- package/dist/packages/_es/Badge.js +5 -1
- package/dist/packages/_es/Barrage.js +5 -3
- package/dist/packages/_es/Calendar.js +7 -2
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Cascader.js +2 -0
- package/dist/packages/_es/Category.js +2 -0
- package/dist/packages/_es/CategoryPane.js +3 -0
- package/dist/packages/_es/Cell.js +1 -0
- package/dist/packages/_es/Checkbox.js +17 -2
- package/dist/packages/_es/CollapseItem.js +1 -0
- package/dist/packages/_es/Comment.js +5 -0
- package/dist/packages/_es/Countdown.js +8 -0
- package/dist/packages/_es/Countup.js +10 -0
- package/dist/packages/_es/DatePicker.js +2 -0
- package/dist/packages/_es/Dialog.js +3 -0
- package/dist/packages/_es/Ellipsis.js +2 -0
- package/dist/packages/_es/Empty.js +3 -0
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +2 -1
- package/dist/packages/_es/ImagePreview.js +1 -0
- package/dist/packages/_es/Input.js +20 -12
- package/dist/packages/_es/Invoice.js +5 -3
- package/dist/packages/_es/Navbar.js +6 -0
- package/dist/packages/_es/Noticebar.js +50 -18
- package/dist/packages/_es/Notify.js +3 -0
- package/dist/packages/_es/Picker.js +2 -0
- package/dist/packages/_es/PullRefresh.js +4 -0
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Searchbar.js +1 -0
- package/dist/packages/_es/ShortPassword.js +1 -0
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +10 -0
- package/dist/packages/_es/Sku.js +14 -0
- package/dist/packages/_es/Swiper.js +5 -2
- package/dist/packages/_es/TabbarItem.js +5 -0
- package/dist/packages/_es/Tabs.js +2 -0
- package/dist/packages/_es/Textarea.js +1 -0
- package/dist/packages/_es/Toast.js +8 -0
- package/dist/packages/_es/Tour.js +1 -0
- package/dist/packages/_es/Uploader.js +5 -2
- package/dist/packages/_es/Video.js +18 -0
- package/dist/packages/_es/{common-05c67d9a.js → common-0c815463.js} +8 -0
- package/dist/packages/_es/{index-4f2972bc.js → index-0432a798.js} +147 -32
- package/dist/packages/_es/{index.vue_vue_type_script_lang-ee936659.js → index.vue_vue_type_script_lang-0725f0ae.js} +1 -0
- package/dist/packages/_es/{index.vue_vue_type_script_lang-8b9f3de5.js → index.vue_vue_type_script_lang-9c679f64.js} +1 -0
- package/dist/packages/badge/index.scss +3 -0
- package/dist/packages/checkbox/index.scss +41 -0
- package/dist/packages/input/index.scss +6 -8
- package/dist/packages/noticebar/index.scss +4 -0
- package/dist/packages/uploader/index.scss +7 -2
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/resolver/index.mjs +24 -0
- package/dist/smartips/web-types.json +20 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/styles/variables-jdb.scss +9 -1
- package/dist/styles/variables-jddkh.scss +9 -1
- package/dist/styles/variables-jdt.scss +8 -0
- package/dist/styles/variables.scss +8 -0
- package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
- package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -0
- package/dist/types/__VUE/swiper/index.vue.d.ts +8 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/resolver/index.d.ts +6 -0
- package/dist/types/utils/date.d.ts +4 -0
- package/package.json +6 -6
|
@@ -41,14 +41,17 @@ const _sfc_main = create({
|
|
|
41
41
|
type: Array,
|
|
42
42
|
default: () => []
|
|
43
43
|
},
|
|
44
|
+
// 市
|
|
44
45
|
country: {
|
|
45
46
|
type: Array,
|
|
46
47
|
default: () => []
|
|
47
48
|
},
|
|
49
|
+
// 县
|
|
48
50
|
town: {
|
|
49
51
|
type: Array,
|
|
50
52
|
default: () => []
|
|
51
53
|
},
|
|
54
|
+
// 镇
|
|
52
55
|
isShowCustomAddress: {
|
|
53
56
|
type: Boolean,
|
|
54
57
|
default: true
|
|
@@ -13,26 +13,32 @@ const _sfc_main = create({
|
|
|
13
13
|
type: String,
|
|
14
14
|
default: ""
|
|
15
15
|
},
|
|
16
|
+
// 静音
|
|
16
17
|
muted: {
|
|
17
18
|
type: Boolean,
|
|
18
19
|
default: false
|
|
19
20
|
},
|
|
21
|
+
// 自动播放
|
|
20
22
|
autoplay: {
|
|
21
23
|
type: Boolean,
|
|
22
24
|
default: false
|
|
23
25
|
},
|
|
26
|
+
// 循环播放
|
|
24
27
|
loop: {
|
|
25
28
|
type: Boolean,
|
|
26
29
|
default: false
|
|
27
30
|
},
|
|
31
|
+
// 是否预加载音频
|
|
28
32
|
preload: {
|
|
29
33
|
type: String,
|
|
30
34
|
default: "auto"
|
|
31
35
|
},
|
|
36
|
+
/* 总时长秒数 */
|
|
32
37
|
second: {
|
|
33
38
|
type: Number,
|
|
34
39
|
default: 0
|
|
35
40
|
},
|
|
41
|
+
// 展示的形式 controls 控制面板 progress 进度条 icon 图标 none 自定义
|
|
36
42
|
type: {
|
|
37
43
|
type: String,
|
|
38
44
|
default: "progress"
|
|
@@ -16,6 +16,10 @@ const _sfc_main = create({
|
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: false
|
|
18
18
|
},
|
|
19
|
+
bubble: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
19
23
|
hidden: {
|
|
20
24
|
type: Boolean,
|
|
21
25
|
default: false
|
|
@@ -79,7 +83,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79
83
|
renderSlot(_ctx.$slots, "default"),
|
|
80
84
|
withDirectives(createElementVNode("view", {
|
|
81
85
|
textContent: toDisplayString(_ctx.content),
|
|
82
|
-
class: normalizeClass(["nut-badge__content nut-badge__content--sup", { "nut-badge__content--dot": _ctx.dot }]),
|
|
86
|
+
class: normalizeClass(["nut-badge__content nut-badge__content--sup", { "nut-badge__content--dot": _ctx.dot, "nut-badge__content--bubble": !_ctx.dot && _ctx.bubble }]),
|
|
83
87
|
style: normalizeStyle(_ctx.stl)
|
|
84
88
|
}, null, 14, _hoisted_2), [
|
|
85
89
|
[vShow, !_ctx.hidden && (_ctx.content || _ctx.dot)]
|
|
@@ -42,7 +42,7 @@ const _sfc_main = create({
|
|
|
42
42
|
});
|
|
43
43
|
let dmBody = ref(document.createElement("div"));
|
|
44
44
|
let dmContainer = ref(document.createElement("div"));
|
|
45
|
-
let timer =
|
|
45
|
+
let timer = null;
|
|
46
46
|
const danmuList = ref(props.danmu);
|
|
47
47
|
const rows = ref(props.rows);
|
|
48
48
|
const top = ref(props.top);
|
|
@@ -99,8 +99,10 @@ const _sfc_main = create({
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
const clearTime = () => {
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
if (timer) {
|
|
103
|
+
clearTimeout(timer);
|
|
104
|
+
timer = null;
|
|
105
|
+
}
|
|
104
106
|
};
|
|
105
107
|
watch(
|
|
106
108
|
() => props.danmu,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ref, resolveComponent, openBlock, createBlock, withCtx, createSlots, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
3
|
-
import { C as CalendarItem, U as Utils } from "./index-
|
|
3
|
+
import { C as CalendarItem, U as Utils } from "./index-0432a798.js";
|
|
4
4
|
import { P as Popup } from "./index-a564e25f.js";
|
|
5
5
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -99,8 +99,13 @@ const _sfc_main = create({
|
|
|
99
99
|
var _a;
|
|
100
100
|
(_a = calendarRef.value) == null ? void 0 : _a.scrollToDate(date);
|
|
101
101
|
};
|
|
102
|
+
const initPosition = () => {
|
|
103
|
+
var _a;
|
|
104
|
+
(_a = calendarRef.value) == null ? void 0 : _a.initPosition();
|
|
105
|
+
};
|
|
102
106
|
useExpose({
|
|
103
|
-
scrollToDate
|
|
107
|
+
scrollToDate,
|
|
108
|
+
initPosition
|
|
104
109
|
});
|
|
105
110
|
const update = () => {
|
|
106
111
|
emit("update:visible", false);
|
|
@@ -99,6 +99,7 @@ class Tree {
|
|
|
99
99
|
parent.children = formatTree(nodes, parent, this.config);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
// for test
|
|
102
103
|
getNodeByValue(value) {
|
|
103
104
|
let foundNode;
|
|
104
105
|
eachTree(this.nodes, (node) => {
|
|
@@ -290,6 +291,7 @@ const _sfc_main$1 = create$1({
|
|
|
290
291
|
emit("update:modelValue", emitValue, pathNodes);
|
|
291
292
|
};
|
|
292
293
|
const methods = {
|
|
294
|
+
// 选中一个节点,静默模式不触发事件
|
|
293
295
|
async handleNode(node, silent) {
|
|
294
296
|
const { disabled, loading } = node;
|
|
295
297
|
if (!silent && disabled || !panes.value[tabsCursor.value]) {
|
|
@@ -5,14 +5,17 @@ import "../locale/lang";
|
|
|
5
5
|
const { componentName, create } = createComponent("category-pane");
|
|
6
6
|
const _sfc_main = create({
|
|
7
7
|
props: {
|
|
8
|
+
//分类模式
|
|
8
9
|
type: {
|
|
9
10
|
type: String,
|
|
10
11
|
default: "classify"
|
|
11
12
|
},
|
|
13
|
+
//右侧导航数据
|
|
12
14
|
categoryChild: {
|
|
13
15
|
type: Array,
|
|
14
16
|
default: () => []
|
|
15
17
|
},
|
|
18
|
+
//模式传入自定义数据
|
|
16
19
|
customCategory: {
|
|
17
20
|
type: Array,
|
|
18
21
|
default: () => []
|
|
@@ -30,6 +30,11 @@ const component = (componentName2, components) => {
|
|
|
30
30
|
indeterminate: {
|
|
31
31
|
type: Boolean,
|
|
32
32
|
default: false
|
|
33
|
+
},
|
|
34
|
+
shape: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "round"
|
|
37
|
+
// button
|
|
33
38
|
}
|
|
34
39
|
},
|
|
35
40
|
emits: ["change", "update:modelValue"],
|
|
@@ -95,6 +100,16 @@ const component = (componentName2, components) => {
|
|
|
95
100
|
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
96
101
|
);
|
|
97
102
|
};
|
|
103
|
+
const renderButton = () => {
|
|
104
|
+
var _a;
|
|
105
|
+
return h(
|
|
106
|
+
"view",
|
|
107
|
+
{
|
|
108
|
+
class: `${componentName2}__button ${pValue.value && `${componentName2}__button--active`} ${pDisabled.value ? `${componentName2}__button--disabled` : ""}`
|
|
109
|
+
},
|
|
110
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
111
|
+
);
|
|
112
|
+
};
|
|
98
113
|
const handleClick = (e) => {
|
|
99
114
|
var _a, _b;
|
|
100
115
|
if (pDisabled.value)
|
|
@@ -131,10 +146,10 @@ const component = (componentName2, components) => {
|
|
|
131
146
|
return h(
|
|
132
147
|
"view",
|
|
133
148
|
{
|
|
134
|
-
class: `${componentName2} ${props.textPosition === "left" ? `${componentName2}--reverse` : ""}`,
|
|
149
|
+
class: `${componentName2} ${componentName2}--${props.shape} ${props.textPosition === "left" ? `${componentName2}--reverse` : ""}`,
|
|
135
150
|
onClick: handleClick
|
|
136
151
|
},
|
|
137
|
-
[renderIcon(), renderLabel()]
|
|
152
|
+
[props.shape == "button" ? renderButton() : [renderIcon(), renderLabel()]]
|
|
138
153
|
);
|
|
139
154
|
};
|
|
140
155
|
}
|
|
@@ -16,6 +16,7 @@ const _sfc_main$3 = create$3({
|
|
|
16
16
|
type: {
|
|
17
17
|
type: String,
|
|
18
18
|
default: "default"
|
|
19
|
+
// default,complex
|
|
19
20
|
},
|
|
20
21
|
info: {
|
|
21
22
|
type: Object,
|
|
@@ -117,6 +118,7 @@ const _sfc_main$2 = create$2({
|
|
|
117
118
|
type: {
|
|
118
119
|
type: String,
|
|
119
120
|
default: "one"
|
|
121
|
+
// one multi
|
|
120
122
|
},
|
|
121
123
|
videos: {
|
|
122
124
|
type: Array,
|
|
@@ -219,6 +221,7 @@ const _sfc_main$1 = create$1({
|
|
|
219
221
|
type: {
|
|
220
222
|
type: String,
|
|
221
223
|
default: "base"
|
|
224
|
+
// simple,base,complex
|
|
222
225
|
},
|
|
223
226
|
info: {
|
|
224
227
|
type: Object,
|
|
@@ -302,10 +305,12 @@ const _sfc_main = create({
|
|
|
302
305
|
headerType: {
|
|
303
306
|
type: String,
|
|
304
307
|
default: "default"
|
|
308
|
+
//头部展示风格 default,complex
|
|
305
309
|
},
|
|
306
310
|
imagesRows: {
|
|
307
311
|
type: String,
|
|
308
312
|
default: "one"
|
|
313
|
+
// 'one' 'multi'
|
|
309
314
|
},
|
|
310
315
|
ellipsis: {
|
|
311
316
|
type: [String, Number, Boolean],
|
|
@@ -23,6 +23,7 @@ const _sfc_main = create({
|
|
|
23
23
|
type: Boolean
|
|
24
24
|
},
|
|
25
25
|
startTime: {
|
|
26
|
+
// 可以是服务器当前时间
|
|
26
27
|
type: [Number, String],
|
|
27
28
|
validator(v) {
|
|
28
29
|
const dateStr = new Date(v).toString().toLowerCase();
|
|
@@ -36,10 +37,12 @@ const _sfc_main = create({
|
|
|
36
37
|
return dateStr !== "invalid date";
|
|
37
38
|
}
|
|
38
39
|
},
|
|
40
|
+
// 是否开启毫秒
|
|
39
41
|
millisecond: {
|
|
40
42
|
default: false,
|
|
41
43
|
type: Boolean
|
|
42
44
|
},
|
|
45
|
+
// 时间格式化
|
|
43
46
|
format: {
|
|
44
47
|
type: String,
|
|
45
48
|
default: "HH:mm:ss"
|
|
@@ -48,6 +51,7 @@ const _sfc_main = create({
|
|
|
48
51
|
type: Boolean,
|
|
49
52
|
default: true
|
|
50
53
|
},
|
|
54
|
+
// 倒计时时长,单位毫秒
|
|
51
55
|
time: {
|
|
52
56
|
type: [Number, String],
|
|
53
57
|
default: 0
|
|
@@ -57,10 +61,14 @@ const _sfc_main = create({
|
|
|
57
61
|
setup(props, { emit, slots }) {
|
|
58
62
|
const state = reactive({
|
|
59
63
|
restTime: 0,
|
|
64
|
+
// 倒计时剩余时间时间
|
|
60
65
|
timer: null,
|
|
61
66
|
counting: !props.paused && props.autoStart,
|
|
67
|
+
// 是否处于倒计时中
|
|
62
68
|
handleEndTime: Date.now(),
|
|
69
|
+
// 最终截止时间
|
|
63
70
|
diffTime: 0
|
|
71
|
+
// 设置了 startTime 时,与 date.now() 的差异
|
|
64
72
|
});
|
|
65
73
|
const classes = computed(() => {
|
|
66
74
|
const prefixCls = componentName;
|
|
@@ -35,6 +35,7 @@ const _sfc_main = create({
|
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default: true
|
|
37
37
|
},
|
|
38
|
+
// 数字滚动
|
|
38
39
|
numWidth: {
|
|
39
40
|
type: Number,
|
|
40
41
|
default: 20
|
|
@@ -47,6 +48,7 @@ const _sfc_main = create({
|
|
|
47
48
|
type: Boolean,
|
|
48
49
|
default: false
|
|
49
50
|
},
|
|
51
|
+
// 自定义图片
|
|
50
52
|
customBgImg: {
|
|
51
53
|
type: String,
|
|
52
54
|
default: ""
|
|
@@ -59,6 +61,7 @@ const _sfc_main = create({
|
|
|
59
61
|
type: Number,
|
|
60
62
|
default: 1
|
|
61
63
|
},
|
|
64
|
+
// 抽奖
|
|
62
65
|
type: {
|
|
63
66
|
type: String,
|
|
64
67
|
default: ""
|
|
@@ -100,14 +103,20 @@ const _sfc_main = create({
|
|
|
100
103
|
to10_0: [0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1],
|
|
101
104
|
timer: null,
|
|
102
105
|
totalCount: 0,
|
|
106
|
+
//正整数
|
|
103
107
|
pointNum: 0,
|
|
108
|
+
//小数位
|
|
104
109
|
numberVal: 0,
|
|
110
|
+
//数字
|
|
105
111
|
num_total_len: 0,
|
|
112
|
+
//数字长度
|
|
106
113
|
relNum: 0,
|
|
114
|
+
//去除小数点
|
|
107
115
|
customNumber: 1,
|
|
108
116
|
prizeLevelTrun: 0,
|
|
109
117
|
prizeY: [],
|
|
110
118
|
prizeYPrev: [],
|
|
119
|
+
// machineTransition: 'none',
|
|
111
120
|
finshMachine: 0,
|
|
112
121
|
notPrize: [],
|
|
113
122
|
typeMachine: ""
|
|
@@ -395,6 +404,7 @@ const _sfc_main = create({
|
|
|
395
404
|
}
|
|
396
405
|
scrollTime(
|
|
397
406
|
i,
|
|
407
|
+
// parseFloat((this.machinePrizeNum-(this.prizeLevelTrun-1))*this.numHeight + turn + local),
|
|
398
408
|
newLocation,
|
|
399
409
|
local
|
|
400
410
|
);
|
|
@@ -70,6 +70,7 @@ const _sfc_main = create({
|
|
|
70
70
|
footerDirection: {
|
|
71
71
|
type: String,
|
|
72
72
|
default: "horizontal"
|
|
73
|
+
//vertical
|
|
73
74
|
},
|
|
74
75
|
customClass: {
|
|
75
76
|
type: String,
|
|
@@ -237,6 +238,8 @@ class DialogOptions {
|
|
|
237
238
|
__publicField(this, "teleport", "body");
|
|
238
239
|
__publicField(this, "id", new Date().getTime());
|
|
239
240
|
__publicField(this, "footerDirection", "horizontal");
|
|
241
|
+
//使用横纵方向 可选值 horizontal、vertical
|
|
242
|
+
// function
|
|
240
243
|
__publicField(this, "onUpdate");
|
|
241
244
|
__publicField(this, "onOk");
|
|
242
245
|
__publicField(this, "onCancel");
|
|
@@ -13,13 +13,16 @@ const _sfc_main = create({
|
|
|
13
13
|
image: {
|
|
14
14
|
type: String,
|
|
15
15
|
default: "empty"
|
|
16
|
+
//默认empty
|
|
16
17
|
},
|
|
17
18
|
imageSize: {
|
|
18
19
|
type: [Number, String],
|
|
20
|
+
// 图片大小,正方形
|
|
19
21
|
default: ""
|
|
20
22
|
},
|
|
21
23
|
description: {
|
|
22
24
|
type: String,
|
|
25
|
+
// 文字区
|
|
23
26
|
default: ""
|
|
24
27
|
}
|
|
25
28
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
2
2
|
import "vue";
|
|
3
|
-
import { c as component } from "./common-
|
|
3
|
+
import { c as component } from "./common-0c815463.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
import "./pxCheck-c6b9f6b7.js";
|
|
6
6
|
const { create } = createComponent("grid");
|
|
@@ -2,7 +2,7 @@ import { inject, getCurrentInstance, onUnmounted, computed, ref, openBlock, crea
|
|
|
2
2
|
import { u as useRouter } from "./index-54d03fc1.js";
|
|
3
3
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
4
4
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
5
|
-
import { G as GRID_KEY } from "./common-
|
|
5
|
+
import { G as GRID_KEY } from "./common-0c815463.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
8
8
|
function useInject(key) {
|
|
@@ -29,6 +29,7 @@ const _sfc_main = create({
|
|
|
29
29
|
text: {
|
|
30
30
|
type: String
|
|
31
31
|
},
|
|
32
|
+
// router
|
|
32
33
|
to: {
|
|
33
34
|
type: [String, Object]
|
|
34
35
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, createCommentVNode, withDirectives,
|
|
1
|
+
import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, createCommentVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
3
3
|
import { MaskClose } from "@nutui/icons-vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -114,7 +114,9 @@ const _sfc_main = create({
|
|
|
114
114
|
const state = reactive({
|
|
115
115
|
focused: false,
|
|
116
116
|
validateFailed: false,
|
|
117
|
+
// 校验失败
|
|
117
118
|
validateMessage: ""
|
|
119
|
+
// 校验信息
|
|
118
120
|
});
|
|
119
121
|
const classes = computed(() => {
|
|
120
122
|
const prefixCls = componentName;
|
|
@@ -173,10 +175,9 @@ const _sfc_main = create({
|
|
|
173
175
|
return;
|
|
174
176
|
}
|
|
175
177
|
const input = event.target;
|
|
176
|
-
|
|
178
|
+
input.value;
|
|
177
179
|
active.value = true;
|
|
178
180
|
emit("focus", event);
|
|
179
|
-
emit("update:modelValue", value);
|
|
180
181
|
};
|
|
181
182
|
const onBlur = (event) => {
|
|
182
183
|
if (props.disabled || props.readonly) {
|
|
@@ -192,7 +193,6 @@ const _sfc_main = create({
|
|
|
192
193
|
}
|
|
193
194
|
updateValue(getModelValue(), "onBlur");
|
|
194
195
|
emit("blur", event);
|
|
195
|
-
emit("update:modelValue", value);
|
|
196
196
|
};
|
|
197
197
|
const clear = (event) => {
|
|
198
198
|
event.stopPropagation();
|
|
@@ -251,16 +251,18 @@ const _sfc_main = create({
|
|
|
251
251
|
});
|
|
252
252
|
const _hoisted_1 = { class: "nut-input-value" };
|
|
253
253
|
const _hoisted_2 = { class: "nut-input-inner" };
|
|
254
|
-
const _hoisted_3 = { class: "nut-input-box" };
|
|
255
|
-
const _hoisted_4 = {
|
|
254
|
+
const _hoisted_3 = { class: "nut-input-left-box" };
|
|
255
|
+
const _hoisted_4 = { class: "nut-input-box" };
|
|
256
|
+
const _hoisted_5 = {
|
|
256
257
|
key: 0,
|
|
257
258
|
class: "nut-input-word-limit"
|
|
258
259
|
};
|
|
259
|
-
const
|
|
260
|
-
const
|
|
260
|
+
const _hoisted_6 = { class: "nut-input-word-num" };
|
|
261
|
+
const _hoisted_7 = {
|
|
261
262
|
key: 0,
|
|
262
263
|
class: "nut-input-clear-box"
|
|
263
264
|
};
|
|
265
|
+
const _hoisted_8 = { class: "nut-input-right-box" };
|
|
264
266
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
265
267
|
const _component_MaskClose = resolveComponent("MaskClose");
|
|
266
268
|
return openBlock(), createElementBlock("view", {
|
|
@@ -269,6 +271,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
269
271
|
createElementVNode("view", _hoisted_1, [
|
|
270
272
|
createElementVNode("view", _hoisted_2, [
|
|
271
273
|
createElementVNode("view", _hoisted_3, [
|
|
274
|
+
renderSlot(_ctx.$slots, "left")
|
|
275
|
+
]),
|
|
276
|
+
createElementVNode("view", _hoisted_4, [
|
|
272
277
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput(_ctx.type)), {
|
|
273
278
|
class: "input-text",
|
|
274
279
|
ref: "inputRef",
|
|
@@ -289,12 +294,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
289
294
|
onCompositionend: _ctx.endComposing,
|
|
290
295
|
onCompositionstart: _ctx.startComposing
|
|
291
296
|
}, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
|
|
292
|
-
_ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view",
|
|
293
|
-
createElementVNode("span",
|
|
297
|
+
_ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
298
|
+
createElementVNode("span", _hoisted_6, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
|
|
294
299
|
createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
|
|
295
300
|
])) : createCommentVNode("", true)
|
|
296
301
|
]),
|
|
297
|
-
_ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("view",
|
|
302
|
+
_ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("view", _hoisted_7, [
|
|
298
303
|
renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
299
304
|
createVNode(_component_MaskClose, mergeProps({ class: "nut-input-clear" }, _ctx.$attrs, {
|
|
300
305
|
size: _ctx.clearSize,
|
|
@@ -305,7 +310,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
305
310
|
])
|
|
306
311
|
], 512)), [
|
|
307
312
|
[vShow, _ctx.active && _ctx.modelValue.length > 0]
|
|
308
|
-
]) : createCommentVNode("", true)
|
|
313
|
+
]) : createCommentVNode("", true),
|
|
314
|
+
createElementVNode("view", _hoisted_8, [
|
|
315
|
+
renderSlot(_ctx.$slots, "right")
|
|
316
|
+
])
|
|
309
317
|
])
|
|
310
318
|
])
|
|
311
319
|
], 2);
|
|
@@ -2,8 +2,8 @@ import { ref, reactive, computed, onMounted, watch, toRefs, resolveComponent, op
|
|
|
2
2
|
import { c as createComponent } from "./component-bb5ff48e.js";
|
|
3
3
|
import Form from "./Form.js";
|
|
4
4
|
import FormItem from "./FormItem.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-
|
|
6
|
-
import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-
|
|
5
|
+
import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-9c679f64.js";
|
|
6
|
+
import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-0725f0ae.js";
|
|
7
7
|
import Button from "./Button.js";
|
|
8
8
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -39,7 +39,9 @@ const _sfc_main = create({
|
|
|
39
39
|
setup(props, { emit }) {
|
|
40
40
|
const formRef = ref();
|
|
41
41
|
const list = ref([]);
|
|
42
|
-
const state = reactive({
|
|
42
|
+
const state = reactive({
|
|
43
|
+
// list: []
|
|
44
|
+
});
|
|
43
45
|
const classes = computed(() => {
|
|
44
46
|
const prefixCls = componentName;
|
|
45
47
|
return {
|
|
@@ -8,10 +8,15 @@ const _sfc_main = create({
|
|
|
8
8
|
components: { Left },
|
|
9
9
|
props: {
|
|
10
10
|
leftShow: { type: Boolean, default: false },
|
|
11
|
+
//左侧 是否显示返回icon
|
|
11
12
|
title: { type: String, default: "" },
|
|
13
|
+
//中间 文字标题
|
|
12
14
|
titleIcon: { type: Boolean, default: false },
|
|
15
|
+
//中间
|
|
13
16
|
leftText: { type: String, default: "" },
|
|
17
|
+
//左侧文字
|
|
14
18
|
desc: { type: String, default: "" },
|
|
19
|
+
//右侧 按钮文字
|
|
15
20
|
fixed: {
|
|
16
21
|
type: Boolean,
|
|
17
22
|
default: false
|
|
@@ -25,6 +30,7 @@ const _sfc_main = create({
|
|
|
25
30
|
default: false
|
|
26
31
|
},
|
|
27
32
|
placeholder: {
|
|
33
|
+
// 生成一个等高的占位元素
|
|
28
34
|
type: Boolean,
|
|
29
35
|
default: true
|
|
30
36
|
},
|