假设我有一个模特:
{
name: 'a',
category: 'C'
}
我希望得到一个商店,其中包含json请求:
{
models: [
{ id: 1, name: 'a', category: 'C' },
{ id: 1, name: 'a', category: 'C' }
]
}
我会给出一个回复:
class Camera
{
// note this section is moved to the beginning,
// so file and settings are initialized before FRAME_HEIGHT and FRAME_WIDTH
private:
std::string file;
Settings settings;
public:
Camera(std::string file)
: file(file)
, settings(file)
, FRAME_HEIGHT(settings.getFrameHeight())
, FRAME_WIDTH(settings.getFrameWidth())
{
}
~Camera() {}
const size_t FRAME_HEIGHT;
const size_t FRAME_WIDTH;
};
如何使用extjs完成此操作?
感谢。