|
|
@@ -43,7 +43,8 @@
|
|
|
{{storeInfo.enterprise.address || '暂无信息'}}
|
|
|
</div>
|
|
|
<div v-else class="text pull-left">
|
|
|
- <input v-model="storeInfo.enterprise.address" type="text" maxlength="50"/>
|
|
|
+ <textarea v-model="storeInfo.enterprise.address" maxlength="50" ref="addTextarea"></textarea>
|
|
|
+ <!--<input v-model="storeInfo.enterprise.address" type="text" maxlength="50"/>-->
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="clearfix" :class="{border: storeState !== 'look'}">
|
|
|
@@ -142,6 +143,11 @@
|
|
|
handler: function (val) {
|
|
|
this.setTextareaHeight()
|
|
|
}
|
|
|
+ },
|
|
|
+ 'storeInfo.enterprise.address': {
|
|
|
+ handler: function (val) {
|
|
|
+ this.setAddarea()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -158,6 +164,7 @@
|
|
|
this.Islook = true
|
|
|
this.hidelook = true
|
|
|
this.setTextareaHeight()
|
|
|
+ this.setAddarea()
|
|
|
},
|
|
|
dealWithText2(tp) {
|
|
|
if (tp === 'open') {
|
|
|
@@ -258,10 +265,34 @@
|
|
|
this.$nextTick(() => {
|
|
|
let el = this.$refs.descTextarea
|
|
|
if (el) {
|
|
|
+ el.style.height = '2rem'
|
|
|
+ el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setAddarea () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let el = this.$refs.addTextarea
|
|
|
+ if (el) {
|
|
|
// console.log(el.scrollHeight - el.clientHeight)
|
|
|
- el.style.height = (el.scrollHeight * 2 - el.clientHeight + 150) / 100 + 'rem'
|
|
|
+// console.log(el.clientHeight)
|
|
|
+// console.log('-----------------')
|
|
|
+ el.style.height = '.6rem'
|
|
|
+ el.style.height = (el.scrollHeight * 2 - el.clientHeight + 25) / 100 + 'rem'
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ setBS () {
|
|
|
+ if (this.BScroll) {
|
|
|
+ this.BScroll.refresh()
|
|
|
+ } else {
|
|
|
+ this.BScroll = new BScroll(this.$refs.userContent, {
|
|
|
+ click: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelBS () {
|
|
|
+ this.BScroll.destroy()
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -282,13 +313,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- if (this.BScroll) {
|
|
|
- this.BScroll.refresh()
|
|
|
- } else {
|
|
|
- this.BScroll = new BScroll(this.$refs.userContent, {
|
|
|
- click: true
|
|
|
- })
|
|
|
- }
|
|
|
+ this.setBS()
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -389,7 +414,7 @@
|
|
|
}
|
|
|
textarea{
|
|
|
width: 4.4rem;
|
|
|
- height: 2.06rem;
|
|
|
+ height: 1.36rem;
|
|
|
padding: 0.06rem 0 0.06rem 0.12rem;
|
|
|
overflow-y: visible;
|
|
|
border: none;
|