我是 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);
}
});
我采取哪些步骤将其转换为数据视图,或者如何使用我的自定义 HTML?