Commit b3a4b2f7 by crushh

update: dist

parent e74f7068
......@@ -3,7 +3,7 @@
<dm-sub-title type="line">基本信息</dm-sub-title>
<div class="mt20">
<el-form-item label="游戏名称" prop="gameName"> <el-input maxlength="10" class="w382" @change="handleNameChange" v-model.trim="baseForm.gameName" show-word-limit :disabled="isDisabled" placeholder="请输入游戏名称" /> </el-form-item>
<el-form-item label="游戏时间" prop="gameTime"><el-date-picker class="w382" v-model="baseForm.gameTime" :disabled="isDisabled" :picker-options="pickerOptions" value-format="timestamp" @change="handleDateChange" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker></el-form-item>
<el-form-item label="游戏时间" prop="gameTime"><el-date-picker class="w382" v-model="baseForm.gameTime" :disabled="isDisabled" :picker-options="pickerOptions" value-format="timestamp" @change="handleDateChange(val, 'gameTime')" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker></el-form-item>
<el-form-item label="游戏说明" prop="gameRule"> <el-input maxlength="500" class="w382" v-model="baseForm.gameRule" show-word-limit :autosize="{ minRows: 4 }" type="textarea" /> </el-form-item>
</div>
<dm-sub-title type="line">展示信息配置</dm-sub-title>
......@@ -253,7 +253,7 @@ export default {
handleDateChange(val, type) {
console.log(val, type);
this.$emit('change', this.baseForm);
if (type) {
if (type == 'adsFlag') {
this.$nextTick(_ => {
const adsImg = document.getElementsByClassName('adsImg');
adsImg[0].scrollIntoView({
......@@ -264,6 +264,8 @@ export default {
behavior: 'smooth'
});
});
} else if (type == 'gameTime' && this.baseForm.gameTime && this.baseForm.gameTime.length) {
this.baseForm.gameTime[1] = this.baseForm.gameTime[1] + 86399000;
}
},
handleTemplateChange(val) {
......
......@@ -299,11 +299,8 @@ export default {
console.log(this.ruleForm);
},
gameTime(val) {
if (val.length) {
if (val && val.length) {
this.gameDays = (val[1] - val[0]) / (24 * 60 * 60 * 1000);
if (!this.isEdit) {
++this.gameDays;
}
console.log(this.gameDays);
this.gameDays = this.gameDays.toFixed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment