yc-design-vue 1.2.0 → 1.2.2
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/Alert/index.vue2.js +1 -1
- package/es/Badge/index.vue.js +1 -1
- package/es/Calendar/Calendar.vue2.js +1 -1
- package/es/Carousel/Carousel.vue.js +1 -1
- package/es/Carousel/Carousel.vue2.js +9 -10
- package/es/Cascader/CascaderIcon.vue2.js +1 -1
- package/es/Checkbox/Checkbox.vue2.js +1 -1
- package/es/Collapse/CollapseItem.vue2.js +1 -1
- package/es/Descriptions/Descriptions.vue.d.ts +1 -1
- package/es/Descriptions/index.d.ts +3 -3
- package/es/Drawer/Drawer.vue2.js +1 -1
- package/es/Grid/GridCol.vue.js +38 -5
- package/es/Input/Input.vue2.js +1 -1
- package/es/Input/InputSuffix.vue2.js +1 -1
- package/es/InputTag/index.vue2.js +1 -1
- package/es/Menu/SubMenu.vue2.js +1 -1
- package/es/Message/Message.vue2.js +1 -1
- package/es/Modal/Modal.vue2.js +1 -1
- package/es/Modal/hooks/useModalClose.d.ts +1 -1
- package/es/Modal/hooks/useModalClose.js +16 -10
- package/es/Notification/Notification.vue2.js +1 -1
- package/es/PageHeader/index.vue2.js +1 -1
- package/es/Radio/Radio.vue2.js +1 -1
- package/es/Select/SelectIcon.vue2.js +1 -1
- package/es/Slider/hooks/useContext.js +10 -9
- package/es/Tabs/TabButton.vue2.js +1 -1
- package/es/Tag/index.vue2.js +1 -1
- package/es/Textarea/index.vue2.js +1 -1
- package/es/TimePicker/TimePicker.vue2.js +1 -1
- package/es/Transfer/TransferPanel.vue2.js +1 -1
- package/es/Trigger/index.vue2.js +1 -1
- package/es/Typography/TypographyBase.vue2.js +2 -2
- package/es/Watermark/index.d.ts +3 -3
- package/es/Watermark/index.vue.d.ts +1 -1
- package/es/_shared/components/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
- package/es/_shared/icons/IconCopy.vue.js +1 -16
- package/es/_shared/icons/IconCopy.vue2.js +16 -1
- package/es/_shared/icons/IconEdit.vue.js +1 -16
- package/es/_shared/icons/IconEdit.vue2.js +16 -1
- package/es/node_modules/@vueuse/core/index.js +1 -3
- package/es/node_modules/@vueuse/shared/index.js +1 -76
- package/es/style.css +1 -1
- package/lib/Alert/index.vue2.js +1 -1
- package/lib/Badge/index.vue.js +1 -1
- package/lib/Calendar/Calendar.vue2.js +1 -1
- package/lib/Carousel/Carousel.vue.js +1 -1
- package/lib/Carousel/Carousel.vue2.js +1 -1
- package/lib/Cascader/CascaderIcon.vue2.js +1 -1
- package/lib/Checkbox/Checkbox.vue2.js +1 -1
- package/lib/Collapse/CollapseItem.vue2.js +1 -1
- package/lib/Descriptions/Descriptions.vue.d.ts +1 -1
- package/lib/Descriptions/index.d.ts +3 -3
- package/lib/Drawer/Drawer.vue2.js +1 -1
- package/lib/Grid/GridCol.vue.js +1 -1
- package/lib/Input/Input.vue2.js +1 -1
- package/lib/Input/InputSuffix.vue2.js +1 -1
- package/lib/InputTag/index.vue2.js +1 -1
- package/lib/Menu/SubMenu.vue2.js +1 -1
- package/lib/Message/Message.vue2.js +1 -1
- package/lib/Modal/Modal.vue2.js +1 -1
- package/lib/Modal/hooks/useModalClose.d.ts +1 -1
- package/lib/Modal/hooks/useModalClose.js +1 -1
- package/lib/Notification/Notification.vue2.js +1 -1
- package/lib/PageHeader/index.vue2.js +1 -1
- package/lib/Radio/Radio.vue2.js +1 -1
- package/lib/Select/SelectIcon.vue2.js +1 -1
- package/lib/Slider/hooks/useContext.js +1 -1
- package/lib/Tabs/TabButton.vue2.js +1 -1
- package/lib/Tag/index.vue2.js +1 -1
- package/lib/Textarea/index.vue2.js +1 -1
- package/lib/TimePicker/TimePicker.vue2.js +1 -1
- package/lib/Transfer/TransferPanel.vue2.js +1 -1
- package/lib/Trigger/index.vue2.js +1 -1
- package/lib/Typography/TypographyBase.vue2.js +1 -1
- package/lib/Watermark/index.d.ts +3 -3
- package/lib/Watermark/index.vue.d.ts +1 -1
- package/lib/_shared/components/ExpandTransition.vue.js +1 -0
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/node_modules/@vueuse/core/index.js +1 -1
- package/lib/node_modules/@vueuse/shared/index.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/_shared/components/ExpandTransition.vue2.js +0 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { tryOnScopeDispose, toArray, watchImmediate, isClient, isObject, makeDestructurable, camelize, tryOnMounted, toRefs, noop, isIOS, notNullish, useThrottleFn, useDebounceFn, pxValue, injectLocal, useTimeoutFn, createSingletonPromise } from "../shared/index.js";
|
2
|
-
import { createFilterWrapper, debounceFilter, getLifeCycleTarget, throttleFilter
|
2
|
+
import { createFilterWrapper, debounceFilter, getLifeCycleTarget, throttleFilter } from "../shared/index.js";
|
3
3
|
import { computed, toValue, watch, shallowRef, getCurrentInstance, onMounted, unref, defineComponent, ref, reactive, watchEffect, hasInjectionContext, toRaw } from "vue";
|
4
4
|
function createReusableTemplate(options = {}) {
|
5
5
|
const {
|
@@ -1080,8 +1080,6 @@ export {
|
|
1080
1080
|
useElementBounding,
|
1081
1081
|
useElementSize,
|
1082
1082
|
useEventListener,
|
1083
|
-
useInterval,
|
1084
|
-
useIntervalFn,
|
1085
1083
|
useMediaQuery,
|
1086
1084
|
useMounted,
|
1087
1085
|
useMutationObserver,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getCurrentScope, onScopeDispose, watch, onMounted, nextTick, isRef, toRefs as toRefs$1, customRef, toValue, getCurrentInstance,
|
1
|
+
import { getCurrentScope, onScopeDispose, watch, onMounted, nextTick, isRef, toRefs as toRefs$1, customRef, toValue, getCurrentInstance, hasInjectionContext, inject, shallowRef, readonly } from "vue";
|
2
2
|
function tryOnScopeDispose(fn) {
|
3
3
|
if (getCurrentScope()) {
|
4
4
|
onScopeDispose(fn);
|
@@ -240,79 +240,6 @@ function tryOnMounted(fn, sync = true, target) {
|
|
240
240
|
else
|
241
241
|
nextTick(fn);
|
242
242
|
}
|
243
|
-
function useIntervalFn(cb, interval = 1e3, options = {}) {
|
244
|
-
const {
|
245
|
-
immediate = true,
|
246
|
-
immediateCallback = false
|
247
|
-
} = options;
|
248
|
-
let timer = null;
|
249
|
-
const isActive = shallowRef(false);
|
250
|
-
function clean() {
|
251
|
-
if (timer) {
|
252
|
-
clearInterval(timer);
|
253
|
-
timer = null;
|
254
|
-
}
|
255
|
-
}
|
256
|
-
function pause() {
|
257
|
-
isActive.value = false;
|
258
|
-
clean();
|
259
|
-
}
|
260
|
-
function resume() {
|
261
|
-
const intervalValue = toValue(interval);
|
262
|
-
if (intervalValue <= 0)
|
263
|
-
return;
|
264
|
-
isActive.value = true;
|
265
|
-
if (immediateCallback)
|
266
|
-
cb();
|
267
|
-
clean();
|
268
|
-
if (isActive.value)
|
269
|
-
timer = setInterval(cb, intervalValue);
|
270
|
-
}
|
271
|
-
if (immediate && isClient)
|
272
|
-
resume();
|
273
|
-
if (isRef(interval) || typeof interval === "function") {
|
274
|
-
const stopWatch = watch(interval, () => {
|
275
|
-
if (isActive.value && isClient)
|
276
|
-
resume();
|
277
|
-
});
|
278
|
-
tryOnScopeDispose(stopWatch);
|
279
|
-
}
|
280
|
-
tryOnScopeDispose(pause);
|
281
|
-
return {
|
282
|
-
isActive,
|
283
|
-
pause,
|
284
|
-
resume
|
285
|
-
};
|
286
|
-
}
|
287
|
-
function useInterval(interval = 1e3, options = {}) {
|
288
|
-
const {
|
289
|
-
controls: exposeControls = false,
|
290
|
-
immediate = true,
|
291
|
-
callback
|
292
|
-
} = options;
|
293
|
-
const counter = shallowRef(0);
|
294
|
-
const update = () => counter.value += 1;
|
295
|
-
const reset = () => {
|
296
|
-
counter.value = 0;
|
297
|
-
};
|
298
|
-
const controls = useIntervalFn(
|
299
|
-
callback ? () => {
|
300
|
-
update();
|
301
|
-
callback(counter.value);
|
302
|
-
} : update,
|
303
|
-
interval,
|
304
|
-
{ immediate }
|
305
|
-
);
|
306
|
-
if (exposeControls) {
|
307
|
-
return {
|
308
|
-
counter,
|
309
|
-
reset,
|
310
|
-
...controls
|
311
|
-
};
|
312
|
-
} else {
|
313
|
-
return counter;
|
314
|
-
}
|
315
|
-
}
|
316
243
|
function useTimeoutFn(cb, interval, options = {}) {
|
317
244
|
const {
|
318
245
|
immediate = true,
|
@@ -383,8 +310,6 @@ export {
|
|
383
310
|
tryOnMounted,
|
384
311
|
tryOnScopeDispose,
|
385
312
|
useDebounceFn,
|
386
|
-
useInterval,
|
387
|
-
useIntervalFn,
|
388
313
|
useThrottleFn,
|
389
314
|
useTimeoutFn,
|
390
315
|
watchImmediate
|