@wanghe1995/excel-editor-ui
v1.0.4
Published
Excel Editor UI Components for docu-flow
Maintainers
Readme
Excel Editor UI
快速开始(仅对象式接入)
import { ExcelEditor } from '@wanghe1995/excel-editor-ui'
const editor = new ExcelEditor({
container: '#app',
initialContent: null,
documentName: '示例表格.xlsx',
readOnly: false,
onChange: (content) => {
console.log('excel change', content)
}
})对外 API(仅对象式)
interface Options {
container: string | HTMLElement
initialContent?: any
documentName?: string
readOnly?: boolean
locale?: ExcelLocale
i18n?: Partial<ExcelI18nMessages>
onChange?: (content: any) => void
}
class ExcelEditor {
constructor(options: Options)
setContent(content: any): void
setDocumentName(name: string): void
setReadOnly(readOnly: boolean): void
destroy(): void
}说明
- 统一采用
new ExcelEditor(...)接入。 - 宿主负责数据请求与持久化;编辑器仅负责渲染与变更回调。
