Browse Source

优化table组件字体大小,限制input输入类型

master
邓平艺 5 years ago
parent
commit
d947bdfc15
  1. 8
      canteen/components/wyb-table/wyb-table.vue
  2. 8
      supplier/components/wyb-table/wyb-table.vue

8
canteen/components/wyb-table/wyb-table.vue

@ -147,7 +147,13 @@
zIndex: hIndex === 0 ? 20 : 0,
left: enableCheck ? checkColWidth + 'rpx' : 0,
position: hIndex === 0 && firstLineFixed ? 'sticky' : 'static'}">
<input class="lf-w-100" :disabled="false" placeholder="请输入.." v-if="isObject(autoContentItem(cIndex, hIndex), 'edit')" :style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx'}" @blur="inputBlur(cIndex, hIndex, $event)" :value="autoContentItem(cIndex, hIndex).value" />
<input class="lf-w-100" :disabled="false" placeholder="请输入.."
v-if="isObject(autoContentItem(cIndex, hIndex), 'edit')"
:style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx'}"
placeholder-style="30rpx"
:type="autoContentItem(cIndex, hIndex).type || 'number'"
@blur="inputBlur(cIndex, hIndex, $event)"
:value="autoContentItem(cIndex, hIndex).value" />
<button class="diy-btn" v-else-if="isObject(autoContentItem(cIndex, hIndex), 'button')" @click="buttonClick(cIndex, hIndex)">{{ autoContentItem(cIndex, hIndex).value }}</button>
<view class="lf-w-100 lf-h-100 lf-row-center" v-else :style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx', 'word-break': 'break-all'}">{{ autoContentItem(cIndex, hIndex) }}</view>
</view>

8
supplier/components/wyb-table/wyb-table.vue

@ -147,7 +147,13 @@
zIndex: hIndex === 0 ? 20 : 0,
left: enableCheck ? checkColWidth + 'rpx' : 0,
position: hIndex === 0 && firstLineFixed ? 'sticky' : 'static'}">
<input class="lf-w-100" :disabled="false" placeholder="请输入.." v-if="isObject(autoContentItem(cIndex, hIndex), 'edit')" :style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx'}" @blur="inputBlur(cIndex, hIndex, $event)" :value="autoContentItem(cIndex, hIndex).value" />
<input class="lf-w-100" :disabled="false" placeholder="请输入.."
v-if="isObject(autoContentItem(cIndex, hIndex), 'edit')"
:style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx'}"
placeholder-style="30rpx"
:type="autoContentItem(cIndex, hIndex).type || 'number'"
@blur="inputBlur(cIndex, hIndex, $event)"
:value="autoContentItem(cIndex, hIndex).value" />
<button class="diy-btn" v-else-if="isObject(autoContentItem(cIndex, hIndex), 'button')" @click="buttonClick(cIndex, hIndex)">{{ autoContentItem(cIndex, hIndex).value }}</button>
<view class="lf-w-100 lf-h-100 lf-row-center" v-else :style="{minHeight: (minHeight[1] || minHeight[0]) + 'rpx', 'word-break': 'break-all'}">{{ autoContentItem(cIndex, hIndex) }}</view>
</view>

Loading…
Cancel
Save