aoi-comp 1.0.8 → 1.0.9

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/README.md CHANGED
@@ -148,16 +148,29 @@ import { AoiInput, AoiTable, AoiView } from 'aoi-comp/comps';
148
148
 
149
149
  ```jsx
150
150
  import { AoiInput, AoiNumber, AoiTable } from 'aoi-comp/comps';
151
+ import { formatTime } from 'aoi-comp/utils';
152
+
153
+ const data = [{ id: '1788164945005', name: '示例数据' }];
154
+ const columns = [
155
+ {
156
+ title: '时间',
157
+ dataIndex: 'id',
158
+ render: (value) => formatTime(Number(value)),
159
+ },
160
+ { title: '名称', dataIndex: 'name' },
161
+ ];
151
162
 
152
163
  const Demo = () => (
153
164
  <>
154
165
  <AoiInput value="test" />
155
166
  <AoiNumber value={8} max={10} />
156
- <AoiTable rowKey="id" columns={[]} data={[]} />
167
+ <AoiTable rowKey="id" columns={columns} data={data} total={data.length} />
157
168
  </>
158
169
  );
159
170
  ```
160
171
 
172
+ > 数据库的 `BIGINT` 字段可能以字符串返回。将毫秒时间戳传给 `formatTime` 前应先转换为数字,例如 `formatTime(Number(record.id))`。
173
+
161
174
  #### 6. 使用 Hooks 和工具函数
162
175
 
163
176
  Hooks 从 `aoi-comp/hooks` 导入:
@@ -1,5 +1,5 @@
1
- import { R as e, Z as t, n, nt as r, p as i, r as a } from "./Geometry-CmoUjYuy.js";
2
- import { k as o, w as s } from "./RenderTargetSystem-BwBGe2Se.js";
1
+ import { R as e, Z as t, n, nt as r, p as i, r as a } from "./Geometry-BM7su788.js";
2
+ import { k as o, w as s } from "./RenderTargetSystem-BNp9VOlY.js";
3
3
  //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/high-shader/shader-bits/localUniformBit.mjs
4
4
  var c = {
5
5
  name: "local-uniform-bit",
@@ -1,4 +1,4 @@
1
- import { L as e, b as t, q as n } from "./Geometry-CmoUjYuy.js";
1
+ import { L as e, b as t, q as n } from "./Geometry-BM7su788.js";
2
2
  var r = new class {
3
3
  constructor(e) {
4
4
  this._canvasPool = /* @__PURE__ */ Object.create(null), this.canvasOptions = e || {}, this.enableFullScreen = !1;
@@ -1,4 +1,4 @@
1
- import { gt as e, pt as t } from "./packages-B-izsU7O.js";
1
+ import { gt as e, pt as t } from "./packages-C9qBCygN.js";
2
2
  //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/extensions/Extensions.mjs
3
3
  var n = /* @__PURE__ */ ((e) => (e.Application = "application", e.WebGLPipes = "webgl-pipes", e.WebGLPipesAdaptor = "webgl-pipes-adaptor", e.WebGLSystem = "webgl-system", e.WebGPUPipes = "webgpu-pipes", e.WebGPUPipesAdaptor = "webgpu-pipes-adaptor", e.WebGPUSystem = "webgpu-system", e.CanvasSystem = "canvas-system", e.CanvasPipesAdaptor = "canvas-pipes-adaptor", e.CanvasPipes = "canvas-pipes", e.Asset = "asset", e.LoadParser = "load-parser", e.ResolveParser = "resolve-parser", e.CacheParser = "cache-parser", e.DetectionParser = "detection-parser", e.MaskEffect = "mask-effect", e.BlendMode = "blend-mode", e.TextureSource = "texture-source", e.TextureUploaderWebGL = "texture-uploader-webgl", e.TextureUploaderWebGPU = "texture-uploader-webgpu", e.Environment = "environment", e.ShapeBuilder = "shape-builder", e.Batcher = "batcher", e))(n || {}), r = (e) => {
4
4
  if (typeof e == "function" || typeof e == "object" && e.extension) {
@@ -1,4 +1,4 @@
1
- import { B as e, C as t, D as n, G as r, H as i, I as a, J as o, L as s, P as c, Q as l, R as u, T as d, V as f, W as p, Y as m, Z as h, _ as g, at as _, b as v, d as y, et as b, f as ee, h as te, i as ne, it as x, j as re, k as ie, l as S, m as ae, n as oe, nt as se, o as ce, r as C, s as le, t as ue, tt as de, u as fe, w as pe, x as me, y as w, z as T } from "./Geometry-CmoUjYuy.js";
1
+ import { B as e, C as t, D as n, G as r, H as i, I as a, J as o, L as s, P as c, Q as l, R as u, T as d, V as f, W as p, Y as m, Z as h, _ as g, at as _, b as v, d as y, et as b, f as ee, h as te, i as ne, it as x, j as re, k as ie, l as S, m as ae, n as oe, nt as se, o as ce, r as C, s as le, t as ue, tt as de, u as fe, w as pe, x as me, y as w, z as T } from "./Geometry-BM7su788.js";
2
2
  //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/environment/autoDetectEnvironment.mjs
3
3
  var E = [];
4
4
  _.handleByNamedList(x.Environment, E);
@@ -1,6 +1,6 @@
1
- import { C as e, F as t, R as n, _ as r, at as i, it as a, nt as o, tt as s, v as c } from "./Geometry-CmoUjYuy.js";
2
- import "./init-W_GeGJkn.js";
3
- import "./init-pj0uFHxN.js";
1
+ import { C as e, F as t, R as n, _ as r, at as i, it as a, nt as o, tt as s, v as c } from "./Geometry-BM7su788.js";
2
+ import "./init-CCTyMlTU.js";
3
+ import "./init-C4yLp8yD.js";
4
4
  //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/dom/CanvasObserver.mjs
5
5
  var l = class {
6
6
  constructor(e) {
@@ -1,4 +1,4 @@
1
- import { $ as e, W as t, b as n, it as r, z as i } from "./Geometry-CmoUjYuy.js";
1
+ import { $ as e, W as t, b as n, it as r, z as i } from "./Geometry-BM7su788.js";
2
2
  //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/sources/ImageSource.mjs
3
3
  var a = class extends t {
4
4
  constructor(e) {