|
@@ -1,4 +1,4 @@
|
|
-import { _decorator, Component, EditBox, instantiate, Node, Prefab, Vec3 } from 'cc';
|
|
|
|
|
|
+import { _decorator, Component, EditBox, instantiate, Node, Prefab, Size, UITransform, Vec3 } from 'cc';
|
|
import { config } from '../../config';
|
|
import { config } from '../../config';
|
|
import { edit_event_view_select_btn } from './edit_event_view_select_btn';
|
|
import { edit_event_view_select_btn } from './edit_event_view_select_btn';
|
|
import { Attributes } from '../Attributes';
|
|
import { Attributes } from '../Attributes';
|
|
@@ -14,6 +14,7 @@ const { ccclass, property } = _decorator;
|
|
export class edit_event_view extends Component {
|
|
export class edit_event_view extends Component {
|
|
@property(Prefab) event_item_prefab:Prefab = null;
|
|
@property(Prefab) event_item_prefab:Prefab = null;
|
|
@property(Node) btn_close:Node = null;
|
|
@property(Node) btn_close:Node = null;
|
|
|
|
+ @property(Node) result_scrollview:Node = null;
|
|
@property(Node) content:Node = null;
|
|
@property(Node) content:Node = null;
|
|
@property(Node) type_content:Node = null;
|
|
@property(Node) type_content:Node = null;
|
|
@property(Node) type_btn:Node = null;
|
|
@property(Node) type_btn:Node = null;
|
|
@@ -87,13 +88,16 @@ export class edit_event_view extends Component {
|
|
this.content.removeAllChildren()
|
|
this.content.removeAllChildren()
|
|
|
|
|
|
let list;
|
|
let list;
|
|
|
|
+ let result_scrollview_size = new Size(this.result_scrollview.getComponent(UITransform).width, 700)
|
|
if(this.m_cur_select_type == -2) {
|
|
if(this.m_cur_select_type == -2) {
|
|
this.search_node.active = true
|
|
this.search_node.active = true
|
|
list = this.m_search_item_list
|
|
list = this.m_search_item_list
|
|
} else {
|
|
} else {
|
|
this.search_node.active = false
|
|
this.search_node.active = false
|
|
|
|
+ result_scrollview_size.height = 800
|
|
list = this.getEventListByType()
|
|
list = this.getEventListByType()
|
|
}
|
|
}
|
|
|
|
+ this.result_scrollview.getComponent(UITransform).setContentSize(result_scrollview_size)
|
|
|
|
|
|
for (let index = 0; index < list.length; index++) {
|
|
for (let index = 0; index < list.length; index++) {
|
|
const element = list[index];
|
|
const element = list[index];
|