Grid.removeItem issue
This commit is contained in:
parent
fc61731c7d
commit
b5fd20aa2c
3
lib/ui/grid/grid.d.ts
vendored
3
lib/ui/grid/grid.d.ts
vendored
@ -257,8 +257,9 @@ export class Grid {
|
|||||||
* 添加行数据
|
* 添加行数据
|
||||||
* @param item 待添加的行数据值
|
* @param item 待添加的行数据值
|
||||||
* @param index 待添加的行索引
|
* @param index 待添加的行索引
|
||||||
|
* @returns 返回已添加的行数据
|
||||||
*/
|
*/
|
||||||
addItem(item: GridItem, index?: number): void;
|
addItem(item: GridItem, index?: number): GridItem;
|
||||||
/**
|
/**
|
||||||
* 删除行数据
|
* 删除行数据
|
||||||
* @param index 待删除的行索引
|
* @param index 待删除的行索引
|
||||||
|
@ -200,6 +200,7 @@ export class Grid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.reload();
|
this.reload();
|
||||||
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
removeItem(index) {
|
removeItem(index) {
|
||||||
@ -213,11 +214,11 @@ export class Grid {
|
|||||||
if (this._var.colAttrs.__filtered === true) {
|
if (this._var.colAttrs.__filtered === true) {
|
||||||
this._var.source.splice(it.__index, 1);
|
this._var.source.splice(it.__index, 1);
|
||||||
}
|
}
|
||||||
for (let i = it.__index + 1; i < this._var.source.length; --i) {
|
for (let i = it.__index; i < this._var.source.length; ++i) {
|
||||||
this._var.source[i].__index -= 1;
|
this._var.source[i].__index -= 1;
|
||||||
}
|
}
|
||||||
this.reload();
|
this.reload();
|
||||||
return item;
|
return it.values;
|
||||||
}
|
}
|
||||||
|
|
||||||
_refreshSource(list) {
|
_refreshSource(list) {
|
||||||
|
@ -45,8 +45,14 @@ export function formatUrl(msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let path;
|
||||||
|
if (typeof consts !== 'undefined') {
|
||||||
|
path = consts.path;
|
||||||
|
} else if (typeof _network !== 'undefined') {
|
||||||
|
path = _network.root;
|
||||||
|
}
|
||||||
for (let r of rs) {
|
for (let r of rs) {
|
||||||
msg = msg.replaceAll(r, '<a target="_blank" href="' + r + '"><svg><use xlink:href="' + ((typeof consts !== 'undefined' && consts.path) || '') + 'fonts/fa-regular.svg#link"></use></svg></a>');
|
msg = msg.replaceAll(r, `<a target="_blank" href="${r}"><svg><use xlink:href="${path || ''}fonts/fa-regular.svg#link"></use></svg></a>`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user