@varlet/ui 2.13.3 → 2.13.4-alpha.1690280210151
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/drag/Drag.mjs +8 -3
- package/es/fab/Fab.mjs +1 -0
- package/es/fab/props.mjs +2 -1
- package/es/fab/style/index.mjs +1 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/switch/Switch.mjs +3 -3
- package/es/varlet.esm.js +2081 -2076
- package/highlight/web-types.en-US.json +2 -2
- package/highlight/web-types.zh-CN.json +2 -2
- package/lib/varlet.cjs.js +13 -7
- package/package.json +6 -6
- package/umd/varlet.js +4 -4
package/es/drag/Drag.mjs
CHANGED
|
@@ -3,7 +3,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
3
3
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
4
|
import { defineComponent, ref, reactive, watch } from 'vue';
|
|
5
5
|
import { props } from './props.mjs';
|
|
6
|
-
import { createNamespace } from '../utils/components.mjs';
|
|
6
|
+
import { createNamespace, useTeleport } from '../utils/components.mjs';
|
|
7
7
|
import { getRect, toPxNum } from '../utils/elements.mjs';
|
|
8
8
|
import { onSmartMounted, onWindowResize } from '@varlet/use';
|
|
9
9
|
import { clamp } from '@varlet/shared';
|
|
@@ -14,7 +14,8 @@ var {
|
|
|
14
14
|
import { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
15
15
|
function __render__(_ctx, _cache) {
|
|
16
16
|
return _openBlock(), _createBlock(_Teleport, {
|
|
17
|
-
to: _ctx.teleport
|
|
17
|
+
to: _ctx.teleport,
|
|
18
|
+
disabled: _ctx.teleportDisabled
|
|
18
19
|
}, [_createElementVNode("div", _mergeProps({
|
|
19
20
|
ref: "drag",
|
|
20
21
|
class: _ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.enableTransition, _ctx.n('--transition')]),
|
|
@@ -33,7 +34,7 @@ function __render__(_ctx, _cache) {
|
|
|
33
34
|
onTouchcancel: _cache[3] || (_cache[3] = function () {
|
|
34
35
|
return _ctx.handleTouchend && _ctx.handleTouchend(...arguments);
|
|
35
36
|
})
|
|
36
|
-
}, _ctx.getAttrs()), [_renderSlot(_ctx.$slots, "default")], 16 /* FULL_PROPS */)], 8 /* PROPS */, ["to"]);
|
|
37
|
+
}, _ctx.getAttrs()), [_renderSlot(_ctx.$slots, "default")], 16 /* FULL_PROPS */)], 8 /* PROPS */, ["to", "disabled"]);
|
|
37
38
|
}
|
|
38
39
|
var __sfc__ = defineComponent({
|
|
39
40
|
name: 'VarDrag',
|
|
@@ -55,6 +56,9 @@ var __sfc__ = defineComponent({
|
|
|
55
56
|
var dragged = ref(false);
|
|
56
57
|
var enableTransition = ref(false);
|
|
57
58
|
var dragging = ref(false);
|
|
59
|
+
var {
|
|
60
|
+
disabled: teleportDisabled
|
|
61
|
+
} = useTeleport();
|
|
58
62
|
var touching = false;
|
|
59
63
|
var prevX = 0;
|
|
60
64
|
var prevY = 0;
|
|
@@ -264,6 +268,7 @@ var __sfc__ = defineComponent({
|
|
|
264
268
|
y,
|
|
265
269
|
enableTransition,
|
|
266
270
|
dragging,
|
|
271
|
+
teleportDisabled,
|
|
267
272
|
n,
|
|
268
273
|
classes,
|
|
269
274
|
getAttrs,
|
package/es/fab/Fab.mjs
CHANGED
package/es/fab/props.mjs
CHANGED
package/es/fab/style/index.mjs
CHANGED
package/es/index.bundle.mjs
CHANGED
|
@@ -244,7 +244,7 @@ import './time-picker/style/index.mjs'
|
|
|
244
244
|
import './tooltip/style/index.mjs'
|
|
245
245
|
import './uploader/style/index.mjs'
|
|
246
246
|
|
|
247
|
-
const version = '2.13.
|
|
247
|
+
const version = '2.13.4-alpha.1690280210151'
|
|
248
248
|
|
|
249
249
|
function install(app) {
|
|
250
250
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -162,7 +162,7 @@ export * from './time-picker/index.mjs'
|
|
|
162
162
|
export * from './tooltip/index.mjs'
|
|
163
163
|
export * from './uploader/index.mjs'
|
|
164
164
|
|
|
165
|
-
const version = '2.13.
|
|
165
|
+
const version = '2.13.4-alpha.1690280210151'
|
|
166
166
|
|
|
167
167
|
function install(app) {
|
|
168
168
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/switch/Switch.mjs
CHANGED
|
@@ -48,8 +48,8 @@ function __render__(_ctx, _cache) {
|
|
|
48
48
|
key: 0,
|
|
49
49
|
class: _normalizeClass(_ctx.n('loading')),
|
|
50
50
|
style: _normalizeStyle({
|
|
51
|
-
width: _ctx.
|
|
52
|
-
height: _ctx.
|
|
51
|
+
width: _ctx.radius,
|
|
52
|
+
height: _ctx.radius
|
|
53
53
|
})
|
|
54
54
|
}, _hoisted_2, 6 /* CLASS, STYLE */)) : _createCommentVNode("v-if", true)], 6 /* CLASS, STYLE */), _createVNode(_component_var_hover_overlay, {
|
|
55
55
|
hovering: _ctx.hovering
|
|
@@ -122,7 +122,7 @@ var __sfc__ = defineComponent({
|
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
});
|
|
125
|
-
var radius = computed(() => multiplySizeUnit(props.size, 0.
|
|
125
|
+
var radius = computed(() => multiplySizeUnit(props.size, 0.8));
|
|
126
126
|
var switchActive = event => {
|
|
127
127
|
var {
|
|
128
128
|
onClick,
|