You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm_web/src/views/admin/fields/components/FieldItem/FieldTextarea.vue

64 lines
1.2 KiB

<template>
<field-wrapper
:activate="activate"
:field="field"
:control-flag="controlFlag"
class="field-textarea"
@click="emitClick"
@action="handleAction">
<div class="box">
<div class="default-val">
{{ typeof field.default_value == 'string' ? field.default_value : '' }}
</div>
<div class="max-tips">
{{ field.default_value.length+'/'+(field.max_length || 800) }}
</div>
</div>
</field-wrapper>
</template>
<script>
import FieldWrapper from './FieldWrapper'
import mixins from './mixins'
export default {
name: 'FieldTextarea',
components: {
FieldWrapper
},
mixins: [mixins],
methods: {}
}
</script>
<style scoped lang="scss">
.box {
position: relative;
width: 100%;
height: 80px;
font-size: 14px;
color: #333;
background: white;
border: 1px solid #dcdfe6;
border-radius: $xr-border-radius-base;
padding: 10px 10px 15px 10px;
.default-val {
width: 100%;
height: 48px;
word-break: break-all;
overflow: hidden;
}
.max-tips {
width: 100%;
text-align: right;
font-size: 12px;
color: #999;
word-break: break-all;
overflow: hidden;
}
}
</style>