<el-row :gutter="20" v-for="(item,index) in rhythm_data" :key="item.id">
<div class="contentBox">
<el-col :span="12">
<el-form-item :label="'节奏'+ (toChineseNumeralFun( rhythm_data.length-index))" label-width="60px">
<el-input placeholder="请输入内容" v-model="item.rhythm_type" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="12" style="position: relative;">
<el-form-item :prop="'rhythm_data.' + index + '.rhythm_time'"
:rules="{ validator: checkAge, trigger: 'change' }">
<el-date-picker
:disabled="type === 'view'"
v-model="item.rhythm_time"
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="至"
:picker-options="pickerOptions"
start-placeholder="开始日期"
style="width:100%"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<span v-if="type !== 'view'" class="el-icon-circle-close" @click="delRhythmItem(index)"></span>
</el-col>
</div>
</el-row>
<script>
import toChineseNumeral from "to-chinese-numeral"
methods: {
toChineseNumeralFun(res){
return toChineseNumeral(res)
},
}
</script>
v-for序号倒序total-index,123转换成一二三
最新推荐文章于 2023-11-16 17:01:23 发布