shenxin 5 rokov pred
rodič
commit
59ad08c5d9
1 zmenil súbory, kde vykonal 19 pridanie a 3 odobranie
  1. 19 3
      src/components/imgText.vue

+ 19 - 3
src/components/imgText.vue

@@ -1,10 +1,21 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-01-25 11:32:04
+ * @LastEditTime: 2021-01-25 16:21:30
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \rebatedine-mini\src\components\imgText.vue
+-->
 <template>
-  <view>
+  <view class="img-text-container">
     <block v-if="type * 1 === 1">
       <text class="u-m-b-16 u-font-24 u-content-color line-40">{{value}}</text>
     </block>
     <block v-if="type * 1 === 2">
-      <image class="u-m-b-16" :src="value | imgFilter" mode="aspectFit" @click="lookImg(value)"></image>
+      <image class="u-m-b-16 image"
+             :src="value | imgFilter"
+             mode="widthFix"
+             @click="lookImg(value)"></image>
     </block>
   </view>
 </template>
@@ -35,5 +46,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
+.img-text-container {
+  width: 100%;
+  .image {
+    width: 100%;
+  }
+}
 </style>