0
我是新來的sencha touch。我面臨的問題,這是我的第一個測試應用程序。確認框未正確呈現
Ext.Msg.confirm('', 'Are you sure you want to reset this form?', function (btn) {
if (btn === 'yes') {
}
});
問題出在確認框樣式。它的到來,但它不適合。 這裏是連接屏幕截圖
這是我使用的代碼
BillingForm.js
Ext.define("test.view.BillingForm", {
extend: "Ext.Container",
config: {
items: [{
title: "Basic",
xtype: "formpanel",
id: "billingForm",
items: [
{
xtype: "fieldset",
title: "Billing Information",
defaults: {
labelWidth: "32%",
style: {
"background-color": "#fff",
"font-size": "12px",
"color": "#333"
}
},
items: [
{
xtype: 'textfield',
name: 'firstname',
label: 'First Name',
palceholder: "Enter your first name",
required: true,
focus: true
}
]
},
{
xtype: 'button',
text: 'Reset',
ui: 'decline',
handler: function(btn, evt) {
Ext.Msg.confirm('', 'Are you sure you want to reset this form?', function (btn) {
if (btn === 'yes') {
}
});
}
}
]
}
]
}
});
MainView.js
Ext.define('test.view.MainView', {
extend : "Ext.Container",
alias : ["widget.mainview"],
config: {
fullscreen: true,
layout: {
type: "vbox"
},
items: [{
xtype: "toolbar",
docked: "top",
height: 45,
title: "First App"
},
Ext.create("test.view.BillingForm",{
height:300,
padding:"10 0 0 0"
})
],
}
});
app.js
Ext.onReady(function(){
Ext.application({
name: 'test',
appFolder : 'app',
models : [],
stores : [],
requires: [],
views: ["MainView","BillingForm"],
controllers: [],
isIconPrecomposed : true,
profiles : [],
launch: function() {
Ext.create("test.view.BillingForm", {});
}
});
});
的Index.html
<!DOCTYPE>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello World</title>
<link href="http://localhost/projects/touch/resources/css/cupertino.css" type="text/css" rel="stylesheet"/>
<script src="http://localhost/projects/touch/sencha-touch-all-debug.js"></script>
<script src="app.js"></script>
</head>
<body>
</body>
</html>