dpzvc3-ui 3.1.4 → 3.1.6
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/README.md +1 -1
- package/dist/dpzvc3.esm.js +5 -4
- package/dist/dpzvc3.esm.js.map +1 -1
- package/dist/dpzvc3.esm.min.js +1 -1
- package/dist/dpzvc3.esm.min.js.map +1 -1
- package/dist/dpzvc3.js +5 -4
- package/dist/dpzvc3.js.map +1 -1
- package/dist/dpzvc3.min.js +1 -1
- package/dist/dpzvc3.min.js.map +1 -1
- package/dist/types/components/actionSheet/index.d.ts +6 -1
- package/dist/types/components/actionSheet/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +7 -2
- package/build-style.js +0 -58
- package/dist-prod/91.05c8ec5277a15f939b0f.js +0 -3
- package/dist-prod/91.05c8ec5277a15f939b0f.js.LICENSE.txt +0 -25
- package/dist-prod/91.05c8ec5277a15f939b0f.js.map +0 -1
- package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +0 -2
- package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +0 -1
- package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +0 -2
- package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +0 -1
- package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +0 -2
- package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +0 -1
- package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +0 -2
- package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +0 -1
- package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +0 -2
- package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +0 -1
- package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +0 -2
- package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +0 -1
- package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +0 -2
- package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +0 -1
- package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +0 -2
- package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +0 -1
- package/dist-prod/header.eb10433dd892738ee95a.chunk.js +0 -2
- package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +0 -1
- package/dist-prod/index.html +0 -19
- package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +0 -2
- package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +0 -1
- package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +0 -2
- package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +0 -1
- package/dist-prod/main.662ad15361e7f3d20234.js +0 -2
- package/dist-prod/main.662ad15361e7f3d20234.js.map +0 -1
- package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +0 -2
- package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +0 -1
- package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +0 -2
- package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +0 -1
- package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +0 -2
- package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +0 -1
- package/dist-prod/popup.538422c7e188363a468d.chunk.js +0 -2
- package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +0 -1
- package/dist-prod/progress.240de4b633002f573030.chunk.js +0 -2
- package/dist-prod/progress.240de4b633002f573030.chunk.js.map +0 -1
- package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +0 -2
- package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +0 -1
- package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +0 -2
- package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +0 -1
- package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +0 -2
- package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +0 -1
- package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +0 -2
- package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +0 -1
- package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +0 -2
- package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +0 -1
- package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +0 -2
- package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +0 -1
- package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +0 -2
- package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +0 -1
- package/dist-prod/tab.29f19483f699b7811259.chunk.js +0 -2
- package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +0 -1
- package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +0 -2
- package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +0 -1
- package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +0 -2
- package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +0 -1
- package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +0 -2
- package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +0 -1
- package/postcss.config.js +0 -5
- package/src/components/Indicator/Indicator.tsx +0 -67
- package/src/components/Indicator/Indicator.vue +0 -82
- package/src/components/Indicator/index.ts +0 -111
- package/src/components/Indicator/types.ts +0 -15
- package/src/components/Text/index.ts +0 -14
- package/src/components/Text/textBar.tsx +0 -104
- package/src/components/Text/types.ts +0 -13
- package/src/components/actionSheet/actionSheet.d.ts +0 -16
- package/src/components/actionSheet/actionSheet.tsx +0 -86
- package/src/components/actionSheet/index.ts +0 -6
- package/src/components/actionSheet/types.ts +0 -10
- package/src/components/app.vue +0 -59
- package/src/components/badge/badge.tsx +0 -80
- package/src/components/badge/index.ts +0 -12
- package/src/components/badge/types.ts +0 -8
- package/src/components/button/button.tsx +0 -105
- package/src/components/button/index.ts +0 -13
- package/src/components/button/types.ts +0 -13
- package/src/components/card/card.d.ts +0 -16
- package/src/components/card/card.tsx +0 -38
- package/src/components/card/index.ts +0 -12
- package/src/components/card/types.ts +0 -3
- package/src/components/cell/cell.tsx +0 -89
- package/src/components/cell/index.ts +0 -12
- package/src/components/cell/types.ts +0 -8
- package/src/components/cellSwipe/cellSwipe.tsx +0 -188
- package/src/components/cellSwipe/index.ts +0 -13
- package/src/components/cellSwipe/types.ts +0 -17
- package/src/components/checkBox/checkbox-group.tsx +0 -75
- package/src/components/checkBox/checkbox.tsx +0 -107
- package/src/components/checkBox/index.ts +0 -29
- package/src/components/checkBox/types.ts +0 -32
- package/src/components/header/header.tsx +0 -119
- package/src/components/header/index.ts +0 -13
- package/src/components/header/types.ts +0 -7
- package/src/components/loadMore/index.ts +0 -14
- package/src/components/loadMore/loadMore.tsx +0 -265
- package/src/components/loadMore/types.ts +0 -26
- package/src/components/message/confirm.ts +0 -104
- package/src/components/message/index.ts +0 -113
- package/src/components/message/message.tsx +0 -100
- package/src/components/message/messageGroup.tsx +0 -59
- package/src/components/message/types.ts +0 -48
- package/src/components/modal/confirm.ts +0 -123
- package/src/components/modal/index.ts +0 -68
- package/src/components/modal/modal.tsx +0 -248
- package/src/components/modal/types.ts +0 -51
- package/src/components/number/Number.tsx +0 -143
- package/src/components/number/index.ts +0 -10
- package/src/components/number/types.ts +0 -13
- package/src/components/picker/area-picker/area-picker.vue +0 -230
- package/src/components/picker/area-picker/props.js +0 -17
- package/src/components/picker/date-picker/date-picker.vue +0 -191
- package/src/components/picker/date-picker/props.js +0 -24
- package/src/components/picker/index.ts +0 -12
- package/src/components/picker/normal-picker/normal-picker.vue +0 -120
- package/src/components/picker/normal-picker/props.js +0 -20
- package/src/components/picker/picker-slot.vue +0 -217
- package/src/components/picker/picker.tsx +0 -112
- package/src/components/picker/types.ts +0 -17
- package/src/components/popup/index.ts +0 -12
- package/src/components/popup/popup.d.ts +0 -16
- package/src/components/popup/popup.tsx +0 -68
- package/src/components/popup/types.ts +0 -9
- package/src/components/progress/index.ts +0 -12
- package/src/components/progress/progress.tsx +0 -81
- package/src/components/progress/types.ts +0 -9
- package/src/components/prompt/confirm.ts +0 -104
- package/src/components/prompt/index.ts +0 -50
- package/src/components/prompt/prompt.tsx +0 -161
- package/src/components/prompt/types.ts +0 -45
- package/src/components/radioBox/index.ts +0 -34
- package/src/components/radioBox/radiobox-group.tsx +0 -66
- package/src/components/radioBox/radiobox-group1.vue +0 -66
- package/src/components/radioBox/radiobox.tsx +0 -115
- package/src/components/radioBox/radiobox1.vue +0 -89
- package/src/components/radioBox/types.ts +0 -24
- package/src/components/rater/index.ts +0 -12
- package/src/components/rater/rater.d.ts +0 -16
- package/src/components/rater/raters.tsx +0 -101
- package/src/components/rater/types.ts +0 -10
- package/src/components/slideBar/index.ts +0 -13
- package/src/components/slideBar/slideBar.tsx +0 -288
- package/src/components/slideBar/types.ts +0 -20
- package/src/components/spinner/behavior/blade.vue +0 -42
- package/src/components/spinner/behavior/double-bounce.vue +0 -38
- package/src/components/spinner/behavior/fading-circle.vue +0 -55
- package/src/components/spinner/behavior/snake.vue +0 -41
- package/src/components/spinner/behavior/triple-bounce.vue +0 -52
- package/src/components/spinner/index.ts +0 -13
- package/src/components/spinner/props.js +0 -28
- package/src/components/spinner/spinner.tsx +0 -85
- package/src/components/spinner/types.ts +0 -20
- package/src/components/swipe/index.ts +0 -13
- package/src/components/swipe/swipe.tsx +0 -292
- package/src/components/swipe/types.ts +0 -21
- package/src/components/switchbar/index.ts +0 -13
- package/src/components/switchbar/switchbar.tsx +0 -58
- package/src/components/switchbar/types.ts +0 -6
- package/src/components/tab/index.ts +0 -12
- package/src/components/tab/tab.tsx +0 -71
- package/src/components/tab/types.ts +0 -15
- package/src/components/toTop/index.ts +0 -13
- package/src/components/toTop/toTop.tsx +0 -54
- package/src/components/toTop/types.ts +0 -7
- package/src/components/upload/index.ts +0 -13
- package/src/components/upload/types.ts +0 -9
- package/src/components/upload/upload.tsx +0 -180
- package/src/config/config.js +0 -16
- package/src/directives/clickoutside.js +0 -42
- package/src/directives/tranferDom.js +0 -66
- package/src/index.d.ts +0 -131
- package/src/index.ts +0 -136
- package/src/lib/MegaPixImage.js +0 -164
- package/src/lib/MegaPixImageOld.js +0 -153
- package/src/lib/exif-js.js +0 -235
- package/src/lib/exif.js +0 -789
- package/src/lib/lib.js +0 -22
- package/src/main.ts +0 -33
- package/src/mixin/emitter.js +0 -72
- package/src/mixin/input.js +0 -41
- package/src/router.ts +0 -36
- package/src/shims-vue.d.ts +0 -37
- package/src/styles/base/font.less +0 -99
- package/src/styles/base/reset.less +0 -135
- package/src/styles/base/variable.less +0 -108
- package/src/styles/components/actionSheet.less +0 -43
- package/src/styles/components/badge.less +0 -81
- package/src/styles/components/button.less +0 -124
- package/src/styles/components/card.less +0 -31
- package/src/styles/components/cell-swipe.less +0 -20
- package/src/styles/components/cell.less +0 -75
- package/src/styles/components/checkBox.less +0 -113
- package/src/styles/components/editor.less +0 -3
- package/src/styles/components/header.less +0 -72
- package/src/styles/components/indicator.less +0 -39
- package/src/styles/components/loadmore.less +0 -48
- package/src/styles/components/message.less +0 -57
- package/src/styles/components/modal.less +0 -84
- package/src/styles/components/number.less +0 -60
- package/src/styles/components/picker.less +0 -152
- package/src/styles/components/popup.less +0 -46
- package/src/styles/components/progress.less +0 -52
- package/src/styles/components/prompt.less +0 -37
- package/src/styles/components/radioBox.less +0 -142
- package/src/styles/components/rater.less +0 -16
- package/src/styles/components/slide-Bar.less +0 -149
- package/src/styles/components/spinner.less +0 -329
- package/src/styles/components/swipe.less +0 -125
- package/src/styles/components/switchBar.less +0 -88
- package/src/styles/components/tab.less +0 -71
- package/src/styles/components/text.less +0 -82
- package/src/styles/components/toTop.less +0 -28
- package/src/styles/components/upload.less +0 -23
- package/src/styles/index.less +0 -39
- package/src/styles/utils/1px.less +0 -206
- package/src/styles/utils/animation.less +0 -165
- package/src/styles/utils/nowrap.less +0 -19
- package/src/template/index.ejs +0 -40
- package/src/types/index.d.ts +0 -127
- package/src/types/js-shims.d.ts +0 -36
- package/src/utils/test.ts +0 -2
- package/src/utils/util.ts +0 -168
- package/src/utils/util1.js +0 -202
- package/src/vconsole-resources.min.js +0 -6
- package/src/vconsole-sources.min.js +0 -6
- package/src/vconsole.min.js +0 -7
- package/src/views/ActionSheet.vue +0 -46
- package/src/views/Badge/Badge.less +0 -12
- package/src/views/Badge/Badge.tsx +0 -23
- package/src/views/Badge.vue +0 -53
- package/src/views/Button.vue +0 -69
- package/src/views/Card.vue +0 -89
- package/src/views/Cell.vue +0 -31
- package/src/views/CellSwipe.vue +0 -80
- package/src/views/CheckBox.vue +0 -78
- package/src/views/Header.vue +0 -71
- package/src/views/Indicator.vue +0 -82
- package/src/views/LoadMore.vue +0 -76
- package/src/views/Message.vue +0 -61
- package/src/views/Modal.vue +0 -69
- package/src/views/Picker.vue +0 -142
- package/src/views/Popup.vue +0 -103
- package/src/views/Progress.vue +0 -49
- package/src/views/Prompt.vue +0 -43
- package/src/views/RadioBox.vue +0 -70
- package/src/views/Rater.vue +0 -53
- package/src/views/SlideBar.vue +0 -62
- package/src/views/Spinner.vue +0 -27
- package/src/views/Swipe.vue +0 -59
- package/src/views/SwitchBar.vue +0 -49
- package/src/views/Tab.vue +0 -55
- package/src/views/Text.vue +0 -97
- package/src/views/ToTop.vue +0 -31
- package/src/views/Upload.vue +0 -65
- package/src/views/guide.vue +0 -164
- package/src/views/index.vue +0 -554
- package/tsconfig.build.json +0 -31
- package/tsconfig.json +0 -41
- package/webpack.base.config.js +0 -85
- package/webpack.dev.config.js +0 -43
- package/webpack.dist.dev.config.js +0 -76
- package/webpack.dist.prod.config.js +0 -90
- package/webpack.prod.config.js +0 -52
package/src/types/index.d.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// src/types/index.d.ts
|
|
2
|
-
|
|
3
|
-
/* ----------------------------------
|
|
4
|
-
* 1️⃣ 按需导出组件 & props(给 TS import 用)
|
|
5
|
-
* ---------------------------------- */
|
|
6
|
-
export { default as Badge } from '../components/badge'
|
|
7
|
-
export type { BadgeProps } from '../components/badge/types'
|
|
8
|
-
|
|
9
|
-
export { default as Popup } from '../components/popup'
|
|
10
|
-
export type { PopupProps } from '../components/popup/types'
|
|
11
|
-
export { default as ActionSheet } from '../components/actionSheet'
|
|
12
|
-
export type { ActionSheetProps } from '../components/actionSheet/types'
|
|
13
|
-
|
|
14
|
-
export { default as Card } from '../components/card'
|
|
15
|
-
export type { CardProps } from '../components/card/types'
|
|
16
|
-
|
|
17
|
-
export { default as Rater } from '../components/rater'
|
|
18
|
-
export type { RaterProps } from '../components/rater/types'
|
|
19
|
-
|
|
20
|
-
export { default as Cell } from '../components/cell'
|
|
21
|
-
export type { CellProps } from '../components/cell/types'
|
|
22
|
-
|
|
23
|
-
export { default as CellSwipe } from '../components/cellSwipe'
|
|
24
|
-
export type { CellSwipeProps } from '../components/cellSwipe/types'
|
|
25
|
-
export { default as DpHeader } from '../components/header'
|
|
26
|
-
export type { HeaderProps } from '../components/header/types'
|
|
27
|
-
|
|
28
|
-
export { default as Spinner } from '../components/spinner'
|
|
29
|
-
export type { SpinnerProps } from '../components/spinner/types'
|
|
30
|
-
|
|
31
|
-
export { default as Swipe } from '../components/swipe'
|
|
32
|
-
export type { SwipeProps } from '../components/swipe/types'
|
|
33
|
-
|
|
34
|
-
export { default as DpButton } from '../components/button'
|
|
35
|
-
export type { ButtonProps } from '../components/button/types'
|
|
36
|
-
|
|
37
|
-
export { default as Picker } from '../components/picker'
|
|
38
|
-
export type { PickerProps } from '../components/picker/types'
|
|
39
|
-
export { default as SwitchBar } from '../components/switchbar'
|
|
40
|
-
export type { SwitchBarProps } from '../components/switchbar/types'
|
|
41
|
-
|
|
42
|
-
export { default as Tab } from '../components/tab'
|
|
43
|
-
export type { TabProps } from '../components/tab/types'
|
|
44
|
-
|
|
45
|
-
export { default as TextBar } from '../components/Text'
|
|
46
|
-
export type { TextBarProps } from '../components/Text/types'
|
|
47
|
-
|
|
48
|
-
export { default as Number } from '../components/number'
|
|
49
|
-
export type { NumberProps } from '../components/number/types'
|
|
50
|
-
|
|
51
|
-
export { default as ToTop } from '../components/toTop'
|
|
52
|
-
export type { ToTopProps } from '../components/toTop/types'
|
|
53
|
-
export { default as Upload } from '../components/upload'
|
|
54
|
-
export type { UploadProps } from '../components/upload/types'
|
|
55
|
-
|
|
56
|
-
export { default as SlideBar } from '../components/slideBar'
|
|
57
|
-
export type { SlideBarProps } from '../components/slideBar/types'
|
|
58
|
-
|
|
59
|
-
export { default as DpProgress } from '../components/progress'
|
|
60
|
-
export type { ProgressProps } from '../components/progress/types'
|
|
61
|
-
|
|
62
|
-
export { default as DpLoadMore } from '../components/loadMore'
|
|
63
|
-
export type { LoadmoreProps } from '../components/loadMore/types'
|
|
64
|
-
|
|
65
|
-
export { default as CheckBox, default as CheckBoxGroup } from '../components/checkBox'
|
|
66
|
-
export type { CheckBoxProps, CheckBoxGroupProps } from '../components/checkBox/types'
|
|
67
|
-
|
|
68
|
-
export { default as RadioBox, default as RadioBoxGroup } from '../components/radioBox'
|
|
69
|
-
export type { RadioBoxProps, RadioGroupProps } from '../components/radioBox/types'
|
|
70
|
-
|
|
71
|
-
/* ----------------------------------
|
|
72
|
-
* 2️⃣ 全局组件声明(给 <template> 用)
|
|
73
|
-
* ---------------------------------- */
|
|
74
|
-
import type { App } from 'vue'
|
|
75
|
-
import type { ModalInstance } from '../components/modal/types'
|
|
76
|
-
import type { MessageInstance } from '../components/message/types'
|
|
77
|
-
import type { IndicatorInstance } from '../components/Indicator/types'
|
|
78
|
-
import type { PromptInstance } from '../components/prompt/types'
|
|
79
|
-
|
|
80
|
-
declare module 'vue' {
|
|
81
|
-
interface ComponentCustomProperties {
|
|
82
|
-
$Modal: ModalInstance
|
|
83
|
-
$Message: MessageInstance
|
|
84
|
-
$Indicator: IndicatorInstance
|
|
85
|
-
$Prompt: PromptInstance
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface GlobalComponents {
|
|
89
|
-
Badge: typeof import('../components/badge')['default']
|
|
90
|
-
Popup: typeof import('../components/popup')['default']
|
|
91
|
-
ActionSheet: typeof import('../components/actionSheet')['default']
|
|
92
|
-
Card: typeof import('../components/card')['default']
|
|
93
|
-
Rater: typeof import('../components/rater')['default']
|
|
94
|
-
Cell: typeof import('../components/cell')['default']
|
|
95
|
-
CellSwipe: typeof import('../components/cellSwipe')['default']
|
|
96
|
-
DpHeader: typeof import('../components/header')['default']
|
|
97
|
-
Spinner: typeof import('../components/spinner')['default']
|
|
98
|
-
Swipe: typeof import('../components/swipe')['default']
|
|
99
|
-
DpButton: typeof import('../components/button')['default']
|
|
100
|
-
Picker: typeof import('../components/picker')['default']
|
|
101
|
-
SwitchBar: typeof import('../components/switchbar')['default']
|
|
102
|
-
Tab: typeof import('../components/tab')['default']
|
|
103
|
-
TextBar: typeof import('../components/Text')['default']
|
|
104
|
-
Number: typeof import('../components/number')['default']
|
|
105
|
-
ToTop: typeof import('../components/toTop')['default']
|
|
106
|
-
Upload: typeof import('../components/upload')['default']
|
|
107
|
-
SlideBar: typeof import('../components/slideBar')['default']
|
|
108
|
-
DpProgress: typeof import('../components/progress')['default']
|
|
109
|
-
DpLoadMore: typeof import('../components/loadMore')['default']
|
|
110
|
-
CheckBox: typeof import('../components/checkBox')['CheckBox']
|
|
111
|
-
CheckBoxGroup: typeof import('../components/checkBox')['CheckBoxGroup']
|
|
112
|
-
RadioBox: typeof import('../components/radioBox')['RadioBox']
|
|
113
|
-
RadioBoxGroup: typeof import('../components/radioBox')['RadioBoxGroup']
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* ----------------------------------
|
|
118
|
-
* 3️⃣ 默认导出整个组件库为 Vue 插件
|
|
119
|
-
* ---------------------------------- */
|
|
120
|
-
import type { Plugin } from 'vue'
|
|
121
|
-
export const Dpzvc3UI: Plugin
|
|
122
|
-
export default Dpzvc3UI
|
|
123
|
-
|
|
124
|
-
/* ----------------------------------
|
|
125
|
-
* 4️⃣ 保证这是 module
|
|
126
|
-
* ---------------------------------- */
|
|
127
|
-
export {}
|
package/src/types/js-shims.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// 声明所有 JS 模块,让 TS 知道它们的类型
|
|
2
|
-
declare module '*.js' {
|
|
3
|
-
const content: any
|
|
4
|
-
export default content
|
|
5
|
-
}
|
|
6
|
-
declare module '*.vue' {
|
|
7
|
-
import type { DefineComponent } from 'vue'
|
|
8
|
-
const component: DefineComponent<any, any, any>
|
|
9
|
-
export default component
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// 单独声明一些特殊 JS 类
|
|
13
|
-
declare module '../../utils/util' {
|
|
14
|
-
export function randomStr(length?: number): string
|
|
15
|
-
export function scrollTop(el: HTMLElement | Window, to?: number, duration?: number): void
|
|
16
|
-
export const JPEG: any
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare module '../../lib/lib' {
|
|
20
|
-
const rafTimeout: any
|
|
21
|
-
export default rafTimeout
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '../../lib/MegaPixImage' {
|
|
25
|
-
const MegaPixImage: any
|
|
26
|
-
export default MegaPixImage
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// 针对 JPEGEncoder 类的情况
|
|
30
|
-
declare module '../../utils/JPEGEncoder' {
|
|
31
|
-
class JPEGEncoder {
|
|
32
|
-
encode(data: any): any
|
|
33
|
-
}
|
|
34
|
-
const JPEG: JPEGEncoder
|
|
35
|
-
export default JPEG
|
|
36
|
-
}
|
package/src/utils/test.ts
DELETED
package/src/utils/util.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
// utils.ts
|
|
2
|
-
import type { ComponentPublicInstance } from 'vue'
|
|
3
|
-
|
|
4
|
-
/** 驼峰转连字符 */
|
|
5
|
-
export function camelcaseToHyphen(str: string): string {
|
|
6
|
-
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** 向上查找组件 */
|
|
10
|
-
export function findComponentUpward(
|
|
11
|
-
content: ComponentPublicInstance,
|
|
12
|
-
componentName: string | string[],
|
|
13
|
-
): ComponentPublicInstance | null {
|
|
14
|
-
const componentNames = typeof componentName === 'string' ? [componentName] : componentName
|
|
15
|
-
|
|
16
|
-
let parent = content.$parent
|
|
17
|
-
let name = parent?.$options.name
|
|
18
|
-
|
|
19
|
-
while (parent && (!name || componentNames.indexOf(name) < 0)) {
|
|
20
|
-
parent = parent.$parent
|
|
21
|
-
name = parent?.$options.name
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return parent ?? null
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** 向下查找第一个匹配组件 */
|
|
28
|
-
export function findComponentDownward(
|
|
29
|
-
content: ComponentPublicInstance,
|
|
30
|
-
componentName: string,
|
|
31
|
-
): ComponentPublicInstance | null {
|
|
32
|
-
const childrens = (content as any).$children as ComponentPublicInstance[]
|
|
33
|
-
let children: ComponentPublicInstance | null = null
|
|
34
|
-
|
|
35
|
-
for (let i = 0; i < childrens.length; i++) {
|
|
36
|
-
const child = childrens[i]
|
|
37
|
-
const name = child.$options.name
|
|
38
|
-
if (name === componentName) {
|
|
39
|
-
children = child
|
|
40
|
-
break
|
|
41
|
-
} else {
|
|
42
|
-
children = findComponentDownward(child, componentName)
|
|
43
|
-
if (children) break
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return children
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** 向下查找所有匹配组件 */
|
|
51
|
-
export function findComponentsDownward(
|
|
52
|
-
content: ComponentPublicInstance,
|
|
53
|
-
componentName: string,
|
|
54
|
-
components: ComponentPublicInstance[] = []
|
|
55
|
-
): ComponentPublicInstance[] {
|
|
56
|
-
const childrens = (content as any).$children as ComponentPublicInstance[]
|
|
57
|
-
childrens.forEach(child => {
|
|
58
|
-
const name = child.$options.name
|
|
59
|
-
const childs = (child as any).$children as ComponentPublicInstance[]
|
|
60
|
-
|
|
61
|
-
if (name === componentName) components.push(child)
|
|
62
|
-
if (childs.length) {
|
|
63
|
-
findComponentsDownward(child, componentName, components)
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
return components
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** 生成随机字符串 */
|
|
71
|
-
export function randomStr(len = 32): string {
|
|
72
|
-
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
|
73
|
-
let str = ''
|
|
74
|
-
const max = chars.length
|
|
75
|
-
for (let i = 0; i < len; i++) {
|
|
76
|
-
str += chars.charAt(Math.floor(Math.random() * max))
|
|
77
|
-
}
|
|
78
|
-
return str
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** JPEG 编码器(any 处理) */
|
|
82
|
-
export const JPEG: { JPEGEncoder: any } = {
|
|
83
|
-
JPEGEncoder: function (a: any) { /* 原始算法保持 any */ }
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** 滚动到指定位置 */
|
|
87
|
-
export function scrollTop(
|
|
88
|
-
el: HTMLElement | Window,
|
|
89
|
-
from = 0,
|
|
90
|
-
to: number,
|
|
91
|
-
duration = 500
|
|
92
|
-
) {
|
|
93
|
-
if (!window.requestAnimationFrame) {
|
|
94
|
-
window.requestAnimationFrame = (
|
|
95
|
-
window.requestAnimationFrame ||
|
|
96
|
-
function (callback) {
|
|
97
|
-
return window.setTimeout(callback, 1000 / 60)
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const difference = Math.abs(from - to)
|
|
103
|
-
const step = Math.ceil(difference / duration * 50)
|
|
104
|
-
|
|
105
|
-
function scroll(start: number, end: number, step: number) {
|
|
106
|
-
if (start === end) return
|
|
107
|
-
|
|
108
|
-
let d = start < end ? Math.min(start + step, end) : Math.max(start - step, end)
|
|
109
|
-
|
|
110
|
-
if (el === window) {
|
|
111
|
-
window.scrollTo(d, d)
|
|
112
|
-
} else {
|
|
113
|
-
(el as HTMLElement).scrollTop = d
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
window.requestAnimationFrame(() => scroll(d, end, step))
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
scroll(from, to, step)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/** Cookie 操作 */
|
|
123
|
-
interface CookieOptions {
|
|
124
|
-
path?: string
|
|
125
|
-
expire?: number
|
|
126
|
-
[key: string]: any
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export const cookieStorage = {
|
|
130
|
-
getItem(key?: string): string | Record<string, string> | null {
|
|
131
|
-
let result: any = {}
|
|
132
|
-
const cookies = document.cookie ? document.cookie.split('; ') : []
|
|
133
|
-
const decodes = /(%[0-9A-Z]{2})+/g
|
|
134
|
-
|
|
135
|
-
for (const cookie of cookies) {
|
|
136
|
-
const parts = cookie.split('=')
|
|
137
|
-
let name = parts.shift()!
|
|
138
|
-
let value = parts.join('=')
|
|
139
|
-
|
|
140
|
-
name = name.replace(decodes, decodeURIComponent)
|
|
141
|
-
value = value.replace(decodes, decodeURIComponent)
|
|
142
|
-
|
|
143
|
-
if (name === key) return value
|
|
144
|
-
if (!key) result[name] = value
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return !key ? result : null
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
removeItem(key: string, options: CookieOptions = {}) {
|
|
151
|
-
const opts = Object.assign({ path: '/', expire: -1 }, options)
|
|
152
|
-
this.setItem(key, '', opts)
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
key(index: number): string {
|
|
156
|
-
const cookies = document.cookie ? document.cookie.split(/;\s*/) : []
|
|
157
|
-
if (index < 0 || index >= cookies.length) return ''
|
|
158
|
-
return cookies[index].split('=').shift()!
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
setItem(key: string, value: string, options: CookieOptions = {}) {
|
|
162
|
-
const opts = Object.assign({ path: '/' }, options)
|
|
163
|
-
let cookieStr = encodeURIComponent(key) + '=' + encodeURIComponent(value)
|
|
164
|
-
if (opts.expire) cookieStr += '; expires=' + new Date(opts.expire).toUTCString()
|
|
165
|
-
if (opts.path) cookieStr += '; path=' + opts.path
|
|
166
|
-
document.cookie = cookieStr
|
|
167
|
-
}
|
|
168
|
-
}
|
package/src/utils/util1.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by yishide on 16/7/18.
|
|
3
|
-
*/
|
|
4
|
-
// import Config from '../config/config'
|
|
5
|
-
//
|
|
6
|
-
// import * as Cache from './cache';
|
|
7
|
-
|
|
8
|
-
export function camelcaseToHyphen (str) {
|
|
9
|
-
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function findComponentUpward (content, componentName, componentNames) {
|
|
13
|
-
if (typeof componentName === 'string') {
|
|
14
|
-
componentNames = [componentName]
|
|
15
|
-
} else {
|
|
16
|
-
componentNames = componentName
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let parent = content.$parent
|
|
20
|
-
let name = parent.$options.name
|
|
21
|
-
while (parent && (!name || componentNames.indexOf(name) < 0)) {
|
|
22
|
-
parent = parent.$parent
|
|
23
|
-
if (parent) name = parent.$options.name
|
|
24
|
-
}
|
|
25
|
-
return parent
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function findComponentDownward (content, componentName) {
|
|
29
|
-
const childrens = content.$children
|
|
30
|
-
let children = null
|
|
31
|
-
|
|
32
|
-
if (childrens.length) {
|
|
33
|
-
childrens.forEach(child => {
|
|
34
|
-
const name = child.$options.name
|
|
35
|
-
if (name === componentName) {
|
|
36
|
-
children = child
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
for (let i = 0; i < childrens.length; i++) {
|
|
41
|
-
const child = childrens[i]
|
|
42
|
-
const name = child.$options.name
|
|
43
|
-
if (name === componentName) {
|
|
44
|
-
children = child
|
|
45
|
-
break
|
|
46
|
-
} else {
|
|
47
|
-
children = findComponentDownward(child, componentName)
|
|
48
|
-
if (children) break
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return children
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function findComponentsDownward (content, componentName, components = []) {
|
|
56
|
-
const childrens = content.$children
|
|
57
|
-
|
|
58
|
-
if (childrens.length) {
|
|
59
|
-
childrens.forEach(child => {
|
|
60
|
-
const name = child.$options.name
|
|
61
|
-
const childs = child.$children
|
|
62
|
-
|
|
63
|
-
if (name === componentName) components.push(child)
|
|
64
|
-
if (childs.length) {
|
|
65
|
-
const findChilds = findComponentsDownward(child, componentName, components)
|
|
66
|
-
if (findChilds) components.concat(findChilds)
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
return components
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function randomStr () {
|
|
74
|
-
const len = 32
|
|
75
|
-
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
|
76
|
-
const max = chars.length
|
|
77
|
-
|
|
78
|
-
let str = ''
|
|
79
|
-
for (let i = 0; i < len; i++) {
|
|
80
|
-
str += chars.charAt(Math.floor(Math.random() * max))
|
|
81
|
-
}
|
|
82
|
-
return str
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export const JPEG = {
|
|
86
|
-
// eslint-disable-next-line no-unused-expressions, no-sequences, eqeqeq, no-array-constructor, no-return-assign, @typescript-eslint/no-unused-expressions
|
|
87
|
-
JPEGEncoder: function (a) { function I (a) { let c; let i; let j; let k; let l; let m; let n; let o; let p; const b = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; for (c = 0; c < 64; c++)i = d((b[c] * a + 50) / 100), i < 1 ? i = 1 : i > 255 && (i = 255), e[z[c]] = i; for (j = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], k = 0; k < 64; k++)l = d((j[k] * a + 50) / 100), l < 1 ? l = 1 : l > 255 && (l = 255), f[z[k]] = l; for (m = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], n = 0, o = 0; o < 8; o++) for (p = 0; p < 8; p++)g[n] = 1 / (8 * e[z[n]] * m[o] * m[p]), h[n] = 1 / (8 * f[z[n]] * m[o] * m[p]), n++ } function J (a, b) { let f; let g; let c = 0; let d = 0; const e = []; for (f = 1; f <= 16; f++) { for (g = 1; g <= a[f]; g++)e[b[d]] = [], e[b[d]][0] = c, e[b[d]][1] = f, d++, c++; c *= 2 } return e } function K () { i = J(A, B), j = J(E, F), k = J(C, D), l = J(G, H) } function L () { let c; let d; let e; let a = 1; let b = 2; for (c = 1; c <= 15; c++) { for (d = a; b > d; d++)n[32767 + d] = c, m[32767 + d] = [], m[32767 + d][1] = c, m[32767 + d][0] = d; for (e = -(b - 1); -a >= e; e++)n[32767 + e] = c, m[32767 + e] = [], m[32767 + e][1] = c, m[32767 + e][0] = b - 1 + e; a <<= 1, b <<= 1 } } function M () { for (let a = 0; a < 256; a++)x[a] = 19595 * a, x[a + 256 >> 0] = 38470 * a, x[a + 512 >> 0] = 7471 * a + 32768, x[a + 768 >> 0] = -11059 * a, x[a + 1024 >> 0] = -21709 * a, x[a + 1280 >> 0] = 32768 * a + 8421375, x[a + 1536 >> 0] = -27439 * a, x[a + 1792 >> 0] = -5329 * a } function N (a) { for (let b = a[0], c = a[1] - 1; c >= 0;)b & 1 << c && (r |= 1 << s), c--, s--, s < 0 && (r == 255 ? (O(255), O(0)) : O(r), s = 7, r = 0) } function O (a) { q.push(w[a]) } function P (a) { O(255 & a >> 8), O(255 & a) } function Q (a, b) { let c; let d; let e; let f; let g; let h; let i; let j; let l; let p; let q; let r; let s; let t; let u; let v; let w; let x; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; let L; let M; let N; let O; let P; let Q; let R; let S; let T; let U; let V; let W; let X; let Y; let Z; let $; let _; let k = 0; const m = 8; const n = 64; for (l = 0; m > l; ++l)c = a[k], d = a[k + 1], e = a[k + 2], f = a[k + 3], g = a[k + 4], h = a[k + 5], i = a[k + 6], j = a[k + 7], p = c + j, q = c - j, r = d + i, s = d - i, t = e + h, u = e - h, v = f + g, w = f - g, x = p + v, y = p - v, z = r + t, A = r - t, a[k] = x + z, a[k + 4] = x - z, B = 0.707106781 * (A + y), a[k + 2] = y + B, a[k + 6] = y - B, x = w + u, z = u + s, A = s + q, C = 0.382683433 * (x - A), D = 0.5411961 * x + C, E = 1.306562965 * A + C, F = 0.707106781 * z, G = q + F, H = q - F, a[k + 5] = H + D, a[k + 3] = H - D, a[k + 1] = G + E, a[k + 7] = G - E, k += 8; for (k = 0, l = 0; m > l; ++l)c = a[k], d = a[k + 8], e = a[k + 16], f = a[k + 24], g = a[k + 32], h = a[k + 40], i = a[k + 48], j = a[k + 56], I = c + j, J = c - j, K = d + i, L = d - i, M = e + h, N = e - h, O = f + g, P = f - g, Q = I + O, R = I - O, S = K + M, T = K - M, a[k] = Q + S, a[k + 32] = Q - S, U = 0.707106781 * (T + R), a[k + 16] = R + U, a[k + 48] = R - U, Q = P + N, S = N + L, T = L + J, V = 0.382683433 * (Q - T), W = 0.5411961 * Q + V, X = 1.306562965 * T + V, Y = 0.707106781 * S, Z = J + Y, $ = J - Y, a[k + 40] = $ + W, a[k + 24] = $ - W, a[k + 8] = Z + X, a[k + 56] = Z - X, k++; for (l = 0; n > l; ++l)_ = a[l] * b[l], o[l] = _ > 0 ? 0 | _ + 0.5 : 0 | _ - 0.5; return o } function R () { P(65504), P(16), O(74), O(70), O(73), O(70), O(0), O(1), O(1), O(0), P(1), P(1), O(0), O(0) } function S (a, b) { P(65472), P(17), O(8), P(b), P(a), O(3), O(1), O(17), O(0), O(2), O(17), O(1), O(3), O(17), O(1) } function T () { let a, b; for (P(65499), P(132), O(0), a = 0; a < 64; a++)O(e[a]); for (O(1), b = 0; b < 64; b++)O(f[b]) } function U () { let a, b, c, d, e, f, g, h; for (P(65476), P(418), O(0), a = 0; a < 16; a++)O(A[a + 1]); for (b = 0; b <= 11; b++)O(B[b]); for (O(16), c = 0; c < 16; c++)O(C[c + 1]); for (d = 0; d <= 161; d++)O(D[d]); for (O(1), e = 0; e < 16; e++)O(E[e + 1]); for (f = 0; f <= 11; f++)O(F[f]); for (O(17), g = 0; g < 16; g++)O(G[g + 1]); for (h = 0; h <= 161; h++)O(H[h]) } function V () { P(65498), P(12), O(3), O(1), O(0), O(2), O(17), O(3), O(17), O(0), O(63), O(0) } function W (a, b, c, d, e) { let h; let l; let o; let q; let r; let s; let t; let u; let v; let w; const f = e[0]; const g = e[240]; const i = 16; const j = 63; const k = 64; for (l = Q(a, b), o = 0; k > o; ++o)p[z[o]] = l[o]; for (q = p[0] - c, c = p[0], q == 0 ? N(d[0]) : (h = 32767 + q, N(d[n[h]]), N(m[h])), r = 63; r > 0 && p[r] == 0; r--);if (r == 0) return N(f), c; for (s = 1; r >= s;) { for (u = s; p[s] == 0 && r >= s; ++s);if (v = s - u, v >= i) { for (t = v >> 4, w = 1; t >= w; ++w)N(g); v = 15 & v }h = 32767 + p[s], N(e[(v << 4) + n[h]]), N(m[h]), s++ } return r != j && N(f), c } function X () { let b; const a = String.fromCharCode; for (b = 0; b < 256; b++)w[b] = a(b) } function Y (a) { if (a <= 0 && (a = 1), a > 100 && (a = 100), y != a) { let b = 0; b = a < 50 ? Math.floor(5e3 / a) : Math.floor(200 - 2 * a), I(b), y = a, console.log('Quality set to: ' + a + '%') } } function Z () { let c; const b = (new Date()).getTime(); a || (a = 50), X(), K(), L(), M(), Y(a), c = (new Date()).getTime() - b, console.log('Initialization ' + c + 'ms') } let d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H; Math.round, d = Math.floor, e = new Array(64), f = new Array(64), g = new Array(64), h = new Array(64), m = new Array(65535), n = new Array(65535), o = new Array(64), p = new Array(64), q = [], r = 0, s = 7, t = new Array(64), u = new Array(64), v = new Array(64), w = new Array(256), x = new Array(2048), z = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63], A = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], B = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], C = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], D = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], E = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], F = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], G = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], H = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250], this.encode = function (a, b) { let d; let e; let f; let m; let n; let o; let p; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; const c = (new Date()).getTime(); for (b && Y(b), q = [], r = 0, s = 7, P(65496), R(), T(), S(a.width, a.height), U(), V(), d = 0, e = 0, f = 0, r = 0, s = 7, this.encode.displayName = '_encode_', m = a.data, n = a.width, o = a.height, p = 4 * n, z = 0; o > z;) { for (y = 0; p > y;) { for (D = p * z + y, E = D, F = -1, G = 0, H = 0; H < 64; H++)G = H >> 3, F = 4 * (7 & H), E = D + G * p + F, z + G >= o && (E -= p * (z + 1 + G - o)), y + F >= p && (E -= y + F - p + 4), A = m[E++], B = m[E++], C = m[E++], t[H] = (x[A] + x[B + 256 >> 0] + x[C + 512 >> 0] >> 16) - 128, u[H] = (x[A + 768 >> 0] + x[B + 1024 >> 0] + x[C + 1280 >> 0] >> 16) - 128, v[H] = (x[A + 1280 >> 0] + x[B + 1536 >> 0] + x[C + 1792 >> 0] >> 16) - 128; d = W(t, g, d, i, k), e = W(u, h, e, j, l), f = W(v, h, f, j, l), y += 32 }z += 8 } return s >= 0 && (I = [], I[1] = s + 1, I[0] = (1 << s + 1) - 1, N(I)), P(65497), J = 'data:image/jpeg;base64,' + btoa(q.join('')), q = [], K = (new Date()).getTime() - c, console.log('Encoding time: ' + K + 'ms'), J }, Z() }
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function scrollTop (el, from = 0, to, duration = 500) {
|
|
91
|
-
if (!window.requestAnimationFrame) {
|
|
92
|
-
window.requestAnimationFrame = (
|
|
93
|
-
window.webkitRequestAnimationFrame ||
|
|
94
|
-
window.mozRequestAnimationFrame ||
|
|
95
|
-
window.msRequestAnimationFrame ||
|
|
96
|
-
function (callback) {
|
|
97
|
-
return window.setTimeout(callback, 1000 / 60)
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
const difference = Math.abs(from - to)
|
|
102
|
-
const step = Math.ceil(difference / duration * 50)
|
|
103
|
-
|
|
104
|
-
function scroll (start, end, step) {
|
|
105
|
-
if (start === end) return
|
|
106
|
-
|
|
107
|
-
let d = (start + step > end) ? end : start + step
|
|
108
|
-
if (start > end) {
|
|
109
|
-
d = (start - step < end) ? end : start - step
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (el === window) {
|
|
113
|
-
window.scrollTo(d, d)
|
|
114
|
-
} else {
|
|
115
|
-
el.scrollTop = d
|
|
116
|
-
}
|
|
117
|
-
window.requestAnimationFrame(() => scroll(d, end, step))
|
|
118
|
-
}
|
|
119
|
-
scroll(from, to, step)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export const cookieStorage = {
|
|
123
|
-
// setItem: function (key, value, options) {
|
|
124
|
-
// let data, opts
|
|
125
|
-
// if (options === undefined) {
|
|
126
|
-
// data = JSON.parse(value)
|
|
127
|
-
// opts = Object.assign({}, defaultConfigs, data.options)
|
|
128
|
-
// delete data.options
|
|
129
|
-
// value = JSON.stringify(data)
|
|
130
|
-
// } else {
|
|
131
|
-
// data = Object.assign({}, options)
|
|
132
|
-
// opts = Object.assign({}, defaultConfigs, options)
|
|
133
|
-
// }
|
|
134
|
-
|
|
135
|
-
// key = encodeURIComponent(String(key))
|
|
136
|
-
// .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
|
137
|
-
// .replace(/[()]/g, escape)
|
|
138
|
-
|
|
139
|
-
// value = encodeURIComponent(String(value))
|
|
140
|
-
// .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent)
|
|
141
|
-
|
|
142
|
-
// if (typeof data.expire === 'number') {
|
|
143
|
-
// if (data.expire === 0) data.expire = Date.now() + timeMap.y * 10
|
|
144
|
-
// opts.expires = new Date(data.expire)
|
|
145
|
-
// }
|
|
146
|
-
|
|
147
|
-
// if (opts.cross) {
|
|
148
|
-
// const hostname = window.location.hostname
|
|
149
|
-
// if (!/^((25[0-5]|2[0-4]\d|[01]?\d\d?)($|(?!\.$)\.)){4}$/.test(hostname) && !!~hostname.indexOf('.')) {
|
|
150
|
-
// opts.domain = '.' + window.location.hostname.split('.').slice(1).join('.')
|
|
151
|
-
// }
|
|
152
|
-
// }
|
|
153
|
-
|
|
154
|
-
// return (document.cookie = [
|
|
155
|
-
// key, '=', value,
|
|
156
|
-
// opts.expires ? '; expires=' + opts.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
|
157
|
-
// opts.path ? '; path=' + opts.path : '',
|
|
158
|
-
// opts.domain ? '; domain=' + opts.domain : '',
|
|
159
|
-
// opts.secure ? '; secure' : ''
|
|
160
|
-
// ].join(''))
|
|
161
|
-
// },
|
|
162
|
-
getItem: function (key) {
|
|
163
|
-
let result = {}
|
|
164
|
-
const cookies = document.cookie ? document.cookie.split('; ') : []
|
|
165
|
-
const decodes = /(%[0-9A-Z]{2})+/g
|
|
166
|
-
|
|
167
|
-
for (const cookie of cookies) {
|
|
168
|
-
const parts = cookie.split('=')
|
|
169
|
-
let name = parts.shift()
|
|
170
|
-
let value = parts.join('=')
|
|
171
|
-
|
|
172
|
-
name = name.replace(decodes, decodeURIComponent)
|
|
173
|
-
value = value.replace(decodes, decodeURIComponent)
|
|
174
|
-
|
|
175
|
-
if (name === key) {
|
|
176
|
-
result = value
|
|
177
|
-
return result
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (!key) {
|
|
181
|
-
result[name] = value
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return !key ? result : null
|
|
186
|
-
},
|
|
187
|
-
removeItem: function (key, options) {
|
|
188
|
-
const opts = Object.assign({
|
|
189
|
-
path: '/',
|
|
190
|
-
expire: -1
|
|
191
|
-
}, options)
|
|
192
|
-
|
|
193
|
-
this.setItem(key, '', opts)
|
|
194
|
-
},
|
|
195
|
-
key: function (index) {
|
|
196
|
-
const cookies = document.cookie ? document.cookie.split(/;\s*/) : []
|
|
197
|
-
if (index < 0 || index >= cookies.length) return ''
|
|
198
|
-
|
|
199
|
-
const kvPairs = cookies[index]
|
|
200
|
-
return kvPairs.split('=').shift()
|
|
201
|
-
}
|
|
202
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* vconsole-resources v1.0.0 (https://github.com/WechatFE/vConsole-resources)
|
|
3
|
-
* Copyright 2016, WechatFE Team
|
|
4
|
-
* MIT license
|
|
5
|
-
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vConsole-resources"]=t():e["vConsole-resources"]=t()}(this,function(){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}();o(1);var c=o(5),l=r(c),u=o(6),f=r(u),d=vConsole.$,p=vConsole.tool,v=function(e){function t(){var e;n(this,t);for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];var s=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return s.$tabbox=d.render(l["default"],{}),s.currentType="",s.typeNameMap={cookies:"Cookies",localstorage:"LocalStorage"},s}return i(t,e),s(t,[{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Refresh",global:!1,onClick:function(e){t.renderResources()}},{name:"Clear",global:!1,onClick:function(e){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){var e=this;d.delegate(d.one(".vc-sub-tabbar",e.$tabbox),"click",".vc-subtab",function(t){d.removeClass(d.all(".vc-subtab",e.$tabbox),"vc-actived"),d.addClass(this,"vc-actived"),e.currentType=this.dataset.type,e.renderResources()})}},{key:"clearLog",value:function(){if(this.currentType&&window.confirm){var e=window.confirm("Remove all "+this.typeNameMap[this.currentType]+"?");if(!e)return!1}switch(this.currentType){case"cookies":this.clearCookieList();break;case"localstorage":this.clearLocalStorageList();break;default:return!1}this.renderResources()}},{key:"renderResources",value:function(){var e=[];switch(this.currentType){case"cookies":e=this.getCookieList();break;case"localstorage":e=this.getLocalStorageList();break;default:return!1}var t=d.one(".vc-log",this.$tabbox);if(0==e.length)t.innerHTML="";else{for(var o=0;o<e.length;o++)e[o].name=p.htmlEncode(e[o].name),e[o].value=p.htmlEncode(e[o].value);t.innerHTML=d.render(f["default"],{list:e},!0)}}},{key:"getCookieList",value:function(){if(!document.cookie)return[];for(var e=[],t=document.cookie.split(";"),o=0;o<t.length;o++){var r=t[o].split("="),n=r[0].replace(/^ /,""),a=r[1];e.push({name:decodeURIComponent(n),value:decodeURIComponent(a)})}return e}},{key:"getLocalStorageList",value:function(){if(!window.localStorage)return[];for(var e=[],t=0;t<localStorage.length;t++){var o=localStorage.key(t),r=localStorage.getItem(o);e.push({name:o,value:r})}return e}},{key:"clearCookieList",value:function(){if(document.cookie)for(var e=this.getCookieList(),t=0;t<e.length;t++)document.cookie=e[t].name+"=;"}},{key:"clearLocalStorageList",value:function(){window.localStorage&&localStorage.clear()}}]),t}(vConsole.VConsolePlugin),b=new v("resources","Resources");vConsole.addPlugin(b)},function(e,t,o){var r=o(2);"string"==typeof r&&(r=[[e.id,r,""]]);o(4)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,o){t=e.exports=o(3)(),t.push([e.id,".vc-sub-tabbar{background-color:#fbf9fe;display:flex;flex-direction:row;flex-wrap:wrap}.vc-sub-tabbar .vc-subtab{flex:1;line-height:30px;padding:0 15px;border-right:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9;text-decoration:none;text-align:center;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.vc-sub-tabbar .vc-subtab:active{background-color:rgba(0,0,0,.15)}.vc-sub-tabbar .vc-subtab.vc-actived{background-color:#fff}",""])},function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var o=this[t];o[2]?e.push("@media "+o[2]+"{"+o[1]+"}"):e.push(o[1])}return e.join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(r[a]=!0)}for(n=0;n<t.length;n++){var i=t[n];"number"==typeof i[0]&&r[i[0]]||(o&&!i[2]?i[2]=o:o&&(i[2]="("+i[2]+") and ("+o+")"),e.push(i))}},e}},function(e,t,o){function r(e,t){for(var o=0;o<e.length;o++){var r=e[o],n=p[r.id];if(n){n.refs++;for(var a=0;a<n.parts.length;a++)n.parts[a](r.parts[a]);for(;a<r.parts.length;a++)n.parts.push(l(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(l(r.parts[a],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function n(e){for(var t=[],o={},r=0;r<e.length;r++){var n=e[r],a=n[0],i=n[1],s=n[2],c=n[3],l={css:i,media:s,sourceMap:c};o[a]?o[a].parts.push(l):t.push(o[a]={id:a,parts:[l]})}return t}function a(e,t){var o=h(),r=m[m.length-1];if("top"===e.insertAt)r?r.nextSibling?o.insertBefore(t,r.nextSibling):o.appendChild(t):o.insertBefore(t,o.firstChild),m.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");o.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=m.indexOf(e);t>=0&&m.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function l(e,t){var o,r,n;if(t.singleton){var a=y++;o=g||(g=s(t)),r=u.bind(null,o,a,!1),n=u.bind(null,o,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=c(t),r=d.bind(null,o),n=function(){i(o),o.href&&URL.revokeObjectURL(o.href)}):(o=s(t),r=f.bind(null,o),n=function(){i(o)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else n()}}function u(e,t,o,r){var n=o?"":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,n);else{var a=document.createTextNode(n),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var o=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function d(e,t){var o=t.css,r=t.sourceMap;r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var n=new Blob([o],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(n),a&&URL.revokeObjectURL(a)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},b=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=v(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,y=0,m=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=b()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=n(e);return r(o,t),function(e){for(var a=[],i=0;i<o.length;i++){var s=o[i],c=p[s.id];c.refs--,a.push(c)}if(e){var l=n(e);r(l,t)}for(var i=0;i<a.length;i++){var c=a[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete p[c.id]}}}};var k=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports="<div class=vc-table> <div class=vc-sub-tabbar> <a href=javascript:; class=vc-subtab data-type=cookies>Cookies</a> <a href=javascript:; class=vc-subtab data-type=localstorage>LocalStorage</a> </div> <div class=vc-log></div> </div>"},function(e,t){e.exports='<div> <dl class=vc-table-row> <dd class=vc-table-col>Name</dd> <dd class="vc-table-col vc-table-col-2">Value</dd> </dl> {{for (var i=0; i<list.length; i++)}} <dl class=vc-table-row> <dd class=vc-table-col>{{list[i].name}}</dd> <dd class="vc-table-col vc-table-col-2">{{list[i].value}}</dd> </dl> {{/for}} </div>'}])});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* vconsole-sources v1.0.1 (https://github.com/WechatFE/vConsole-sources)
|
|
3
|
-
* Copyright 2016, WechatFE Team
|
|
4
|
-
* MIT license
|
|
5
|
-
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["vConsole-sources"]=t():e["vConsole-sources"]=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),l=r(c);n(2);var u=vConsole.$,f=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=s(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.resUrls=t.getAllResUrl(),a}return i(t,e),a(t,[{key:"onRenderTab",value:function(e){var t=this,n=this.resUrls,r=this.$dom=u.render(l["default"],{resUrls:n});e(r),u.bind(u.all(".vc-sources-file",r),"click",function(){u.removeClass(u.all(".vc-sources-file",r),"actived"),u.addClass(this,"actived");var e=1*this.dataset.idx,o=n[e];if(o)if(u.one(".vc-sources-url",r).innerText=o.url,o.content){var s=u.one(".vc-sources-content",r),i=u.one(".vc-sources-iframe-content",r);s.style.display="block",i.style.display="none",s.innerText=o.content}else t.fillContent(o.url,e)})}},{key:"getResContent",value:function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){if(3==n.readyState,4==n.readyState){n.onreadystatechange=null;var e=n.status;t(e>=200&&e<400?n.responseText:"[ERROR] Please Try Again.")}},n.send()}},{key:"fillContent",value:function(e,t){var n=location.protocol+"//"+location.host,r=this.$dom,o=u.one(".vc-sources-content",r),s=u.one(".vc-sources-iframe-content",r),i=this.resUrls;0==e.indexOf(n)?(o.innerText="loading...",o.style.display="block",s.style.display="none",this.getResContent(e,function(e){o.innerText=e,i[t]&&(i[t].content=e)})):(s.src=e,o.style.display="none",s.style.display="block")}}],[{key:"getAllResUrl",value:function(){var e=[];e.push({url:location.href,filename:t.getFileName(location.href),type:"html",content:document.getElementsByTagName("html")[0].innerHTML});for(var n=u.all('link[rel="stylesheet"],script[src]'),r=0;r<n.length;++r){var o=n[r],s="",i="",a="unknow",c=o.nodeName.toUpperCase();"LINK"==c?(s=o.href||"",a="css"):"SCRIPT"==c&&(s=o.src||"",a="script"),i=t.getFileName(s),i&&e.push({url:s,filename:i,type:a})}return e}},{key:"getFileName",value:function(e){var t=/\/([^\/\?]+)($|\?)/g,n=t.exec(e);return n&&n[1]}}]),t}(vConsole.VConsolePlugin);vConsole.addPlugin(new f("vconsole-source","Source"))},function(e,t){e.exports='<div> <div class=vc-sources-title> FILE: <span class=vc-sources-url></span> </div> <div class=vc-sources-left-panel> <ul> {{for(var i in resUrls)}} <li><a data-idx="{{i}}" class="vc-sources-file vc-sources-type-{{resUrls[i].type}}" href=javascript:void(0);>{{resUrls[i].filename}}</a></li> {{/for}} </ul> </div> <div class=vc-sources-right-panel> <div class=vc-sources-content-panel> <div class=vc-sources-content> </div> <iframe class=vc-sources-iframe-content style=display:none> </iframe> </div> </div> </div>'},function(e,t,n){var r=n(3);"string"==typeof r&&(r=[[e.id,r,""]]);n(5)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,".vc-sources-left-panel{position:absolute;top:51px;bottom:0;left:0;width:80px;overflow:auto;border-right:5px solid #f4f4f4;background-color:#fefefe}.vc-sources-left-panel li{border-bottom:1px dashed #efefef}.vc-sources-left-panel a{color:#333;display:block;padding:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vc-sources-left-panel a.actived{background-color:#f4f4f4}.vc-sources-left-panel a.vc-sources-type-html{color:#333}.vc-sources-left-panel a.vc-sources-type-css{color:#6a5acd}.vc-sources-left-panel a.vc-sources-type-script{color:#daa520}.vc-sources-right-panel{padding:5px;overflow:auto;position:absolute;top:51px;left:85px;right:0;bottom:0}.vc-sources-right-panel .vc-sources-content-panel{width:100%;height:100%}.vc-sources-right-panel .vc-sources-iframe-content{border:none;width:100%;height:100%}.vc-sources-title{word-wrap:break-word;word-break:break-all;padding:5px;height:40px;overflow:auto;border-bottom:1px solid #eee;background-color:#f4f4f4}",""])},function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var s=this[o][0];"number"==typeof s&&(r[s]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=d[r.id];if(o){o.refs++;for(var s=0;s<o.parts.length;s++)o.parts[s](r.parts[s]);for(;s<r.parts.length;s++)o.parts.push(l(r.parts[s],t))}else{for(var i=[],s=0;s<r.parts.length;s++)i.push(l(r.parts[s],t));d[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],s=o[0],i=o[1],a=o[2],c=o[3],l={css:i,media:a,sourceMap:c};n[s]?n[s].parts.push(l):t.push(n[s]={id:s,parts:[l]})}return t}function s(e,t){var n=y(),r=m[m.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),m.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=m.indexOf(e);t>=0&&m.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",s(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",s(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var s=g++;n=b||(b=a(t)),r=u.bind(null,n,s,!1),o=u.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(t),r=p.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var s=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(s,i[t]):e.appendChild(s)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function p(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var d={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),y=v(function(){return document.head||document.getElementsByTagName("head")[0]}),b=null,g=0,m=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var s=[],i=0;i<n.length;i++){var a=n[i],c=d[a.id];c.refs--,s.push(c)}if(e){var l=o(e);r(l,t)}for(var i=0;i<s.length;i++){var c=s[i];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete d[c.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()}])});
|