0

カメラAPIを使用して写真を撮り、これを画面に表示しようとしています。写真を撮ることができます。しかし、それを画面に表示する方法がわかりません。このために私は以下のコードを書きました:

Ext.define('MyApp.view.CameraPanel', {    extend: 'Ext.Panel',


config: {
    ui: 'light',
    layout: {
        type: 'card'
    },
    items: [
        {
            xtype: 'button',
            handler: function(button, event) {
                Ext.device.Camera.capture({
                    source: 'camera',
                    destination: 'data',


                    success: function(image) {


                        takenimage.setSrc(image);
                    },


                    failure: function() {
                        Ext.Msg.alert('Error', 'There was an error when acquiring the picture.');
                    },
                    scope: this
                });
            },
            height: 33,
            left: 60,
            top: 400,
            ui: 'decline-round',
            width: 200,
            text: 'Take a Photo'
        },
        {
            xtype: 'image',
            itemId: 'takenimage',
            src: 'image'
        }
    ]
}

});

私はこの煎茶プラットフォームに不慣れです。助けてください。

ありがとう

4

1 に答える 1

0

htmlタグを使用して、この問題を修正することができます。

于 2012-11-15T14:40:16.110 に答える