import { Connect } from "dob-react" import * as React from "react" import * as ReactDOM from "react-dom"; import Icon from "../../components/icon/src" import { Input } from "../../components/input/src" import { Select } from "../../components/select/src" import { TabPanel, Tabs } from "../../components/tabs/src" import * as Styled from "./index.style" import { Props, State } from "./index.type" @Connect class PageAddFolder extends React.Component { public static defaultProps = new Props() public state = new State() private pageInfo: IPage = null public render() { this.pageInfo = this.props.stores.ApplicationStore.currentEditPage if (!this.pageInfo) { return } const allChilds = this.props.actions.ApplicationAction.getPageAllChilds(this.props.stores.ApplicationStore.currentEditPageKey) const folderSelectOptions = this.props.stores.ApplicationStore.pageFolderList .filter(pageKey => pageKey !== this.props.stores.ApplicationStore.currentEditPageKey) .filter(pageKey => !allChilds.some(eachChild => eachChild === pageKey)) .map(pageKey => { const folderInfo = this.props.stores.ApplicationStore.pages.get(pageKey) return { key: pageKey, value: folderInfo.name || "未命名" } }) return ( {this.props.stores.ApplicationStore.currentCreatedPageKey ? "添加文件夹" : "编辑文件夹"} {this.props.stores.ApplicationStore.currentCreatedPageKey !== this.props.stores.ApplicationStore.currentEditPageKey && } 名称 路径名 父级文件夹