@varlet/ui 3.11.5-alpha.1757700927355 → 3.12.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/dialog/Dialog.mjs +25 -6
- package/es/dialog/dialog.css +1 -1
- package/es/dialog/props.mjs +4 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/utils/components.mjs +1 -3
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +1030 -1015
- package/highlight/web-types.en-US.json +37 -1
- package/highlight/web-types.zh-CN.json +37 -1
- package/lib/varlet.cjs.js +30 -10
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/dialog.d.ts +8 -0
- package/umd/varlet.js +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3019,6 +3019,42 @@
|
|
|
3019
3019
|
"kind": "expression"
|
|
3020
3020
|
}
|
|
3021
3021
|
},
|
|
3022
|
+
{
|
|
3023
|
+
"name": "confirm-button-loading",
|
|
3024
|
+
"description": "Confirm button loading state",
|
|
3025
|
+
"default": "false",
|
|
3026
|
+
"value": {
|
|
3027
|
+
"type": "boolean",
|
|
3028
|
+
"kind": "expression"
|
|
3029
|
+
}
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"name": "cancel-button-loading",
|
|
3033
|
+
"description": "Cancel button loading state",
|
|
3034
|
+
"default": "false",
|
|
3035
|
+
"value": {
|
|
3036
|
+
"type": "boolean",
|
|
3037
|
+
"kind": "expression"
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
{
|
|
3041
|
+
"name": "confirm-button-disabled",
|
|
3042
|
+
"description": "Confirm button disabled state",
|
|
3043
|
+
"default": "false",
|
|
3044
|
+
"value": {
|
|
3045
|
+
"type": "boolean",
|
|
3046
|
+
"kind": "expression"
|
|
3047
|
+
}
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"name": "cancel-button-disabled",
|
|
3051
|
+
"description": "Cancel button disabled state",
|
|
3052
|
+
"default": "false",
|
|
3053
|
+
"value": {
|
|
3054
|
+
"type": "boolean",
|
|
3055
|
+
"kind": "expression"
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3022
3058
|
{
|
|
3023
3059
|
"name": "dialog-class",
|
|
3024
3060
|
"description": "Dialog body class",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3070,6 +3070,42 @@
|
|
|
3070
3070
|
"kind": "expression"
|
|
3071
3071
|
}
|
|
3072
3072
|
},
|
|
3073
|
+
{
|
|
3074
|
+
"name": "confirm-button-loading",
|
|
3075
|
+
"description": "确认按钮加载状态",
|
|
3076
|
+
"default": "false",
|
|
3077
|
+
"value": {
|
|
3078
|
+
"type": "boolean",
|
|
3079
|
+
"kind": "expression"
|
|
3080
|
+
}
|
|
3081
|
+
},
|
|
3082
|
+
{
|
|
3083
|
+
"name": "cancel-button-loading",
|
|
3084
|
+
"description": "取消按钮加载状态",
|
|
3085
|
+
"default": "false",
|
|
3086
|
+
"value": {
|
|
3087
|
+
"type": "boolean",
|
|
3088
|
+
"kind": "expression"
|
|
3089
|
+
}
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
"name": "confirm-button-disabled",
|
|
3093
|
+
"description": "确认按钮禁用状态",
|
|
3094
|
+
"default": "false",
|
|
3095
|
+
"value": {
|
|
3096
|
+
"type": "boolean",
|
|
3097
|
+
"kind": "expression"
|
|
3098
|
+
}
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"name": "cancel-button-disabled",
|
|
3102
|
+
"description": "取消按钮禁用状态",
|
|
3103
|
+
"default": "false",
|
|
3104
|
+
"value": {
|
|
3105
|
+
"type": "boolean",
|
|
3106
|
+
"kind": "expression"
|
|
3107
|
+
}
|
|
3108
|
+
},
|
|
3073
3109
|
{
|
|
3074
3110
|
"name": "dialog-class",
|
|
3075
3111
|
"description": "对话框主体区域的 class",
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -1829,9 +1829,7 @@ function flatFragment(vNodes) {
|
|
|
1829
1829
|
return;
|
|
1830
1830
|
}
|
|
1831
1831
|
if (vNode.type === vue.Fragment && isArray(vNode.children)) {
|
|
1832
|
-
vNode.children
|
|
1833
|
-
result.push(item);
|
|
1834
|
-
});
|
|
1832
|
+
result.push(...flatFragment(vNode.children));
|
|
1835
1833
|
return;
|
|
1836
1834
|
}
|
|
1837
1835
|
result.push(vNode);
|
|
@@ -17157,6 +17155,10 @@ const props$L = __spreadValues$f({
|
|
|
17157
17155
|
cancelButtonTextColor: String,
|
|
17158
17156
|
confirmButtonColor: String,
|
|
17159
17157
|
cancelButtonColor: String,
|
|
17158
|
+
confirmButtonLoading: Boolean,
|
|
17159
|
+
cancelButtonLoading: Boolean,
|
|
17160
|
+
confirmButtonDisabled: Boolean,
|
|
17161
|
+
cancelButtonDisabled: Boolean,
|
|
17160
17162
|
dialogClass: String,
|
|
17161
17163
|
dialogStyle: Object,
|
|
17162
17164
|
onBeforeClose: defineListenerProp(),
|
|
@@ -17283,6 +17285,8 @@ function __render__$N(_ctx, _cache) {
|
|
|
17283
17285
|
text: "",
|
|
17284
17286
|
"text-color": _ctx.cancelButtonTextColor,
|
|
17285
17287
|
color: _ctx.cancelButtonColor,
|
|
17288
|
+
loading: _ctx.cancelButtonLoading,
|
|
17289
|
+
disabled: _ctx.cancelButtonDisabled,
|
|
17286
17290
|
onClick: _ctx.cancel
|
|
17287
17291
|
}, {
|
|
17288
17292
|
default: vue.withCtx(() => {
|
|
@@ -17297,7 +17301,7 @@ function __render__$N(_ctx, _cache) {
|
|
|
17297
17301
|
}),
|
|
17298
17302
|
_: 1
|
|
17299
17303
|
/* STABLE */
|
|
17300
|
-
}, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true),
|
|
17304
|
+
}, 8, ["class", "text-color", "color", "loading", "disabled", "onClick"])) : vue.createCommentVNode("v-if", true),
|
|
17301
17305
|
_ctx.confirmButton ? (vue.openBlock(), vue.createBlock(_component_var_button, {
|
|
17302
17306
|
key: 1,
|
|
17303
17307
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("confirm-button"))),
|
|
@@ -17305,6 +17309,8 @@ function __render__$N(_ctx, _cache) {
|
|
|
17305
17309
|
text: "",
|
|
17306
17310
|
"text-color": _ctx.confirmButtonTextColor,
|
|
17307
17311
|
color: _ctx.confirmButtonColor,
|
|
17312
|
+
loading: _ctx.confirmButtonLoading,
|
|
17313
|
+
disabled: _ctx.confirmButtonDisabled,
|
|
17308
17314
|
onClick: _ctx.confirm
|
|
17309
17315
|
}, {
|
|
17310
17316
|
default: vue.withCtx(() => {
|
|
@@ -17319,7 +17325,7 @@ function __render__$N(_ctx, _cache) {
|
|
|
17319
17325
|
}),
|
|
17320
17326
|
_: 1
|
|
17321
17327
|
/* STABLE */
|
|
17322
|
-
}, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
17328
|
+
}, 8, ["class", "text-color", "color", "loading", "disabled", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
17323
17329
|
],
|
|
17324
17330
|
2
|
|
17325
17331
|
/* CLASS */
|
|
@@ -17343,9 +17349,19 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
17343
17349
|
inheritAttrs: false,
|
|
17344
17350
|
props: props$L,
|
|
17345
17351
|
setup(props2) {
|
|
17352
|
+
const { t: pt } = injectLocaleProvider();
|
|
17346
17353
|
const popupShow = vue.ref(false);
|
|
17347
17354
|
const popupCloseOnClickOverlay = vue.ref(false);
|
|
17348
|
-
const
|
|
17355
|
+
const confirmButtonLoading = useVModel(props2, "confirmButtonLoading");
|
|
17356
|
+
const cancelButtonLoading = useVModel(props2, "cancelButtonLoading");
|
|
17357
|
+
const confirmButtonDisabled = useVModel(props2, "confirmButtonDisabled");
|
|
17358
|
+
const cancelButtonDisabled = useVModel(props2, "cancelButtonDisabled");
|
|
17359
|
+
const exposedRefs = {
|
|
17360
|
+
confirmButtonLoading,
|
|
17361
|
+
cancelButtonLoading,
|
|
17362
|
+
confirmButtonDisabled,
|
|
17363
|
+
cancelButtonDisabled
|
|
17364
|
+
};
|
|
17349
17365
|
vue.watch(
|
|
17350
17366
|
() => props2.show,
|
|
17351
17367
|
(newValue) => {
|
|
@@ -17374,7 +17390,7 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
17374
17390
|
return;
|
|
17375
17391
|
}
|
|
17376
17392
|
if (onBeforeClose != null) {
|
|
17377
|
-
call(onBeforeClose, "close", done);
|
|
17393
|
+
call(onBeforeClose, "close", done, exposedRefs);
|
|
17378
17394
|
return;
|
|
17379
17395
|
}
|
|
17380
17396
|
call(props2["onUpdate:show"], false);
|
|
@@ -17383,7 +17399,7 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
17383
17399
|
const { onBeforeClose, onConfirm } = props2;
|
|
17384
17400
|
call(onConfirm);
|
|
17385
17401
|
if (onBeforeClose != null) {
|
|
17386
|
-
call(onBeforeClose, "confirm", done);
|
|
17402
|
+
call(onBeforeClose, "confirm", done, exposedRefs);
|
|
17387
17403
|
return;
|
|
17388
17404
|
}
|
|
17389
17405
|
call(props2["onUpdate:show"], false);
|
|
@@ -17392,7 +17408,7 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
17392
17408
|
const { onBeforeClose, onCancel } = props2;
|
|
17393
17409
|
call(onCancel);
|
|
17394
17410
|
if (onBeforeClose != null) {
|
|
17395
|
-
call(onBeforeClose, "cancel", done);
|
|
17411
|
+
call(onBeforeClose, "cancel", done, exposedRefs);
|
|
17396
17412
|
return;
|
|
17397
17413
|
}
|
|
17398
17414
|
call(props2["onUpdate:show"], false);
|
|
@@ -17407,6 +17423,10 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
17407
17423
|
return {
|
|
17408
17424
|
popupShow,
|
|
17409
17425
|
popupCloseOnClickOverlay,
|
|
17426
|
+
confirmButtonLoading,
|
|
17427
|
+
cancelButtonLoading,
|
|
17428
|
+
confirmButtonDisabled,
|
|
17429
|
+
cancelButtonDisabled,
|
|
17410
17430
|
pt,
|
|
17411
17431
|
t,
|
|
17412
17432
|
n: n$P,
|
|
@@ -32028,7 +32048,7 @@ withInstall(stdin_default$1);
|
|
|
32028
32048
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
32029
32049
|
const _WatermarkComponent = stdin_default$1;
|
|
32030
32050
|
var stdin_default = stdin_default$1;
|
|
32031
|
-
const version = "3.
|
|
32051
|
+
const version = "3.12.0";
|
|
32032
32052
|
function install(app) {
|
|
32033
32053
|
stdin_default$60.install && app.use(stdin_default$60);
|
|
32034
32054
|
stdin_default$5_.install && app.use(stdin_default$5_);
|