dpzvc3-ui 3.0.0
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/LICENSE +20 -0
- package/README.md +175 -0
- package/build-style.js +58 -0
- package/dist/dpzvc3.esm.js +17676 -0
- package/dist/dpzvc3.esm.js.map +1 -0
- package/dist/dpzvc3.esm.min.js +2 -0
- package/dist/dpzvc3.esm.min.js.map +1 -0
- package/dist/dpzvc3.js +15200 -0
- package/dist/dpzvc3.js.map +1 -0
- package/dist/dpzvc3.min.js +2 -0
- package/dist/dpzvc3.min.js.map +1 -0
- package/dist/styles/base/font.css +1 -0
- package/dist/styles/base/reset.css +1 -0
- package/dist/styles/base/variable.css +0 -0
- package/dist/styles/components/actionSheet.css +1 -0
- package/dist/styles/components/badge.css +1 -0
- package/dist/styles/components/button.css +1 -0
- package/dist/styles/components/card.css +1 -0
- package/dist/styles/components/cell-swipe.css +1 -0
- package/dist/styles/components/cell.css +1 -0
- package/dist/styles/components/checkBox.css +1 -0
- package/dist/styles/components/editor.css +1 -0
- package/dist/styles/components/header.css +1 -0
- package/dist/styles/components/indicator.css +1 -0
- package/dist/styles/components/loadmore.css +1 -0
- package/dist/styles/components/message.css +1 -0
- package/dist/styles/components/modal.css +1 -0
- package/dist/styles/components/number.css +1 -0
- package/dist/styles/components/picker.css +1 -0
- package/dist/styles/components/popup.css +1 -0
- package/dist/styles/components/progress.css +1 -0
- package/dist/styles/components/prompt.css +1 -0
- package/dist/styles/components/radioBox.css +1 -0
- package/dist/styles/components/slide-Bar.css +1 -0
- package/dist/styles/components/spinner.css +1 -0
- package/dist/styles/components/swipe.css +1 -0
- package/dist/styles/components/switchBar.css +1 -0
- package/dist/styles/components/tab.css +1 -0
- package/dist/styles/components/text.css +1 -0
- package/dist/styles/components/toTop.css +1 -0
- package/dist/styles/components/upload.css +1 -0
- package/dist/styles/dpzvc3.css +1 -0
- package/dist/styles/utils/1px.css +1 -0
- package/dist/styles/utils/animation.css +1 -0
- package/dist/styles/utils/nowrap.css +1 -0
- package/dist-prod/91.9d79b442ec3131707419.js +3 -0
- package/dist-prod/91.9d79b442ec3131707419.js.LICENSE.txt +25 -0
- package/dist-prod/91.9d79b442ec3131707419.js.map +1 -0
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js +2 -0
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js.map +1 -0
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js +2 -0
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js.map +1 -0
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js +2 -0
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js.map +1 -0
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js +2 -0
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js.map +1 -0
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js +2 -0
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js.map +1 -0
- package/dist-prod/cellswipe.53b0178e4638c201dcf1.chunk.js +2 -0
- package/dist-prod/cellswipe.53b0178e4638c201dcf1.chunk.js.map +1 -0
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js +2 -0
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js.map +1 -0
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js +2 -0
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js.map +1 -0
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js +2 -0
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js.map +1 -0
- package/dist-prod/index.html +19 -0
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js +2 -0
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js.map +1 -0
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js +2 -0
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js.map +1 -0
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js +2 -0
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js.map +1 -0
- package/dist-prod/message.e57fa263a214006f7191.chunk.js +2 -0
- package/dist-prod/message.e57fa263a214006f7191.chunk.js.map +1 -0
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js +2 -0
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js.map +1 -0
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js +2 -0
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js.map +1 -0
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js +2 -0
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js.map +1 -0
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js +2 -0
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js.map +1 -0
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js +2 -0
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js.map +1 -0
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js +2 -0
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js.map +1 -0
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js +2 -0
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js.map +1 -0
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js +2 -0
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js.map +1 -0
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js +2 -0
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js.map +1 -0
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js +2 -0
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js.map +1 -0
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js +2 -0
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js.map +1 -0
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js +2 -0
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js.map +1 -0
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js +2 -0
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js.map +1 -0
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js +2 -0
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js.map +1 -0
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js +2 -0
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js.map +1 -0
- package/images/IMG_2614 2 2.JPG +0 -0
- package/images/IMG_2614.JPG +0 -0
- package/images/IMG_2615 2.JPG +0 -0
- package/images/IMG_2615.JPG +0 -0
- package/package.json +113 -0
- package/postcss.config.js +5 -0
- package/src/components/Indicator/Indicator.vue +82 -0
- package/src/components/Indicator/index.js +86 -0
- package/src/components/Text/Number.vue +167 -0
- package/src/components/Text/index.js +7 -0
- package/src/components/Text/textBar.vue +122 -0
- package/src/components/action-sheet/actionSheet.vue +93 -0
- package/src/components/action-sheet/index.js +5 -0
- package/src/components/app.vue +61 -0
- package/src/components/badge/badge.vue +80 -0
- package/src/components/badge/index.js +5 -0
- package/src/components/button/button.vue +111 -0
- package/src/components/button/index.js +5 -0
- package/src/components/card/card.vue +49 -0
- package/src/components/card/index.js +5 -0
- package/src/components/cell/cell.vue +93 -0
- package/src/components/cell/index.js +5 -0
- package/src/components/cell-swipe/cell-swipe.vue +169 -0
- package/src/components/cell-swipe/index.js +5 -0
- package/src/components/checkBox/checkbox-group.vue +74 -0
- package/src/components/checkBox/checkbox.vue +117 -0
- package/src/components/checkBox/index.js +8 -0
- package/src/components/header/header.vue +130 -0
- package/src/components/header/index.js +5 -0
- package/src/components/loadMore/index.js +5 -0
- package/src/components/loadMore/loadmore.vue +258 -0
- package/src/components/message/confirm.js +60 -0
- package/src/components/message/index.js +111 -0
- package/src/components/message/message.vue +137 -0
- package/src/components/message/messageGroup.vue +82 -0
- package/src/components/modal/confirm.js +122 -0
- package/src/components/modal/index.js +52 -0
- package/src/components/modal/modal.vue +138 -0
- package/src/components/picker/area-picker/area-picker.vue +230 -0
- package/src/components/picker/area-picker/props.js +17 -0
- package/src/components/picker/date-picker/date-picker.vue +191 -0
- package/src/components/picker/date-picker/props.js +24 -0
- package/src/components/picker/index.js +5 -0
- package/src/components/picker/normal-picker/normal-picker.vue +120 -0
- package/src/components/picker/normal-picker/props.js +20 -0
- package/src/components/picker/picker-slot.vue +217 -0
- package/src/components/picker/picker.vue +111 -0
- package/src/components/popup/index.js +5 -0
- package/src/components/popup/popup.vue +91 -0
- package/src/components/progress/index.js +5 -0
- package/src/components/progress/progress.vue +86 -0
- package/src/components/prompt/confirm.js +91 -0
- package/src/components/prompt/index.js +53 -0
- package/src/components/prompt/prompt.vue +125 -0
- package/src/components/radioBox/index.js +8 -0
- package/src/components/radioBox/radiobox-group.vue +66 -0
- package/src/components/radioBox/radiobox.vue +88 -0
- package/src/components/rater/index.js +5 -0
- package/src/components/rater/rater.vue +118 -0
- package/src/components/slideBar/index.js +6 -0
- package/src/components/slideBar/slideBar.vue +207 -0
- package/src/components/spinner/behavior/blade.vue +42 -0
- package/src/components/spinner/behavior/double-bounce.vue +38 -0
- package/src/components/spinner/behavior/fading-circle.vue +55 -0
- package/src/components/spinner/behavior/snake.vue +41 -0
- package/src/components/spinner/behavior/triple-bounce.vue +52 -0
- package/src/components/spinner/index.js +5 -0
- package/src/components/spinner/props.js +28 -0
- package/src/components/spinner/spinner.vue +78 -0
- package/src/components/swipe/index.js +5 -0
- package/src/components/swipe/swipe.vue +281 -0
- package/src/components/switchbar/index.js +5 -0
- package/src/components/switchbar/switchbar.vue +79 -0
- package/src/components/tab/index.js +6 -0
- package/src/components/tab/tab.vue +89 -0
- package/src/components/toTop/index.js +5 -0
- package/src/components/toTop/topTop.vue +78 -0
- package/src/components/upload/index.js +5 -0
- package/src/components/upload/upload.vue +166 -0
- package/src/config/config.js +16 -0
- package/src/directives/clickoutside.js +42 -0
- package/src/directives/tranferDom.js +66 -0
- package/src/index.js +149 -0
- package/src/lib/MegaPixImage.js +163 -0
- package/src/lib/MegaPixImageOld.js +153 -0
- package/src/lib/exif-js.js +235 -0
- package/src/lib/exif.js +789 -0
- package/src/main.js +31 -0
- package/src/mixin/emitter.js +72 -0
- package/src/mixin/input.js +41 -0
- package/src/router.js +36 -0
- package/src/styles/base/font.less +99 -0
- package/src/styles/base/reset.less +135 -0
- package/src/styles/base/variable.less +108 -0
- package/src/styles/components/actionSheet.less +43 -0
- package/src/styles/components/badge.less +81 -0
- package/src/styles/components/button.less +124 -0
- package/src/styles/components/card.less +31 -0
- package/src/styles/components/cell-swipe.less +20 -0
- package/src/styles/components/cell.less +75 -0
- package/src/styles/components/checkBox.less +113 -0
- package/src/styles/components/editor.less +3 -0
- package/src/styles/components/header.less +72 -0
- package/src/styles/components/indicator.less +39 -0
- package/src/styles/components/loadmore.less +48 -0
- package/src/styles/components/message.less +57 -0
- package/src/styles/components/modal.less +84 -0
- package/src/styles/components/number.less +60 -0
- package/src/styles/components/picker.less +152 -0
- package/src/styles/components/popup.less +46 -0
- package/src/styles/components/progress.less +52 -0
- package/src/styles/components/prompt.less +37 -0
- package/src/styles/components/radioBox.less +138 -0
- package/src/styles/components/slide-Bar.less +149 -0
- package/src/styles/components/spinner.less +329 -0
- package/src/styles/components/swipe.less +125 -0
- package/src/styles/components/switchBar.less +88 -0
- package/src/styles/components/tab.less +71 -0
- package/src/styles/components/text.less +82 -0
- package/src/styles/components/toTop.less +28 -0
- package/src/styles/components/upload.less +23 -0
- package/src/styles/index.less +38 -0
- package/src/styles/utils/1px.less +206 -0
- package/src/styles/utils/animation.less +165 -0
- package/src/styles/utils/nowrap.less +19 -0
- package/src/template/index.ejs +40 -0
- package/src/utils/util.js +202 -0
- package/src/vconsole-resources.min.js +6 -0
- package/src/vconsole-sources.min.js +6 -0
- package/src/vconsole.min.js +7 -0
- package/src/views/ActionSheet.vue +46 -0
- package/src/views/Badge.vue +51 -0
- package/src/views/Button.vue +69 -0
- package/src/views/Card.vue +88 -0
- package/src/views/Cell.vue +30 -0
- package/src/views/CellSwipe.vue +68 -0
- package/src/views/CheckBox.vue +77 -0
- package/src/views/Header.vue +70 -0
- package/src/views/Indicator.vue +82 -0
- package/src/views/LoadMore.vue +73 -0
- package/src/views/Message.vue +61 -0
- package/src/views/Modal.vue +69 -0
- package/src/views/Picker.vue +140 -0
- package/src/views/Popup.vue +97 -0
- package/src/views/Progress.vue +47 -0
- package/src/views/Prompt.vue +43 -0
- package/src/views/RadioBox.vue +68 -0
- package/src/views/Rater.vue +49 -0
- package/src/views/SlideBar.vue +55 -0
- package/src/views/Spinner.vue +15 -0
- package/src/views/Swipe.vue +59 -0
- package/src/views/SwitchBar.vue +47 -0
- package/src/views/Tab.vue +53 -0
- package/src/views/Text.vue +93 -0
- package/src/views/ToTop.vue +17 -0
- package/src/views/Upload.vue +61 -0
- package/src/views/guide.vue +164 -0
- package/src/views/index.vue +554 -0
- package/webpack.base.config.js +65 -0
- package/webpack.dev.config.js +42 -0
- package/webpack.dist.dev.config.js +75 -0
- package/webpack.dist.prod.config.js +89 -0
- package/webpack.prod.config.js +51 -0
|
@@ -0,0 +1,202 @@
|
|
|
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
|
|
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 = new Array(), 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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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>'}])});
|
|
@@ -0,0 +1,6 @@
|
|
|
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")}}()}])});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* vconsole v2.3.0 (https://github.com/WechatFE/vConsole)
|
|
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=t():e.vConsole=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1),i=n(r),l=o(14),a=n(l),c=o(15),s=n(c),d=o(22),u=n(d),v=o(24),f=n(v),p=new i["default"];p.addPlugin(s["default"]),p.addPlugin(u["default"]),p.addPlugin(f["default"]),p.VConsolePlugin=a["default"],t["default"]=p,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(2),c=r(a),s=o(3),d=n(s),u=o(4),v=r(u);o(6);var f=o(10),p=r(f),b=o(11),g=r(b),h=o(12),m=r(h),y=o(13),_=r(y),x=function(){function e(){i(this,e);var t=this;this.version=c["default"].version,this.html=p["default"],this.$dom=null,this.activedTab="",this.tabList=[],this.pluginList={},this.console={},this.logList=[],this.isReady=!1,this.switchPos={x:10,y:10,startX:0,startY:0,endX:0,endY:0},this.bodyOverflowCSS="",this.tool=d,this.$=v["default"];var o=function(){t._render(),t._mockTap(),t._bindEvent(),t._autoRun()};"complete"==document.readyState?o():v["default"].bind(window,"load",o)}return l(e,[{key:"_render",value:function(){var e="#__vconsole";if(!v["default"].one(e)){var t=document.createElement("div");t.innerHTML=this.html,document.body.appendChild(t.children[0])}this.$dom=v["default"].one(e);var o=d.getStorage("switch_x"),n=d.getStorage("switch_y");o&&n&&(this.switchPos.x=o,this.switchPos.y=n,v["default"].one(".vc-switch").style.right=o+"px",v["default"].one(".vc-switch").style.bottom=n+"px"),v["default"].one(".vc-mask",this.$dom).style.display="none"}},{key:"_mockTap",value:function(){var e=700,t=10,o=void 0,n=void 0,r=void 0,i=!1,l=void 0,a=null;this.$dom.addEventListener("touchstart",function(e){if(void 0===o){var t=e.targetTouches[0];n=t.pageX,r=t.pageY,o=e.timeStamp,a=e.target.nodeType===Node.TEXT_NODE?e.target.parentNode:e.target}},!1),this.$dom.addEventListener("touchmove",function(e){var o=e.changedTouches[0];(Math.abs(o.pageX-n)>t||Math.abs(o.pageY-r)>t)&&(i=!0)}),this.$dom.addEventListener("touchend",function(t){i===!1&&t.timeStamp-o<e&&null!=a&&(void 0===l&&(l=document.createEvent("Event"),l.initEvent("tap",!0,!0)),a.dispatchEvent(l)),o=void 0,i=!1,a=null},!1)}},{key:"_bindEvent",value:function(){var e=this,t=v["default"].one(".vc-switch",e.$dom);v["default"].bind(t,"touchstart",function(t){e.switchPos.startX=t.touches[0].pageX,e.switchPos.startY=t.touches[0].pageY}),v["default"].bind(t,"touchend",function(t){0==e.switchPos.endX&&0==e.switchPos.endY||(e.switchPos.x=e.switchPos.endX,e.switchPos.y=e.switchPos.endY,e.switchPos.startX=0,e.switchPos.startY=0,e.switchPos.endX=0,e.switchPos.endY=0,d.setStorage("switch_x",e.switchPos.x),d.setStorage("switch_y",e.switchPos.y))}),v["default"].bind(t,"touchmove",function(o){if(o.touches.length>0){var n=o.touches[0].pageX-e.switchPos.startX,r=o.touches[0].pageY-e.switchPos.startY,i=e.switchPos.x-n,l=e.switchPos.y-r;0>i&&(i=0),0>l&&(l=0),i+t.offsetWidth>document.body.offsetWidth&&(i=document.body.offsetWidth-t.offsetWidth),l+t.offsetHeight>document.body.offsetHeight&&(l=document.body.offsetHeight-t.offsetHeight),t.style.right=i+"px",t.style.bottom=l+"px",e.switchPos.endX=i,e.switchPos.endY=l,o.preventDefault()}}),v["default"].bind(v["default"].one(".vc-switch",e.$dom),"tap",function(){e.show()}),v["default"].bind(v["default"].one(".vc-hide",e.$dom),"tap",function(){e.hide()}),v["default"].bind(v["default"].one(".vc-mask",e.$dom),"tap",function(t){return t.target!=v["default"].one(".vc-mask")?!1:void e.hide()}),v["default"].delegate(v["default"].one(".vc-tabbar",e.$dom),"tap",".vc-tab",function(t){var o=this.dataset.tab;o!=e.activedTab&&e.showTab(o)})}},{key:"_autoRun",value:function(){this.isReady=!0;for(var e in this.pluginList)this._initPlugin(this.pluginList[e]);this.showTab(this.tabList[0])}},{key:"_initPlugin",value:function(e){var t=this;e.trigger("init"),e.trigger("renderTab",function(o){t.tabList.push(e.id);var n=v["default"].render(g["default"],{id:e.id,name:e.name});v["default"].one(".vc-tabbar",t.$dom).appendChild(n);var r=v["default"].render(m["default"],{id:e.id});o&&(d.isString(o)?r.innerHTML+=o:d.isFunction(o.appendTo)?o.appendTo(r):d.isElement(o)&&r.appendChild(o)),v["default"].one(".vc-content",t.$dom).appendChild(r)}),e.trigger("addTool",function(t){if(t)for(var o=v["default"].one(".vc-tool-last"),n=0;n<t.length;n++){var r=t[n],i=v["default"].render(_["default"],{name:r.name||"Undefined",pluginID:e.id});1==r.global&&v["default"].addClass(i,"vc-global-tool"),d.isFunction(r.onClick)&&v["default"].bind(i,"tap",r.onClick),o.parentNode.insertBefore(i,o)}}),e.trigger("ready")}},{key:"_triggerPluginsEvent",value:function(e){for(var t in this.pluginList)this.pluginList[t].trigger(e)}},{key:"_triggerPluginEvent",value:function(e,t){var o=this.pluginList[e];o&&o.trigger(t)}},{key:"addPlugin",value:function(e){return void 0!==this.pluginList[e.id]?(console.warn("Plugin "+e.id+" has already been added."),!1):(this.pluginList[e.id]=e,this.isReady&&this._initPlugin(e),!0)}},{key:"show",value:function(){v["default"].addClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("showConsole");var e=v["default"].one(".vc-mask",this.$dom);e.style.display="block"}},{key:"hide",value:function(){v["default"].removeClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("hideConsole");var e=v["default"].one(".vc-mask",this.$dom);e.addEventListener("transitionend",function(t){e.style.display="none"},!1)}},{key:"showTab",value:function(e){var t=v["default"].one("#__vc_log_"+e);v["default"].removeClass(v["default"].all(".vc-tab",this.$dom),"vc-actived"),v["default"].addClass(v["default"].one("#__vc_tab_"+e),"vc-actived"),v["default"].removeClass(v["default"].all(".vc-logbox",this.$dom),"vc-actived"),v["default"].addClass(t,"vc-actived"),v["default"].one(".vc-content",this.$dom).scrollTop=v["default"].one(".vc-content",this.$dom).scrollHeight,v["default"].removeClass(v["default"].all(".vc-tool",this.$dom),"vc-actived"),v["default"].addClass(v["default"].all(".vc-tool-"+e,this.$dom),"vc-actived"),this._triggerPluginEvent(this.activedTab,"hide"),this.activedTab=e,this._triggerPluginEvent(this.activedTab,"show")}}]),e}();t["default"]=x,e.exports=t["default"]},function(e,t){e.exports={name:"vconsole",version:"2.3.0",description:"A lightweight, extendable front-end developer tool for mobile web page.",homepage:"https://github.com/WechatFE/vConsole",main:"dist/vconsole.min.js",scripts:{test:"mocha",dist:"webpack && npm test"},keywords:["console","debug","mobile"],repository:{type:"git",url:"git+https://github.com/WechatFE/vConsole.git"},dependencies:{},devDependencies:{"babel-core":"^6.7.7","babel-loader":"^6.2.4","babel-plugin-add-module-exports":"^0.1.4","babel-preset-es2015":"^6.6.0","babel-preset-stage-3":"^6.5.0",chai:"^3.5.0","css-loader":"^0.23.1","extract-text-webpack-plugin":"^1.0.1","html-loader":"^0.4.3",jsdom:"^9.2.1","json-loader":"^0.5.4",less:"^2.5.3","less-loader":"^2.2.3",mocha:"^2.5.3","style-loader":"^0.13.1",webpack:"~1.12.11"},author:"WechatFE Team",license:"MIT"}},function(e,t){"use strict";function o(e){var t=e>0?new Date(e):new Date,o=t.getDate()<10?"0"+t.getDate():t.getDate(),n=t.getMonth()<9?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getFullYear(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),l=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),a=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=t.getMilliseconds()<10?"0"+t.getMilliseconds():t.getMilliseconds();return 100>c&&(c="0"+c),{time:+t,year:r,month:n,day:o,hour:i,minute:l,second:a,millisecond:c}}function n(e){return"[object Number]"==Object.prototype.toString.call(e)}function r(e){return"[object String]"==Object.prototype.toString.call(e)}function i(e){return"[object Array]"==Object.prototype.toString.call(e)}function l(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function a(e){return"[object Undefined]"==Object.prototype.toString.call(e)}function c(e){return"[object Null]"==Object.prototype.toString.call(e)}function s(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function d(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&(n(e)||r(e)||l(e)||i(e)||c(e)||u(e)||a(e)||s(e)))}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function v(e){return"object"===("undefined"==typeof HTMLElement?"undefined":y(HTMLElement))?e instanceof HTMLElement:e&&"object"===("undefined"==typeof e?"undefined":y(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function f(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML}function p(e){function t(e){for(var t=p.length-1;t>=0;t--)if(p[t].child==e)return!0;return!1}function o(e){if(d(e)){if(t(e))return void(v+="CircularObject");p.push({parent:parent,child:e});var b=Object.keys(e);v+="{",f++;for(var g=0;g<b.length;g++){var h=b[g];e.hasOwnProperty(h)&&(v+=h+": ",o(e[h],e),g<b.length-1&&(v+=", "))}f--,v+="}",p.pop()}else if(i(e)){if(t(e))return void(v+="CircularArray");p.push({parent:parent,child:e}),v+="[",f++;for(var m=0;m<e.length;m++)o(e[m],e),m<e.length-1&&(v+=", ");f--,v+="]",p.pop()}else v+=r(e)?'"'+e+'"':n(e)?e:l(e)?e:c(e)?"null":a(e)?"undefined":u(e)?"function()":s(e)?"symbol":"unknown"}var v="",f=0,p=[];return o(e,null),v}function b(e){if(!d(e)&&!i(e))return[];var t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=[];for(var n in e)t.indexOf(n)<0&&o.push(n);return o=o.sort()}function g(e){return Object.prototype.toString.call(e).replace("[object ","").replace("]","")}function h(e,t){window.localStorage&&(e="vConsole_"+e,localStorage.setItem(e,t))}function m(e){return window.localStorage?(e="vConsole_"+e,localStorage.getItem(e)):void 0}Object.defineProperty(t,"__esModule",{value:!0});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.getDate=o,t.isNumber=n,t.isString=r,t.isArray=i,t.isBoolean=l,t.isUndefined=a,t.isNull=c,t.isSymbol=s,t.isObject=d,t.isFunction=u,t.isElement=v,t.htmlEncode=f,t.JSONStringify=p,t.getObjAllKeys=b,t.getObjName=g,t.setStorage=h,t.getStorage=m},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(3),i=o(5),l=n(i),a={};a.one=function(e,t){return t?t.querySelector(e):document.querySelector(e)},a.all=function(e,t){var o=void 0,n=[];return o=t?t.querySelectorAll(e):document.querySelectorAll(e),o&&o.length>0&&(n=Array.prototype.slice.call(o)),n},a.addClass=function(e,t){if(e){(0,r.isArray)(e)||(e=[e]);for(var o=0;o<e.length;o++)e[o].className+=" "+t}},a.removeClass=function(e,t){if(e){(0,r.isArray)(e)||(e=[e]);for(var o=0;o<e.length;o++){for(var n=e[o].className.split(" "),i=0;i<n.length;i++)n[i]==t&&(n[i]="");e[o].className=n.join(" ").trim()}}},a.hasClass=function(e,t){if(!e)return!1;for(var o=e.className.split(" "),n=0;n<o.length;n++)if(o[n]==t)return!0;return!1},a.bind=function(e,t,o,n){if(e){void 0===n&&(n=!1),(0,r.isArray)(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].addEventListener(t,o,n)}},a.delegate=function(e,t,o,n){e&&e.addEventListener(t,function(t){var r=a.all(o,e);if(r)e:for(var i=0;i<r.length;i++)for(var l=t.target;l;){if(l==r[i]){n.call(l,t);break e}if(l=l.parentNode,l==e)break}},!1)},a.render=l["default"],t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function o(e,t,o){var n=/\{\{([^\}]+)\}\}/g,r="var arr = [];\n",i=0,l=[],a=function(e,t){""!==e&&(r+=t?e.match(/^ ?else/g)?"} "+e+" {\n":e.match(/\/(if|for|switch)/g)?"}\n":e.match(/^ ?if|for|switch/g)?e+" {\n":e.match(/^ ?(break|continue) ?$/g)?e+";\n":e.match(/^ ?(case|default)/g)?e+":\n":"arr.push("+e+");\n":'arr.push("'+e.replace(/"/g,'\\"')+'");\n')};for(e=e.replace(/(\{\{ ?switch(.+?)\}\})[\r\n\t ]+\{\{/g,"$1{{"),e=e.replace(/^\n/,"").replace(/\n/g,"\\\n");l=n.exec(e);)a(e.slice(i,l.index),!1),a(l[1],!0),i=l.index+l[0].length;a(e.substr(i,e.length-i),!1),r+='return arr.join("");',r="with (this) {\n"+r+"\n}";var c=new Function(r).apply(t);if(!o){var s=document.createElement("div");s.innerHTML=c,c=s.children[0]}return c}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){var n=o(7);"string"==typeof n&&(n=[[e.id,n,""]]);o(9)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,o){t=e.exports=o(8)(),t.push([e.id,'#__vconsole{font-size:13px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}#__vconsole .vc-max-height{max-height:250px}#__vconsole .vc-max-height-line{max-height:44px}#__vconsole .vc-min-height{min-height:40px}#__vconsole .vc-switch{display:block;position:fixed;right:10px;bottom:10px;color:#fff;background-color:#04be02;line-height:1;font-size:14px;padding:8px 16px;z-index:10000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.4)}#__vconsole .vc-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:transparent;z-index:10001;transition:background .3s;-webkit-tap-highlight-color:transparent;overflow-y:scroll}#__vconsole .vc-panel{position:fixed;min-height:85%;left:0;right:0;bottom:0;z-index:10002;background-color:#efeff4;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-transform:translateY(100%);transform:translateY(100%)}#__vconsole .vc-tabbar{border-bottom:1px solid #d9d9d9;overflow-x:auto;height:39px;width:auto;white-space:nowrap}#__vconsole .vc-tabbar .vc-tab{display:inline-block;line-height:39px;padding:0 15px;border-right:1px solid #d9d9d9;text-decoration:none;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-tabbar .vc-tab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-tabbar .vc-tab.vc-actived{background-color:#fff}#__vconsole .vc-content{background-color:#fff;overflow-x:hidden;overflow-y:auto;position:absolute;top:40px;left:0;right:0;bottom:40px;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox{display:none;position:relative;min-height:100%}#__vconsole .vc-logbox i{font-style:normal}#__vconsole .vc-logbox .vc-log{-webkit-tap-highlight-color:transparent}#__vconsole .vc-logbox .vc-log:empty:before{content:"Empty";color:#999;position:absolute;top:45%;left:0;right:0;bottom:0;font-size:15px;text-align:center}#__vconsole .vc-logbox .vc-item{margin:0;padding:6px 8px;overflow:hidden;line-height:1.3;border-bottom:1px solid #eee;word-break:break-word}#__vconsole .vc-logbox .vc-item-info{color:#6a5acd}#__vconsole .vc-logbox .vc-item-debug{color:#daa520}#__vconsole .vc-logbox .vc-item-warn{color:orange;border-color:#ffb930;background-color:#fffacd}#__vconsole .vc-logbox .vc-item-error{color:#dc143c;border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-item .vc-item-content{margin-right:60px;display:block}#__vconsole .vc-logbox .vc-item .vc-item-meta{color:#888;float:right;width:60px;text-align:right}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-content{margin-right:0}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-meta{display:none}#__vconsole .vc-logbox .vc-item .vc-item-code{display:block;white-space:pre-wrap;overflow:auto;position:relative}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output{padding-left:12px}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input:before,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\203A";position:absolute;top:-3px;left:0;font-size:16px;color:#6a5acd}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\2039"}#__vconsole .vc-logbox .vc-item .vc-fold{display:block;overflow:auto;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer{display:block;font-style:italic;padding-left:10px;position:relative}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:before{content:"";position:absolute;top:4px;left:2px;width:0;height:0;border:4px solid transparent;border-left-color:#000}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer.vc-toggle:before{top:6px;left:0;border-top-color:#000;border-left-color:transparent}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner{display:none;margin-left:10px}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner.vc-toggle{display:block}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner .vc-code-key{margin-left:10px}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer .vc-code-key{margin-left:0}#__vconsole .vc-logbox .vc-code-key{color:#905}#__vconsole .vc-logbox .vc-code-private-key{color:#d391b5}#__vconsole .vc-logbox .vc-code-function{color:#905;font-style:italic}#__vconsole .vc-logbox .vc-code-boolean,#__vconsole .vc-logbox .vc-code-number{color:#0086b3}#__vconsole .vc-logbox .vc-code-string{color:#183691}#__vconsole .vc-logbox .vc-code-null,#__vconsole .vc-logbox .vc-code-undefined{color:#666}#__vconsole .vc-logbox .vc-cmd{position:absolute;height:40px;left:0;right:0;bottom:0;border-top:1px solid #d9d9d9}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input-wrap{display:block;height:28px;margin-right:40px;padding:6px 8px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input{width:100%;border:none;resize:none;outline:none;padding:0;font-size:12px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input::-webkit-input-placeholder{line-height:28px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn{position:absolute;top:0;right:0;bottom:0;width:40px;border:none;background-color:#efeff4;outline:none;-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-logbox .vc-group .vc-group-preview{-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-group .vc-group-preview:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-group .vc-group-detail{display:none;padding:0 0 10px 20px;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-detail{display:block}#__vconsole .vc-logbox .vc-table .vc-table-row{display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-row.vc-left-border{border-left:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-col{flex:1;padding:3px 4px;border-left:1px solid #eee;overflow:auto;white-space:pre-wrap;word-break:break-word;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-table .vc-table-col:first-child{border:none}#__vconsole .vc-logbox .vc-table .vc-small .vc-table-col{padding:0 4px;font-size:12px}#__vconsole .vc-logbox .vc-table .vc-table-col-2{flex:2}#__vconsole .vc-logbox .vc-table .vc-table-col-3{flex:3}#__vconsole .vc-logbox .vc-table .vc-table-col-4{flex:4}#__vconsole .vc-logbox .vc-table .vc-table-col-5{flex:5}#__vconsole .vc-logbox .vc-table .vc-table-col-6{flex:6}#__vconsole .vc-logbox .vc-table .vc-table-row-error{border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-table .vc-table-row-error .vc-table-col{color:#dc143c;border-color:#f4a0ab}#__vconsole .vc-logbox .vc-table .vc-table-col-title{font-weight:700}#__vconsole .vc-logbox.vc-actived{display:block}#__vconsole .vc-toolbar{border-top:1px solid #d9d9d9;line-height:39px;position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:row}#__vconsole .vc-toolbar .vc-tool{display:none;text-decoration:none;color:#000;width:50%;flex:1;text-align:center;position:relative;-webkit-touch-callout:none}#__vconsole .vc-toolbar .vc-tool.vc-actived,#__vconsole .vc-toolbar .vc-tool.vc-global-tool{display:block}#__vconsole .vc-toolbar .vc-tool:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-toolbar .vc-tool:after{content:" ";position:absolute;top:7px;bottom:7px;right:0;border-left:1px solid #d9d9d9}#__vconsole .vc-toolbar .vc-tool-last:after{border:none}#__vconsole.vc-toggle .vc-switch{display:none}#__vconsole.vc-toggle .vc-mask{background:rgba(0,0,0,.6);display:block}#__vconsole.vc-toggle .vc-panel{-webkit-transform:translate(0);transform:translate(0)}',""])},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 n={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(n[i]=!0)}for(r=0;r<t.length;r++){var l=t[r];"number"==typeof l[0]&&n[l[0]]||(o&&!l[2]?l[2]=o:o&&(l[2]="("+l[2]+") and ("+o+")"),e.push(l))}},e}},function(e,t,o){function n(e,t){for(var o=0;o<e.length;o++){var n=e[o],r=f[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i],t))}else{for(var l=[],i=0;i<n.parts.length;i++)l.push(s(n.parts[i],t));f[n.id]={id:n.id,refs:1,parts:l}}}}function r(e){for(var t=[],o={},n=0;n<e.length;n++){var r=e[n],i=r[0],l=r[1],a=r[2],c=r[3],s={css:l,media:a,sourceMap:c};o[i]?o[i].parts.push(s):t.push(o[i]={id:i,parts:[s]})}return t}function i(e,t){var o=g(),n=y[y.length-1];if("top"===e.insertAt)n?n.nextSibling?o.insertBefore(t,n.nextSibling):o.appendChild(t):o.insertBefore(t,o.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");o.appendChild(t)}}function l(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function s(e,t){var o,n,r;if(t.singleton){var i=m++;o=h||(h=a(t)),n=d.bind(null,o,i,!1),r=d.bind(null,o,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=c(t),n=v.bind(null,o),r=function(){l(o),o.href&&URL.revokeObjectURL(o.href)}):(o=a(t),n=u.bind(null,o),r=function(){l(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}function d(e,t,o,n){var r=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=_(t,r);else{var i=document.createTextNode(r),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function u(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function v(e,t){var o=t.css,n=t.sourceMap;n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var r=new Blob([o],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var f={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},b=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=p(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,m=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=b()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=r(e);return n(o,t),function(e){for(var i=[],l=0;l<o.length;l++){var a=o[l],c=f[a.id];c.refs--,i.push(c)}if(e){var s=r(e);n(s,t)}for(var l=0;l<i.length;l++){var c=i[l];if(0===c.refs){for(var d=0;d<c.parts.length;d++)c.parts[d]();delete f[c.id]}}}};var _=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports='<div id=__vconsole class=""> <div class=vc-switch>vConsole</div> <div class=vc-mask> </div> <div class=vc-panel> <div class=vc-tabbar> </div> <div class=vc-content> </div> <div class=vc-toolbar> <a class="vc-tool vc-global-tool vc-tool-last vc-hide">Hide</a> </div> </div> </div>'},function(e,t){e.exports="<a class=vc-tab data-tab={{id}} id=__vc_tab_{{id}}>{{name}}</a>"},function(e,t){e.exports="<div class=vc-logbox id=__vc_log_{{id}}> </div>"},function(e,t){e.exports='<a class="vc-tool vc-tool-{{pluginID}}">{{name}}</a>'},function(e,t){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?"newPlugin":arguments[1];o(this,e),this.id=t,this.name=n,this.eventList={}}return n(e,[{key:"on",value:function(e,t){return this.eventList[e]=t,this}},{key:"trigger",value:function(e,t){if("function"==typeof this.eventList[e])this.eventList[e].call(this,t);else{var o="on"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[o]&&this[o].call(this,t)}return this}},{key:"id",get:function(){return this._id},set:function(e){if(!e)throw"Plugin ID cannot be empty";this._id=e.toLowerCase()}},{key:"name",get:function(){return this._name},set:function(e){if(!e)throw"Plugin name cannot be empty";this._name=e}}]),e}();t["default"]=r,e.exports=t["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),_get=function e(t,o,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,o);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,o,n)}if("value"in r)return r.value;var l=r.get;if(void 0!==l)return l.call(n)},_query=__webpack_require__(4),_query2=_interopRequireDefault(_query),_tool=__webpack_require__(3),tool=_interopRequireWildcard(_tool),_log=__webpack_require__(16),_log2=_interopRequireDefault(_log),_tabbox_default=__webpack_require__(20),_tabbox_default2=_interopRequireDefault(_tabbox_default),_item_code=__webpack_require__(21),_item_code2=_interopRequireDefault(_item_code),VConsoleDefaultTab=function(_VConsoleLogTab){function VConsoleDefaultTab(){var e;_classCallCheck(this,VConsoleDefaultTab);for(var t=arguments.length,o=Array(t),n=0;t>n;n++)o[n]=arguments[n];var r=_possibleConstructorReturn(this,(e=Object.getPrototypeOf(VConsoleDefaultTab)).call.apply(e,[this].concat(o)));return r.tplTabbox=_tabbox_default2["default"],r.windowOnError=null,r}return _inherits(VConsoleDefaultTab,_VConsoleLogTab),_createClass(VConsoleDefaultTab,[{key:"onReady",value:function(){var e=this;_get(Object.getPrototypeOf(VConsoleDefaultTab.prototype),"onReady",this).call(this),_query2["default"].bind(_query2["default"].one(".vc-cmd",this.$tabbox),"submit",function(t){t.preventDefault();var o=_query2["default"].one(".vc-cmd-input",t.target),n=o.value;o.value="",""!==n&&e.evalCommand(n)})}},{key:"mockConsole",value:function(){_get(Object.getPrototypeOf(VConsoleDefaultTab.prototype),"mockConsole",this).call(this);var e=this;tool.isFunction(window.onerror)&&(this.windowOnError=window.onerror),window.onerror=function(t,o,n,r,i){var l=t;o&&(l+="\n"+o.replace(location.origin,"")),(n||r)&&(l+=":"+n+":"+r),e.printLog({logType:"error",logs:[l],noOrigin:!0}),tool.isFunction(e.windowOnError)&&e.windowOnError.apply(window,t,o,n,r,i)}}},{key:"evalCommand",value:function evalCommand(cmd){this.printLog({logType:"log",content:_query2["default"].render(_item_code2["default"],{content:cmd,type:"input"}),noMeta:!0,style:""});var result=eval(cmd),$content=void 0;tool.isArray(result)||tool.isObject(result)?$content=this.getFoldedLine(result):(tool.isNull(result)?result="null":tool.isUndefined(result)?result="undefined":tool.isFunction(result)?result="function()":tool.isString(result)&&(result='"'+result+'"'),$content=_query2["default"].render(_item_code2["default"],{content:result,type:"output"})),this.printLog({logType:"log",content:$content,noMeta:!0,style:""})}}]),VConsoleDefaultTab}(_log2["default"]),tab=new VConsoleDefaultTab("default","Log");exports["default"]=tab,module.exports=exports["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 a(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)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),d=o(3),u=r(d),v=o(4),f=n(v),p=o(14),b=n(p),g=o(17),h=n(g),m=o(18),y=n(m),_=o(19),x=n(_),w=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),r=0;o>r;r++)n[r]=arguments[r];var a=l(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.tplTabbox="",a.allowUnformattedLog=!0,a.isReady=!1,a.$tabbox=null,a.console={},a.logList=[],a.mockConsole(),a}return a(t,e),s(t,[{key:"onInit",value:function(){this.isReady=!0,this.$tabbox=f["default"].render(this.tplTabbox,{});
|
|
7
|
+
for(var e=0;e<this.logList.length;e++)this.printLog(this.logList[e]);this.logList=[]}},{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Clear",global:!1,onClick:function(e){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){}},{key:"mockConsole",value:function(){var e=this;window.console?(this.console.log=window.console.log,this.console.info=window.console.info,this.console.warn=window.console.warn,this.console.debug=window.console.debug,this.console.error=window.console.error):window.console={},window.console.log=function(){e.printLog({logType:"log",logs:arguments})},window.console.info=function(){e.printLog({logType:"info",logs:arguments})},window.console.warn=function(){e.printLog({logType:"warn",logs:arguments})},window.console.debug=function(){e.printLog({logType:"debug",logs:arguments})},window.console.error=function(){e.printLog({logType:"error",logs:arguments})}}},{key:"clearLog",value:function(){f["default"].one(".vc-log",this.$tabbox).innerHTML=""}},{key:"printOriginLog",value:function(e){"function"==typeof this.console[e.logType]&&this.console[e.logType].apply(window.console,e.logs)}},{key:"printLog",value:function(e){var t=e.logs||[];if(t.length||e.content){t=[].slice.call(t||[]);var o=!0,n=/^\[(\w+)\] ?/i,r="";if(u.isString(t[0])){var i=t[0].match(n);null!==i&&i.length>0&&(r=i[1].toLowerCase())}if(r?o=r==this.id:0==this.allowUnformattedLog&&(o=!1),!o)return void(e.noOrigin||this.printOriginLog(e));if(e.date||(e.date=+new Date),!this.isReady)return void this.logList.push(e);if(u.isString(t[0])&&(t[0]=t[0].replace(n,""),""===t[0]&&t.shift()),!e.meta){var l=u.getDate(e.date);e.meta=l.hour+":"+l.minute+":"+l.second}for(var a=f["default"].render(h["default"],{logType:e.logType,noMeta:!!e.noMeta,meta:e.meta,style:e.style||""}),s=f["default"].one(".vc-item-content",a),d=0;d<t.length;d++){var v=document.createElement("SPAN");try{if(""===t[d])continue;u.isFunction(t[d])?v.innerHTML=" "+t[d].toString():u.isObject(t[d])||u.isArray(t[d])?v=this.getFoldedLine(t[d]):v.innerHTML=" "+u.htmlEncode(t[d]).replace(/\n/g,"<br/>")}catch(p){v.innerHTML=" ["+c(t[d])+"]"}v&&s.appendChild(v)}u.isObject(e.content)&&s.appendChild(e.content),f["default"].one(".vc-log",this.$tabbox).appendChild(a),f["default"].one(".vc-content").scrollTop=f["default"].one(".vc-content").scrollHeight,e.noOrigin||this.printOriginLog(e)}}},{key:"getFoldedLine",value:function(e,t){var o=this;if(!t){var n=u.JSONStringify(e),r=n.substr(0,26);t=u.getObjName(e),n.length>26&&(r+="..."),t+=" "+r}var i=f["default"].render(y["default"],{outer:t,lineType:"obj"});return f["default"].bind(f["default"].one(".vc-fold-outer",i),"tap",function(t){t.preventDefault(),t.stopPropagation(),f["default"].hasClass(i,"vc-toggle")?(f["default"].removeClass(i,"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-inner",i),"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-outer",i),"vc-toggle")):(f["default"].addClass(i,"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-inner",i),"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-outer",i),"vc-toggle"));var n=f["default"].one(".vc-fold-inner",i);if(0==n.children.length&&e){for(var r=u.getObjAllKeys(e),l=0;l<r.length;l++){var a=e[r[l]],c="undefined",s="";u.isString(a)?(c="string",a='"'+a+'"'):u.isNumber(a)?c="number":u.isBoolean(a)?c="boolean":u.isNull(a)?(c="null",a="null"):u.isUndefined(a)?(c="undefined",a="undefined"):u.isFunction(a)?(c="function",a="function()"):u.isSymbol(a)&&(c="symbol");var d=void 0;if(u.isArray(a)){var v=u.getObjName(a)+"["+a.length+"]";d=o.getFoldedLine(a,f["default"].render(x["default"],{key:r[l],keyType:s,value:v,valueType:"array"},!0))}else if(u.isObject(a)){var p=u.getObjName(a);d=o.getFoldedLine(a,f["default"].render(x["default"],{key:r[l],keyType:s,value:p,valueType:"object"},!0))}else{e.hasOwnProperty(r[l])||(s="private");var b={lineType:"kv",key:r[l],keyType:s,value:a,valueType:c};d=f["default"].render(y["default"],b)}n.appendChild(d)}if(u.isObject(e)){var g=e.__proto__,h=void 0;h=u.isObject(g)?o.getFoldedLine(g,f["default"].render(x["default"],{key:"__proto__",keyType:"private",value:u.getObjName(g),valueType:"object"},!0)):f["default"].render(x["default"],{key:"__proto__",keyType:"private",value:"null",valueType:"null"}),n.appendChild(h)}}return!1}),i}}]),t}(b["default"]);t["default"]=w,e.exports=t["default"]},function(e,t){e.exports='<div class="vc-item vc-item-{{logType}} {{if (!noMeta)}}vc-item-nometa{{/if}} {{style}}"> <span class=vc-item-meta>{{if (!noMeta)}}{{meta}}{{/if}}</span> <div class=vc-item-content></div> </div>'},function(e,t){e.exports="<div class=vc-fold> {{if (lineType == 'obj')}} <i class=vc-fold-outer>{{outer}}</i> <div class=vc-fold-inner></div> {{else if (lineType == 'value')}} <i class=vc-code-{{valueType}}>{{value}}</i> {{else if (lineType == 'kv')}} <i class=\"vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}\">{{key}}</i>: <i class=vc-code-{{valueType}}>{{value}}</i> {{/if}} </div>"},function(e,t){e.exports='<span> <i class="vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}">{{key}}</i>: <i class=vc-code-{{valueType}}>{{value}}</i> </span>'},function(e,t){e.exports="<div> <div class=vc-log style=padding-bottom:40px></div> <form class=vc-cmd> <button class=vc-cmd-btn type=submit>OK</button> <div class=vc-cmd-input-wrap> <textarea class=vc-cmd-input placeholder=command...></textarea> </div> </form> </div>"},function(e,t){e.exports='<pre class="vc-item-code vc-item-code-{{type}}">{{content}}</pre>'},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 a(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)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=function m(e,t,o){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var r=Object.getPrototypeOf(e);return null===r?void 0:m(r,t,o)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(o)},d=o(3),u=r(d),v=o(16),f=n(v),p=o(23),b=n(p),g=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),r=0;o>r;r++)n[r]=arguments[r];var a=l(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.tplTabbox=b["default"],a.allowUnformattedLog=!1,a}return a(t,e),c(t,[{key:"onInit",value:function(){s(Object.getPrototypeOf(t.prototype),"onInit",this).call(this),this.printSystemInfo()}},{key:"printSystemInfo",value:function(){var e=navigator.userAgent,t="",o=u.getDate();console.info("[system]","Now:",o.year+"-"+o.month+"-"+o.day+" "+o.hour+":"+o.minute+":"+o.second+"."+o.millisecond);var n=e.match(/(ipod).*\s([\d_]+)/i),r=e.match(/(ipad).*\s([\d_]+)/i),i=e.match(/(iphone)\sos\s([\d_]+)/i),l=e.match(/(android)\s([\d\.]+)/i);t="Unknown",l?t="Android "+l[2]:i?t="iPhone, iOS "+i[2].replace(/_/g,"."):r?t="iPad, iOS "+r[2].replace(/_/g,"."):n&&(t="iPod, iOS "+n[2].replace(/_/g,"."));var a=t,c=e.match(/MicroMessenger\/([\d\.]+)/i);t="Unknown",c&&c[1]?(t=c[1],a+=", WeChat "+t,console.info("[system]","System:",a)):console.info("[system]","System:",a),t="Unknown",t="https:"==location.protocol?"HTTPS":"http:"==location.protocol?"HTTP":location.protocol.replace(":",""),a=t;var s=e.toLowerCase().match(/ nettype\/([^ ]+)/g);t="Unknown",s&&s[0]?(s=s[0].split("/"),t=s[1],a+=", "+t,console.info("[system]","Network:",a)):console.info("[system]","Protocol:",a),console.info("[system]","UA:",e),setTimeout(function(){var e=window.performance||window.msPerformance||window.webkitPerformance;if(e&&e.timing){var t=e.timing;t.navigationStart&&t.domainLookupStart&&console.info("[system]","navigation:",t.domainLookupStart-t.navigationStart+"ms"),t.domainLookupEnd&&t.domainLookupStart&&console.info("[system]","dns:",t.domainLookupEnd-t.domainLookupStart+"ms"),t.connectEnd&&t.connectStart&&(t.connectEnd&&t.secureConnectionStart?console.info("[system]","tcp (ssl):",t.connectEnd-t.connectStart+"ms ("+(t.connectEnd-t.secureConnectionStart)+"ms)"):console.info("[system]","tcp:",t.connectEnd-t.connectStart+"ms")),t.responseStart&&t.requestStart&&console.info("[system]","request:",t.responseStart-t.requestStart+"ms"),t.responseEnd&&t.responseStart&&console.info("[system]","response:",t.responseEnd-t.responseStart+"ms"),t.domComplete&&t.domLoading&&(t.domContentLoadedEventStart&&t.domLoading?console.info("[system]","domComplete (domLoaded):",t.domComplete-t.domLoading+"ms ("+(t.domContentLoadedEventStart-t.domLoading)+"ms)"):console.info("[system]","domComplete:",t.domComplete-t.domLoading+"ms")),t.loadEventEnd&&t.loadEventStart&&console.info("[system]","loadEvent:",t.loadEventEnd-t.loadEventStart+"ms"),t.navigationStart&&t.loadEventEnd&&console.info("[system]","total (DOM):",t.loadEventEnd-t.navigationStart+"ms ("+(t.domComplete-t.navigationStart)+"ms)")}},0)}}]),t}(f["default"]),h=new g("system","System");t["default"]=h,e.exports=t["default"]},function(e,t){e.exports="<div> <div class=vc-log></div> </div>"},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 a(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)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(4),d=r(s),u=o(3),v=n(u),f=o(14),p=r(f),b=o(25),g=r(b),h=o(26),m=r(h),y=o(27),_=r(y),x=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),r=0;o>r;r++)n[r]=arguments[r];var a=l(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.$tabbox=d["default"].render(g["default"],{}),a.$header=null,a.reqList={},a.domList={},a.mockAjax(),a}return a(t,e),c(t,[{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Clear",global:!1,onClick:function(e){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){this.renderHeader(),d["default"].delegate(d["default"].one(".vc-log",this.$tabbox),"tap",".vc-group-preview",function(e){var t=this.parentNode;d["default"].hasClass(t,"vc-actived")?d["default"].removeClass(t,"vc-actived"):d["default"].addClass(t,"vc-actived"),e.preventDefault()})}},{key:"clearLog",value:function(){this.reqList={};for(var e in this.domList)this.domList[e].remove(),this.domList[e]=void 0;this.domList={},this.renderHeader()}},{key:"renderHeader",value:function(){var e=Object.keys(this.reqList).length,t=d["default"].render(m["default"],{count:e}),o=d["default"].one(".vc-log",this.$tabbox);this.$header?this.$header.parentNode.replaceChild(t,this.$header):o.parentNode.insertBefore(t,o),this.$header=t}},{key:"updateRequest",value:function(e,t){var o=Object.keys(this.reqList).length,n=this.reqList[e]||{};for(var r in t)n[r]=t[r];this.reqList[e]=n;var i={url:n.url,status:n.status||"-",type:"-",costTime:n.costTime>0?n.costTime+"ms":"-",header:n.header,response:v.htmlEncode(n.response)};n.readyState<=1?i.status="Pending":n.readyState<4&&(i.status="Loading");var l=d["default"].render(_["default"],i),a=this.domList[e];n.status>=400&&d["default"].addClass(d["default"].one(".vc-group-preview",l),"vc-table-row-error"),a?a.parentNode.replaceChild(l,a):d["default"].one(".vc-log",this.$tabbox).appendChild(l),this.domList[e]=l;var c=Object.keys(this.reqList).length;c!=o&&this.renderHeader()}},{key:"mockAjax",value:function(){var e=window.XMLHttpRequest;if(e){var t=this,o=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.open=function(){var e=this,n=[].slice.call(arguments),r=n[1],i=t.getUniqueID();e._requestID=i;var l=e.onreadystatechange||function(){};return e.onreadystatechange=function(){var o=t.reqList[i]||{};if(o.url=r,o.readyState=e.readyState,0==e.readyState)o.startTime=+new Date;else if(1==e.readyState)o.startTime=+new Date;else if(2==e.readyState){o.header={};for(var n=e.getAllResponseHeaders()||"",a=n.split("\n"),c=0;c<a.length;c++){var s=a[c];if(s){var d=s.split(": "),u=d[0],v=d.slice(1).join(": ");o.header[u]=v}}}else 3==e.readyState||4==e.readyState&&(o.status=e.status,o.endTime=+new Date,o.costTime=o.endTime-(o.startTime||o.endTime),o.response=e.response);return e._noVConsole||t.updateRequest(i,o),l.apply(e,arguments)},o.apply(e,n)}}}},{key:"getUniqueID",value:function(){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,o="x"==e?t:3&t|8;return o.toString(16)});return e}}]),t}(p["default"]),w=new x("network","Network");t["default"]=w,e.exports=t["default"]},function(e,t){e.exports="<div class=vc-table> <div class=vc-log></div> </div>"},function(e,t){e.exports='<dl class=vc-table-row> <dd class="vc-table-col vc-table-col-4">Name {{if (count > 0)}}({{count}}){{/if}}</dd> <dd class=vc-table-col>Status</dd> <dd class=vc-table-col>Time</dd> </dl>'},function(e,t){e.exports='<div class=vc-group> <dl class="vc-table-row vc-group-preview"> <dd class="vc-table-col vc-table-col-4">{{url}}</dd> <dd class=vc-table-col>{{status}}</dd> <dd class=vc-table-col>{{costTime}}</dd> </dl> <div class=vc-group-detail> <div> <dl class="vc-table-row vc-left-border"> <dt class="vc-table-col vc-table-col-title">Headers</dt> </dl> {{for (var key in header)}} <div class="vc-table-row vc-left-border vc-small"> <div class="vc-table-col vc-table-col-2">{{key}}</div> <div class="vc-table-col vc-table-col-4 vc-max-height-line">{{header[key]}}</div> </div> {{/for}} </div> <div> <dl class="vc-table-row vc-left-border"> <dt class="vc-table-col vc-table-col-title">Response</dt> </dl> <div class="vc-table-row vc-left-border vc-small"> <pre class="vc-table-col vc-max-height vc-min-height">{{response}}</pre> </div> </div> </div> </div>'}])});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ActionSheet">
|
|
3
|
+
<VButton
|
|
4
|
+
width="50%"
|
|
5
|
+
@click="visible = true"
|
|
6
|
+
/>
|
|
7
|
+
<ActionSheet
|
|
8
|
+
v-model="visible"
|
|
9
|
+
:items="actionSheet"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { ref } from 'vue'
|
|
16
|
+
// import VButton from '@/components/button'
|
|
17
|
+
// import ActionSheet from '@/components/action-sheet'
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'ViewActionSheet',
|
|
21
|
+
// components: { VButton, ActionSheet },
|
|
22
|
+
setup () {
|
|
23
|
+
// 响应式状态
|
|
24
|
+
const visible = ref(false)
|
|
25
|
+
const actionSheet = ref([
|
|
26
|
+
{ text: '提交' },
|
|
27
|
+
{ text: '确定' }
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
visible,
|
|
32
|
+
actionSheet
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="less" scoped>
|
|
39
|
+
.ActionSheet {
|
|
40
|
+
height: 100%;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
justify-content: space-around;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Badge">
|
|
3
|
+
<Badge number="10">
|
|
4
|
+
<div class="item" />
|
|
5
|
+
</Badge>
|
|
6
|
+
|
|
7
|
+
<Badge
|
|
8
|
+
number="100"
|
|
9
|
+
:max="99"
|
|
10
|
+
:dot="false"
|
|
11
|
+
>
|
|
12
|
+
<div class="item" />
|
|
13
|
+
</Badge>
|
|
14
|
+
|
|
15
|
+
<Badge
|
|
16
|
+
number="100"
|
|
17
|
+
:max="99"
|
|
18
|
+
:dot="true"
|
|
19
|
+
>
|
|
20
|
+
<div class="item" />
|
|
21
|
+
</Badge>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { defineComponent } from 'vue'
|
|
27
|
+
// import Badge from '@/components/badge/badge.vue' // 修改为你实际路径
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: 'ViewBadge',
|
|
31
|
+
setup () {
|
|
32
|
+
// 这个组件不需要响应式数据,所以 setup 可以为空
|
|
33
|
+
return {}
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="less" scoped>
|
|
39
|
+
.Badge {
|
|
40
|
+
width: 100%;
|
|
41
|
+
margin-top: 100px;
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: space-around;
|
|
44
|
+
|
|
45
|
+
.item {
|
|
46
|
+
width: 45px;
|
|
47
|
+
height: 45px;
|
|
48
|
+
background-color: red;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Button">
|
|
3
|
+
<VButton type="primary">
|
|
4
|
+
Primary
|
|
5
|
+
</VButton>
|
|
6
|
+
<VButton
|
|
7
|
+
type="success"
|
|
8
|
+
:loading="loading"
|
|
9
|
+
@click="onClick"
|
|
10
|
+
>
|
|
11
|
+
Success
|
|
12
|
+
</VButton>
|
|
13
|
+
<VButton
|
|
14
|
+
type="warning"
|
|
15
|
+
:loading="loading"
|
|
16
|
+
@click="onClick"
|
|
17
|
+
>
|
|
18
|
+
Warning
|
|
19
|
+
</VButton>
|
|
20
|
+
<VButton type="danger">
|
|
21
|
+
Danger
|
|
22
|
+
</VButton>
|
|
23
|
+
<VButton type="normal">
|
|
24
|
+
Normal
|
|
25
|
+
</VButton>
|
|
26
|
+
<VButton
|
|
27
|
+
type="normal"
|
|
28
|
+
disabled
|
|
29
|
+
>
|
|
30
|
+
Disabled
|
|
31
|
+
</VButton>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import { ref } from 'vue'
|
|
37
|
+
import VButton from '../components/button'
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: 'ViewButton',
|
|
41
|
+
components: {
|
|
42
|
+
VButton
|
|
43
|
+
},
|
|
44
|
+
setup () {
|
|
45
|
+
const loading = ref(false)
|
|
46
|
+
|
|
47
|
+
const onClick = () => {
|
|
48
|
+
// console.trace('onClick triggered')
|
|
49
|
+
loading.value = !loading.value
|
|
50
|
+
// alert(loading.value)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
loading,
|
|
55
|
+
onClick
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="less" scoped>
|
|
62
|
+
.Button {
|
|
63
|
+
height: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
justify-content: space-around;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
</style>
|