@varlet/ui 3.9.0-alpha.1740240238764 → 3.9.0
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/es/action-sheet/style/index.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/index.mjs +3 -0
- package/es/locale/ja-JP.d.ts +5 -0
- package/es/locale/ja-JP.mjs +108 -0
- package/es/locale/zh-TW.mjs +4 -1
- package/es/pagination/Pagination.mjs +2 -0
- package/es/radio/Radio.mjs +15 -4
- package/es/radio-group/RadioGroup.mjs +8 -2
- package/es/varlet.esm.js +4332 -4216
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +144 -15
- package/package.json +7 -7
- package/types/locale.d.ts +5 -0
- package/umd/varlet.js +7 -7
package/es/index.bundle.mjs
CHANGED
|
@@ -280,7 +280,7 @@ import './tooltip/style/index.mjs'
|
|
|
280
280
|
import './uploader/style/index.mjs'
|
|
281
281
|
import './watermark/style/index.mjs'
|
|
282
282
|
|
|
283
|
-
const version = '3.9.0
|
|
283
|
+
const version = '3.9.0'
|
|
284
284
|
|
|
285
285
|
function install(app) {
|
|
286
286
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -186,7 +186,7 @@ export * from './tooltip/index.mjs'
|
|
|
186
186
|
export * from './uploader/index.mjs'
|
|
187
187
|
export * from './watermark/index.mjs'
|
|
188
188
|
|
|
189
|
-
const version = '3.9.0
|
|
189
|
+
const version = '3.9.0'
|
|
190
190
|
|
|
191
191
|
function install(app) {
|
|
192
192
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/locale/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { ref } from "vue";
|
|
|
18
18
|
import { hasOwn } from "@varlet/shared";
|
|
19
19
|
import enUS from "./en-US.mjs";
|
|
20
20
|
import faIR from "./fa-IR.mjs";
|
|
21
|
+
import jaJP from "./ja-JP.mjs";
|
|
21
22
|
import zhCN from "./zh-CN.mjs";
|
|
22
23
|
import zhHK from "./zh-HK.mjs";
|
|
23
24
|
import zhTW from "./zh-TW.mjs";
|
|
@@ -66,6 +67,7 @@ const _LocaleComponent = {
|
|
|
66
67
|
zhTW,
|
|
67
68
|
zhHK,
|
|
68
69
|
faIR,
|
|
70
|
+
jaJP,
|
|
69
71
|
messages,
|
|
70
72
|
currentMessage,
|
|
71
73
|
add,
|
|
@@ -80,6 +82,7 @@ var stdin_default = {
|
|
|
80
82
|
zhTW,
|
|
81
83
|
zhHK,
|
|
82
84
|
faIR,
|
|
85
|
+
jaJP,
|
|
83
86
|
messages,
|
|
84
87
|
currentMessage,
|
|
85
88
|
add,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var stdin_default = {
|
|
2
|
+
// Dialog
|
|
3
|
+
dialogTitle: "\u78BA\u8A8D",
|
|
4
|
+
dialogConfirmButtonText: "\u78BA\u8A8D",
|
|
5
|
+
dialogCancelButtonText: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
6
|
+
// ActionSheet
|
|
7
|
+
actionSheetTitle: "\u3044\u305A\u308C\u304B\u3092\u9078\u629E",
|
|
8
|
+
// List
|
|
9
|
+
listLoadingText: "\u8AAD\u307F\u8FBC\u307F\u4E2D",
|
|
10
|
+
listFinishedText: "\u4EE5\u4E0A\u3067\u3059",
|
|
11
|
+
listErrorText: "\u8AAD\u307F\u8FBC\u307F\u5931\u6557",
|
|
12
|
+
// Picker
|
|
13
|
+
pickerTitle: "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
14
|
+
pickerConfirmButtonText: "\u78BA\u8A8D",
|
|
15
|
+
pickerCancelButtonText: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
16
|
+
// date-picker
|
|
17
|
+
datePickerMonthDict: {
|
|
18
|
+
"01": {
|
|
19
|
+
name: "1\u6708",
|
|
20
|
+
abbr: "1\u6708"
|
|
21
|
+
},
|
|
22
|
+
"02": {
|
|
23
|
+
name: "2\u6708",
|
|
24
|
+
abbr: "2\u6708"
|
|
25
|
+
},
|
|
26
|
+
"03": {
|
|
27
|
+
name: "3\u6708",
|
|
28
|
+
abbr: "3\u6708"
|
|
29
|
+
},
|
|
30
|
+
"04": {
|
|
31
|
+
name: "4\u6708",
|
|
32
|
+
abbr: "4\u6708"
|
|
33
|
+
},
|
|
34
|
+
"05": {
|
|
35
|
+
name: "5\u6708",
|
|
36
|
+
abbr: "5\u6708"
|
|
37
|
+
},
|
|
38
|
+
"06": {
|
|
39
|
+
name: "6\u6708",
|
|
40
|
+
abbr: "6\u6708"
|
|
41
|
+
},
|
|
42
|
+
"07": {
|
|
43
|
+
name: "7\u6708",
|
|
44
|
+
abbr: "7\u6708"
|
|
45
|
+
},
|
|
46
|
+
"08": {
|
|
47
|
+
name: "8\u6708",
|
|
48
|
+
abbr: "8\u6708"
|
|
49
|
+
},
|
|
50
|
+
"09": {
|
|
51
|
+
name: "9\u6708",
|
|
52
|
+
abbr: "9\u6708"
|
|
53
|
+
},
|
|
54
|
+
"10": {
|
|
55
|
+
name: "10\u6708",
|
|
56
|
+
abbr: "10\u6708"
|
|
57
|
+
},
|
|
58
|
+
"11": {
|
|
59
|
+
name: "11\u6708",
|
|
60
|
+
abbr: "11\u6708"
|
|
61
|
+
},
|
|
62
|
+
"12": {
|
|
63
|
+
name: "12\u6708",
|
|
64
|
+
abbr: "12\u6708"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
datePickerWeekDict: {
|
|
68
|
+
"0": {
|
|
69
|
+
name: "\u65E5\u66DC\u65E5",
|
|
70
|
+
abbr: "\u65E5"
|
|
71
|
+
},
|
|
72
|
+
"1": {
|
|
73
|
+
name: "\u6708\u66DC\u65E5",
|
|
74
|
+
abbr: "\u6708"
|
|
75
|
+
},
|
|
76
|
+
"2": {
|
|
77
|
+
name: "\u706B\u66DC\u65E5",
|
|
78
|
+
abbr: "\u706B"
|
|
79
|
+
},
|
|
80
|
+
"3": {
|
|
81
|
+
name: "\u6C34\u66DC\u65E5",
|
|
82
|
+
abbr: "\u6C34"
|
|
83
|
+
},
|
|
84
|
+
"4": {
|
|
85
|
+
name: "\u6728\u66DC\u65E5",
|
|
86
|
+
abbr: "\u6728"
|
|
87
|
+
},
|
|
88
|
+
"5": {
|
|
89
|
+
name: "\u91D1\u66DC\u65E5",
|
|
90
|
+
abbr: "\u91D1"
|
|
91
|
+
},
|
|
92
|
+
"6": {
|
|
93
|
+
name: "\u571F\u66DC\u65E5",
|
|
94
|
+
abbr: "\u571F"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
datePickerSelected: "\u4EF6\u9078\u629E\u6E08\u307F",
|
|
98
|
+
datePickerHint: "\u65E5\u4ED8\u3092\u9078\u629E",
|
|
99
|
+
// pagination
|
|
100
|
+
paginationItem: "\u4EF6",
|
|
101
|
+
paginationPage: "\u30DA\u30FC\u30B8",
|
|
102
|
+
paginationJump: "\u30B8\u30E3\u30F3\u30D7",
|
|
103
|
+
// time-picker
|
|
104
|
+
timePickerHint: "\u6642\u9593\u3092\u9078\u629E"
|
|
105
|
+
};
|
|
106
|
+
export {
|
|
107
|
+
stdin_default as default
|
|
108
|
+
};
|
package/es/locale/zh-TW.mjs
CHANGED
|
@@ -95,10 +95,13 @@ var stdin_default = {
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
datePickerSelected: "\u500B\u88AB\u9078\u64C7",
|
|
98
|
+
datePickerHint: "\u9078\u64C7\u65E5\u671F",
|
|
98
99
|
// pagination
|
|
99
100
|
paginationItem: "\u689D",
|
|
100
101
|
paginationPage: "\u9801",
|
|
101
|
-
paginationJump: "\u524D\u5F80"
|
|
102
|
+
paginationJump: "\u524D\u5F80",
|
|
103
|
+
// time-picker
|
|
104
|
+
timePickerHint: "\u9078\u64C7\u6642\u9593"
|
|
102
105
|
};
|
|
103
106
|
export {
|
|
104
107
|
stdin_default as default
|
|
@@ -58,6 +58,7 @@ function __render__(_ctx, _cache) {
|
|
|
58
58
|
modelValue: _ctx.simpleCurrentValue,
|
|
59
59
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.simpleCurrentValue = $event),
|
|
60
60
|
"var-pagination-cover": "",
|
|
61
|
+
variant: "standard",
|
|
61
62
|
hint: false,
|
|
62
63
|
disabled: _ctx.disabled,
|
|
63
64
|
onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.setPage("simple", _ctx.simpleCurrentValue, $event)),
|
|
@@ -222,6 +223,7 @@ function __render__(_ctx, _cache) {
|
|
|
222
223
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.quickJumperValue = $event),
|
|
223
224
|
disabled: _ctx.disabled,
|
|
224
225
|
hint: false,
|
|
226
|
+
variant: "standard",
|
|
225
227
|
"var-pagination-cover": "",
|
|
226
228
|
onBlur: _cache[7] || (_cache[7] = ($event) => _ctx.setPage("quick", _ctx.quickJumperValue, $event)),
|
|
227
229
|
onKeydown: _cache[8] || (_cache[8] = _withKeys(($event) => _ctx.setPage("quick", _ctx.quickJumperValue, $event), ["enter"]))
|
package/es/radio/Radio.mjs
CHANGED
|
@@ -115,9 +115,18 @@ const __sfc__ = defineComponent({
|
|
|
115
115
|
const { radioGroup, bindRadioGroup } = useRadioGroup();
|
|
116
116
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
117
117
|
const { form, bindForm } = useForm();
|
|
118
|
-
const tabIndex = computed(
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
const tabIndex = computed(() => {
|
|
119
|
+
const disabled = (form == null ? void 0 : form.disabled.value) || props2.disabled;
|
|
120
|
+
const isChecked = checked.value;
|
|
121
|
+
const hasCheckedInRadioGroup = radioGroup == null ? void 0 : radioGroup.hasChecked.value;
|
|
122
|
+
if (disabled) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (radioGroup && hasCheckedInRadioGroup && !isChecked) {
|
|
126
|
+
return "-1";
|
|
127
|
+
}
|
|
128
|
+
return "0";
|
|
129
|
+
});
|
|
121
130
|
const {
|
|
122
131
|
errorMessage,
|
|
123
132
|
validateWithTrigger: vt,
|
|
@@ -197,7 +206,9 @@ const __sfc__ = defineComponent({
|
|
|
197
206
|
}
|
|
198
207
|
function sync(v2) {
|
|
199
208
|
const { checkedValue, uncheckedValue } = props2;
|
|
200
|
-
|
|
209
|
+
const checked2 = v2 === checkedValue;
|
|
210
|
+
value.value = checked2 ? checkedValue : uncheckedValue;
|
|
211
|
+
return checked2;
|
|
201
212
|
}
|
|
202
213
|
function reset() {
|
|
203
214
|
value.value = props2.uncheckedValue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineComponent, nextTick, watch } from "vue";
|
|
1
|
+
import { computed, defineComponent, nextTick, ref, watch } from "vue";
|
|
2
2
|
import { call, isFunction, preventDefault } from "@varlet/shared";
|
|
3
3
|
import { useEventListener } from "@varlet/use";
|
|
4
4
|
import VarFormDetails from "../form-details/index.mjs";
|
|
@@ -69,11 +69,13 @@ const __sfc__ = defineComponent({
|
|
|
69
69
|
resetValidation
|
|
70
70
|
} = useValidation();
|
|
71
71
|
const radioGroupErrorMessage = computed(() => errorMessage.value);
|
|
72
|
+
const hasChecked = ref(false);
|
|
72
73
|
const radioGroupProvider = {
|
|
73
74
|
onToggle,
|
|
74
75
|
validate,
|
|
75
76
|
reset,
|
|
76
77
|
resetValidation,
|
|
78
|
+
hasChecked: computed(() => hasChecked.value),
|
|
77
79
|
errorMessage: radioGroupErrorMessage
|
|
78
80
|
};
|
|
79
81
|
watch(() => props2.modelValue, syncRadios);
|
|
@@ -129,7 +131,11 @@ const __sfc__ = defineComponent({
|
|
|
129
131
|
});
|
|
130
132
|
}
|
|
131
133
|
function syncRadios() {
|
|
132
|
-
|
|
134
|
+
radios.forEach(({ sync }) => {
|
|
135
|
+
if (sync(props2.modelValue)) {
|
|
136
|
+
hasChecked.value = true;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
133
139
|
}
|
|
134
140
|
function onToggle(changedValue) {
|
|
135
141
|
call(props2["onUpdate:modelValue"], changedValue);
|