@varlet/ui 2.9.5-alpha.1680773894800 → 2.9.5-alpha.1680801460533
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/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/utils/components.mjs +5 -1
- package/es/varlet.esm.js +104 -104
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +4 -1
- package/package.json +6 -6
- package/types/context.d.ts +1 -0
- package/umd/varlet.js +4 -4
package/es/index.bundle.mjs
CHANGED
|
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
|
|
|
241
241
|
import './tooltip/style/index.mjs'
|
|
242
242
|
import './uploader/style/index.mjs'
|
|
243
243
|
|
|
244
|
-
const version = '2.9.5-alpha.
|
|
244
|
+
const version = '2.9.5-alpha.1680801460533'
|
|
245
245
|
|
|
246
246
|
function install(app) {
|
|
247
247
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
|
|
|
160
160
|
export * from './tooltip/index.mjs'
|
|
161
161
|
export * from './uploader/index.mjs'
|
|
162
162
|
|
|
163
|
-
const version = '2.9.5-alpha.
|
|
163
|
+
const version = '2.9.5-alpha.1680801460533'
|
|
164
164
|
|
|
165
165
|
function install(app) {
|
|
166
166
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/utils/components.mjs
CHANGED
|
@@ -6,7 +6,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
6
6
|
|
|
7
7
|
import { useEventListener } from '@varlet/use';
|
|
8
8
|
import { createApp, h, getCurrentInstance, isVNode, ref, onActivated, onDeactivated, Comment, Fragment } from 'vue';
|
|
9
|
-
import { isArray } from '@varlet/shared';
|
|
9
|
+
import { inBrowser, isArray } from '@varlet/shared';
|
|
10
10
|
export function pickProps(props, propsKey) {
|
|
11
11
|
return Array.isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
|
|
12
12
|
pickedProps[key] = props[key];
|
|
@@ -143,6 +143,10 @@ export function useValidation() {
|
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
export function useRouteListener(cb) {
|
|
146
|
+
if (!inBrowser()) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
146
150
|
useEventListener(window, 'hashchange', cb);
|
|
147
151
|
useEventListener(window, 'popstate', cb);
|
|
148
152
|
}
|