article默认展开修改

This commit is contained in:
qsc 2023-07-11 10:12:54 +08:00
parent a7aa99e9f8
commit b3063e2c66
2 changed files with 23 additions and 21 deletions

View File

@ -1,5 +1,6 @@
/// <reference types="wechat-miniprogram" />
/// <reference types="react" /> /// <reference types="react" />
import { EntityDict } from '../../../general-app-domain'; import { EntityDict } from '../../../general-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, {
articleMenuId: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default; export default _default;

View File

@ -22,7 +22,7 @@ exports.default = OakComponent({
name: 1, name: 1,
content: 1, content: 1,
articleMenuId: 1, articleMenuId: 1,
} },
}, },
extraFile$entity: { extraFile$entity: {
$entity: 'extraFile', $entity: 'extraFile',
@ -54,8 +54,8 @@ exports.default = OakComponent({
isList: true, isList: true,
formData: function (_a) { formData: function (_a) {
var _this = this; var _this = this;
var rows = _a.data; var rows = _a.data, props = _a.props;
var articleMenus = this.getArticleMenus(); var articleMenus = this.getArticleMenus(props.articleMenuId);
var treeData = articleMenus === null || articleMenus === void 0 ? void 0 : articleMenus.map(function (articleMenu) { var treeData = articleMenus === null || articleMenus === void 0 ? void 0 : articleMenus.map(function (articleMenu) {
var _a, _b; var _a, _b;
return { return {
@ -73,18 +73,15 @@ exports.default = OakComponent({
}, },
filters: [], filters: [],
lifetimes: {}, lifetimes: {},
properties: {
articleMenuId: '',
},
data: { data: {
selectedArticleId: '', selectedArticleId: '',
openKeys: [], openKeys: [],
selectedKeys: [], selectedKeys: [],
treeData: [], treeData: [],
parentId: '', parentId: '',
articleMenuId: '',
id: '',
name: '',
isArticle: false,
isChildren: false,
logo: '',
breadcrumbItems: [], breadcrumbItems: [],
}, },
methods: { methods: {
@ -108,7 +105,7 @@ exports.default = OakComponent({
name: 1, name: 1,
content: 1, content: 1,
articleMenuId: 1, articleMenuId: 1,
} },
}, },
extraFile$entity: { extraFile$entity: {
$entity: 'extraFile', $entity: 'extraFile',
@ -133,9 +130,11 @@ exports.default = OakComponent({
}, },
}, },
filter: { filter: {
parentId: parentId ? parentId : { parentId: parentId
$exists: false ? parentId
} : {
$exists: false,
},
}, },
sorter: [ sorter: [
{ {
@ -172,7 +171,7 @@ exports.default = OakComponent({
name: 1, name: 1,
content: 1, content: 1,
articleMenuId: 1, articleMenuId: 1,
} },
}, },
extraFile$entity: { extraFile$entity: {
$entity: 'extraFile', $entity: 'extraFile',
@ -197,9 +196,11 @@ exports.default = OakComponent({
}, },
}, },
filter: { filter: {
parentId: parentId ? parentId : { parentId: parentId
$exists: false ? parentId
} : {
$exists: false,
},
}, },
sorter: [ sorter: [
{ {
@ -226,7 +227,7 @@ exports.default = OakComponent({
articleMenuId: 1, articleMenuId: 1,
}, },
filter: { filter: {
articleMenuId: articleMenuId articleMenuId: articleMenuId,
}, },
sorter: [ sorter: [
{ {
@ -252,7 +253,7 @@ exports.default = OakComponent({
articleMenuId: 1, articleMenuId: 1,
}, },
filter: { filter: {
articleMenuId: articleMenuId articleMenuId: articleMenuId,
}, },
sorter: [ sorter: [
{ {