gpt4 book ai didi

extjs 更改商店的默认值

转载 作者:行者123 更新时间:2023-12-01 09:42:54 25 4
gpt4 key购买 nike

让我们假设,有一个 JsonStore :

SomeStore = Ext.extend(Ext.data.JsonStore, {
constructor: function(cfg) {
cfg = cfg || {};
OrdersStore.superclass.constructor.call(this, Ext.apply({
storeId: 'someStore',
url: 'someUrl',
root: 'rows',
fields: [
{
name: 'someId'
defaultvalue : '100'
}
]
}, cfg));
}
});

我该怎么做:

new SomeStore().getFieldByname('someId').setDefaultvalue = '73'

正确的语法是什么?

最佳答案

someStore.fields.item('someId').defaultValue = 73;

关于extjs 更改商店的默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5279430/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com