Commit 55a605b2 authored by 徐光星's avatar 徐光星

Merge branch 'feat/fix' into 'master'

feat: 修复时间问题、修复保存时间距的问题

See merge request !100
parents 98816ece 1c3dbe1c
...@@ -111,7 +111,7 @@ export class PageInfo extends Model<PageInfo> { ...@@ -111,7 +111,7 @@ export class PageInfo extends Model<PageInfo> {
field: 'updated_at', field: 'updated_at',
get() { get() {
const moment = require('moment'); const moment = require('moment');
const updatedAt = this.getDataValue('updatedAt'); const updatedAt = this.getDataValue('updated_at');
return moment(updatedAt).format('YYYY-MM-DD HH:mm:ss'); return moment(updatedAt).format('YYYY-MM-DD HH:mm:ss');
}, },
}) })
......
...@@ -119,12 +119,7 @@ export default class DynamicForm extends Vue { ...@@ -119,12 +119,7 @@ export default class DynamicForm extends Vue {
const imgName = btoa(`coverImage-${uuidv4().substr(0, 8)}`); const imgName = btoa(`coverImage-${uuidv4().substr(0, 8)}`);
const gridEle = document.querySelector('.Dcm-container-panel'); const gridEle = document.querySelector('.Dcm-container-panel');
this.changeStyle('forward'); this.changeStyle('forward');
const canvas = await html2canvas(gridEle as HTMLElement, { useCORS: true, allowTaint: true, ignoreElements: (element: any) => { const canvas = await html2canvas(gridEle as HTMLElement, { useCORS: true, allowTaint: true });
if (element.className.toLowerCase() == 'ignore-html2canvas-loop') {
return element;
}
return false;
} });
this.changeStyle('backward'); this.changeStyle('backward');
const base64 = canvas.toDataURL(); const base64 = canvas.toDataURL();
const { data: { uptoken } } = await editorApi.getUpToken(); const { data: { uptoken } } = await editorApi.getUpToken();
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<p slot="title">{{ config.title }}</p> <p slot="title">{{ config.title }}</p>
<div class="dynamic-row-card"> <div class="dynamic-row-card">
<img <img
data-html2canvas-ignore="true"
class="ignore-html2canvas-loop" class="ignore-html2canvas-loop"
:src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'" :src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'"
/> />
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
<p slot="title">{{ config.title }}</p> <p slot="title">{{ config.title }}</p>
<div class="dynamic-row-card"> <div class="dynamic-row-card">
<img <img
data-html2canvas-ignore="true"
class="ignore-html2canvas-loop" class="ignore-html2canvas-loop"
:src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'" :src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'"
/> />
......
<template> <template>
<div class="freedom" :ref="`freedomContainer${containerIndex}`" @click.stop="handleElementClick(containerIndex)"> <div class="freedom" :ref="`freedomContainer${containerIndex}`" @click.stop="handleElementClick(containerIndex)">
<div class="freedom-body" :data-index="containerIndex"> <div class="freedom-body" :data-index="containerIndex">
<video width="100%" @loadeddata="videoOnload" ref="videoBackground" height="auto" style="z-index: -10; osition: absolute; top: 0; left: 0" v-if="childItem.props.freedomVideo" :src="childItem.props.freedomVideo" autoplay loop muted />
<div v-for="(item, index) in childItem.child" :style="transformStyle(item.commonStyle, 'container')" :class="['freedom-body-item', { 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop.prevent="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)"> <div v-for="(item, index) in childItem.child" :style="transformStyle(item.commonStyle, 'container')" :class="['freedom-body-item', { 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop.prevent="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)">
<component ref="childComponent" :style="transformStyle(item.commonStyle, 'component')" :is="item.name" v-bind="item.props"></component> <component ref="childComponent" :style="transformStyle(item.commonStyle, 'component')" :is="item.name" v-bind="item.props"></component>
<div class="freedom-body-dot" <div class="freedom-body-dot"
......
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