zetan-cli-dev-template-vue-element-admin 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +8 -0
- package/template/.editorconfig +14 -0
- package/template/.env.development +5 -0
- package/template/.env.production +6 -0
- package/template/.env.staging +8 -0
- package/template/.eslintignore +4 -0
- package/template/.eslintrc.js +198 -0
- package/template/.travis.yml +5 -0
- package/template/LICENSE +21 -0
- package/template/README.es.md +228 -0
- package/template/README.ja.md +224 -0
- package/template/README.md +250 -0
- package/template/README.zh-CN.md +273 -0
- package/template/babel.config.js +14 -0
- package/template/build/index.js +35 -0
- package/template/jest.config.js +24 -0
- package/template/jsconfig.json +9 -0
- package/template/mock/article.js +116 -0
- package/template/mock/index.js +60 -0
- package/template/mock/mock-server.js +81 -0
- package/template/mock/remote-search.js +51 -0
- package/template/mock/role/index.js +98 -0
- package/template/mock/role/routes.js +530 -0
- package/template/mock/user.js +84 -0
- package/template/mock/utils.js +48 -0
- package/template/package.json +111 -0
- package/template/plop-templates/component/index.hbs +26 -0
- package/template/plop-templates/component/prompt.js +55 -0
- package/template/plop-templates/store/index.hbs +16 -0
- package/template/plop-templates/store/prompt.js +62 -0
- package/template/plop-templates/utils.js +2 -0
- package/template/plop-templates/view/index.hbs +26 -0
- package/template/plop-templates/view/prompt.js +55 -0
- package/template/plopfile.js +9 -0
- package/template/postcss.config.js +5 -0
- package/template/public/favicon.ico +0 -0
- package/template/public/index.html +15 -0
- package/template/src/App.vue +11 -0
- package/template/src/api/article.js +41 -0
- package/template/src/api/qiniu.js +8 -0
- package/template/src/api/remote-search.js +17 -0
- package/template/src/api/role.js +38 -0
- package/template/src/api/user.js +24 -0
- package/template/src/assets/401_images/401.gif +0 -0
- package/template/src/assets/404_images/404.png +0 -0
- package/template/src/assets/404_images/404_cloud.png +0 -0
- package/template/src/assets/custom-theme/fonts/element-icons.ttf +0 -0
- package/template/src/assets/custom-theme/fonts/element-icons.woff +0 -0
- package/template/src/assets/custom-theme/index.css +1 -0
- package/template/src/components/BackToTop/index.vue +111 -0
- package/template/src/components/Breadcrumb/index.vue +82 -0
- package/template/src/components/Charts/Keyboard.vue +155 -0
- package/template/src/components/Charts/LineMarker.vue +227 -0
- package/template/src/components/Charts/MixChart.vue +271 -0
- package/template/src/components/Charts/mixins/resize.js +56 -0
- package/template/src/components/DndList/index.vue +166 -0
- package/template/src/components/DragSelect/index.vue +65 -0
- package/template/src/components/Dropzone/index.vue +297 -0
- package/template/src/components/ErrorLog/index.vue +78 -0
- package/template/src/components/GithubCorner/index.vue +54 -0
- package/template/src/components/Hamburger/index.vue +44 -0
- package/template/src/components/HeaderSearch/index.vue +180 -0
- package/template/src/components/ImageCropper/index.vue +1779 -0
- package/template/src/components/ImageCropper/utils/data2blob.js +19 -0
- package/template/src/components/ImageCropper/utils/effectRipple.js +39 -0
- package/template/src/components/ImageCropper/utils/language.js +232 -0
- package/template/src/components/ImageCropper/utils/mimes.js +7 -0
- package/template/src/components/JsonEditor/index.vue +77 -0
- package/template/src/components/Kanban/index.vue +99 -0
- package/template/src/components/MDinput/index.vue +360 -0
- package/template/src/components/MarkdownEditor/default-options.js +31 -0
- package/template/src/components/MarkdownEditor/index.vue +118 -0
- package/template/src/components/Pagination/index.vue +101 -0
- package/template/src/components/PanThumb/index.vue +142 -0
- package/template/src/components/RightPanel/index.vue +145 -0
- package/template/src/components/Screenfull/index.vue +60 -0
- package/template/src/components/Share/DropdownMenu.vue +103 -0
- package/template/src/components/SizeSelect/index.vue +57 -0
- package/template/src/components/Sticky/index.vue +91 -0
- package/template/src/components/SvgIcon/index.vue +62 -0
- package/template/src/components/TextHoverEffect/Mallki.vue +113 -0
- package/template/src/components/ThemePicker/index.vue +175 -0
- package/template/src/components/Tinymce/components/EditorImage.vue +111 -0
- package/template/src/components/Tinymce/dynamicLoadScript.js +59 -0
- package/template/src/components/Tinymce/index.vue +247 -0
- package/template/src/components/Tinymce/plugins.js +7 -0
- package/template/src/components/Tinymce/toolbar.js +6 -0
- package/template/src/components/Upload/SingleImage.vue +134 -0
- package/template/src/components/Upload/SingleImage2.vue +130 -0
- package/template/src/components/Upload/SingleImage3.vue +157 -0
- package/template/src/components/UploadExcel/index.vue +138 -0
- package/template/src/directive/clipboard/clipboard.js +49 -0
- package/template/src/directive/clipboard/index.js +13 -0
- package/template/src/directive/el-drag-dialog/drag.js +77 -0
- package/template/src/directive/el-drag-dialog/index.js +13 -0
- package/template/src/directive/el-table/adaptive.js +41 -0
- package/template/src/directive/el-table/index.js +13 -0
- package/template/src/directive/permission/index.js +13 -0
- package/template/src/directive/permission/permission.js +31 -0
- package/template/src/directive/sticky.js +91 -0
- package/template/src/directive/waves/index.js +13 -0
- package/template/src/directive/waves/waves.css +26 -0
- package/template/src/directive/waves/waves.js +72 -0
- package/template/src/filters/index.js +68 -0
- package/template/src/icons/index.js +9 -0
- package/template/src/icons/svg/404.svg +1 -0
- package/template/src/icons/svg/bug.svg +1 -0
- package/template/src/icons/svg/chart.svg +1 -0
- package/template/src/icons/svg/clipboard.svg +1 -0
- package/template/src/icons/svg/component.svg +1 -0
- package/template/src/icons/svg/dashboard.svg +1 -0
- package/template/src/icons/svg/documentation.svg +1 -0
- package/template/src/icons/svg/drag.svg +1 -0
- package/template/src/icons/svg/edit.svg +1 -0
- package/template/src/icons/svg/education.svg +1 -0
- package/template/src/icons/svg/email.svg +1 -0
- package/template/src/icons/svg/example.svg +1 -0
- package/template/src/icons/svg/excel.svg +1 -0
- package/template/src/icons/svg/exit-fullscreen.svg +1 -0
- package/template/src/icons/svg/eye-open.svg +1 -0
- package/template/src/icons/svg/eye.svg +1 -0
- package/template/src/icons/svg/form.svg +1 -0
- package/template/src/icons/svg/fullscreen.svg +1 -0
- package/template/src/icons/svg/guide.svg +1 -0
- package/template/src/icons/svg/icon.svg +1 -0
- package/template/src/icons/svg/international.svg +1 -0
- package/template/src/icons/svg/language.svg +1 -0
- package/template/src/icons/svg/link.svg +1 -0
- package/template/src/icons/svg/list.svg +1 -0
- package/template/src/icons/svg/lock.svg +1 -0
- package/template/src/icons/svg/message.svg +1 -0
- package/template/src/icons/svg/money.svg +1 -0
- package/template/src/icons/svg/nested.svg +1 -0
- package/template/src/icons/svg/password.svg +1 -0
- package/template/src/icons/svg/pdf.svg +1 -0
- package/template/src/icons/svg/people.svg +1 -0
- package/template/src/icons/svg/peoples.svg +1 -0
- package/template/src/icons/svg/qq.svg +1 -0
- package/template/src/icons/svg/search.svg +1 -0
- package/template/src/icons/svg/shopping.svg +1 -0
- package/template/src/icons/svg/size.svg +1 -0
- package/template/src/icons/svg/skill.svg +1 -0
- package/template/src/icons/svg/star.svg +1 -0
- package/template/src/icons/svg/tab.svg +1 -0
- package/template/src/icons/svg/table.svg +1 -0
- package/template/src/icons/svg/theme.svg +1 -0
- package/template/src/icons/svg/tree-table.svg +1 -0
- package/template/src/icons/svg/tree.svg +1 -0
- package/template/src/icons/svg/user.svg +1 -0
- package/template/src/icons/svg/wechat.svg +1 -0
- package/template/src/icons/svg/zip.svg +1 -0
- package/template/src/icons/svgo.yml +22 -0
- package/template/src/layout/components/AppMain.vue +57 -0
- package/template/src/layout/components/Navbar.vue +167 -0
- package/template/src/layout/components/Settings/index.vue +108 -0
- package/template/src/layout/components/Sidebar/FixiOSBug.js +26 -0
- package/template/src/layout/components/Sidebar/Item.vue +41 -0
- package/template/src/layout/components/Sidebar/Link.vue +43 -0
- package/template/src/layout/components/Sidebar/Logo.vue +82 -0
- package/template/src/layout/components/Sidebar/SidebarItem.vue +95 -0
- package/template/src/layout/components/Sidebar/index.vue +54 -0
- package/template/src/layout/components/TagsView/ScrollPane.vue +94 -0
- package/template/src/layout/components/TagsView/index.vue +292 -0
- package/template/src/layout/components/index.js +5 -0
- package/template/src/layout/index.vue +102 -0
- package/template/src/layout/mixin/ResizeHandler.js +45 -0
- package/template/src/main.js +53 -0
- package/template/src/permission.js +74 -0
- package/template/src/router/index.js +404 -0
- package/template/src/router/modules/charts.js +36 -0
- package/template/src/router/modules/components.js +102 -0
- package/template/src/router/modules/nested.js +66 -0
- package/template/src/router/modules/table.js +41 -0
- package/template/src/settings.js +35 -0
- package/template/src/store/getters.js +15 -0
- package/template/src/store/index.js +25 -0
- package/template/src/store/modules/app.js +56 -0
- package/template/src/store/modules/errorLog.js +28 -0
- package/template/src/store/modules/permission.js +69 -0
- package/template/src/store/modules/settings.js +35 -0
- package/template/src/store/modules/tagsView.js +160 -0
- package/template/src/store/modules/user.js +131 -0
- package/template/src/styles/btn.scss +99 -0
- package/template/src/styles/element-ui.scss +84 -0
- package/template/src/styles/element-variables.scss +31 -0
- package/template/src/styles/index.scss +191 -0
- package/template/src/styles/mixin.scss +66 -0
- package/template/src/styles/sidebar.scss +226 -0
- package/template/src/styles/transition.scss +48 -0
- package/template/src/styles/variables.scss +35 -0
- package/template/src/utils/auth.js +15 -0
- package/template/src/utils/clipboard.js +32 -0
- package/template/src/utils/error-log.js +35 -0
- package/template/src/utils/get-page-title.js +10 -0
- package/template/src/utils/index.js +357 -0
- package/template/src/utils/open-window.js +25 -0
- package/template/src/utils/permission.js +21 -0
- package/template/src/utils/request.js +85 -0
- package/template/src/utils/scroll-to.js +58 -0
- package/template/src/utils/validate.js +87 -0
- package/template/src/vendor/Export2Excel.js +220 -0
- package/template/src/vendor/Export2Zip.js +24 -0
- package/template/src/views/charts/keyboard.vue +23 -0
- package/template/src/views/charts/line.vue +23 -0
- package/template/src/views/charts/mix-chart.vue +23 -0
- package/template/src/views/clipboard/index.vue +49 -0
- package/template/src/views/components-demo/avatar-upload.vue +61 -0
- package/template/src/views/components-demo/back-to-top.vue +154 -0
- package/template/src/views/components-demo/count-to.vue +218 -0
- package/template/src/views/components-demo/dnd-list.vue +39 -0
- package/template/src/views/components-demo/drag-dialog.vue +61 -0
- package/template/src/views/components-demo/drag-kanban.vue +66 -0
- package/template/src/views/components-demo/drag-select.vue +43 -0
- package/template/src/views/components-demo/dropzone.vue +31 -0
- package/template/src/views/components-demo/json-editor.vue +36 -0
- package/template/src/views/components-demo/markdown.vue +101 -0
- package/template/src/views/components-demo/mixin.vue +169 -0
- package/template/src/views/components-demo/split-pane.vue +67 -0
- package/template/src/views/components-demo/sticky.vue +135 -0
- package/template/src/views/components-demo/tinymce.vue +36 -0
- package/template/src/views/dashboard/admin/components/BarChart.vue +102 -0
- package/template/src/views/dashboard/admin/components/BoxCard.vue +118 -0
- package/template/src/views/dashboard/admin/components/LineChart.vue +135 -0
- package/template/src/views/dashboard/admin/components/PanelGroup.vue +181 -0
- package/template/src/views/dashboard/admin/components/PieChart.vue +79 -0
- package/template/src/views/dashboard/admin/components/RaddarChart.vue +116 -0
- package/template/src/views/dashboard/admin/components/TodoList/Todo.vue +81 -0
- package/template/src/views/dashboard/admin/components/TodoList/index.scss +320 -0
- package/template/src/views/dashboard/admin/components/TodoList/index.vue +127 -0
- package/template/src/views/dashboard/admin/components/TransactionTable.vue +55 -0
- package/template/src/views/dashboard/admin/components/mixins/resize.js +55 -0
- package/template/src/views/dashboard/admin/index.vue +124 -0
- package/template/src/views/dashboard/editor/index.vue +74 -0
- package/template/src/views/dashboard/index.vue +31 -0
- package/template/src/views/documentation/index.vue +57 -0
- package/template/src/views/error-log/components/ErrorTestA.vue +13 -0
- package/template/src/views/error-log/components/ErrorTestB.vue +11 -0
- package/template/src/views/error-log/index.vue +32 -0
- package/template/src/views/error-page/401.vue +99 -0
- package/template/src/views/error-page/404.vue +228 -0
- package/template/src/views/example/components/ArticleDetail.vue +289 -0
- package/template/src/views/example/components/Dropdown/Comment.vue +41 -0
- package/template/src/views/example/components/Dropdown/Platform.vue +46 -0
- package/template/src/views/example/components/Dropdown/SourceUrl.vue +38 -0
- package/template/src/views/example/components/Dropdown/index.js +3 -0
- package/template/src/views/example/components/Warning.vue +13 -0
- package/template/src/views/example/create.vue +13 -0
- package/template/src/views/example/edit.vue +13 -0
- package/template/src/views/example/list.vue +112 -0
- package/template/src/views/excel/components/AutoWidthOption.vue +34 -0
- package/template/src/views/excel/components/BookTypeOption.vue +39 -0
- package/template/src/views/excel/components/FilenameOption.vue +27 -0
- package/template/src/views/excel/export-excel.vue +116 -0
- package/template/src/views/excel/merge-header.vue +101 -0
- package/template/src/views/excel/select-excel.vue +107 -0
- package/template/src/views/excel/upload-excel.vue +42 -0
- package/template/src/views/guide/index.vue +36 -0
- package/template/src/views/guide/steps.js +53 -0
- package/template/src/views/icons/element-icons.js +3 -0
- package/template/src/views/icons/index.vue +101 -0
- package/template/src/views/icons/svg-icons.js +10 -0
- package/template/src/views/login/auth-redirect.vue +15 -0
- package/template/src/views/login/components/SocialSignin.vue +72 -0
- package/template/src/views/login/index.vue +324 -0
- package/template/src/views/nested/menu1/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-1/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-2/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue +5 -0
- package/template/src/views/nested/menu1/menu1-2/menu1-2-2/index.vue +5 -0
- package/template/src/views/nested/menu1/menu1-3/index.vue +5 -0
- package/template/src/views/nested/menu2/index.vue +5 -0
- package/template/src/views/pdf/content.js +58 -0
- package/template/src/views/pdf/download.vue +201 -0
- package/template/src/views/pdf/index.vue +13 -0
- package/template/src/views/permission/components/SwitchRoles.vue +32 -0
- package/template/src/views/permission/directive.vue +111 -0
- package/template/src/views/permission/page.vue +19 -0
- package/template/src/views/permission/role.vue +270 -0
- package/template/src/views/profile/components/Account.vue +38 -0
- package/template/src/views/profile/components/Activity.vue +185 -0
- package/template/src/views/profile/components/Timeline.vue +43 -0
- package/template/src/views/profile/components/UserCard.vue +134 -0
- package/template/src/views/profile/index.vue +68 -0
- package/template/src/views/qiniu/upload.vue +41 -0
- package/template/src/views/redirect/index.vue +12 -0
- package/template/src/views/tab/components/TabPane.vue +103 -0
- package/template/src/views/tab/index.vue +57 -0
- package/template/src/views/table/complex-table.vue +379 -0
- package/template/src/views/table/drag-table.vue +153 -0
- package/template/src/views/table/dynamic-table/components/FixedThead.vue +62 -0
- package/template/src/views/table/dynamic-table/components/UnfixedThead.vue +50 -0
- package/template/src/views/table/dynamic-table/index.vue +24 -0
- package/template/src/views/table/inline-edit-table.vue +149 -0
- package/template/src/views/theme/index.vue +120 -0
- package/template/src/views/zip/index.vue +77 -0
- package/template/tests/unit/.eslintrc.js +5 -0
- package/template/tests/unit/components/Hamburger.spec.js +18 -0
- package/template/tests/unit/components/SvgIcon.spec.js +22 -0
- package/template/tests/unit/utils/formatTime.spec.js +29 -0
- package/template/tests/unit/utils/param2Obj.spec.js +14 -0
- package/template/tests/unit/utils/parseTime.spec.js +37 -0
- package/template/tests/unit/utils/validate.spec.js +28 -0
- package/template/vue.config.js +124 -0
@@ -0,0 +1,1779 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-show="value" class="vue-image-crop-upload">
|
3
|
+
<div class="vicp-wrap">
|
4
|
+
<div class="vicp-close" @click="off">
|
5
|
+
<i class="vicp-icon4" />
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div v-show="step == 1" class="vicp-step1">
|
9
|
+
<div
|
10
|
+
class="vicp-drop-area"
|
11
|
+
@dragleave="preventDefault"
|
12
|
+
@dragover="preventDefault"
|
13
|
+
@dragenter="preventDefault"
|
14
|
+
@click="handleClick"
|
15
|
+
@drop="handleChange"
|
16
|
+
>
|
17
|
+
<i v-show="loading != 1" class="vicp-icon1">
|
18
|
+
<i class="vicp-icon1-arrow" />
|
19
|
+
<i class="vicp-icon1-body" />
|
20
|
+
<i class="vicp-icon1-bottom" />
|
21
|
+
</i>
|
22
|
+
<span v-show="loading !== 1" class="vicp-hint">{{ lang.hint }}</span>
|
23
|
+
<span v-show="!isSupported" class="vicp-no-supported-hint">{{ lang.noSupported }}</span>
|
24
|
+
<input v-show="false" v-if="step == 1" ref="fileinput" type="file" @change="handleChange">
|
25
|
+
</div>
|
26
|
+
<div v-show="hasError" class="vicp-error">
|
27
|
+
<i class="vicp-icon2" />
|
28
|
+
{{ errorMsg }}
|
29
|
+
</div>
|
30
|
+
<div class="vicp-operate">
|
31
|
+
<a @click="off" @mousedown="ripple">{{ lang.btn.off }}</a>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div v-if="step == 2" class="vicp-step2">
|
36
|
+
<div class="vicp-crop">
|
37
|
+
<div v-show="true" class="vicp-crop-left">
|
38
|
+
<div class="vicp-img-container">
|
39
|
+
<img
|
40
|
+
ref="img"
|
41
|
+
:src="sourceImgUrl"
|
42
|
+
:style="sourceImgStyle"
|
43
|
+
class="vicp-img"
|
44
|
+
draggable="false"
|
45
|
+
@drag="preventDefault"
|
46
|
+
@dragstart="preventDefault"
|
47
|
+
@dragend="preventDefault"
|
48
|
+
@dragleave="preventDefault"
|
49
|
+
@dragover="preventDefault"
|
50
|
+
@dragenter="preventDefault"
|
51
|
+
@drop="preventDefault"
|
52
|
+
@touchstart="imgStartMove"
|
53
|
+
@touchmove="imgMove"
|
54
|
+
@touchend="createImg"
|
55
|
+
@touchcancel="createImg"
|
56
|
+
@mousedown="imgStartMove"
|
57
|
+
@mousemove="imgMove"
|
58
|
+
@mouseup="createImg"
|
59
|
+
@mouseout="createImg"
|
60
|
+
>
|
61
|
+
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-1" />
|
62
|
+
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-2" />
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div class="vicp-range">
|
66
|
+
<input
|
67
|
+
:value="scale.range"
|
68
|
+
type="range"
|
69
|
+
step="1"
|
70
|
+
min="0"
|
71
|
+
max="100"
|
72
|
+
@input="zoomChange"
|
73
|
+
>
|
74
|
+
<i
|
75
|
+
class="vicp-icon5"
|
76
|
+
@mousedown="startZoomSub"
|
77
|
+
@mouseout="endZoomSub"
|
78
|
+
@mouseup="endZoomSub"
|
79
|
+
/>
|
80
|
+
<i
|
81
|
+
class="vicp-icon6"
|
82
|
+
@mousedown="startZoomAdd"
|
83
|
+
@mouseout="endZoomAdd"
|
84
|
+
@mouseup="endZoomAdd"
|
85
|
+
/>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div v-if="!noRotate" class="vicp-rotate">
|
89
|
+
<i @mousedown="startRotateLeft" @mouseout="endRotate" @mouseup="endRotate">↺</i>
|
90
|
+
<i @mousedown="startRotateRight" @mouseout="endRotate" @mouseup="endRotate">↻</i>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div v-show="true" class="vicp-crop-right">
|
94
|
+
<div class="vicp-preview">
|
95
|
+
<div v-if="!noSquare" class="vicp-preview-item">
|
96
|
+
<img :src="createImgUrl" :style="previewStyle">
|
97
|
+
<span>{{ lang.preview }}</span>
|
98
|
+
</div>
|
99
|
+
<div v-if="!noCircle" class="vicp-preview-item vicp-preview-item-circle">
|
100
|
+
<img :src="createImgUrl" :style="previewStyle">
|
101
|
+
<span>{{ lang.preview }}</span>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<div class="vicp-operate">
|
107
|
+
<a @click="setStep(1)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
108
|
+
<a class="vicp-operate-btn" @click="prepareUpload" @mousedown="ripple">{{ lang.btn.save }}</a>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div v-if="step == 3" class="vicp-step3">
|
113
|
+
<div class="vicp-upload">
|
114
|
+
<span v-show="loading === 1" class="vicp-loading">{{ lang.loading }}</span>
|
115
|
+
<div class="vicp-progress-wrap">
|
116
|
+
<span v-show="loading === 1" :style="progressStyle" class="vicp-progress" />
|
117
|
+
</div>
|
118
|
+
<div v-show="hasError" class="vicp-error">
|
119
|
+
<i class="vicp-icon2" />
|
120
|
+
{{ errorMsg }}
|
121
|
+
</div>
|
122
|
+
<div v-show="loading === 2" class="vicp-success">
|
123
|
+
<i class="vicp-icon3" />
|
124
|
+
{{ lang.success }}
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
<div class="vicp-operate">
|
128
|
+
<a @click="setStep(2)" @mousedown="ripple">{{ lang.btn.back }}</a>
|
129
|
+
<a @click="off" @mousedown="ripple">{{ lang.btn.close }}</a>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
<canvas v-show="false" ref="canvas" :width="width" :height="height" />
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</template>
|
136
|
+
|
137
|
+
<script>
|
138
|
+
'use strict'
|
139
|
+
import request from '@/utils/request'
|
140
|
+
import language from './utils/language.js'
|
141
|
+
import mimes from './utils/mimes.js'
|
142
|
+
import data2blob from './utils/data2blob.js'
|
143
|
+
import effectRipple from './utils/effectRipple.js'
|
144
|
+
export default {
|
145
|
+
props: {
|
146
|
+
// 域,上传文件name,触发事件会带上(如果一个页面多个图片上传控件,可以做区分
|
147
|
+
field: {
|
148
|
+
type: String,
|
149
|
+
default: 'avatar'
|
150
|
+
},
|
151
|
+
// 原名key,类似于id,触发事件会带上(如果一个页面多个图片上传控件,可以做区分
|
152
|
+
ki: {
|
153
|
+
type: Number,
|
154
|
+
default: 0
|
155
|
+
},
|
156
|
+
// 显示该控件与否
|
157
|
+
value: {
|
158
|
+
type: Boolean,
|
159
|
+
default: true
|
160
|
+
},
|
161
|
+
// 上传地址
|
162
|
+
url: {
|
163
|
+
type: String,
|
164
|
+
default: ''
|
165
|
+
},
|
166
|
+
// 其他要上传文件附带的数据,对象格式
|
167
|
+
params: {
|
168
|
+
type: Object,
|
169
|
+
default: null
|
170
|
+
},
|
171
|
+
// Add custom headers
|
172
|
+
headers: {
|
173
|
+
type: Object,
|
174
|
+
default: null
|
175
|
+
},
|
176
|
+
// 剪裁图片的宽
|
177
|
+
width: {
|
178
|
+
type: Number,
|
179
|
+
default: 200
|
180
|
+
},
|
181
|
+
// 剪裁图片的高
|
182
|
+
height: {
|
183
|
+
type: Number,
|
184
|
+
default: 200
|
185
|
+
},
|
186
|
+
// 不显示旋转功能
|
187
|
+
noRotate: {
|
188
|
+
type: Boolean,
|
189
|
+
default: true
|
190
|
+
},
|
191
|
+
// 不预览圆形图片
|
192
|
+
noCircle: {
|
193
|
+
type: Boolean,
|
194
|
+
default: false
|
195
|
+
},
|
196
|
+
// 不预览方形图片
|
197
|
+
noSquare: {
|
198
|
+
type: Boolean,
|
199
|
+
default: false
|
200
|
+
},
|
201
|
+
// 单文件大小限制
|
202
|
+
maxSize: {
|
203
|
+
type: Number,
|
204
|
+
default: 10240
|
205
|
+
},
|
206
|
+
// 语言类型
|
207
|
+
langType: {
|
208
|
+
type: String,
|
209
|
+
default: 'zh'
|
210
|
+
},
|
211
|
+
// 语言包
|
212
|
+
langExt: {
|
213
|
+
type: Object,
|
214
|
+
default: null
|
215
|
+
},
|
216
|
+
// 图片上传格式
|
217
|
+
imgFormat: {
|
218
|
+
type: String,
|
219
|
+
default: 'png'
|
220
|
+
},
|
221
|
+
// 是否支持跨域
|
222
|
+
withCredentials: {
|
223
|
+
type: Boolean,
|
224
|
+
default: false
|
225
|
+
}
|
226
|
+
},
|
227
|
+
data() {
|
228
|
+
const { imgFormat, langType, langExt, width, height } = this
|
229
|
+
let isSupported = true
|
230
|
+
const allowImgFormat = ['jpg', 'png']
|
231
|
+
const tempImgFormat =
|
232
|
+
allowImgFormat.indexOf(imgFormat) === -1 ? 'jpg' : imgFormat
|
233
|
+
const lang = language[langType] ? language[langType] : language['en']
|
234
|
+
const mime = mimes[tempImgFormat]
|
235
|
+
// 规范图片格式
|
236
|
+
this.imgFormat = tempImgFormat
|
237
|
+
if (langExt) {
|
238
|
+
Object.assign(lang, langExt)
|
239
|
+
}
|
240
|
+
if (typeof FormData !== 'function') {
|
241
|
+
isSupported = false
|
242
|
+
}
|
243
|
+
return {
|
244
|
+
// 图片的mime
|
245
|
+
mime,
|
246
|
+
// 语言包
|
247
|
+
lang,
|
248
|
+
// 浏览器是否支持该控件
|
249
|
+
isSupported,
|
250
|
+
// 浏览器是否支持触屏事件
|
251
|
+
// eslint-disable-next-line no-prototype-builtins
|
252
|
+
isSupportTouch: document.hasOwnProperty('ontouchstart'),
|
253
|
+
// 步骤
|
254
|
+
step: 1, // 1选择文件 2剪裁 3上传
|
255
|
+
// 上传状态及进度
|
256
|
+
loading: 0, // 0未开始 1正在 2成功 3错误
|
257
|
+
progress: 0,
|
258
|
+
// 是否有错误及错误信息
|
259
|
+
hasError: false,
|
260
|
+
errorMsg: '',
|
261
|
+
// 需求图宽高比
|
262
|
+
ratio: width / height,
|
263
|
+
// 原图地址、生成图片地址
|
264
|
+
sourceImg: null,
|
265
|
+
sourceImgUrl: '',
|
266
|
+
createImgUrl: '',
|
267
|
+
// 原图片拖动事件初始值
|
268
|
+
sourceImgMouseDown: {
|
269
|
+
on: false,
|
270
|
+
mX: 0, // 鼠标按下的坐标
|
271
|
+
mY: 0,
|
272
|
+
x: 0, // scale原图坐标
|
273
|
+
y: 0
|
274
|
+
},
|
275
|
+
// 生成图片预览的容器大小
|
276
|
+
previewContainer: {
|
277
|
+
width: 100,
|
278
|
+
height: 100
|
279
|
+
},
|
280
|
+
// 原图容器宽高
|
281
|
+
sourceImgContainer: {
|
282
|
+
// sic
|
283
|
+
width: 240,
|
284
|
+
height: 184 // 如果生成图比例与此一致会出现bug,先改成特殊的格式吧,哈哈哈
|
285
|
+
},
|
286
|
+
// 原图展示属性
|
287
|
+
scale: {
|
288
|
+
zoomAddOn: false, // 按钮缩放事件开启
|
289
|
+
zoomSubOn: false, // 按钮缩放事件开启
|
290
|
+
range: 1, // 最大100
|
291
|
+
rotateLeft: false, // 按钮向左旋转事件开启
|
292
|
+
rotateRight: false, // 按钮向右旋转事件开启
|
293
|
+
degree: 0, // 旋转度数
|
294
|
+
x: 0,
|
295
|
+
y: 0,
|
296
|
+
width: 0,
|
297
|
+
height: 0,
|
298
|
+
maxWidth: 0,
|
299
|
+
maxHeight: 0,
|
300
|
+
minWidth: 0, // 最宽
|
301
|
+
minHeight: 0,
|
302
|
+
naturalWidth: 0, // 原宽
|
303
|
+
naturalHeight: 0
|
304
|
+
}
|
305
|
+
}
|
306
|
+
},
|
307
|
+
computed: {
|
308
|
+
// 进度条样式
|
309
|
+
progressStyle() {
|
310
|
+
const { progress } = this
|
311
|
+
return {
|
312
|
+
width: progress + '%'
|
313
|
+
}
|
314
|
+
},
|
315
|
+
// 原图样式
|
316
|
+
sourceImgStyle() {
|
317
|
+
const { scale, sourceImgMasking } = this
|
318
|
+
const top = scale.y + sourceImgMasking.y + 'px'
|
319
|
+
const left = scale.x + sourceImgMasking.x + 'px'
|
320
|
+
return {
|
321
|
+
top,
|
322
|
+
left,
|
323
|
+
width: scale.width + 'px',
|
324
|
+
height: scale.height + 'px',
|
325
|
+
transform: 'rotate(' + scale.degree + 'deg)', // 旋转时 左侧原始图旋转样式
|
326
|
+
'-ms-transform': 'rotate(' + scale.degree + 'deg)', // 兼容IE9
|
327
|
+
'-moz-transform': 'rotate(' + scale.degree + 'deg)', // 兼容FireFox
|
328
|
+
'-webkit-transform': 'rotate(' + scale.degree + 'deg)', // 兼容Safari 和 chrome
|
329
|
+
'-o-transform': 'rotate(' + scale.degree + 'deg)' // 兼容 Opera
|
330
|
+
}
|
331
|
+
},
|
332
|
+
// 原图蒙版属性
|
333
|
+
sourceImgMasking() {
|
334
|
+
const { width, height, ratio, sourceImgContainer } = this
|
335
|
+
const sic = sourceImgContainer
|
336
|
+
const sicRatio = sic.width / sic.height // 原图容器宽高比
|
337
|
+
let x = 0
|
338
|
+
let y = 0
|
339
|
+
let w = sic.width
|
340
|
+
let h = sic.height
|
341
|
+
let scale = 1
|
342
|
+
if (ratio < sicRatio) {
|
343
|
+
scale = sic.height / height
|
344
|
+
w = sic.height * ratio
|
345
|
+
x = (sic.width - w) / 2
|
346
|
+
}
|
347
|
+
if (ratio > sicRatio) {
|
348
|
+
scale = sic.width / width
|
349
|
+
h = sic.width / ratio
|
350
|
+
y = (sic.height - h) / 2
|
351
|
+
}
|
352
|
+
return {
|
353
|
+
scale, // 蒙版相对需求宽高的缩放
|
354
|
+
x,
|
355
|
+
y,
|
356
|
+
width: w,
|
357
|
+
height: h
|
358
|
+
}
|
359
|
+
},
|
360
|
+
// 原图遮罩样式
|
361
|
+
sourceImgShadeStyle() {
|
362
|
+
const { sourceImgMasking, sourceImgContainer } = this
|
363
|
+
const sic = sourceImgContainer
|
364
|
+
const sim = sourceImgMasking
|
365
|
+
const w =
|
366
|
+
sim.width === sic.width ? sim.width : (sic.width - sim.width) / 2
|
367
|
+
const h =
|
368
|
+
sim.height === sic.height ? sim.height : (sic.height - sim.height) / 2
|
369
|
+
return {
|
370
|
+
width: w + 'px',
|
371
|
+
height: h + 'px'
|
372
|
+
}
|
373
|
+
},
|
374
|
+
previewStyle() {
|
375
|
+
const { ratio, previewContainer } = this
|
376
|
+
const pc = previewContainer
|
377
|
+
let w = pc.width
|
378
|
+
let h = pc.height
|
379
|
+
const pcRatio = w / h
|
380
|
+
if (ratio < pcRatio) {
|
381
|
+
w = pc.height * ratio
|
382
|
+
}
|
383
|
+
if (ratio > pcRatio) {
|
384
|
+
h = pc.width / ratio
|
385
|
+
}
|
386
|
+
return {
|
387
|
+
width: w + 'px',
|
388
|
+
height: h + 'px'
|
389
|
+
}
|
390
|
+
}
|
391
|
+
},
|
392
|
+
watch: {
|
393
|
+
value(newValue) {
|
394
|
+
if (newValue && this.loading !== 1) {
|
395
|
+
this.reset()
|
396
|
+
}
|
397
|
+
}
|
398
|
+
},
|
399
|
+
created() {
|
400
|
+
// 绑定按键esc隐藏此插件事件
|
401
|
+
document.addEventListener('keyup', this.closeHandler)
|
402
|
+
},
|
403
|
+
destroyed() {
|
404
|
+
document.removeEventListener('keyup', this.closeHandler)
|
405
|
+
},
|
406
|
+
methods: {
|
407
|
+
// 点击波纹效果
|
408
|
+
ripple(e) {
|
409
|
+
effectRipple(e)
|
410
|
+
},
|
411
|
+
// 关闭控件
|
412
|
+
off() {
|
413
|
+
setTimeout(() => {
|
414
|
+
this.$emit('input', false)
|
415
|
+
this.$emit('close')
|
416
|
+
if (this.step === 3 && this.loading === 2) {
|
417
|
+
this.setStep(1)
|
418
|
+
}
|
419
|
+
}, 200)
|
420
|
+
},
|
421
|
+
// 设置步骤
|
422
|
+
setStep(no) {
|
423
|
+
// 延时是为了显示动画效果呢,哈哈哈
|
424
|
+
setTimeout(() => {
|
425
|
+
this.step = no
|
426
|
+
}, 200)
|
427
|
+
},
|
428
|
+
/* 图片选择区域函数绑定
|
429
|
+
---------------------------------------------------------------*/
|
430
|
+
preventDefault(e) {
|
431
|
+
e.preventDefault()
|
432
|
+
return false
|
433
|
+
},
|
434
|
+
handleClick(e) {
|
435
|
+
if (this.loading !== 1) {
|
436
|
+
if (e.target !== this.$refs.fileinput) {
|
437
|
+
e.preventDefault()
|
438
|
+
if (document.activeElement !== this.$refs) {
|
439
|
+
this.$refs.fileinput.click()
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
},
|
444
|
+
handleChange(e) {
|
445
|
+
e.preventDefault()
|
446
|
+
if (this.loading !== 1) {
|
447
|
+
const files = e.target.files || e.dataTransfer.files
|
448
|
+
this.reset()
|
449
|
+
if (this.checkFile(files[0])) {
|
450
|
+
this.setSourceImg(files[0])
|
451
|
+
}
|
452
|
+
}
|
453
|
+
},
|
454
|
+
/* ---------------------------------------------------------------*/
|
455
|
+
// 检测选择的文件是否合适
|
456
|
+
checkFile(file) {
|
457
|
+
const { lang, maxSize } = this
|
458
|
+
// 仅限图片
|
459
|
+
if (file.type.indexOf('image') === -1) {
|
460
|
+
this.hasError = true
|
461
|
+
this.errorMsg = lang.error.onlyImg
|
462
|
+
return false
|
463
|
+
}
|
464
|
+
// 超出大小
|
465
|
+
if (file.size / 1024 > maxSize) {
|
466
|
+
this.hasError = true
|
467
|
+
this.errorMsg = lang.error.outOfSize + maxSize + 'kb'
|
468
|
+
return false
|
469
|
+
}
|
470
|
+
return true
|
471
|
+
},
|
472
|
+
// 重置控件
|
473
|
+
reset() {
|
474
|
+
this.loading = 0
|
475
|
+
this.hasError = false
|
476
|
+
this.errorMsg = ''
|
477
|
+
this.progress = 0
|
478
|
+
},
|
479
|
+
// 设置图片源
|
480
|
+
setSourceImg(file) {
|
481
|
+
const fr = new FileReader()
|
482
|
+
fr.onload = e => {
|
483
|
+
this.sourceImgUrl = fr.result
|
484
|
+
this.startCrop()
|
485
|
+
}
|
486
|
+
fr.readAsDataURL(file)
|
487
|
+
},
|
488
|
+
// 剪裁前准备工作
|
489
|
+
startCrop() {
|
490
|
+
const {
|
491
|
+
width,
|
492
|
+
height,
|
493
|
+
ratio,
|
494
|
+
scale,
|
495
|
+
sourceImgUrl,
|
496
|
+
sourceImgMasking,
|
497
|
+
lang
|
498
|
+
} = this
|
499
|
+
const sim = sourceImgMasking
|
500
|
+
const img = new Image()
|
501
|
+
img.src = sourceImgUrl
|
502
|
+
img.onload = () => {
|
503
|
+
const nWidth = img.naturalWidth
|
504
|
+
const nHeight = img.naturalHeight
|
505
|
+
const nRatio = nWidth / nHeight
|
506
|
+
let w = sim.width
|
507
|
+
let h = sim.height
|
508
|
+
let x = 0
|
509
|
+
let y = 0
|
510
|
+
// 图片像素不达标
|
511
|
+
if (nWidth < width || nHeight < height) {
|
512
|
+
this.hasError = true
|
513
|
+
this.errorMsg = lang.error.lowestPx + width + '*' + height
|
514
|
+
return false
|
515
|
+
}
|
516
|
+
if (ratio > nRatio) {
|
517
|
+
h = w / nRatio
|
518
|
+
y = (sim.height - h) / 2
|
519
|
+
}
|
520
|
+
if (ratio < nRatio) {
|
521
|
+
w = h * nRatio
|
522
|
+
x = (sim.width - w) / 2
|
523
|
+
}
|
524
|
+
scale.range = 0
|
525
|
+
scale.x = x
|
526
|
+
scale.y = y
|
527
|
+
scale.width = w
|
528
|
+
scale.height = h
|
529
|
+
scale.degree = 0
|
530
|
+
scale.minWidth = w
|
531
|
+
scale.minHeight = h
|
532
|
+
scale.maxWidth = nWidth * sim.scale
|
533
|
+
scale.maxHeight = nHeight * sim.scale
|
534
|
+
scale.naturalWidth = nWidth
|
535
|
+
scale.naturalHeight = nHeight
|
536
|
+
this.sourceImg = img
|
537
|
+
this.createImg()
|
538
|
+
this.setStep(2)
|
539
|
+
}
|
540
|
+
},
|
541
|
+
// 鼠标按下图片准备移动
|
542
|
+
imgStartMove(e) {
|
543
|
+
e.preventDefault()
|
544
|
+
// 支持触摸事件,则鼠标事件无效
|
545
|
+
if (this.isSupportTouch && !e.targetTouches) {
|
546
|
+
return false
|
547
|
+
}
|
548
|
+
const et = e.targetTouches ? e.targetTouches[0] : e
|
549
|
+
const { sourceImgMouseDown, scale } = this
|
550
|
+
const simd = sourceImgMouseDown
|
551
|
+
simd.mX = et.screenX
|
552
|
+
simd.mY = et.screenY
|
553
|
+
simd.x = scale.x
|
554
|
+
simd.y = scale.y
|
555
|
+
simd.on = true
|
556
|
+
},
|
557
|
+
// 鼠标按下状态下移动,图片移动
|
558
|
+
imgMove(e) {
|
559
|
+
e.preventDefault()
|
560
|
+
// 支持触摸事件,则鼠标事件无效
|
561
|
+
if (this.isSupportTouch && !e.targetTouches) {
|
562
|
+
return false
|
563
|
+
}
|
564
|
+
const et = e.targetTouches ? e.targetTouches[0] : e
|
565
|
+
const {
|
566
|
+
sourceImgMouseDown: { on, mX, mY, x, y },
|
567
|
+
scale,
|
568
|
+
sourceImgMasking
|
569
|
+
} = this
|
570
|
+
const sim = sourceImgMasking
|
571
|
+
const nX = et.screenX
|
572
|
+
const nY = et.screenY
|
573
|
+
const dX = nX - mX
|
574
|
+
const dY = nY - mY
|
575
|
+
let rX = x + dX
|
576
|
+
let rY = y + dY
|
577
|
+
if (!on) return
|
578
|
+
if (rX > 0) {
|
579
|
+
rX = 0
|
580
|
+
}
|
581
|
+
if (rY > 0) {
|
582
|
+
rY = 0
|
583
|
+
}
|
584
|
+
if (rX < sim.width - scale.width) {
|
585
|
+
rX = sim.width - scale.width
|
586
|
+
}
|
587
|
+
if (rY < sim.height - scale.height) {
|
588
|
+
rY = sim.height - scale.height
|
589
|
+
}
|
590
|
+
scale.x = rX
|
591
|
+
scale.y = rY
|
592
|
+
},
|
593
|
+
// 按钮按下开始向右旋转
|
594
|
+
startRotateRight(e) {
|
595
|
+
const { scale } = this
|
596
|
+
scale.rotateRight = true
|
597
|
+
const rotate = () => {
|
598
|
+
if (scale.rotateRight) {
|
599
|
+
const degree = ++scale.degree
|
600
|
+
this.createImg(degree)
|
601
|
+
setTimeout(function() {
|
602
|
+
rotate()
|
603
|
+
}, 60)
|
604
|
+
}
|
605
|
+
}
|
606
|
+
rotate()
|
607
|
+
},
|
608
|
+
// 按钮按下开始向左旋转
|
609
|
+
startRotateLeft(e) {
|
610
|
+
const { scale } = this
|
611
|
+
scale.rotateLeft = true
|
612
|
+
const rotate = () => {
|
613
|
+
if (scale.rotateLeft) {
|
614
|
+
const degree = --scale.degree
|
615
|
+
this.createImg(degree)
|
616
|
+
setTimeout(function() {
|
617
|
+
rotate()
|
618
|
+
}, 60)
|
619
|
+
}
|
620
|
+
}
|
621
|
+
rotate()
|
622
|
+
},
|
623
|
+
// 停止旋转
|
624
|
+
endRotate() {
|
625
|
+
const { scale } = this
|
626
|
+
scale.rotateLeft = false
|
627
|
+
scale.rotateRight = false
|
628
|
+
},
|
629
|
+
// 按钮按下开始放大
|
630
|
+
startZoomAdd(e) {
|
631
|
+
const { scale } = this
|
632
|
+
scale.zoomAddOn = true
|
633
|
+
const zoom = () => {
|
634
|
+
if (scale.zoomAddOn) {
|
635
|
+
const range = scale.range >= 100 ? 100 : ++scale.range
|
636
|
+
this.zoomImg(range)
|
637
|
+
setTimeout(function() {
|
638
|
+
zoom()
|
639
|
+
}, 60)
|
640
|
+
}
|
641
|
+
}
|
642
|
+
zoom()
|
643
|
+
},
|
644
|
+
// 按钮松开或移开取消放大
|
645
|
+
endZoomAdd(e) {
|
646
|
+
this.scale.zoomAddOn = false
|
647
|
+
},
|
648
|
+
// 按钮按下开始缩小
|
649
|
+
startZoomSub(e) {
|
650
|
+
const { scale } = this
|
651
|
+
scale.zoomSubOn = true
|
652
|
+
const zoom = () => {
|
653
|
+
if (scale.zoomSubOn) {
|
654
|
+
const range = scale.range <= 0 ? 0 : --scale.range
|
655
|
+
this.zoomImg(range)
|
656
|
+
setTimeout(function() {
|
657
|
+
zoom()
|
658
|
+
}, 60)
|
659
|
+
}
|
660
|
+
}
|
661
|
+
zoom()
|
662
|
+
},
|
663
|
+
// 按钮松开或移开取消缩小
|
664
|
+
endZoomSub(e) {
|
665
|
+
const { scale } = this
|
666
|
+
scale.zoomSubOn = false
|
667
|
+
},
|
668
|
+
zoomChange(e) {
|
669
|
+
this.zoomImg(e.target.value)
|
670
|
+
},
|
671
|
+
// 缩放原图
|
672
|
+
zoomImg(newRange) {
|
673
|
+
const { sourceImgMasking, scale } = this
|
674
|
+
const {
|
675
|
+
maxWidth,
|
676
|
+
maxHeight,
|
677
|
+
minWidth,
|
678
|
+
minHeight,
|
679
|
+
width,
|
680
|
+
height,
|
681
|
+
x,
|
682
|
+
y
|
683
|
+
} = scale
|
684
|
+
const sim = sourceImgMasking
|
685
|
+
// 蒙版宽高
|
686
|
+
const sWidth = sim.width
|
687
|
+
const sHeight = sim.height
|
688
|
+
// 新宽高
|
689
|
+
const nWidth = minWidth + ((maxWidth - minWidth) * newRange) / 100
|
690
|
+
const nHeight = minHeight + ((maxHeight - minHeight) * newRange) / 100
|
691
|
+
// 新坐标(根据蒙版中心点缩放)
|
692
|
+
let nX = sWidth / 2 - (nWidth / width) * (sWidth / 2 - x)
|
693
|
+
let nY = sHeight / 2 - (nHeight / height) * (sHeight / 2 - y)
|
694
|
+
// 判断新坐标是否超过蒙版限制
|
695
|
+
if (nX > 0) {
|
696
|
+
nX = 0
|
697
|
+
}
|
698
|
+
if (nY > 0) {
|
699
|
+
nY = 0
|
700
|
+
}
|
701
|
+
if (nX < sWidth - nWidth) {
|
702
|
+
nX = sWidth - nWidth
|
703
|
+
}
|
704
|
+
if (nY < sHeight - nHeight) {
|
705
|
+
nY = sHeight - nHeight
|
706
|
+
}
|
707
|
+
// 赋值处理
|
708
|
+
scale.x = nX
|
709
|
+
scale.y = nY
|
710
|
+
scale.width = nWidth
|
711
|
+
scale.height = nHeight
|
712
|
+
scale.range = newRange
|
713
|
+
setTimeout(() => {
|
714
|
+
if (scale.range === newRange) {
|
715
|
+
this.createImg()
|
716
|
+
}
|
717
|
+
}, 300)
|
718
|
+
},
|
719
|
+
// 生成需求图片
|
720
|
+
createImg(e) {
|
721
|
+
const {
|
722
|
+
mime,
|
723
|
+
sourceImg,
|
724
|
+
scale: { x, y, width, height, degree },
|
725
|
+
sourceImgMasking: { scale }
|
726
|
+
} = this
|
727
|
+
const canvas = this.$refs.canvas
|
728
|
+
const ctx = canvas.getContext('2d')
|
729
|
+
if (e) {
|
730
|
+
// 取消鼠标按下移动状态
|
731
|
+
this.sourceImgMouseDown.on = false
|
732
|
+
}
|
733
|
+
canvas.width = this.width
|
734
|
+
canvas.height = this.height
|
735
|
+
ctx.clearRect(0, 0, this.width, this.height)
|
736
|
+
// 将透明区域设置为白色底边
|
737
|
+
ctx.fillStyle = '#fff'
|
738
|
+
ctx.fillRect(0, 0, this.width, this.height)
|
739
|
+
ctx.translate(this.width * 0.5, this.height * 0.5)
|
740
|
+
ctx.rotate((Math.PI * degree) / 180)
|
741
|
+
ctx.translate(-this.width * 0.5, -this.height * 0.5)
|
742
|
+
ctx.drawImage(
|
743
|
+
sourceImg,
|
744
|
+
x / scale,
|
745
|
+
y / scale,
|
746
|
+
width / scale,
|
747
|
+
height / scale
|
748
|
+
)
|
749
|
+
this.createImgUrl = canvas.toDataURL(mime)
|
750
|
+
},
|
751
|
+
prepareUpload() {
|
752
|
+
const { url, createImgUrl, field, ki } = this
|
753
|
+
this.$emit('crop-success', createImgUrl, field, ki)
|
754
|
+
if (typeof url === 'string' && url) {
|
755
|
+
this.upload()
|
756
|
+
} else {
|
757
|
+
this.off()
|
758
|
+
}
|
759
|
+
},
|
760
|
+
// 上传图片
|
761
|
+
upload() {
|
762
|
+
const {
|
763
|
+
lang,
|
764
|
+
imgFormat,
|
765
|
+
mime,
|
766
|
+
url,
|
767
|
+
params,
|
768
|
+
field,
|
769
|
+
ki,
|
770
|
+
createImgUrl
|
771
|
+
} = this
|
772
|
+
const fmData = new FormData()
|
773
|
+
fmData.append(
|
774
|
+
field,
|
775
|
+
data2blob(createImgUrl, mime),
|
776
|
+
field + '.' + imgFormat
|
777
|
+
)
|
778
|
+
// 添加其他参数
|
779
|
+
if (typeof params === 'object' && params) {
|
780
|
+
Object.keys(params).forEach(k => {
|
781
|
+
fmData.append(k, params[k])
|
782
|
+
})
|
783
|
+
}
|
784
|
+
// 监听进度回调
|
785
|
+
// const uploadProgress = (event) => {
|
786
|
+
// if (event.lengthComputable) {
|
787
|
+
// this.progress = 100 * Math.round(event.loaded) / event.total
|
788
|
+
// }
|
789
|
+
// }
|
790
|
+
// 上传文件
|
791
|
+
this.reset()
|
792
|
+
this.loading = 1
|
793
|
+
this.setStep(3)
|
794
|
+
request({
|
795
|
+
url,
|
796
|
+
method: 'post',
|
797
|
+
data: fmData
|
798
|
+
})
|
799
|
+
.then(resData => {
|
800
|
+
this.loading = 2
|
801
|
+
this.$emit('crop-upload-success', resData.data)
|
802
|
+
})
|
803
|
+
.catch(err => {
|
804
|
+
if (this.value) {
|
805
|
+
this.loading = 3
|
806
|
+
this.hasError = true
|
807
|
+
this.errorMsg = lang.fail
|
808
|
+
this.$emit('crop-upload-fail', err, field, ki)
|
809
|
+
}
|
810
|
+
})
|
811
|
+
},
|
812
|
+
closeHandler(e) {
|
813
|
+
if (this.value && (e.key === 'Escape' || e.keyCode === 27)) {
|
814
|
+
this.off()
|
815
|
+
}
|
816
|
+
}
|
817
|
+
}
|
818
|
+
}
|
819
|
+
</script>
|
820
|
+
|
821
|
+
<style lang="scss">
|
822
|
+
@charset "UTF-8";
|
823
|
+
@-webkit-keyframes vicp_progress {
|
824
|
+
0% {
|
825
|
+
background-position-y: 0;
|
826
|
+
}
|
827
|
+
100% {
|
828
|
+
background-position-y: 40px;
|
829
|
+
}
|
830
|
+
}
|
831
|
+
@keyframes vicp_progress {
|
832
|
+
0% {
|
833
|
+
background-position-y: 0;
|
834
|
+
}
|
835
|
+
100% {
|
836
|
+
background-position-y: 40px;
|
837
|
+
}
|
838
|
+
}
|
839
|
+
@-webkit-keyframes vicp {
|
840
|
+
0% {
|
841
|
+
opacity: 0;
|
842
|
+
-webkit-transform: scale(0) translatey(-60px);
|
843
|
+
transform: scale(0) translatey(-60px);
|
844
|
+
}
|
845
|
+
100% {
|
846
|
+
opacity: 1;
|
847
|
+
-webkit-transform: scale(1) translatey(0);
|
848
|
+
transform: scale(1) translatey(0);
|
849
|
+
}
|
850
|
+
}
|
851
|
+
@keyframes vicp {
|
852
|
+
0% {
|
853
|
+
opacity: 0;
|
854
|
+
-webkit-transform: scale(0) translatey(-60px);
|
855
|
+
transform: scale(0) translatey(-60px);
|
856
|
+
}
|
857
|
+
100% {
|
858
|
+
opacity: 1;
|
859
|
+
-webkit-transform: scale(1) translatey(0);
|
860
|
+
transform: scale(1) translatey(0);
|
861
|
+
}
|
862
|
+
}
|
863
|
+
.vue-image-crop-upload {
|
864
|
+
position: fixed;
|
865
|
+
display: block;
|
866
|
+
-webkit-box-sizing: border-box;
|
867
|
+
box-sizing: border-box;
|
868
|
+
z-index: 10000;
|
869
|
+
top: 0;
|
870
|
+
bottom: 0;
|
871
|
+
left: 0;
|
872
|
+
right: 0;
|
873
|
+
width: 100%;
|
874
|
+
height: 100%;
|
875
|
+
background-color: rgba(0, 0, 0, 0.65);
|
876
|
+
-webkit-tap-highlight-color: transparent;
|
877
|
+
-moz-tap-highlight-color: transparent;
|
878
|
+
}
|
879
|
+
.vue-image-crop-upload .vicp-wrap {
|
880
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
881
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
882
|
+
position: fixed;
|
883
|
+
display: block;
|
884
|
+
-webkit-box-sizing: border-box;
|
885
|
+
box-sizing: border-box;
|
886
|
+
z-index: 10000;
|
887
|
+
top: 0;
|
888
|
+
bottom: 0;
|
889
|
+
left: 0;
|
890
|
+
right: 0;
|
891
|
+
margin: auto;
|
892
|
+
width: 600px;
|
893
|
+
height: 330px;
|
894
|
+
padding: 25px;
|
895
|
+
background-color: #fff;
|
896
|
+
border-radius: 2px;
|
897
|
+
-webkit-animation: vicp 0.12s ease-in;
|
898
|
+
animation: vicp 0.12s ease-in;
|
899
|
+
}
|
900
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close {
|
901
|
+
position: absolute;
|
902
|
+
right: -30px;
|
903
|
+
top: -30px;
|
904
|
+
}
|
905
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close .vicp-icon4 {
|
906
|
+
position: relative;
|
907
|
+
display: block;
|
908
|
+
width: 30px;
|
909
|
+
height: 30px;
|
910
|
+
cursor: pointer;
|
911
|
+
-webkit-transition: -webkit-transform 0.18s;
|
912
|
+
transition: -webkit-transform 0.18s;
|
913
|
+
transition: transform 0.18s;
|
914
|
+
transition: transform 0.18s, -webkit-transform 0.18s;
|
915
|
+
-webkit-transform: rotate(0);
|
916
|
+
-ms-transform: rotate(0);
|
917
|
+
transform: rotate(0);
|
918
|
+
}
|
919
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close .vicp-icon4::after,
|
920
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close .vicp-icon4::before {
|
921
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
922
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
923
|
+
content: "";
|
924
|
+
position: absolute;
|
925
|
+
top: 12px;
|
926
|
+
left: 4px;
|
927
|
+
width: 20px;
|
928
|
+
height: 3px;
|
929
|
+
-webkit-transform: rotate(45deg);
|
930
|
+
-ms-transform: rotate(45deg);
|
931
|
+
transform: rotate(45deg);
|
932
|
+
background-color: #fff;
|
933
|
+
}
|
934
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close .vicp-icon4::after {
|
935
|
+
-webkit-transform: rotate(-45deg);
|
936
|
+
-ms-transform: rotate(-45deg);
|
937
|
+
transform: rotate(-45deg);
|
938
|
+
}
|
939
|
+
.vue-image-crop-upload .vicp-wrap .vicp-close .vicp-icon4:hover {
|
940
|
+
-webkit-transform: rotate(90deg);
|
941
|
+
-ms-transform: rotate(90deg);
|
942
|
+
transform: rotate(90deg);
|
943
|
+
}
|
944
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step1 .vicp-drop-area {
|
945
|
+
position: relative;
|
946
|
+
-webkit-box-sizing: border-box;
|
947
|
+
box-sizing: border-box;
|
948
|
+
padding: 35px;
|
949
|
+
height: 170px;
|
950
|
+
background-color: rgba(0, 0, 0, 0.03);
|
951
|
+
text-align: center;
|
952
|
+
border: 1px dashed rgba(0, 0, 0, 0.08);
|
953
|
+
overflow: hidden;
|
954
|
+
}
|
955
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step1 .vicp-drop-area .vicp-icon1 {
|
956
|
+
display: block;
|
957
|
+
margin: 0 auto 6px;
|
958
|
+
width: 42px;
|
959
|
+
height: 42px;
|
960
|
+
overflow: hidden;
|
961
|
+
}
|
962
|
+
.vue-image-crop-upload
|
963
|
+
.vicp-wrap
|
964
|
+
.vicp-step1
|
965
|
+
.vicp-drop-area
|
966
|
+
.vicp-icon1
|
967
|
+
.vicp-icon1-arrow {
|
968
|
+
display: block;
|
969
|
+
margin: 0 auto;
|
970
|
+
width: 0;
|
971
|
+
height: 0;
|
972
|
+
border-bottom: 14.7px solid rgba(0, 0, 0, 0.3);
|
973
|
+
border-left: 14.7px solid transparent;
|
974
|
+
border-right: 14.7px solid transparent;
|
975
|
+
}
|
976
|
+
.vue-image-crop-upload
|
977
|
+
.vicp-wrap
|
978
|
+
.vicp-step1
|
979
|
+
.vicp-drop-area
|
980
|
+
.vicp-icon1
|
981
|
+
.vicp-icon1-body {
|
982
|
+
display: block;
|
983
|
+
width: 12.6px;
|
984
|
+
height: 14.7px;
|
985
|
+
margin: 0 auto;
|
986
|
+
background-color: rgba(0, 0, 0, 0.3);
|
987
|
+
}
|
988
|
+
.vue-image-crop-upload
|
989
|
+
.vicp-wrap
|
990
|
+
.vicp-step1
|
991
|
+
.vicp-drop-area
|
992
|
+
.vicp-icon1
|
993
|
+
.vicp-icon1-bottom {
|
994
|
+
-webkit-box-sizing: border-box;
|
995
|
+
box-sizing: border-box;
|
996
|
+
display: block;
|
997
|
+
height: 12.6px;
|
998
|
+
border: 6px solid rgba(0, 0, 0, 0.3);
|
999
|
+
border-top: none;
|
1000
|
+
}
|
1001
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step1 .vicp-drop-area .vicp-hint {
|
1002
|
+
display: block;
|
1003
|
+
padding: 15px;
|
1004
|
+
font-size: 14px;
|
1005
|
+
color: #666;
|
1006
|
+
line-height: 30px;
|
1007
|
+
}
|
1008
|
+
.vue-image-crop-upload
|
1009
|
+
.vicp-wrap
|
1010
|
+
.vicp-step1
|
1011
|
+
.vicp-drop-area
|
1012
|
+
.vicp-no-supported-hint {
|
1013
|
+
display: block;
|
1014
|
+
position: absolute;
|
1015
|
+
top: 0;
|
1016
|
+
left: 0;
|
1017
|
+
padding: 30px;
|
1018
|
+
width: 100%;
|
1019
|
+
height: 60px;
|
1020
|
+
line-height: 30px;
|
1021
|
+
background-color: #eee;
|
1022
|
+
text-align: center;
|
1023
|
+
color: #666;
|
1024
|
+
font-size: 14px;
|
1025
|
+
}
|
1026
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step1 .vicp-drop-area:hover {
|
1027
|
+
cursor: pointer;
|
1028
|
+
border-color: rgba(0, 0, 0, 0.1);
|
1029
|
+
background-color: rgba(0, 0, 0, 0.05);
|
1030
|
+
}
|
1031
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop {
|
1032
|
+
overflow: hidden;
|
1033
|
+
}
|
1034
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left {
|
1035
|
+
float: left;
|
1036
|
+
}
|
1037
|
+
.vue-image-crop-upload
|
1038
|
+
.vicp-wrap
|
1039
|
+
.vicp-step2
|
1040
|
+
.vicp-crop
|
1041
|
+
.vicp-crop-left
|
1042
|
+
.vicp-img-container {
|
1043
|
+
position: relative;
|
1044
|
+
display: block;
|
1045
|
+
width: 240px;
|
1046
|
+
height: 180px;
|
1047
|
+
background-color: #e5e5e0;
|
1048
|
+
overflow: hidden;
|
1049
|
+
}
|
1050
|
+
.vue-image-crop-upload
|
1051
|
+
.vicp-wrap
|
1052
|
+
.vicp-step2
|
1053
|
+
.vicp-crop
|
1054
|
+
.vicp-crop-left
|
1055
|
+
.vicp-img-container
|
1056
|
+
.vicp-img {
|
1057
|
+
position: absolute;
|
1058
|
+
display: block;
|
1059
|
+
cursor: move;
|
1060
|
+
-webkit-user-select: none;
|
1061
|
+
-moz-user-select: none;
|
1062
|
+
-ms-user-select: none;
|
1063
|
+
user-select: none;
|
1064
|
+
}
|
1065
|
+
.vue-image-crop-upload
|
1066
|
+
.vicp-wrap
|
1067
|
+
.vicp-step2
|
1068
|
+
.vicp-crop
|
1069
|
+
.vicp-crop-left
|
1070
|
+
.vicp-img-container
|
1071
|
+
.vicp-img-shade {
|
1072
|
+
-webkit-box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1073
|
+
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1074
|
+
position: absolute;
|
1075
|
+
background-color: rgba(241, 242, 243, 0.8);
|
1076
|
+
}
|
1077
|
+
.vue-image-crop-upload
|
1078
|
+
.vicp-wrap
|
1079
|
+
.vicp-step2
|
1080
|
+
.vicp-crop
|
1081
|
+
.vicp-crop-left
|
1082
|
+
.vicp-img-container
|
1083
|
+
.vicp-img-shade.vicp-img-shade-1 {
|
1084
|
+
top: 0;
|
1085
|
+
left: 0;
|
1086
|
+
}
|
1087
|
+
.vue-image-crop-upload
|
1088
|
+
.vicp-wrap
|
1089
|
+
.vicp-step2
|
1090
|
+
.vicp-crop
|
1091
|
+
.vicp-crop-left
|
1092
|
+
.vicp-img-container
|
1093
|
+
.vicp-img-shade.vicp-img-shade-2 {
|
1094
|
+
bottom: 0;
|
1095
|
+
right: 0;
|
1096
|
+
}
|
1097
|
+
.vue-image-crop-upload
|
1098
|
+
.vicp-wrap
|
1099
|
+
.vicp-step2
|
1100
|
+
.vicp-crop
|
1101
|
+
.vicp-crop-left
|
1102
|
+
.vicp-rotate {
|
1103
|
+
position: relative;
|
1104
|
+
width: 240px;
|
1105
|
+
height: 18px;
|
1106
|
+
}
|
1107
|
+
.vue-image-crop-upload
|
1108
|
+
.vicp-wrap
|
1109
|
+
.vicp-step2
|
1110
|
+
.vicp-crop
|
1111
|
+
.vicp-crop-left
|
1112
|
+
.vicp-rotate
|
1113
|
+
i {
|
1114
|
+
display: block;
|
1115
|
+
width: 18px;
|
1116
|
+
height: 18px;
|
1117
|
+
border-radius: 100%;
|
1118
|
+
line-height: 18px;
|
1119
|
+
text-align: center;
|
1120
|
+
font-size: 12px;
|
1121
|
+
font-weight: bold;
|
1122
|
+
background-color: rgba(0, 0, 0, 0.08);
|
1123
|
+
color: #fff;
|
1124
|
+
overflow: hidden;
|
1125
|
+
}
|
1126
|
+
.vue-image-crop-upload
|
1127
|
+
.vicp-wrap
|
1128
|
+
.vicp-step2
|
1129
|
+
.vicp-crop
|
1130
|
+
.vicp-crop-left
|
1131
|
+
.vicp-rotate
|
1132
|
+
i:hover {
|
1133
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1134
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1135
|
+
cursor: pointer;
|
1136
|
+
background-color: rgba(0, 0, 0, 0.14);
|
1137
|
+
}
|
1138
|
+
.vue-image-crop-upload
|
1139
|
+
.vicp-wrap
|
1140
|
+
.vicp-step2
|
1141
|
+
.vicp-crop
|
1142
|
+
.vicp-crop-left
|
1143
|
+
.vicp-rotate
|
1144
|
+
i:first-child {
|
1145
|
+
float: left;
|
1146
|
+
}
|
1147
|
+
.vue-image-crop-upload
|
1148
|
+
.vicp-wrap
|
1149
|
+
.vicp-step2
|
1150
|
+
.vicp-crop
|
1151
|
+
.vicp-crop-left
|
1152
|
+
.vicp-rotate
|
1153
|
+
i:last-child {
|
1154
|
+
float: right;
|
1155
|
+
}
|
1156
|
+
.vue-image-crop-upload
|
1157
|
+
.vicp-wrap
|
1158
|
+
.vicp-step2
|
1159
|
+
.vicp-crop
|
1160
|
+
.vicp-crop-left
|
1161
|
+
.vicp-range {
|
1162
|
+
position: relative;
|
1163
|
+
margin: 30px 0 10px 0;
|
1164
|
+
width: 240px;
|
1165
|
+
height: 18px;
|
1166
|
+
}
|
1167
|
+
.vue-image-crop-upload
|
1168
|
+
.vicp-wrap
|
1169
|
+
.vicp-step2
|
1170
|
+
.vicp-crop
|
1171
|
+
.vicp-crop-left
|
1172
|
+
.vicp-range
|
1173
|
+
.vicp-icon5,
|
1174
|
+
.vue-image-crop-upload
|
1175
|
+
.vicp-wrap
|
1176
|
+
.vicp-step2
|
1177
|
+
.vicp-crop
|
1178
|
+
.vicp-crop-left
|
1179
|
+
.vicp-range
|
1180
|
+
.vicp-icon6 {
|
1181
|
+
position: absolute;
|
1182
|
+
top: 0;
|
1183
|
+
width: 18px;
|
1184
|
+
height: 18px;
|
1185
|
+
border-radius: 100%;
|
1186
|
+
background-color: rgba(0, 0, 0, 0.08);
|
1187
|
+
}
|
1188
|
+
.vue-image-crop-upload
|
1189
|
+
.vicp-wrap
|
1190
|
+
.vicp-step2
|
1191
|
+
.vicp-crop
|
1192
|
+
.vicp-crop-left
|
1193
|
+
.vicp-range
|
1194
|
+
.vicp-icon5:hover,
|
1195
|
+
.vue-image-crop-upload
|
1196
|
+
.vicp-wrap
|
1197
|
+
.vicp-step2
|
1198
|
+
.vicp-crop
|
1199
|
+
.vicp-crop-left
|
1200
|
+
.vicp-range
|
1201
|
+
.vicp-icon6:hover {
|
1202
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1203
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1204
|
+
cursor: pointer;
|
1205
|
+
background-color: rgba(0, 0, 0, 0.14);
|
1206
|
+
}
|
1207
|
+
.vue-image-crop-upload
|
1208
|
+
.vicp-wrap
|
1209
|
+
.vicp-step2
|
1210
|
+
.vicp-crop
|
1211
|
+
.vicp-crop-left
|
1212
|
+
.vicp-range
|
1213
|
+
.vicp-icon5 {
|
1214
|
+
left: 0;
|
1215
|
+
}
|
1216
|
+
.vue-image-crop-upload
|
1217
|
+
.vicp-wrap
|
1218
|
+
.vicp-step2
|
1219
|
+
.vicp-crop
|
1220
|
+
.vicp-crop-left
|
1221
|
+
.vicp-range
|
1222
|
+
.vicp-icon5::before {
|
1223
|
+
position: absolute;
|
1224
|
+
content: "";
|
1225
|
+
display: block;
|
1226
|
+
left: 3px;
|
1227
|
+
top: 8px;
|
1228
|
+
width: 12px;
|
1229
|
+
height: 2px;
|
1230
|
+
background-color: #fff;
|
1231
|
+
}
|
1232
|
+
.vue-image-crop-upload
|
1233
|
+
.vicp-wrap
|
1234
|
+
.vicp-step2
|
1235
|
+
.vicp-crop
|
1236
|
+
.vicp-crop-left
|
1237
|
+
.vicp-range
|
1238
|
+
.vicp-icon6 {
|
1239
|
+
right: 0;
|
1240
|
+
}
|
1241
|
+
.vue-image-crop-upload
|
1242
|
+
.vicp-wrap
|
1243
|
+
.vicp-step2
|
1244
|
+
.vicp-crop
|
1245
|
+
.vicp-crop-left
|
1246
|
+
.vicp-range
|
1247
|
+
.vicp-icon6::before {
|
1248
|
+
position: absolute;
|
1249
|
+
content: "";
|
1250
|
+
display: block;
|
1251
|
+
left: 3px;
|
1252
|
+
top: 8px;
|
1253
|
+
width: 12px;
|
1254
|
+
height: 2px;
|
1255
|
+
background-color: #fff;
|
1256
|
+
}
|
1257
|
+
.vue-image-crop-upload
|
1258
|
+
.vicp-wrap
|
1259
|
+
.vicp-step2
|
1260
|
+
.vicp-crop
|
1261
|
+
.vicp-crop-left
|
1262
|
+
.vicp-range
|
1263
|
+
.vicp-icon6::after {
|
1264
|
+
position: absolute;
|
1265
|
+
content: "";
|
1266
|
+
display: block;
|
1267
|
+
top: 3px;
|
1268
|
+
left: 8px;
|
1269
|
+
width: 2px;
|
1270
|
+
height: 12px;
|
1271
|
+
background-color: #fff;
|
1272
|
+
}
|
1273
|
+
.vue-image-crop-upload
|
1274
|
+
.vicp-wrap
|
1275
|
+
.vicp-step2
|
1276
|
+
.vicp-crop
|
1277
|
+
.vicp-crop-left
|
1278
|
+
.vicp-range
|
1279
|
+
input[type="range"] {
|
1280
|
+
display: block;
|
1281
|
+
padding-top: 5px;
|
1282
|
+
margin: 0 auto;
|
1283
|
+
width: 180px;
|
1284
|
+
height: 8px;
|
1285
|
+
vertical-align: top;
|
1286
|
+
background: transparent;
|
1287
|
+
-webkit-appearance: none;
|
1288
|
+
-moz-appearance: none;
|
1289
|
+
appearance: none;
|
1290
|
+
cursor: pointer;
|
1291
|
+
/* 滑块
|
1292
|
+
---------------------------------------------------------------*/
|
1293
|
+
/* 轨道
|
1294
|
+
---------------------------------------------------------------*/
|
1295
|
+
}
|
1296
|
+
.vue-image-crop-upload
|
1297
|
+
.vicp-wrap
|
1298
|
+
.vicp-step2
|
1299
|
+
.vicp-crop
|
1300
|
+
.vicp-crop-left
|
1301
|
+
.vicp-range
|
1302
|
+
input[type="range"]:focus {
|
1303
|
+
outline: none;
|
1304
|
+
}
|
1305
|
+
.vue-image-crop-upload
|
1306
|
+
.vicp-wrap
|
1307
|
+
.vicp-step2
|
1308
|
+
.vicp-crop
|
1309
|
+
.vicp-crop-left
|
1310
|
+
.vicp-range
|
1311
|
+
input[type="range"]::-webkit-slider-thumb {
|
1312
|
+
-webkit-box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1313
|
+
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1314
|
+
-webkit-appearance: none;
|
1315
|
+
appearance: none;
|
1316
|
+
margin-top: -3px;
|
1317
|
+
width: 12px;
|
1318
|
+
height: 12px;
|
1319
|
+
background-color: #61c091;
|
1320
|
+
border-radius: 100%;
|
1321
|
+
border: none;
|
1322
|
+
-webkit-transition: 0.2s;
|
1323
|
+
transition: 0.2s;
|
1324
|
+
}
|
1325
|
+
.vue-image-crop-upload
|
1326
|
+
.vicp-wrap
|
1327
|
+
.vicp-step2
|
1328
|
+
.vicp-crop
|
1329
|
+
.vicp-crop-left
|
1330
|
+
.vicp-range
|
1331
|
+
input[type="range"]::-moz-range-thumb {
|
1332
|
+
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1333
|
+
-moz-appearance: none;
|
1334
|
+
appearance: none;
|
1335
|
+
width: 12px;
|
1336
|
+
height: 12px;
|
1337
|
+
background-color: #61c091;
|
1338
|
+
border-radius: 100%;
|
1339
|
+
border: none;
|
1340
|
+
-webkit-transition: 0.2s;
|
1341
|
+
transition: 0.2s;
|
1342
|
+
}
|
1343
|
+
.vue-image-crop-upload
|
1344
|
+
.vicp-wrap
|
1345
|
+
.vicp-step2
|
1346
|
+
.vicp-crop
|
1347
|
+
.vicp-crop-left
|
1348
|
+
.vicp-range
|
1349
|
+
input[type="range"]::-ms-thumb {
|
1350
|
+
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.18);
|
1351
|
+
appearance: none;
|
1352
|
+
width: 12px;
|
1353
|
+
height: 12px;
|
1354
|
+
background-color: #61c091;
|
1355
|
+
border: none;
|
1356
|
+
border-radius: 100%;
|
1357
|
+
-webkit-transition: 0.2s;
|
1358
|
+
transition: 0.2s;
|
1359
|
+
}
|
1360
|
+
.vue-image-crop-upload
|
1361
|
+
.vicp-wrap
|
1362
|
+
.vicp-step2
|
1363
|
+
.vicp-crop
|
1364
|
+
.vicp-crop-left
|
1365
|
+
.vicp-range
|
1366
|
+
input[type="range"]:active::-moz-range-thumb {
|
1367
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
1368
|
+
width: 14px;
|
1369
|
+
height: 14px;
|
1370
|
+
}
|
1371
|
+
.vue-image-crop-upload
|
1372
|
+
.vicp-wrap
|
1373
|
+
.vicp-step2
|
1374
|
+
.vicp-crop
|
1375
|
+
.vicp-crop-left
|
1376
|
+
.vicp-range
|
1377
|
+
input[type="range"]:active::-ms-thumb {
|
1378
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
1379
|
+
width: 14px;
|
1380
|
+
height: 14px;
|
1381
|
+
}
|
1382
|
+
.vue-image-crop-upload
|
1383
|
+
.vicp-wrap
|
1384
|
+
.vicp-step2
|
1385
|
+
.vicp-crop
|
1386
|
+
.vicp-crop-left
|
1387
|
+
.vicp-range
|
1388
|
+
input[type="range"]:active::-webkit-slider-thumb {
|
1389
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
1390
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.23);
|
1391
|
+
margin-top: -4px;
|
1392
|
+
width: 14px;
|
1393
|
+
height: 14px;
|
1394
|
+
}
|
1395
|
+
.vue-image-crop-upload
|
1396
|
+
.vicp-wrap
|
1397
|
+
.vicp-step2
|
1398
|
+
.vicp-crop
|
1399
|
+
.vicp-crop-left
|
1400
|
+
.vicp-range
|
1401
|
+
input[type="range"]::-webkit-slider-runnable-track {
|
1402
|
+
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1403
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1404
|
+
width: 100%;
|
1405
|
+
height: 6px;
|
1406
|
+
cursor: pointer;
|
1407
|
+
border-radius: 2px;
|
1408
|
+
border: none;
|
1409
|
+
background-color: rgba(68, 170, 119, 0.3);
|
1410
|
+
}
|
1411
|
+
.vue-image-crop-upload
|
1412
|
+
.vicp-wrap
|
1413
|
+
.vicp-step2
|
1414
|
+
.vicp-crop
|
1415
|
+
.vicp-crop-left
|
1416
|
+
.vicp-range
|
1417
|
+
input[type="range"]::-moz-range-track {
|
1418
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1419
|
+
width: 100%;
|
1420
|
+
height: 6px;
|
1421
|
+
cursor: pointer;
|
1422
|
+
border-radius: 2px;
|
1423
|
+
border: none;
|
1424
|
+
background-color: rgba(68, 170, 119, 0.3);
|
1425
|
+
}
|
1426
|
+
.vue-image-crop-upload
|
1427
|
+
.vicp-wrap
|
1428
|
+
.vicp-step2
|
1429
|
+
.vicp-crop
|
1430
|
+
.vicp-crop-left
|
1431
|
+
.vicp-range
|
1432
|
+
input[type="range"]::-ms-track {
|
1433
|
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
1434
|
+
width: 100%;
|
1435
|
+
cursor: pointer;
|
1436
|
+
background: transparent;
|
1437
|
+
border-color: transparent;
|
1438
|
+
color: transparent;
|
1439
|
+
height: 6px;
|
1440
|
+
border-radius: 2px;
|
1441
|
+
border: none;
|
1442
|
+
}
|
1443
|
+
.vue-image-crop-upload
|
1444
|
+
.vicp-wrap
|
1445
|
+
.vicp-step2
|
1446
|
+
.vicp-crop
|
1447
|
+
.vicp-crop-left
|
1448
|
+
.vicp-range
|
1449
|
+
input[type="range"]::-ms-fill-lower {
|
1450
|
+
background-color: rgba(68, 170, 119, 0.3);
|
1451
|
+
}
|
1452
|
+
.vue-image-crop-upload
|
1453
|
+
.vicp-wrap
|
1454
|
+
.vicp-step2
|
1455
|
+
.vicp-crop
|
1456
|
+
.vicp-crop-left
|
1457
|
+
.vicp-range
|
1458
|
+
input[type="range"]::-ms-fill-upper {
|
1459
|
+
background-color: rgba(68, 170, 119, 0.15);
|
1460
|
+
}
|
1461
|
+
.vue-image-crop-upload
|
1462
|
+
.vicp-wrap
|
1463
|
+
.vicp-step2
|
1464
|
+
.vicp-crop
|
1465
|
+
.vicp-crop-left
|
1466
|
+
.vicp-range
|
1467
|
+
input[type="range"]:focus::-webkit-slider-runnable-track {
|
1468
|
+
background-color: rgba(68, 170, 119, 0.5);
|
1469
|
+
}
|
1470
|
+
.vue-image-crop-upload
|
1471
|
+
.vicp-wrap
|
1472
|
+
.vicp-step2
|
1473
|
+
.vicp-crop
|
1474
|
+
.vicp-crop-left
|
1475
|
+
.vicp-range
|
1476
|
+
input[type="range"]:focus::-moz-range-track {
|
1477
|
+
background-color: rgba(68, 170, 119, 0.5);
|
1478
|
+
}
|
1479
|
+
.vue-image-crop-upload
|
1480
|
+
.vicp-wrap
|
1481
|
+
.vicp-step2
|
1482
|
+
.vicp-crop
|
1483
|
+
.vicp-crop-left
|
1484
|
+
.vicp-range
|
1485
|
+
input[type="range"]:focus::-ms-fill-lower {
|
1486
|
+
background-color: rgba(68, 170, 119, 0.45);
|
1487
|
+
}
|
1488
|
+
.vue-image-crop-upload
|
1489
|
+
.vicp-wrap
|
1490
|
+
.vicp-step2
|
1491
|
+
.vicp-crop
|
1492
|
+
.vicp-crop-left
|
1493
|
+
.vicp-range
|
1494
|
+
input[type="range"]:focus::-ms-fill-upper {
|
1495
|
+
background-color: rgba(68, 170, 119, 0.25);
|
1496
|
+
}
|
1497
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-right {
|
1498
|
+
float: right;
|
1499
|
+
}
|
1500
|
+
.vue-image-crop-upload
|
1501
|
+
.vicp-wrap
|
1502
|
+
.vicp-step2
|
1503
|
+
.vicp-crop
|
1504
|
+
.vicp-crop-right
|
1505
|
+
.vicp-preview {
|
1506
|
+
height: 150px;
|
1507
|
+
overflow: hidden;
|
1508
|
+
}
|
1509
|
+
.vue-image-crop-upload
|
1510
|
+
.vicp-wrap
|
1511
|
+
.vicp-step2
|
1512
|
+
.vicp-crop
|
1513
|
+
.vicp-crop-right
|
1514
|
+
.vicp-preview
|
1515
|
+
.vicp-preview-item {
|
1516
|
+
position: relative;
|
1517
|
+
padding: 5px;
|
1518
|
+
width: 100px;
|
1519
|
+
height: 100px;
|
1520
|
+
float: left;
|
1521
|
+
margin-right: 16px;
|
1522
|
+
}
|
1523
|
+
.vue-image-crop-upload
|
1524
|
+
.vicp-wrap
|
1525
|
+
.vicp-step2
|
1526
|
+
.vicp-crop
|
1527
|
+
.vicp-crop-right
|
1528
|
+
.vicp-preview
|
1529
|
+
.vicp-preview-item
|
1530
|
+
span {
|
1531
|
+
position: absolute;
|
1532
|
+
bottom: -30px;
|
1533
|
+
width: 100%;
|
1534
|
+
font-size: 14px;
|
1535
|
+
color: #bbb;
|
1536
|
+
display: block;
|
1537
|
+
text-align: center;
|
1538
|
+
}
|
1539
|
+
.vue-image-crop-upload
|
1540
|
+
.vicp-wrap
|
1541
|
+
.vicp-step2
|
1542
|
+
.vicp-crop
|
1543
|
+
.vicp-crop-right
|
1544
|
+
.vicp-preview
|
1545
|
+
.vicp-preview-item
|
1546
|
+
img {
|
1547
|
+
position: absolute;
|
1548
|
+
display: block;
|
1549
|
+
top: 0;
|
1550
|
+
bottom: 0;
|
1551
|
+
left: 0;
|
1552
|
+
right: 0;
|
1553
|
+
margin: auto;
|
1554
|
+
padding: 3px;
|
1555
|
+
background-color: #fff;
|
1556
|
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
1557
|
+
overflow: hidden;
|
1558
|
+
-webkit-user-select: none;
|
1559
|
+
-moz-user-select: none;
|
1560
|
+
-ms-user-select: none;
|
1561
|
+
user-select: none;
|
1562
|
+
}
|
1563
|
+
.vue-image-crop-upload
|
1564
|
+
.vicp-wrap
|
1565
|
+
.vicp-step2
|
1566
|
+
.vicp-crop
|
1567
|
+
.vicp-crop-right
|
1568
|
+
.vicp-preview
|
1569
|
+
.vicp-preview-item.vicp-preview-item-circle {
|
1570
|
+
margin-right: 0;
|
1571
|
+
}
|
1572
|
+
.vue-image-crop-upload
|
1573
|
+
.vicp-wrap
|
1574
|
+
.vicp-step2
|
1575
|
+
.vicp-crop
|
1576
|
+
.vicp-crop-right
|
1577
|
+
.vicp-preview
|
1578
|
+
.vicp-preview-item.vicp-preview-item-circle
|
1579
|
+
img {
|
1580
|
+
border-radius: 100%;
|
1581
|
+
}
|
1582
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step3 .vicp-upload {
|
1583
|
+
position: relative;
|
1584
|
+
-webkit-box-sizing: border-box;
|
1585
|
+
box-sizing: border-box;
|
1586
|
+
padding: 35px;
|
1587
|
+
height: 170px;
|
1588
|
+
background-color: rgba(0, 0, 0, 0.03);
|
1589
|
+
text-align: center;
|
1590
|
+
border: 1px dashed #ddd;
|
1591
|
+
}
|
1592
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step3 .vicp-upload .vicp-loading {
|
1593
|
+
display: block;
|
1594
|
+
padding: 15px;
|
1595
|
+
font-size: 16px;
|
1596
|
+
color: #999;
|
1597
|
+
line-height: 30px;
|
1598
|
+
}
|
1599
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step3 .vicp-upload .vicp-progress-wrap {
|
1600
|
+
margin-top: 12px;
|
1601
|
+
background-color: rgba(0, 0, 0, 0.08);
|
1602
|
+
border-radius: 3px;
|
1603
|
+
}
|
1604
|
+
.vue-image-crop-upload
|
1605
|
+
.vicp-wrap
|
1606
|
+
.vicp-step3
|
1607
|
+
.vicp-upload
|
1608
|
+
.vicp-progress-wrap
|
1609
|
+
.vicp-progress {
|
1610
|
+
position: relative;
|
1611
|
+
display: block;
|
1612
|
+
height: 5px;
|
1613
|
+
border-radius: 3px;
|
1614
|
+
background-color: #4a7;
|
1615
|
+
-webkit-box-shadow: 0 2px 6px 0 rgba(68, 170, 119, 0.3);
|
1616
|
+
box-shadow: 0 2px 6px 0 rgba(68, 170, 119, 0.3);
|
1617
|
+
-webkit-transition: width 0.15s linear;
|
1618
|
+
transition: width 0.15s linear;
|
1619
|
+
background-image: -webkit-linear-gradient(
|
1620
|
+
135deg,
|
1621
|
+
rgba(255, 255, 255, 0.2) 25%,
|
1622
|
+
transparent 25%,
|
1623
|
+
transparent 50%,
|
1624
|
+
rgba(255, 255, 255, 0.2) 50%,
|
1625
|
+
rgba(255, 255, 255, 0.2) 75%,
|
1626
|
+
transparent 75%,
|
1627
|
+
transparent
|
1628
|
+
);
|
1629
|
+
background-image: linear-gradient(
|
1630
|
+
-45deg,
|
1631
|
+
rgba(255, 255, 255, 0.2) 25%,
|
1632
|
+
transparent 25%,
|
1633
|
+
transparent 50%,
|
1634
|
+
rgba(255, 255, 255, 0.2) 50%,
|
1635
|
+
rgba(255, 255, 255, 0.2) 75%,
|
1636
|
+
transparent 75%,
|
1637
|
+
transparent
|
1638
|
+
);
|
1639
|
+
background-size: 40px 40px;
|
1640
|
+
-webkit-animation: vicp_progress 0.5s linear infinite;
|
1641
|
+
animation: vicp_progress 0.5s linear infinite;
|
1642
|
+
}
|
1643
|
+
.vue-image-crop-upload
|
1644
|
+
.vicp-wrap
|
1645
|
+
.vicp-step3
|
1646
|
+
.vicp-upload
|
1647
|
+
.vicp-progress-wrap
|
1648
|
+
.vicp-progress::after {
|
1649
|
+
content: "";
|
1650
|
+
position: absolute;
|
1651
|
+
display: block;
|
1652
|
+
top: -3px;
|
1653
|
+
right: -3px;
|
1654
|
+
width: 9px;
|
1655
|
+
height: 9px;
|
1656
|
+
border: 1px solid rgba(245, 246, 247, 0.7);
|
1657
|
+
-webkit-box-shadow: 0 1px 4px 0 rgba(68, 170, 119, 0.7);
|
1658
|
+
box-shadow: 0 1px 4px 0 rgba(68, 170, 119, 0.7);
|
1659
|
+
border-radius: 100%;
|
1660
|
+
background-color: #4a7;
|
1661
|
+
}
|
1662
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step3 .vicp-upload .vicp-error,
|
1663
|
+
.vue-image-crop-upload .vicp-wrap .vicp-step3 .vicp-upload .vicp-success {
|
1664
|
+
height: 100px;
|
1665
|
+
line-height: 100px;
|
1666
|
+
}
|
1667
|
+
.vue-image-crop-upload .vicp-wrap .vicp-operate {
|
1668
|
+
position: absolute;
|
1669
|
+
right: 20px;
|
1670
|
+
bottom: 20px;
|
1671
|
+
}
|
1672
|
+
.vue-image-crop-upload .vicp-wrap .vicp-operate a {
|
1673
|
+
position: relative;
|
1674
|
+
float: left;
|
1675
|
+
display: block;
|
1676
|
+
margin-left: 10px;
|
1677
|
+
width: 100px;
|
1678
|
+
height: 36px;
|
1679
|
+
line-height: 36px;
|
1680
|
+
text-align: center;
|
1681
|
+
cursor: pointer;
|
1682
|
+
font-size: 14px;
|
1683
|
+
color: #4a7;
|
1684
|
+
border-radius: 2px;
|
1685
|
+
overflow: hidden;
|
1686
|
+
-webkit-user-select: none;
|
1687
|
+
-moz-user-select: none;
|
1688
|
+
-ms-user-select: none;
|
1689
|
+
user-select: none;
|
1690
|
+
}
|
1691
|
+
.vue-image-crop-upload .vicp-wrap .vicp-operate a:hover {
|
1692
|
+
background-color: rgba(0, 0, 0, 0.03);
|
1693
|
+
}
|
1694
|
+
.vue-image-crop-upload .vicp-wrap .vicp-error,
|
1695
|
+
.vue-image-crop-upload .vicp-wrap .vicp-success {
|
1696
|
+
display: block;
|
1697
|
+
font-size: 14px;
|
1698
|
+
line-height: 24px;
|
1699
|
+
height: 24px;
|
1700
|
+
color: #d10;
|
1701
|
+
text-align: center;
|
1702
|
+
vertical-align: top;
|
1703
|
+
}
|
1704
|
+
.vue-image-crop-upload .vicp-wrap .vicp-success {
|
1705
|
+
color: #4a7;
|
1706
|
+
}
|
1707
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon3 {
|
1708
|
+
position: relative;
|
1709
|
+
display: inline-block;
|
1710
|
+
width: 20px;
|
1711
|
+
height: 20px;
|
1712
|
+
top: 4px;
|
1713
|
+
}
|
1714
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon3::after {
|
1715
|
+
position: absolute;
|
1716
|
+
top: 3px;
|
1717
|
+
left: 6px;
|
1718
|
+
width: 6px;
|
1719
|
+
height: 10px;
|
1720
|
+
border-width: 0 2px 2px 0;
|
1721
|
+
border-color: #4a7;
|
1722
|
+
border-style: solid;
|
1723
|
+
-webkit-transform: rotate(45deg);
|
1724
|
+
-ms-transform: rotate(45deg);
|
1725
|
+
transform: rotate(45deg);
|
1726
|
+
content: "";
|
1727
|
+
}
|
1728
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon2 {
|
1729
|
+
position: relative;
|
1730
|
+
display: inline-block;
|
1731
|
+
width: 20px;
|
1732
|
+
height: 20px;
|
1733
|
+
top: 4px;
|
1734
|
+
}
|
1735
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon2::after,
|
1736
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon2::before {
|
1737
|
+
content: "";
|
1738
|
+
position: absolute;
|
1739
|
+
top: 9px;
|
1740
|
+
left: 4px;
|
1741
|
+
width: 13px;
|
1742
|
+
height: 2px;
|
1743
|
+
background-color: #d10;
|
1744
|
+
-webkit-transform: rotate(45deg);
|
1745
|
+
-ms-transform: rotate(45deg);
|
1746
|
+
transform: rotate(45deg);
|
1747
|
+
}
|
1748
|
+
.vue-image-crop-upload .vicp-wrap .vicp-icon2::after {
|
1749
|
+
-webkit-transform: rotate(-45deg);
|
1750
|
+
-ms-transform: rotate(-45deg);
|
1751
|
+
transform: rotate(-45deg);
|
1752
|
+
}
|
1753
|
+
.e-ripple {
|
1754
|
+
position: absolute;
|
1755
|
+
border-radius: 100%;
|
1756
|
+
background-color: rgba(0, 0, 0, 0.15);
|
1757
|
+
background-clip: padding-box;
|
1758
|
+
pointer-events: none;
|
1759
|
+
-webkit-user-select: none;
|
1760
|
+
-moz-user-select: none;
|
1761
|
+
-ms-user-select: none;
|
1762
|
+
user-select: none;
|
1763
|
+
-webkit-transform: scale(0);
|
1764
|
+
-ms-transform: scale(0);
|
1765
|
+
transform: scale(0);
|
1766
|
+
opacity: 1;
|
1767
|
+
}
|
1768
|
+
.e-ripple.z-active {
|
1769
|
+
opacity: 0;
|
1770
|
+
-webkit-transform: scale(2);
|
1771
|
+
-ms-transform: scale(2);
|
1772
|
+
transform: scale(2);
|
1773
|
+
-webkit-transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
|
1774
|
+
transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
|
1775
|
+
transition: opacity 1.2s ease-out, transform 0.6s ease-out;
|
1776
|
+
transition: opacity 1.2s ease-out, transform 0.6s ease-out,
|
1777
|
+
-webkit-transform 0.6s ease-out;
|
1778
|
+
}
|
1779
|
+
</style>
|