1234567891011121314151617181920212223242526272829303132 |
- using System.Collections;
- using System.Collections.Generic;
- using LitJson;
- using UnityEngine;
- using UnityEngine.UI;
- public class JieKouRiZhiItem : MonoBehaviour
- {
- public Text call_name;
- public Text call_date;
- public Text source;
- public Text input;
- public Text output;
- public Text result;
- public Text receive_date;
- public void init(JsonData data)
- {
- call_name.text = data["call_name"].ToString();
- call_date.text = data["call_date"].ToString();
- source.text = data["source"].ToString();
- input.text = data["input"].ToString();
- output.text = data["output"].ToString();
- result.text = data["result"].ToString();
- receive_date.text = data["receive_date"].ToString();
- call_name.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- call_name.transform.parent.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- input.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- input.transform.parent.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- output.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- output.transform.parent.GetComponent<ContentSizeFitter>().SetLayoutVertical();
- }
- }
|