提交 44e735fe authored 作者: 蔡芬's avatar 蔡芬

2

上级 cc49cb8a
...@@ -17,6 +17,14 @@ ul { ...@@ -17,6 +17,14 @@ ul {
&:after { display: block; content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; background-color: #eee; } &:after { display: block; content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; background-color: #eee; }
} }
} }
.aloneBlock {
margin: 5px 0;
border: 1px solid #eee;
padding: 10px;
&:hover {
box-shadow: 1px 1px 1px rgba(0,0,0,0.3), -1px -1px 1px rgba(0,0,0,0.2);
}
}
.margin { .margin {
&_15_0 {margin: 15px 0;} &_15_0 {margin: 15px 0;}
} }
...@@ -32,6 +40,9 @@ ul { ...@@ -32,6 +40,9 @@ ul {
.height { .height {
&_100p {height: 100%;} &_100p {height: 100%;}
} }
.color {
&_red {color: red;}
}
.bgc { .bgc {
&_ccc {background-color: #ccc;} &_ccc {background-color: #ccc;}
} }
<template>
<div>
<h6>小标题</h6>
<el-upload
action="#"
list-type="picture-card"
:auto-upload="false">
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
class="el-upload-list__item-thumbnail"
:src="file.url" alt=""
>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
`<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
disabled: false
};
},
methods: {
handleRemove(file) {
console.log(file);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
handleDownload(file) {
console.log(file);
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<label>{{label}}</label>
<!-- $attrs可以获取来自父组件传过来的值,并展开放在当前标签上 -->
<input type="number" name="" id="" v-bind="$attrs" :value="value" @input="inputHandle">
</div>
</template>
<script>
export default {
props: {
label: String,
value: [Number,String]
},
methods: {
inputHandle(e) {
console.log(e.target.value, this.value)
this.$emit('input', e.target.value);
//分发校验事件
// this.$parent.$emit('validate');
}
},
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
富文本框
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<h6>{{label}}</h6>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</template>
<script>
export default {
props: {
label: String,
value: [Number,String]
},
data() {
return {
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<p>{{detail.title}}</p>
<div class="edit-title">
<div contenteditable="true" class="edit-title-inner" :id="detail.id" :style="detail.style">
{{detail.default}}
<div class="edit-title-tools displaynone" contenteditable="false">
<span @click="tap('bold')">B</span>
<span @click="tap('italic')">I</span>
<span @click="tap('underline')">U</span>
<span @click="tap('colorpicker')">C</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
detail: {
type:Object,
default: function() {
return {
style: {
color:'#000',
'font-weight':'normal',
'text-decoration': 'none',
'font-style': 'normal',
}
}
}
},
name: String, //属性名
},
data() {
return {
};
},
methods: {
tap(type) {
console.log('tap',type)
switch(type) {
case "bold":
this.toggleStyle('font-weight','bold','normal');
break;
case "italic":
this.toggleStyle('font-style','italic','normal');
break;
case "underline":
this.toggleStyle('text-decoration','underline','none');
break;
case "colorpicker":
// this.toggleStyle('colorpicker','underline','none');
break;
}
console.log(this.detail)
},
toggleStyle(styleName,selVal,defVal) {
this.detail.style[styleName] = this.detail.style[styleName] != selVal ? selVal : defVal;
},
},
}
</script>
<style lang="less" scoped>
.edit-title {
position: relative;
margin-top: 5px;
}
.edit-title-inner {
position: relative;
box-sizing: border-box;
height: 100%;
padding: 10px;
height: auto;
&:active,&:focus-visible{
outline: rosybrown auto 1px;
}
&:active > .edit-title-tools,
&:focus-visible > .edit-title-tools{
display: block;
}
}
.edit-title-tools {
position: absolute;
bottom: -100%;
color:#000;
font-weight: normal;
font-style: normal;
text-decoration: none;
cursor: pointer;
>span {
padding: 5px;
background-color: #eee;
}
}
</style>
\ No newline at end of file
<template>
<div>
<div>
是否显示弹窗 {{showPop}}
</div>
<TopHead :detail="detail"></TopHead>
<TopBody :list="articleList" @addArticle="addArticle"></TopBody>
<el-drawer
:title="drawerSet.title"
:visible.sync="drawerSet.visible"
:direction="drawerSet.direction"
:before-close="handleClose">
<form action="false" :model="ruleForm">
<el-tabs v-model="drawerSet.activeName" @tab-click="handleClick">
<el-tab-pane v-for="(pitem,pind) in tabList" :key="pitem.id" :name="pind">
<span slot="label"><i class="el-icon-date"></i> {{pitem.tab_group_name}}</span>
<div v-for="sitem in pitem.setting_list" :key="sitem.id">
<div v-if="sitem.properties">
<h4 >{{sitem.title}}</h4>
<div v-for="ritem in sitem.properties" :key="ritem.id">
<SimpleInput v-if="ritem.display == 1 && ritem['form_type'] == 'simpleInput'" :detail="ritem" :name="ritem.properties_name" ></SimpleInput>
<RichEditor v-else-if="ritem.display == 1 && ritem['form_type'] == 'richText'"></RichEditor>
<NumberInput v-else-if="ritem.display == 1 && ritem['form_type'] == 'number'" :label="ritem.title" v-model="ruleForm[ritem.properties_name]" @input="changeVal"></NumberInput>
<!-- <SelectField v-else-if="ritem.display == 1 && ritem['form_type'] == 'Select'" :label="ritem.title" v-model="ruleForm[ritem.properties_name]"></SelectField> -->
<el-select v-else-if="ritem.display == 1 && ritem['form_type'] == 'Select'"
v-model="ruleForm[ritem.properties_name]" placeholder="请选择">
<el-option
v-for="item in ritem.enum"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<ImageUpload v-else-if="ritem.display == 1 && ritem['form_type'] == 'Asset'"></ImageUpload>
</div>
</div>
<SimpleInput v-else-if="sitem['form_type'] == 'simpleInput'" :detail="sitem" :name="sitem.properties_name" ></SimpleInput>
<RichEditor v-else-if="sitem['form_type'] == 'richText'" :detail="sitem" :name="sitem.properties_name" ></RichEditor>
</div>
</el-tab-pane>
</el-tabs>
</form>
</el-drawer>
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import TopHead from '@/components/scaffold/tophead.vue';
import TopBody from '@/components/scaffold/tobody.vue';
import SimpleInput from '@/components/common/simpleInput.vue';
import RichEditor from '@/components/common/richEditor.vue';
import NumberInput from '@/components/common/numberInput.vue';
import SelectField from '@/components/common/selectField.vue';
import ImageUpload from '@/components/common/imageUpload.vue';
export default {
props: {
detail: Object,
children: Array,
},
components:{TopHead, TopBody, SimpleInput, RichEditor, NumberInput, SelectField, ImageUpload},
data() {
return {
drawerSet: {
direction: "rtl", //从右往左
visible: false, //是否显示
title: "",
activeName: 0
},
articleList: [],
ruleForm:{},
};
},
computed: {
...mapState({ showPop:state=>state.showPop, popDetail: state=>state.popDetail }),
tabList() {
return this.popDetail && this.popDetail.tabgroup_list || [];
},
},
watch: {
showPop(n,o) {
if(!!n) { //打开
this.openFrame();
return;
}
// 关闭
}
},
mounted() {
this.articleList = this.children;
},
methods: {
...mapMutations(['closePop']),
addArticle(obj) {
this.articleList.push(obj);
},
openFrame() {
let openType = this.popDetail.type;
switch(openType) {
case "right":
this.drawerSet.title = this.popDetail.title;
this.drawerSet.visible = true;
break;
case "center":
//待处理 中间弹窗
break;
}
},
handleClose(done) {
//关闭右侧弹窗
this.closePop();
done();
},
handleClick(tab, event) {
console.log(tab, event);
},
changeVal(value) {
console.log(value)
console.log(this.ruleForm)
console.log(this.tabList)
}
},
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="aloneBlock">
<p class="color_red">章节标题</p>
<ToBlock v-for="item in list" :key="item.id"></ToBlock>
<el-button @click="addBlock">添加组件</el-button>
</div>
</template>
<script>
import ToBlock from './toblock.vue';
export default {
props:{
list: Array,
},
components:{ ToBlock },
data() {
return {
// blockList: [],
demoBlock:{
title: "组块标题",
body: "",
instruction:"",
},
};
},
mounted() {
// this.blockList = this.list;
},
methods: {
addBlock() {
console.log('添加组件')
this.$emit('addBlock',this.demoBlock)
},
},
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="aloneBlock">
<p class="color_red">组块</p>
<div v-if="componentShow">组件类型</div>
<el-button @click="selectComponent">选择组件</el-button>
</div>
</template>
<script>
export default {
data() {
return {
componentShow:false,
};
},
methods: {
selectComponent() {
console.log('选择组件')
this.componentShow = true;
},
},
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="">
<p class="color_red">页面除了头部之外的内容区域</p>
<ToArticle v-for="item in list" :key="item.id" @addBlock="addBlock" :list="blockList"></ToArticle>
<el-button @click="addArticle">添加章节</el-button>
</div>
</template>
<script>
import ToArticle from './toarticle.vue';
export default {
props:{
list: Array,
},
components:{ ToArticle },
data() {
return {
blockList:[],
demoArticle: {
title: "章节标题",
body: "",
instruction:"",
},
};
},
mounted() {
},
methods: {
addArticle() {
console.log('新增章节');
this.$emit('addArticle', this.demoArticle)
},
addBlock(obj) {
this.blockList.push(obj)
},
},
}
</script>
<style>
</style>
\ No newline at end of file
<template> <template>
<div> <div class="aloneBlock">
<el-input type="text" placeholder="请输入内容"></el-input> <p class="color_red">头部</p>
<div class="edit-title"> <el-button @click="showEidt"><i class="el-icon-edit"></i></el-button>
<div contenteditable="true" class="edit-title-inner" :id="detail.id" :style="detail.style"> <!-- <el-input type="text" placeholder="请输入内容"></el-input> -->
{{detail.displayTitle}}
<div class="edit-title-tools displaynone" contenteditable="false"> <div v-for="item in list" :key="item.id">
<span @click="tap('bold')">B</span> <div v-if="item.display === 1">
<span @click="tap('italic')">I</span> <label :for="item.key_name">{{item.title}}</label>
<span @click="tap('underline')">U</span> <el-input :value="item.default"></el-input>
<span @click="tap('colorpicker')">C</span>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from 'vuex';
export default { export default {
props:{ props:{
detail: { detail: {
type:Object, type:Object,
default: function() { default: function() {
return { return {}
style: {
color:'#000',
'font-weight':'normal',
'text-decoration': 'none',
'font-style': 'normal',
}
}
} }
} }
}, },
methods: { computed: {
tap(type) { list() {
console.log('tap',type) return this.detail['tabgroup_list'] && this.detail['tabgroup_list'][0].setting_list || [];
switch(type) {
case "bold":
this.toggleStyle('font-weight','bold','normal');
break;
case "italic":
this.toggleStyle('font-style','italic','normal');
break;
case "underline":
this.toggleStyle('text-decoration','underline','none');
break;
case "colorpicker":
// this.toggleStyle('colorpicker','underline','none');
break;
}
console.log(this.detail)
}, },
toggleStyle(styleName,selVal,defVal) { type() {
this.detail.style[styleName] = this.detail.style[styleName] != selVal ? selVal : defVal; return this.detail.type;
} }
}, },
methods: {
...mapMutations(['openPop']),
showEidt() {
this.openPop(this.detail);
},
},
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.edit-title {
position: relative;
margin-top: 5px;
}
.edit-title-inner {
position: relative;
box-sizing: border-box;
height: 100%;
padding: 10px;
height: auto;
&:active,&:focus-visible{
outline: rosybrown auto 1px;
}
&:active > .edit-title-tools,
&:focus-visible > .edit-title-tools{
display: block;
}
}
.edit-title-tools {
position: absolute;
bottom: -100%;
color:#000;
font-weight: normal;
font-style: normal;
text-decoration: none;
cursor: pointer;
>span {
padding: 5px;
background-color: #eee;
}
}
</style> </style>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -495,6 +495,7 @@ ...@@ -495,6 +495,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "simpleInput",
"type": "string", "type": "string",
"title": "Title", "title": "Title",
"default": "Untitled", "default": "Untitled",
...@@ -524,6 +525,7 @@ ...@@ -524,6 +525,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "simpleInput",
"type": "string", "type": "string",
"title": "Display title", "title": "Display title",
"description": "When viewing an element - this is the title that will be displayed on the page", "description": "When viewing an element - this is the title that will be displayed on the page",
...@@ -555,6 +557,7 @@ ...@@ -555,6 +557,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "simpleInput",
"type": "string", "type": "string",
"title": "Subtitle", "title": "Subtitle",
"description": "When viewing a menu\/page - this is the subtitle that will be displayed on the menu\/page", "description": "When viewing a menu\/page - this is the subtitle that will be displayed on the menu\/page",
...@@ -585,6 +588,7 @@ ...@@ -585,6 +588,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "richText",
"type": "string", "type": "string",
"title": "Body", "title": "Body",
"default": "", "default": "",
...@@ -615,6 +619,7 @@ ...@@ -615,6 +619,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "simpleInput",
"type": "string", "type": "string",
"title": "Instruction", "title": "Instruction",
"default": "", "default": "",
...@@ -679,6 +684,7 @@ ...@@ -679,6 +684,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "number",
"type": "number", "type": "number",
"title": "Large", "title": "Large",
"description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped", "description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped",
...@@ -706,6 +712,7 @@ ...@@ -706,6 +712,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "number",
"type": "number", "type": "number",
"title": "Medium", "title": "Medium",
"description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped", "description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped",
...@@ -733,6 +740,7 @@ ...@@ -733,6 +740,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "number",
"type": "number", "type": "number",
"title": "Small", "title": "Small",
"description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped", "description": "Minimum height should only be used in instances where the page header height needs to be greater than the content e.g. to prevent a background image being cropped",
...@@ -788,6 +796,7 @@ ...@@ -788,6 +796,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Asset",
"type": "string", "type": "string",
"isObjectId": "1", "isObjectId": "1",
"title": "Large", "title": "Large",
...@@ -819,6 +828,7 @@ ...@@ -819,6 +828,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Asset",
"type": "string", "type": "string",
"isObjectId": "1", "isObjectId": "1",
"title": "Medium", "title": "Medium",
...@@ -850,6 +860,7 @@ ...@@ -850,6 +860,7 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Asset",
"type": "string", "type": "string",
"isObjectId": "1", "isObjectId": "1",
"title": "Small", "title": "Small",
...@@ -909,16 +920,27 @@ ...@@ -909,16 +920,27 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Select",
"type": "string", "type": "string",
"title": "Repeat", "title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically", "description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "", "default": "",
"enum": [ "enum": [
"", {
"repeat", "value": "repeat",
"repeat-x", "label": "重复"
"repeat-y", },
"no-repeat" {
"value": "repeat-x",
"label": "横向重复"
},
{
"value": "repeat-y",
"label": "纵向重复"
},{
"value": "no-repeat",
"label": "不重复"
}
], ],
"_backboneForms": "Select", "_backboneForms": "Select",
"display": 1, "display": 1,
...@@ -944,15 +966,24 @@ ...@@ -944,15 +966,24 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Select",
"type": "string", "type": "string",
"title": "Size", "title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible", "description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible",
"default": "", "default": "",
"enum": [ "enum": [
"", {
"auto", "value": "auto",
"cover", "label": "自动"
"contain" },
{
"value": "cover",
"label": "覆盖"
},
{
"value": "contain",
"label": "包含"
}
], ],
"_backboneForms": "Select", "_backboneForms": "Select",
"display": 1, "display": 1,
...@@ -978,21 +1009,48 @@ ...@@ -978,21 +1009,48 @@
"display": 1, "display": 1,
"extra_group_key": null "extra_group_key": null
}, },
"form_type": "Select",
"type": "string", "type": "string",
"title": "Position", "title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical", "description": "The first value is the horizontal position and the second value is the vertical",
"default": "", "default": "",
"enum": [ "enum": [
"", {
"left top", "value": "left top",
"left center", "label": "左上"
"left bottom", },
"center top", {
"center center", "value": "left center",
"center bottom", "label": "左中"
"right top", },
"right center", {
"right bottom" "value": "left bottom",
"label": "左下"
},
{
"value": "center top",
"label": "中上"
},
{
"value": "center center",
"label": "居中"
},
{
"value": "center bottom",
"label": "中下"
},
{
"value": "right top",
"label": "右上"
},
{
"value": "right center",
"label": "右中"
},
{
"value": "right bottom",
"label": "右下"
}
], ],
"_backboneForms": "Select", "_backboneForms": "Select",
"display": 1, "display": 1,
......
...@@ -3,7 +3,7 @@ import App from "./App.vue"; ...@@ -3,7 +3,7 @@ import App from "./App.vue";
import router from "./router"; import router from "./router";
import store from "./store"; import store from "./store";
import { Button, Drawer, Message, MessageBox, Row, Col, Form, import { Button, Drawer, Message, MessageBox, Row, Col, Form,
FormItem, Input, Menu, MenuItem, Submenu, Dropdown, DropdownItem, DropdownMenu, Select, Option, Tabs, TabPane, Tree } from 'element-ui'; FormItem, Input, Menu, MenuItem, Submenu, Dropdown, DropdownItem, DropdownMenu, Select, Option, Tabs, TabPane, Tree, Upload, Dialog } from 'element-ui';
Vue.config.productionTip = false; Vue.config.productionTip = false;
...@@ -26,6 +26,8 @@ Vue.use(Option); ...@@ -26,6 +26,8 @@ Vue.use(Option);
Vue.use(Tabs); Vue.use(Tabs);
Vue.use(TabPane); Vue.use(TabPane);
Vue.use(Tree); Vue.use(Tree);
Vue.use(Upload);
Vue.use(Dialog);
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
......
...@@ -4,8 +4,20 @@ import Vuex from "vuex"; ...@@ -4,8 +4,20 @@ import Vuex from "vuex";
Vue.use(Vuex); Vue.use(Vuex);
export default new Vuex.Store({ export default new Vuex.Store({
state: {}, state: {
mutations: {}, showPop:false, //是否显示编辑弹窗
popDetail:{} //编辑内容
},
mutations: {
openPop(state, data) {
state.showPop = true;
state.popDetail = data;
},
closePop(state) {
state.showPop = false;
state.popDetail = {};
},
},
actions: {}, actions: {},
modules: {}, modules: {},
}); });
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
</el-col> </el-col>
<el-col :xs="18" :sm="18" :md="18" :lg="18" :xl="18"> <el-col :xs="18" :sm="18" :md="18" :lg="18" :xl="18">
<div class="course-edit-inner padding_15 height_100p"> <div class="course-edit-inner padding_15 height_100p">
<recursion :children="trees"></recursion> <!-- <recursion :children="trees"></recursion> -->
<FullPage :detail="currentPage.detail" :children="[]"></FullPage>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -58,11 +59,14 @@ ...@@ -58,11 +59,14 @@
</template> </template>
<script> <script>
import FullPage from '@/components/scaffold/fullpage.vue';
import recursion from '@/components/common/recursion.vue'; import recursion from '@/components/common/recursion.vue';
import listJson from '@/demo.json'; //测试数据
let id = 1000; let id = 1000;
export default { export default {
components:{ components:{
recursion recursion,
FullPage
}, },
data() { data() {
return { return {
...@@ -102,7 +106,10 @@ export default { ...@@ -102,7 +106,10 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
currentPage: {
detail:{}
},
} }
}, },
watch: { watch: {
...@@ -111,6 +118,10 @@ export default { ...@@ -111,6 +118,10 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('listJson',listJson)
if(listJson && typeof listJson == 'object') {
this.modifyJson();
}
}, },
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
...@@ -127,6 +138,9 @@ export default { ...@@ -127,6 +138,9 @@ export default {
} }
data.children.push(newChild); data.children.push(newChild);
}, },
modifyJson() {
this.currentPage.detail = listJson['content'];
},
} }
} }
</script> </script>
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论