Commit 51899a0a authored by JingChao's avatar JingChao

移除fastclick和添加模态框左右弹出效果

parent a2d764a2
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
"dependencies": { "dependencies": {
"autosize": "^3.0.20", "autosize": "^3.0.20",
"better-scroll": "^1.10.3", "better-scroll": "^1.10.3",
"fastclick": "https://hel.hand-china.com/easyUI/fastclick.git",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vux": "^2.9.2", "vux": "^2.9.2",
......
...@@ -18,7 +18,6 @@ Vue.use(ShowPicture) ...@@ -18,7 +18,6 @@ Vue.use(ShowPicture)
Vue.use(Select) Vue.use(Select)
Vue.use(NumberKeyboard) Vue.use(NumberKeyboard)
Vue.use(Notify) Vue.use(Notify)
Vue.use(HlsModal)
// Vue.prototype.HlsModal = window.HlsModal = HlsModal // Vue.prototype.HlsModal = window.HlsModal = HlsModal
export default { export default {
......
...@@ -4893,7 +4893,7 @@ input:checked + .checkbox-icon:before { ...@@ -4893,7 +4893,7 @@ input:checked + .checkbox-icon:before {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 10; z-index: 25;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, .1); background-color: rgba(0, 0, 0, .1);
...@@ -4907,7 +4907,7 @@ input:checked + .checkbox-icon:before { ...@@ -4907,7 +4907,7 @@ input:checked + .checkbox-icon:before {
display: block; display: block;
position: absolute; position: absolute;
top: 0; top: 0;
z-index: 10; z-index: 30;
overflow: hidden; overflow: hidden;
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
...@@ -4928,36 +4928,6 @@ input:checked + .checkbox-icon:before { ...@@ -4928,36 +4928,6 @@ input:checked + .checkbox-icon:before {
bottom: 0; bottom: 0;
} }
.platform-ios.platform-cordova .modal-wrapper .modal .bar-header:not(.bar-subheader) {
height: 1.76rem;
}
.platform-ios.platform-cordova .modal-wrapper .modal .bar-header:not(.bar-subheader) > * {
margin-top: 0;
}
.platform-ios.platform-cordova .modal-wrapper .modal .tabs-top > .tabs,
.platform-ios.platform-cordova .modal-wrapper .modal .tabs.tabs-top {
top: 1.76rem;
}
.platform-ios.platform-cordova .modal-wrapper .modal .has-header,
.platform-ios.platform-cordova .modal-wrapper .modal .bar-subheader {
top: 1.76rem;
}
.platform-ios.platform-cordova .modal-wrapper .modal .has-subheader {
top: 3.52rem;
}
.platform-ios.platform-cordova .modal-wrapper .modal .has-header.has-tabs-top {
top: 3.72rem;
}
.platform-ios.platform-cordova .modal-wrapper .modal .has-header.has-subheader.has-tabs-top {
top: 5.48rem;
}
.modal-backdrop-bg { .modal-backdrop-bg {
-webkit-transition: opacity 300ms ease-in-out; -webkit-transition: opacity 300ms ease-in-out;
transition: opacity 300ms ease-in-out; transition: opacity 300ms ease-in-out;
...@@ -5311,6 +5281,69 @@ input:checked + .checkbox-icon:before { ...@@ -5311,6 +5281,69 @@ input:checked + .checkbox-icon:before {
transition: all ease-in-out 250ms; transition: all ease-in-out 250ms;
} }
.slide-in-down {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
.slide-in-down.ng-enter,
.slide-in-down > .ng-enter {
-webkit-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
}
.slide-in-down.ng-enter-active,
.slide-in-down > .ng-enter-active {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.slide-in-down.ng-leave,
.slide-in-down > .ng-leave {
-webkit-transition: all ease-in-out 250ms;
transition: all ease-in-out 250ms;
}
.slide-in-right {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
.slide-in-right.ng-enter, .slide-in-right > .ng-enter {
-webkit-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
}
.slide-in-right.ng-enter-active, .slide-in-right > .ng-enter-active {
-webkit-transform: translateX(0);
transform: translateX(0);
}
.slide-in-right.ng-leave, .slide-in-right > .ng-leave {
-webkit-transition: all ease-in-out 250ms;
transition: all ease-in-out 250ms;
}
.slide-in-left {
-webkit-transform: translateX(200%);
transform: translateX(200%);
}
.slide-in-left.ng-enter, .slide-in-left > .ng-enter {
-webkit-transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
transition: all cubic-bezier(0.1, 0.7, 0.1, 1) 400ms;
}
.slide-in-left.ng-enter-active, .slide-in-left > .ng-enter-active {
-webkit-transform: translateX(0);
transform: translateX(0);
}
.slide-in-left.ng-leave, .slide-in-left > .ng-leave {
-webkit-transition: all ease-in-out 250ms;
transition: all ease-in-out 250ms;
}
@-webkit-keyframes scaleOut { @-webkit-keyframes scaleOut {
from { from {
-webkit-transform: scale(1); -webkit-transform: scale(1);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div v-if="showContent" :style="{'min-height':minHeight,'flex':proportion[1] }" class="add-content"> <div v-if="showContent" :style="{'min-height':minHeight,'flex':proportion[1] }" class="add-content">
<slot name="content"/> <slot name="content"/>
<slot name="right-icon"/> <slot name="right-icon"/>
<img v-if="showArrow" :src="rightIcon" class="right-icon" style="height: 0.2rem"> <img v-if="showArrow" :src="rightIcon" class="right-icon">
</div> </div>
<slot/> <slot/>
</div> </div>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
showFocusBorder: { showFocusBorder: {
type: Boolean, type: Boolean,
default: true, default: false,
}, },
}, },
data () { data () {
...@@ -97,8 +97,9 @@ export default { ...@@ -97,8 +97,9 @@ export default {
}, },
focusin () { focusin () {
let vm = this let vm = this
let showFocus = vm.$parent.showFocusBorder ? vm.$parent.showFocusBorder : vm.showFocusBorder
vm.focus = 'focus' vm.focus = 'focus'
if (vm.showFocusBorder) { if (showFocus) {
vm.focusBorder = 'focus-border' vm.focusBorder = 'focus-border'
} }
}, },
...@@ -124,7 +125,6 @@ export default { ...@@ -124,7 +125,6 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
@import "../../common/styles/variables";
.hls-item { .hls-item {
//height: 100px; //height: 100px;
width: 100%; width: 100%;
...@@ -224,6 +224,7 @@ export default { ...@@ -224,6 +224,7 @@ export default {
//右侧图标 //右侧图标
.right-icon { .right-icon {
margin-left: 5px; margin-left: 5px;
height: 0.2rem;
} }
//toggle //toggle
......
...@@ -21,6 +21,10 @@ export default { ...@@ -21,6 +21,10 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
showFocusBorder: {
type: Boolean,
default: false,
},
}, },
data () { data () {
return {} return {}
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div v-show="showModal" :class="active" class="modal-backdrop" @touchstart="hideModal"> <div v-show="showModal" :class="active" class="modal-backdrop" @touchstart="hideModal">
<div class="modal-backdrop-bg"/> <div class="modal-backdrop-bg"/>
<div <div
:class="[modalClass,cusClass]" :class="[modalClass,transition]"
class="modal slide-in-up" class="modal"
@touchstart="start" @touchstart="start"
@mousedown="start"> @mousedown="start">
<slot/> <slot/>
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
value: Boolean, // eslint-disable-line value: Boolean, // eslint-disable-line
position: { position: {
type: String, type: String,
default: 'bottom', default: 'top',
}, },
cusClass: { cusClass: {
type: String, type: String,
...@@ -34,7 +34,12 @@ export default { ...@@ -34,7 +34,12 @@ export default {
}, },
computed: { computed: {
transition () { transition () {
return this.position === 'bottom' ? 'slide-in-up' : 'slide-in-down' return {
'slide-in-up': this.position === 'top',
'slide-in-down': this.position === 'bottom',
'slide-in-left': this.position === 'left',
'slide-in-right': this.position === 'right',
}
}, },
active () { active () {
return this.showModal ? 'active' : 'hide' return this.showModal ? 'active' : 'hide'
...@@ -59,7 +64,7 @@ export default { ...@@ -59,7 +64,7 @@ export default {
this.state = 2 this.state = 2
setTimeout(() => { setTimeout(() => {
}, 400) }, 400)
}, 50) }, 100)
}, },
showModal (val) { showModal (val) {
// 标签用法时需要发射一个input事件,修改v-model绑定的属性值 // 标签用法时需要发射一个input事件,修改v-model绑定的属性值
......
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import Vue from 'vue'
import FastClick from 'fastclick' // import FastClick from 'fastclick'
import axios from 'axios' import axios from 'axios'
import App from './App' import App from './App'
import router from './router/index' import router from './router/index'
...@@ -89,7 +89,7 @@ let hlsExit = function () { ...@@ -89,7 +89,7 @@ let hlsExit = function () {
} }
Vue.prototype.$hlsExit = hlsExit Vue.prototype.$hlsExit = hlsExit
FastClick.attach(document.body) // FastClick.attach(document.body)
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
</h-header> </h-header>
<s-tab> <s-tab>
<tab-item>Vue</tab-item> <tab-item>Vue</tab-item>
<tab-item>APP</tab-item> <tab-item @click.native="showModal = !showModal">APP</tab-item>
</s-tab> </s-tab>
<h-content > <h-content >
<list-item> <list-item :show-focus-border="true">
<item> <item :show-arrow="true" :arrow-right="arrarRight">
<section slot="name">姓名</section> <section slot="name">姓名</section>
<input slot="content" type="text"> <input slot="content" type="text">
</item> </item>
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
</s-tab> --> </s-tab> -->
<!-- <div style="height: 40px;"/> --> <!-- <div style="height: 40px;"/> -->
<bottom-tab/> <bottom-tab/>
<h-modal v-model="showModal" position="left">
<div>123</div>
</h-modal>
</h-view> </h-view>
</template> </template>
...@@ -83,6 +86,7 @@ ...@@ -83,6 +86,7 @@
export default { export default {
data () { data () {
return { return {
arrarRight: require('../assets/image/right-arrow@2x.png'),
userImg: window.localStorage.userImg || '', userImg: window.localStorage.userImg || '',
message: [{ message: [{
'isFromeMe': false, 'isFromeMe': false,
...@@ -93,6 +97,7 @@ export default { ...@@ -93,6 +97,7 @@ export default {
}, },
autosize: true, autosize: true,
height: '', height: '',
showModal: false,
} }
}, },
watch: {}, watch: {},
...@@ -193,6 +198,9 @@ export default { ...@@ -193,6 +198,9 @@ export default {
.h-bottom-tab{ .h-bottom-tab{
box-shadow: none; box-shadow: none;
} }
.modal{
left:50%
}
.content { .content {
background-color: #eeeeee; background-color: #eeeeee;
//border: 1px solid red; //border: 1px solid red;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment