Commit 1979007b authored by Xuguangxing's avatar Xuguangxing

feat: merge master

parents 685ba6f7 5c79a357
<template>
<div id="app" class="layout" >
<div id="app" class="layout">
<Row type="flex" class="layout-container" v-if="!isDashboard">
<i-col :span="3" class="layout-menu-left">
<Menu :active-name="activeName" theme="dark" width="auto" :open-names="['1']" accordion @on-select="select">
<Menu
:active-name="activeName"
theme="dark"
width="auto"
:open-names="['1']"
accordion
@on-select="select"
>
<div class="layout-logo-left">低代码平台</div>
<Menu-item v-if="tenant.workist" name="list">作品列表</Menu-item>
<Menu-item v-if="tenant.draftList" name="my">我的草稿</Menu-item>
<Menu-item v-if="tenant.tmplList" name="template">创意模板</Menu-item>
<Menu-item name="list">作品列表</Menu-item>
<Menu-item name="my">我的草稿</Menu-item>
<Menu-item name="template">创意模板</Menu-item>
<Menu-item name="navigator">导航配置</Menu-item>
</Menu>
</i-col>
......@@ -29,118 +36,117 @@
</div>
</template>
<style lang="less" scoped>
#app {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ivu-spin-fix {
z-index: 1000;
background-color: rgba(0, 0, 0, 0.8);
}
.layout {
border: 1px solid #d7dde4;
background: #f5f7f9;
position: relative;
border-radius: 4px;
overflow: auto;
height: 100%;
}
.layout-container {
height: 100%;
}
.layout-breadcrumb {
padding: 10px 15px 0;
}
.layout-content {
flex: 1;
overflow: auto;
background: #fff;
border-radius: 4px;
}
.layout-content-main {
padding: 10px;
}
.layout-copy {
height: 45px;
text-align: center;
padding: 10px 0 20px;
color: #9ea7b4;
}
.layout-menu-left {
background: #464c5b;
}
.layout-menu-right {
display: flex;
flex-direction: column;
}
.layout-header {
height: 45px;
line-height: 45px;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.layout-ceiling-main {
float: right;
margin-right: 15px;
}
.layout-logo-left {
width: 90%;
height: 30px;
line-height: 30px;
color: #fff;
font-size: 18px;
text-align: center;
background: #5b6270;
border-radius: 3px;
margin: 15px auto;
}
.layout-ceiling-main a {
color: #9ba7b5;
}
.ivu-col {
transition: width 0.2s ease-in-out;
}
.router-fade-enter-active,
.router-fade-leave-active {
transition: opacity 0.3s;
}
.router-fade-enter,
.router-fade-leave-active {
opacity: 0;
}
.avator {
float: right;
width: 120px;
height: 45px;
line-height: 45px;
font-size: 14px;
}
body {
/deep/ .cr-popup {
z-index: 1111;
}
}
#app {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ivu-spin-fix {
z-index: 1000;
background-color: rgba(0, 0, 0, 0.8);
}
.layout {
border: 1px solid #d7dde4;
background: #f5f7f9;
position: relative;
border-radius: 4px;
overflow: auto;
height: 100%;
}
.layout-container {
height: 100%;
}
.layout-breadcrumb {
padding: 10px 15px 0;
}
.layout-content {
flex: 1;
overflow: auto;
background: #fff;
border-radius: 4px;
}
.layout-content-main {
padding: 10px;
}
.layout-copy {
height: 45px;
text-align: center;
padding: 10px 0 20px;
color: #9ea7b4;
}
.layout-menu-left {
background: #464c5b;
}
.layout-menu-right {
display: flex;
flex-direction: column;
}
.layout-header {
height: 45px;
line-height: 45px;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.layout-ceiling-main {
float: right;
margin-right: 15px;
}
.layout-logo-left {
width: 90%;
height: 30px;
line-height: 30px;
color: #fff;
font-size: 18px;
text-align: center;
background: #5b6270;
border-radius: 3px;
margin: 15px auto;
}
.layout-ceiling-main a {
color: #9ba7b5;
}
.ivu-col {
transition: width 0.2s ease-in-out;
}
.router-fade-enter-active,
.router-fade-leave-active {
transition: opacity 0.3s;
}
.router-fade-enter,
.router-fade-leave-active {
opacity: 0;
}
.avator {
float: right;
width: 120px;
height: 45px;
line-height: 45px;
font-size: 14px;
}
body {
/deep/ .cr-popup {
z-index: 1111;
}
}
</style>
<script lang="ts" src="./index.ts"></script>
\ No newline at end of file
......@@ -11,13 +11,25 @@ export const basicComponents = [
key: 'link',
name: '跳转链接',
desc: '跳转链接',
type: 'text'
type: 'text',
},
// {
// key: 'freedomVideo',
// name: '视频背景',
// desc: '视频背景',
// type: 'upload'
// },
{
key: 'freedomVideo',
name: '视频背景',
desc: '视频背景',
type: 'upload'
key: 'isFinance',
name: '是否导流',
desc: '是否导流',
type: 'checkbox',
},
{
key: 'needLogin',
name: '是否登录',
desc: '是否登录',
type: 'checkbox',
}
],
value: {
......
......@@ -302,6 +302,15 @@ export default class DynamicForm extends Mixins(ContextMenuMixin, DynamicFormMix
if (element.name !== 'cs-guide-cube') {
this.adjustHeight();
}
if (element.name === 'freedom-container') {
const { isFinance } = newVal;
if (isFinance) {
newVal.needLogin = true;
newVal.disabledSelectNeedLogin = true;
} else {
newVal.disabledSelectNeedLogin = false;
}
}
});
this.$emit('modProps', params, 'component');
}
......
......@@ -92,7 +92,28 @@ export default class EditorModule implements Module<EditorState, RootState> {
const res = await api.getPageById(condition);
const { page } = res as PageInfo;
const { pageInfo } = cloneDeep(defaultState);
commit(SET_PAGE_INFO, { ...pageInfo, page: JSON.parse(page as string) });
const pageObj = JSON.parse(page as string);
commit(SET_PAGE_INFO, { ...pageInfo, page: pageObj });
const goodsTabs = {};
(pageObj as Page).elements.forEach((element, idx) => {
if (element.name === 'cs-goods-tabs' && element?.child?.length) {
goodsTabs[idx] = cloneDeep(element.child);
// 逆向循环
for (let i = element.child.length - 1; i >= 0; i--) {
commit(COPY_OR_DELETE_PAGE_INFO, { type: 'delete', containerIndex: idx, childIndex: i });
// this.updatePageData({ type: 'delete', containerIndex: idx, childIndex: i });
}
}
});
let tempIndex = 0;
Object.keys(goodsTabs).forEach(key => {
goodsTabs[key].forEach((child, index) => {
commit(UPDATE_PAGE_INFO, { containerIndex: +key + 1 + index + tempIndex, data: child, type: 'add' });
// console.log('parseGoodsTabs', { containerIndex: +key + 1 + index, data: child });
// this.updatePageInfo({ containerIndex: +key + 1 + index, data: child });
});
tempIndex++;
});
},
setDragable({ commit }, condition) {
commit(SET_DRAGABLE, condition);
......
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