flameresttable 1.0.15 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
package/src/App.vue CHANGED
@@ -40,10 +40,7 @@ opts.Remove.can = true;
40
40
 
41
41
  opts.onRowClickOpenSlot = true;
42
42
 
43
- // Загружаем первичные данные
44
- Model.all({ sort: ['id'] }).then(r =>
45
- TableComponent.value?.Table.load(r)
46
- )
43
+ opts.LoadParams.sort = ['-dt1'];
47
44
 
48
45
  </script>
49
46
 
@@ -321,10 +321,12 @@ export default defineComponent({
321
321
 
322
322
  // Автозагрузка первичной версии
323
323
  if (props.opts.autoload === true) {
324
+ /**
324
325
  const tModel = (props.model as any)
325
326
  tModel.all().then((r: any) => {
326
327
  Table.load(r);
327
- })
328
+ })*/
329
+ Table.update();
328
330
  }
329
331
 
330
332
  const primaryKey = (Table.model as any).constructor.primaryKeys[0];
@@ -3,7 +3,7 @@ export default interface ITableLoadParams {
3
3
  where?: any
4
4
  fields?: any,
5
5
  expand?: any,
6
- sortfields?: Array<string>,
6
+ sort?: Array<string>,
7
7
  page?: number,
8
8
  perPage?: number
9
9
 
@@ -36,7 +36,7 @@ export default class TableOpts {
36
36
  * Удалить одну колонку или сразу несколько
37
37
  * @param ColumnName Полностью удалить строку
38
38
  */
39
- public delete(ColumnName: string | Array<string>) {
39
+ public delete(ColumnName: string | Array<string>, opts: IColumn = {}) {
40
40
 
41
41
  let arr: Array<string> = [];
42
42
  if (typeof ColumnName === 'string') arr = [ColumnName as string];