اليوم ، عندما كنت أستخدم Easyi لإجراء تخطيطات ، واجهت سؤالًا.
المشكلة: عندما يتم كتابة class = "easyui-layout" في div مستقل ، لا يمكن عرض نمط التخطيط ولا يوجد خطأ.
على سبيل المثال:
نسخة الكود كما يلي:
<span style = "font-size: 14px ؛"> <body>
<viv>
<div data- options = "region: 'North' ، title: 'North title' ، split: true" style = "height: 100px ؛">
</div>
<div data- options = "region: 'south' ، title: 'south title' ، split: true" style = "height: 100px ؛">
</div>
<div data- options = "region: 'east' ، iconcls: 'icon-reload' ، title: 'east' ، split: true">
</div>
<div data- options = "المنطقة:" الغرب "، العنوان:" الغرب "، الانقسام: TRUE">
</div>
<div data- options = "region: 'center' ، title: 'center title'" href = "centerpage.html" style = "background: #EEE ؛ Overflow: Hidden ؛">
</div>
</div>
</body> </span>
يعرض:
الحل: عندما يتم كتابة class = "easyui-layout" في الجسم ، يتم حل المشكلة. ولا يمكن تضمين سمة المنطقة في divs الأخرى غير ذات الصلة.
شفرة:
نسخة الكود كما يلي:
<span style = "font-size: 14px ؛"> <body>
<div data- options = "region: 'North' ، title: 'North title' ، split: true" style = "height: 100px ؛">
</div>
<div data- options = "region: 'south' ، title: 'south title' ، split: true" style = "height: 100px ؛">
</div>
<div data- options = "region: 'east' ، iconcls: 'icon-reload' ، title: 'east' ، split: true">
</div>
<div data- options = "المنطقة:" الغرب "، العنوان:" الغرب "، الانقسام: TRUE">
</div>
<div data- options = "region: 'center' ، title: 'center title'" href = "centerpage.html" style = "background: #EEE ؛ Overflow: Hidden ؛">
</div>
</body> </span>
أتساءل دائما لماذا هذا؟