Merge pull request #4 from PanJiaChen/master

sync
This commit is contained in:
szueric 2019-06-12 16:51:06 +08:00 committed by GitHub
commit 0f5ea1867a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 22 deletions

View File

@ -839,16 +839,20 @@ export default {
that.$emit('crop-upload-fail', err, field, ki) that.$emit('crop-upload-fail', err, field, ki)
} }
}) })
},
closeHandler(e) {
if (this.value && (e.key == 'Escape' || e.keyCode == 27)) {
this.off()
}
} }
}, },
created() { created() {
// esc // esc
document.addEventListener('keyup', (e) => { document.addEventListener('keyup', this.closeHandler)
if (this.value && (e.key == 'Escape' || e.keyCode == 27)) { },
this.off() destroyed() {
} document.removeEventListener('keyup', this.closeHandler)
}) },
}
} }
</script> </script>

View File

@ -9,7 +9,7 @@
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:required="required" :required="required"
type="email" type="email"
class="material-input" class="material-input"
@ -24,7 +24,7 @@
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:required="required" :required="required"
type="url" type="url"
class="material-input" class="material-input"
@ -40,7 +40,7 @@
:step="step" :step="step"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:max="max" :max="max"
:min="min" :min="min"
:minlength="minlength" :minlength="minlength"
@ -59,7 +59,7 @@
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:max="max" :max="max"
:min="min" :min="min"
:required="required" :required="required"
@ -76,7 +76,7 @@
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:required="required" :required="required"
type="tel" type="tel"
class="material-input" class="material-input"
@ -91,7 +91,7 @@
:placeholder="fillPlaceHolder" :placeholder="fillPlaceHolder"
:readonly="readonly" :readonly="readonly"
:disabled="disabled" :disabled="disabled"
:autoComplete="autoComplete" :autocomplete="autoComplete"
:minlength="minlength" :minlength="minlength"
:maxlength="maxlength" :maxlength="maxlength"
:required="required" :required="required"

View File

@ -5,7 +5,8 @@
<slot /> <slot />
</div> </div>
</div> </div>
<img :src="image" class="pan-thumb"> <!-- eslint-disable-next-line -->
<div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div>
</div> </div>
</template> </template>
@ -52,7 +53,8 @@ export default {
.pan-thumb { .pan-thumb {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-size: 100%; background-position: center center;
background-size: cover;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
@ -60,7 +62,7 @@ export default {
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
} }
.pan-thumb:after { /* .pan-thumb:after {
content: ''; content: '';
width: 8px; width: 8px;
height: 8px; height: 8px;
@ -71,7 +73,7 @@ export default {
margin: -4px 0 0 -4px; margin: -4px 0 0 -4px;
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%); background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9); box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
} } */
.pan-info { .pan-info {
position: absolute; position: absolute;

View File

@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send cookies when cross-domain requests
timeout: 5000 // request timeout timeout: 5000 // request timeout
}) })

View File

@ -7,7 +7,7 @@
<PlatformDropdown v-model="postForm.platforms" /> <PlatformDropdown v-model="postForm.platforms" />
<SourceUrlDropdown v-model="postForm.source_uri" /> <SourceUrlDropdown v-model="postForm.source_uri" />
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm"> <el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">
Publush Publish
</el-button> </el-button>
<el-button v-loading="loading" type="warning" @click="draftForm"> <el-button v-loading="loading" type="warning" @click="draftForm">
Draft Draft
@ -36,7 +36,7 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label-width="120px" label="Publush Time:" class="postInfo-container-item"> <el-form-item label-width="120px" label="Publish Time:" class="postInfo-container-item">
<el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" /> <el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on" label-position="left">
<div class="title-container"> <div class="title-container">
<h3 class="title">Login Form</h3> <h3 class="title">Login Form</h3>
@ -17,7 +17,7 @@
name="username" name="username"
type="text" type="text"
tabindex="1" tabindex="1"
auto-complete="on" autocomplete="on"
/> />
</el-form-item> </el-form-item>
@ -34,7 +34,7 @@
placeholder="Password" placeholder="Password"
name="password" name="password"
tabindex="2" tabindex="2"
auto-complete="on" autocomplete="on"
@keyup.native="checkCapslock" @keyup.native="checkCapslock"
@blur="capsTooltip = false" @blur="capsTooltip = false"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"