我的代码如下:
<template>
<div>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="活动名称">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="活动区域">
<el-select v-model="form.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="活动时间">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
</el-col>
</el-form-item>
<el-form-item>
<el-button type="primary" >立即创建</el-button>
<el-button>取消</el-button>
</el-form-item>
</el-form>
<div>
<div id="lsheet" style="margin:0px;padding:0px;width:100%;height:250px;"></div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
form: {
name: "",
region: "",
date1: "",
date2: "",
},
};
},
mounted() {
luckysheet.create({
container: "lsheet", // 设定DOM容器的id
title: "Luckysheet Demo", // 设定表格名称
lang: "zh", // 设定表格语言
showinfobar: false,
showtoolbar: false,
sheetFormulaBar: false,
});
}
};
</script>
<style>
</style>
当 lucksheet.create 的时候,其它按钮等组件就按不动了,只有 lucksheet 加载完成后才正常。
2条答案
按热度按时间5lhxktic1#
使用work读取数据渲染试试
qmelpv7a2#
使用work读取数据渲染试试
work只能读取数据,但是渲染层还是避不开阻塞的吧?