innerName
A temporary runtime-generated name (innerId + tag), used for quickly identifying elements.
Read-only Property
innerName: string
A temporary runtime-generated name used for quick element identification.
Belongs to
UI Element
Example
Display the innerName of a rectangle element
ts
ts
// #显示矩形元素的 innerName (App)
import { App, Rect, Text } from 'leafer-ui'
import '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/viewport' // 导入视口插件 (可选)
const app = new App({ view: window, editor: {} })
const rect = Rect.one({ fill: '#32cd79' }, 0, 30)
app.tree.add(rect)
app.tree.add(new Text({ text: rect.innerName, fill: '#32cd79' }))