我是ExtJS的新手,我已经有一个医生名单的例子,但在医生详细信息页面中,它看起来像一个填充的表格,这是我的查看文件:
Ext.define("GS.view.DoctorView", {
extend: "Ext.form.Panel",
requires: "Ext.form.FieldSet",
alias: "widget.doctorview",
config:{
scrollable:'vertical'
},
initialize: function () {
this.callParent(arguments);
var backButton = {
xtype: "button",
ui: "back",
text: "Back List",
handler: this.onBackButtonTap,
scope: this
};
var topToolbar = {
xtype: "toolbar",
docked: "top",
title: "Doctor Profile",
items: [
backButton,
{ xtype: "spacer" }
]
};
var bottomToolbar = {
xtype: "toolbar",
docked: "bottom",
items: [
]
};
var doctorNameView = {
xtype: 'textfield',
name: 'title',
label: 'Title',
required: true
};
var doctorDescView = {
xtype: 'textareafield',
name: 'narrative',
label: 'Narrative'
};
this.add([
topToolbar,
{ xtype: "fieldset",
items: [doctorNameView, doctorDescView]
},
bottomToolbar
]);
},
onBackButtonTap: function () {
this.fireEvent("backToListCommand", this);
}
});
我采取了哪些步骤将其转换为dataview,或者如何使用我的自定义HTML?
答案 0 :(得分:0)
首先,您的问题非常模糊,因此您应该阅读一些数据视图教程或文章,以了解您为何真正需要数据视图,因为列表是数据视图,表单是您创建的详细信息视图。
http://www.sencha.com/blog/dive-into-dataview-with-sencha-touch-2-beta-2
http://docs.sencha.com/touch/2-1/#!/guide/dataview
要使用自定义HTML,您必须使用xtemplate