@varlet/ui 3.1.0-alpha.1710070004473 → 3.1.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/button/Button.mjs +9 -9
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/select/useSelectController.mjs +2 -4
- package/es/varlet.esm.js +518 -513
- package/highlight/web-types.en-US.json +1 -1
- package/lib/varlet.cjs.js +15 -14
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/es/button/Button.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { computed, defineComponent, ref } from "vue";
|
|
|
6
6
|
import { props } from "./props.mjs";
|
|
7
7
|
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
8
8
|
import { useButtonGroup } from "./provide.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { call, normalizeToArray } from "@varlet/shared";
|
|
10
10
|
const { name, n, classes } = createNamespace("button");
|
|
11
11
|
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
12
12
|
const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
|
|
@@ -88,11 +88,12 @@ const __sfc__ = defineComponent({
|
|
|
88
88
|
const { buttonGroup } = useButtonGroup();
|
|
89
89
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
90
90
|
const states = computed(() => {
|
|
91
|
+
var _a, _b, _c, _d, _e, _f;
|
|
91
92
|
if (!buttonGroup) {
|
|
92
93
|
return {
|
|
93
94
|
elevation: formatElevation(props2.elevation, 2),
|
|
94
|
-
type: props2.type != null ?
|
|
95
|
-
size: props2.size != null ?
|
|
95
|
+
type: (_a = props2.type) != null ? _a : "default",
|
|
96
|
+
size: (_b = props2.size) != null ? _b : "normal",
|
|
96
97
|
color: props2.color,
|
|
97
98
|
text: props2.text,
|
|
98
99
|
textColor: props2.textColor,
|
|
@@ -103,10 +104,10 @@ const __sfc__ = defineComponent({
|
|
|
103
104
|
const { type, size, color, textColor, mode } = buttonGroup;
|
|
104
105
|
return {
|
|
105
106
|
elevation: "",
|
|
106
|
-
type: props2.type != null ?
|
|
107
|
-
size: props2.size != null ?
|
|
108
|
-
color: props2.color != null ?
|
|
109
|
-
textColor: props2.textColor != null ?
|
|
107
|
+
type: (_c = props2.type) != null ? _c : type.value,
|
|
108
|
+
size: (_d = props2.size) != null ? _d : size.value,
|
|
109
|
+
color: (_e = props2.color) != null ? _e : color.value,
|
|
110
|
+
textColor: (_f = props2.textColor) != null ? _f : textColor.value,
|
|
110
111
|
text: mode.value === "text" || mode.value === "outline",
|
|
111
112
|
outline: mode.value === "outline",
|
|
112
113
|
iconContainer: mode.value === "icon-container"
|
|
@@ -115,8 +116,7 @@ const __sfc__ = defineComponent({
|
|
|
115
116
|
function attemptAutoLoading(result) {
|
|
116
117
|
if (props2.autoLoading) {
|
|
117
118
|
pending.value = true;
|
|
118
|
-
|
|
119
|
-
Promise.all(result).then(() => {
|
|
119
|
+
Promise.all(normalizeToArray(result)).then(() => {
|
|
120
120
|
pending.value = false;
|
|
121
121
|
}).catch(() => {
|
|
122
122
|
pending.value = false;
|
package/es/index.bundle.mjs
CHANGED
|
@@ -262,7 +262,7 @@ import './tooltip/style/index.mjs'
|
|
|
262
262
|
import './uploader/style/index.mjs'
|
|
263
263
|
import './watermark/style/index.mjs'
|
|
264
264
|
|
|
265
|
-
const version = '3.1.0
|
|
265
|
+
const version = '3.1.0'
|
|
266
266
|
|
|
267
267
|
function install(app) {
|
|
268
268
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -174,7 +174,7 @@ export * from './tooltip/index.mjs'
|
|
|
174
174
|
export * from './uploader/index.mjs'
|
|
175
175
|
export * from './watermark/index.mjs'
|
|
176
176
|
|
|
177
|
-
const version = '3.1.0
|
|
177
|
+
const version = '3.1.0'
|
|
178
178
|
|
|
179
179
|
function install(app) {
|
|
180
180
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -34,10 +34,8 @@ function useSelectController(options) {
|
|
|
34
34
|
return (_a = option == null ? void 0 : option.label.value) != null ? _a : "";
|
|
35
35
|
}
|
|
36
36
|
function findValueOrLabel({ value, label: label2 }) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
return label2.value;
|
|
37
|
+
var _a;
|
|
38
|
+
return (_a = value.value) != null ? _a : label2.value;
|
|
41
39
|
}
|
|
42
40
|
function getSelectedValue(option) {
|
|
43
41
|
const multiple = multipleGetter();
|