mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-10 00:11:06 +08:00
Compare commits
5 Commits
ee08a2611b
...
42a5f79c2c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42a5f79c2c | ||
|
|
e0545b5568 | ||
|
|
2a95498569 | ||
|
|
0f4e9aed48 | ||
|
|
e1cafe61ed |
@ -1,7 +1,6 @@
|
||||
import { get } from 'lodash-es';
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
import { createRequire } from 'module';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { fileURLToPath, pathToFileURL } from 'url';
|
||||
import { join, dirname, isAbsolute } from 'path';
|
||||
|
||||
function findRootDir(dir: string): string {
|
||||
@ -58,11 +57,10 @@ export function getPackageJson() {
|
||||
}
|
||||
|
||||
async function getVantConfigAsync() {
|
||||
const require = createRequire(import.meta.url);
|
||||
delete require.cache[VANT_CONFIG_FILE];
|
||||
|
||||
try {
|
||||
return (await import(VANT_CONFIG_FILE)).default;
|
||||
// https://github.com/nodejs/node/issues/31710
|
||||
// absolute file paths don't work on Windows
|
||||
return (await import(pathToFileURL(VANT_CONFIG_FILE).href)).default;
|
||||
} catch (err) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## v1.3.4
|
||||
|
||||
- Fix useClickAway failed in SSR
|
||||
|
||||
### v1.3.3
|
||||
|
||||
- Allow to call useWindowSize outside setup
|
||||
@ -7,7 +11,7 @@
|
||||
|
||||
### v1.3.2
|
||||
|
||||
-Remove passive event polyfill
|
||||
- Remove passive event polyfill
|
||||
|
||||
### v1.3.1
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/use",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "Vant Composition API",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { Ref, unref } from 'vue';
|
||||
import { inBrowser } from '../utils';
|
||||
import { useEventListener } from '../useEventListener';
|
||||
|
||||
export type UseClickAwayOptions = {
|
||||
@ -10,6 +11,10 @@ export function useClickAway(
|
||||
listener: EventListener,
|
||||
options: UseClickAwayOptions = {}
|
||||
) {
|
||||
if (!inBrowser) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { eventName = 'click' } = options;
|
||||
|
||||
const onClick = (event: Event) => {
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
"dependencies": {
|
||||
"@vant/icons": "^1.7.1",
|
||||
"@vant/popperjs": "^1.1.0",
|
||||
"@vant/use": "^1.3.3"
|
||||
"@vant/use": "^1.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
|
||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@ -53,7 +53,7 @@ importers:
|
||||
'@vant/cli': workspace:*
|
||||
'@vant/icons': ^1.7.1
|
||||
'@vant/popperjs': ^1.1.0
|
||||
'@vant/use': ^1.3.3
|
||||
'@vant/use': ^1.3.4
|
||||
'@vue/compiler-sfc': ^3.2.20
|
||||
'@vue/runtime-core': ^3.2.20
|
||||
'@vue/test-utils': ^2.0.0-rc.16
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user