Repository: yanzhandong/v3hooks Branch: master Commit: 71a54b57668c Files: 108 Total size: 155.5 KB Directory structure: gitextract_yd9gghg3/ ├── .gitignore ├── README.md ├── babel.config.js ├── docs/ │ └── question.md ├── example/ │ ├── .eslintignore │ ├── README.md │ ├── babel.config.js │ ├── jsconfig.json │ ├── package.json │ ├── public/ │ │ └── index.html │ ├── src/ │ │ ├── App.vue │ │ ├── components/ │ │ │ └── HelloWorld.vue │ │ ├── main.ts │ │ ├── pages/ │ │ │ ├── home/ │ │ │ │ └── index.vue │ │ │ ├── useBoolean/ │ │ │ │ └── index.vue │ │ │ ├── useCookie/ │ │ │ │ └── index.vue │ │ │ ├── useDate/ │ │ │ │ └── index.vue │ │ │ ├── useDynamicList/ │ │ │ │ └── index.vue │ │ │ ├── useExternal/ │ │ │ │ └── index.vue │ │ │ ├── useFullscreen/ │ │ │ │ └── index.vue │ │ │ ├── useInterval/ │ │ │ │ └── index.vue │ │ │ ├── useLocalStorage/ │ │ │ │ └── index.vue │ │ │ ├── useLockFn/ │ │ │ │ └── index.vue │ │ │ ├── useMediaQuery/ │ │ │ │ └── index.vue │ │ │ ├── useNetwork/ │ │ │ │ └── index.vue │ │ │ ├── useQRCode/ │ │ │ │ └── index.vue │ │ │ ├── useRouteQuery/ │ │ │ │ └── index.vue │ │ │ ├── useSessionStorage/ │ │ │ │ └── index.vue │ │ │ ├── useSetAndUseMap/ │ │ │ │ └── index.vue │ │ │ ├── useTextSelection/ │ │ │ │ └── index.vue │ │ │ ├── useToggle/ │ │ │ │ └── index.vue │ │ │ ├── useVirtualList/ │ │ │ │ └── index.vue │ │ │ └── useWebSocket/ │ │ │ └── index.vue │ │ ├── router.ts │ │ └── shims-vue.d.ts │ ├── tsconfig.json │ └── vue.config.js ├── jest.config.js ├── package.json ├── packages/ │ ├── index.ts │ ├── useBoolean/ │ │ ├── index.md │ │ └── index.ts │ ├── useCookie/ │ │ ├── index.md │ │ └── index.ts │ ├── useDate/ │ │ ├── index.md │ │ └── index.ts │ ├── useDebounce/ │ │ ├── index.md │ │ └── index.ts │ ├── useDebounceFn/ │ │ ├── index.md │ │ └── index.ts │ ├── useDocumentVisibility/ │ │ ├── index.md │ │ └── index.ts │ ├── useDynamicList/ │ │ ├── index.md │ │ └── index.ts │ ├── useExternal/ │ │ ├── index.md │ │ └── index.ts │ ├── useFullscreen/ │ │ ├── index.md │ │ └── index.ts │ ├── useInterval/ │ │ ├── index.md │ │ └── index.ts │ ├── useLocalStorage/ │ │ ├── index.md │ │ └── index.ts │ ├── useLockFn/ │ │ ├── index.md │ │ └── index.ts │ ├── useMap/ │ │ ├── index.md │ │ └── index.ts │ ├── useMediaQuery/ │ │ ├── index.md │ │ └── index.ts │ ├── useNetwork/ │ │ ├── index.md │ │ └── index.ts │ ├── useQRCode/ │ │ ├── index.md │ │ └── index.ts │ ├── useRequest/ │ │ ├── __tests__/ │ │ │ └── index.test.ts │ │ ├── index.md │ │ ├── index.ts │ │ ├── src/ │ │ │ ├── cache.ts │ │ │ ├── fetch.ts │ │ │ ├── loadingDelay.ts │ │ │ ├── polling.ts │ │ │ ├── service.ts │ │ │ └── visibility.ts │ │ └── types.d.ts │ ├── useRouteQuery/ │ │ ├── index.md │ │ └── index.ts │ ├── useSessionStorage/ │ │ ├── index.md │ │ └── index.ts │ ├── useSet/ │ │ ├── index.md │ │ └── index.ts │ ├── useTextSelection/ │ │ ├── index.md │ │ └── index.ts │ ├── useThrottle/ │ │ ├── index.md │ │ └── index.ts │ ├── useThrottleFn/ │ │ ├── index.md │ │ └── index.ts │ ├── useTimeout/ │ │ ├── index.md │ │ └── index.ts │ ├── useToggle/ │ │ ├── index.md │ │ └── index.ts │ ├── useUnmount/ │ │ └── index.ts │ ├── useVirtualList/ │ │ ├── index.md │ │ └── index.ts │ ├── useWebSocket/ │ │ ├── index.md │ │ └── index.ts │ └── utils/ │ ├── index.ts │ ├── memoryCache.ts │ └── testingHelpers.ts ├── rollup.config.js └── tsconfig.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # compiled output /node_modules /dist example/node_modules example/dist # Logs logs *.log # OS .DS_Store # Tests packages/*/coverage packages/*/.nyc_output # IDEs and editors .idea .project .classpath .c9 *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json ================================================ FILE: README.md ================================================
npm i v3hooks --saveor
yarn add v3hooks
{{ loading ? "loading" : data }}
Clicked count: {{debounceFnValue}}
DebouncedValue: {{debounceValue}}
Clicked count: {{throttleFnValue}}
throttleValue: {{throttleValue}}
useToggleDemoState: {{useToggleDemoState}}
{{ useBooleanState }}
{{ loading ? "loading" : data }}
{{ loading2 ? "loading" : data2 }}
value:{{ state }}
value:{{ active }} uuid:{{getKey(index)}}
是否全屏: {{isFullscreen}}
value:{{ state }}
value:{{ state }}
网络状态:{{ state }}
value:{{ state }}
value:{{ state }}
value:{{ state }}
value:{{ state2 }}
可选择区域: 123111111111111aaaaaaaaaaabbbbbbbbbbb eeeeeeeeeeeeeeee
已选择的值:{{ text }}
位置信息:rect: {{ rect }}
left: {{ rect.left }}
{{ useBooleanState }}
value:{{ state }}
DebouncedValue: {{debounceValue}}
Clicked count: {{debounceFnValue}}
value:{{ active }} uuid:{{getKey(index)}}
是否全屏: {{isFullscreen}}
是否全屏: {{isFullscreen}}
value:{{ state }}
value:{{ state }}