Commit a8fbaaef by yanju

Merge branch 'fix-issue#15' into 'master'

动态点赞修改

See merge request pigbigbig/beyond-clouds-front!138
parents 333fb0d1 e9ccddeb
import AutoTextarea from './src/main';
AutoTextarea.install = function (Vue) {
Vue.component(AutoTextarea.name,AutoTextarea)
}
export default AutoTextarea
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<script> <script>
export default { export default {
name:'autoTextarea', name:'yunTextarea',
data(){ data(){
return { return {
temp_value:(()=>{ temp_value:(()=>{
......
import yunEditor from './src/main';
import YunVideo from "../video/src/main";
yunEditor.install = function (Vue) {
Vue.component(yunEditor.name,yunEditor)
}
export default yunEditor
<template>
<div>
<yun-textarea ref="vNoteTextarea" placeholder="placeholder"
class="content-input" fontSize="14px"
style="border:1px solid black;width:200px"
lineHeight="1.5" v-model="d_value" fullHeight
></yun-textarea>
<yun-video dataSrc=" http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></yun-video>
<div class="height"></div>
</div>
</template>
<script>
export default {
name:'yunEditor',
data(){
return{
d_value:''
}
}
}
</script>
<style lang="scss">
.height{
height:900px;
& textarea{
width:768*$length;
border:1px solid #EFEFEF;
border-radius:4*$length;
padding:11*$length 14*$length;
background-color: #F9FBFC;
@include fontStyle(14,22,500,#999,start);
height:120*$length;
}
}
</style>
import YunVideo from './src/main';
YunVideo.install = function (Vue) {
Vue.component(YunVideo.name,YunVideo)
}
export default YunVideo
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<p class="like1">赞({{praiseNum}})</p> <p class="like1">赞({{praiseNum}})</p>
</div> </div>
<div class="abs_down-arrow" @click="showPraiseCon=!showPraiseCon"> <div class="abs_down-arrow" @click="showPraiseCon=!showPraiseCon" v-if="praiseList.length>0">
<yun-icon :class="returnItem4IconClass" size="8px" name="down_arrow"></yun-icon> <yun-icon :class="returnItem4IconClass" size="8px" name="down_arrow"></yun-icon>
</div> </div>
</div> </div>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
praiseList:[], praiseList:[],
praiseTotal:0, praiseTotal:0,
showAllPraise:true, showAllPraise:true,
showPraiseCon:false, showPraiseCon:true,
} }
}, },
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
if(this.pictures.length===1){ if(this.pictures.length===1){
if(process.browser){ if(process.browser){
let src = this.pictures[0]; let src = this.pictures[0];
let img = new this.$Image(); let img = new Image();
img.src = src; img.src = src;
return img.height / img.width > 1.33; return img.height / img.width > 1.33;
} }
...@@ -251,17 +251,10 @@ ...@@ -251,17 +251,10 @@
} }
}, },
watch:{
showPraiseCon(val){
if(val===true){
this.dataGetPraiseList();
}
}
},
created(){ created(){
this.dateGet2Info(); this.dateGet2Info();
this.dataGetPraiseList();
if(process.browser){ if(process.browser){
document.addEventListener('click',(e)=>{ document.addEventListener('click',(e)=>{
if(this.$refs.deleteButton){ if(this.$refs.deleteButton){
...@@ -426,6 +419,7 @@ ...@@ -426,6 +419,7 @@
}) })
this.praised = true; this.praised = true;
this.praiseNum = this.praiseNum +1; this.praiseNum = this.praiseNum +1;
this.dataGetPraiseList();
}else if(response.code===1000){ }else if(response.code===1000){
this.$message({ this.$message({
type:'warning', type:'warning',
...@@ -445,6 +439,8 @@ ...@@ -445,6 +439,8 @@
}) })
this.praised = false; this.praised = false;
this.praiseNum = this.praiseNum -1; this.praiseNum = this.praiseNum -1;
this.dataGetPraiseList();
}else if(response.code===1000){ }else if(response.code===1000){
this.$message({ this.$message({
type:'warning', type:'warning',
...@@ -859,10 +855,10 @@ ...@@ -859,10 +855,10 @@
@extend %flex-row-center; @extend %flex-row-center;
p{ p{
margin-left:8*$length; margin-left:8*$length;
@include fontStyle(12,16,500,#666,center); @include fontStyle(12,16,500,#FF7474,center);
} }
i{ i{
color:#ccc; color:#FF7474;
padding-bottom: 2px; padding-bottom: 2px;
} }
} }
......
...@@ -57,7 +57,9 @@ module.exports = { ...@@ -57,7 +57,9 @@ module.exports = {
{src:'~/plugins/yunCropper.js',ssr:false}, {src:'~/plugins/yunCropper.js',ssr:false},
{src:'~/plugins/yunAvatar.js',ssr:true}, {src:'~/plugins/yunAvatar.js',ssr:true},
{src:'~/plugins/yunInput.js',ssr:true}, {src:'~/plugins/yunInput.js',ssr:true},
{src:'~/plugins/imageInfo.js',ssr:false}, {src:'~/plugins/yunVideo.js',ssr:false},
{src:'~/plugins/yunTextarea.js',ssr:true},
{src:'~/plugins/yunEditor.js',ssr:false},
], ],
/* /*
** Nuxt.js dev-modules ** Nuxt.js dev-modules
......
import yunEditor from '../components/common/editor';
import Vue from 'vue';
Vue.use(yunEditor);
import YunTextarea from '../components/common/auto-textarea';
import Vue from 'vue';
Vue.use(YunTextarea)
import YunVideo from '../components/common/video/src/main.vue'; import YunVideo from '../components/common/video';
import Vue from 'vue'; import Vue from 'vue';
Vue.use(YunVideo) Vue.use(YunVideo)
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