azs-doc-editor 1.0.2 → 1.0.3

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
@@ -13,7 +13,26 @@
13
13
  ## 安装
14
14
 
15
15
  ```bash
16
- npm install vue-document-editor
16
+ npm install azs-doc-editor
17
+ ```
18
+
19
+ ## 重要:样式导入
20
+
21
+ **必须在你的项目中导入以下样式,否则编辑器的按钮和图标将不显示:**
22
+
23
+ ```typescript
24
+ // main.ts 或 main.js
25
+ import 'element-plus/dist/index.css'
26
+ import 'remixicon/fonts/remixicon.css'
27
+ import 'azs-doc-editor/style.css'
28
+ ```
29
+
30
+ 或者在你的 HTML 中引入:
31
+
32
+ ```html
33
+ <link rel="stylesheet" href="node_modules/element-plus/dist/index.css">
34
+ <link rel="stylesheet" href="node_modules/remixicon/fonts/remixicon.css">
35
+ <link rel="stylesheet" href="node_modules/azs-doc-editor/dist/style.css">
17
36
  ```
18
37
 
19
38
  ## 前置要求
@@ -36,8 +55,12 @@ npm install vue-document-editor
36
55
 
37
56
  ```typescript
38
57
  import { createApp } from 'vue'
39
- import DocumentConverter from 'vue-document-converter'
40
- import 'vue-document-converter/style.css'
58
+ import DocumentConverter from 'azs-doc-editor'
59
+
60
+ // 必须导入这些样式
61
+ import 'element-plus/dist/index.css'
62
+ import 'remixicon/fonts/remixicon.css'
63
+ import 'azs-doc-editor/style.css'
41
64
 
42
65
  const app = createApp(App)
43
66
  app.use(DocumentConverter)
@@ -10107,7 +10107,7 @@ const df = /* @__PURE__ */ Se(cf, [["__scopeId", "data-v-e8b5969a"]]), uf = { cl
10107
10107
  };
10108
10108
  }
10109
10109
  });
10110
- const yf = /* @__PURE__ */ Se(gf, [["__scopeId", "data-v-7c7b1a7b"]]), bf = { class: "editor-page-main" }, Cf = { class: "editor-header" }, kf = { class: "editor-body" }, Sf = {
10110
+ const yf = /* @__PURE__ */ Se(gf, [["__scopeId", "data-v-7c7b1a7b"]]), bf = { class: "editor-header" }, Cf = { class: "editor-page-main" }, kf = { class: "editor-body" }, Sf = {
10111
10111
  id: "editor",
10112
10112
  class: "editor-area-container"
10113
10113
  }, vf = /* @__PURE__ */ G({
@@ -10230,146 +10230,146 @@ const yf = /* @__PURE__ */ Se(gf, [["__scopeId", "data-v-7c7b1a7b"]]), bf = { cl
10230
10230
  ref: i
10231
10231
  }, [
10232
10232
  v("div", bf, [
10233
- v("div", Cf, [
10234
- S(M(J), {
10235
- type: "action",
10236
- desc: "撤销",
10237
- icon: "ri-arrow-go-back-line",
10238
- onClick: A[0] || (A[0] = (Te) => {
10239
- var be;
10240
- return (be = a.value) == null ? void 0 : be.chain().focus().undo().run();
10241
- }),
10242
- disabled: !((ae = a.value) != null && ae.can().chain().focus().undo().run()) || !d.value
10243
- }, null, 8, ["disabled"]),
10244
- S(M(J), {
10245
- type: "action",
10246
- desc: "重做",
10247
- icon: "ri-arrow-go-forward-line",
10248
- onClick: A[1] || (A[1] = (Te) => {
10249
- var be;
10250
- return (be = a.value) == null ? void 0 : be.chain().focus().redo().run();
10251
- }),
10252
- disabled: !((xe = a.value) != null && xe.can().chain().focus().redo().run()) || !d.value
10253
- }, null, 8, ["disabled"]),
10254
- S(M(J), {
10255
- type: "action",
10256
- desc: "清除样式",
10257
- icon: "ri-eraser-fill",
10258
- onClick: A[2] || (A[2] = (Te) => {
10259
- var be;
10260
- return (be = a.value) == null ? void 0 : be.chain().focus().unsetAllMarks().run();
10261
- }),
10262
- disabled: !((mo = a.value) != null && mo.can().chain().focus().unsetAllMarks().run()) || !d.value
10263
- }, null, 8, ["disabled"]),
10264
- S(X, { direction: "vertical" }),
10265
- S(M(Ds), {
10266
- editor: a.value,
10267
- editable: d.value
10268
- }, null, 8, ["editor", "editable"]),
10269
- S(M(Ls), {
10270
- editor: a.value,
10271
- editable: d.value
10272
- }, null, 8, ["editor", "editable"]),
10273
- S(M(zs), {
10274
- editor: a.value,
10275
- editable: d.value
10276
- }, null, 8, ["editor", "editable"]),
10277
- S(M(js), {
10278
- editor: a.value,
10279
- editable: d.value
10280
- }, null, 8, ["editor", "editable"]),
10281
- S(M(Us), {
10282
- editor: a.value,
10283
- editable: d.value
10284
- }, null, 8, ["editor", "editable"]),
10285
- S(X, { direction: "vertical" }),
10286
- S(M(Bs), {
10287
- editor: a.value,
10288
- editable: d.value
10289
- }, null, 8, ["editor", "editable"]),
10290
- S(X, { direction: "vertical" }),
10291
- S(_e, {
10292
- trigger: "click",
10293
- disabled: !d.value
10294
- }, {
10295
- dropdown: T(() => [
10296
- S(Ie, { style: { overflow: "hidden" } }, {
10297
- default: T(() => [
10298
- S(re, {
10299
- icon: M(nf),
10300
- class: "dropdown-item"
10301
- }, {
10302
- default: T(() => [
10303
- v("input", {
10304
- type: "file",
10305
- id: "file",
10306
- class: "select-file",
10307
- title: "",
10308
- accept: "image/*",
10309
- onChange: w
10310
- }, null, 32),
10311
- A[8] || (A[8] = v("span", { class: "desc" }, "图片", -1))
10312
- ]),
10313
- _: 1
10314
- }, 8, ["icon"]),
10315
- S(re, {
10316
- icon: M(ef),
10317
- class: "dropdown-item",
10318
- onClick: A[3] || (A[3] = (Te) => y.value = !0)
10319
- }, {
10320
- default: T(() => [...A[9] || (A[9] = [
10321
- v("span", { class: "desc" }, "链接", -1)
10322
- ])]),
10323
- _: 1
10324
- }, 8, ["icon"]),
10325
- S(re, {
10326
- class: "dropdown-item",
10327
- onClick: A[4] || (A[4] = (Te) => {
10328
- var be;
10329
- return (be = a.value) == null ? void 0 : be.chain().focus().setHorizontalRule().run();
10330
- })
10331
- }, {
10332
- default: T(() => [...A[10] || (A[10] = [
10333
- v("i", { class: "ri-separator" }, null, -1),
10334
- v("span", { class: "desc" }, "分割线", -1)
10335
- ])]),
10336
- _: 1
10337
- }),
10338
- S(re, { class: "dropdown-item" }, {
10339
- default: T(() => [
10340
- S(M(oa), { "insert-content": b })
10341
- ]),
10342
- _: 1
10233
+ S(M(J), {
10234
+ type: "action",
10235
+ desc: "撤销",
10236
+ icon: "ri-arrow-go-back-line",
10237
+ onClick: A[0] || (A[0] = (Te) => {
10238
+ var be;
10239
+ return (be = a.value) == null ? void 0 : be.chain().focus().undo().run();
10240
+ }),
10241
+ disabled: !((ae = a.value) != null && ae.can().chain().focus().undo().run()) || !d.value
10242
+ }, null, 8, ["disabled"]),
10243
+ S(M(J), {
10244
+ type: "action",
10245
+ desc: "重做",
10246
+ icon: "ri-arrow-go-forward-line",
10247
+ onClick: A[1] || (A[1] = (Te) => {
10248
+ var be;
10249
+ return (be = a.value) == null ? void 0 : be.chain().focus().redo().run();
10250
+ }),
10251
+ disabled: !((xe = a.value) != null && xe.can().chain().focus().redo().run()) || !d.value
10252
+ }, null, 8, ["disabled"]),
10253
+ S(M(J), {
10254
+ type: "action",
10255
+ desc: "清除样式",
10256
+ icon: "ri-eraser-fill",
10257
+ onClick: A[2] || (A[2] = (Te) => {
10258
+ var be;
10259
+ return (be = a.value) == null ? void 0 : be.chain().focus().unsetAllMarks().run();
10260
+ }),
10261
+ disabled: !((mo = a.value) != null && mo.can().chain().focus().unsetAllMarks().run()) || !d.value
10262
+ }, null, 8, ["disabled"]),
10263
+ S(X, { direction: "vertical" }),
10264
+ S(M(Ds), {
10265
+ editor: a.value,
10266
+ editable: d.value
10267
+ }, null, 8, ["editor", "editable"]),
10268
+ S(M(Ls), {
10269
+ editor: a.value,
10270
+ editable: d.value
10271
+ }, null, 8, ["editor", "editable"]),
10272
+ S(M(zs), {
10273
+ editor: a.value,
10274
+ editable: d.value
10275
+ }, null, 8, ["editor", "editable"]),
10276
+ S(M(js), {
10277
+ editor: a.value,
10278
+ editable: d.value
10279
+ }, null, 8, ["editor", "editable"]),
10280
+ S(M(Us), {
10281
+ editor: a.value,
10282
+ editable: d.value
10283
+ }, null, 8, ["editor", "editable"]),
10284
+ S(X, { direction: "vertical" }),
10285
+ S(M(Bs), {
10286
+ editor: a.value,
10287
+ editable: d.value
10288
+ }, null, 8, ["editor", "editable"]),
10289
+ S(X, { direction: "vertical" }),
10290
+ S(_e, {
10291
+ trigger: "click",
10292
+ disabled: !d.value
10293
+ }, {
10294
+ dropdown: T(() => [
10295
+ S(Ie, { style: { overflow: "hidden" } }, {
10296
+ default: T(() => [
10297
+ S(re, {
10298
+ icon: M(nf),
10299
+ class: "dropdown-item"
10300
+ }, {
10301
+ default: T(() => [
10302
+ v("input", {
10303
+ type: "file",
10304
+ id: "file",
10305
+ class: "select-file",
10306
+ title: "",
10307
+ accept: "image/*",
10308
+ onChange: w
10309
+ }, null, 32),
10310
+ A[8] || (A[8] = v("span", { class: "desc" }, "图片", -1))
10311
+ ]),
10312
+ _: 1
10313
+ }, 8, ["icon"]),
10314
+ S(re, {
10315
+ icon: M(ef),
10316
+ class: "dropdown-item",
10317
+ onClick: A[3] || (A[3] = (Te) => y.value = !0)
10318
+ }, {
10319
+ default: T(() => [...A[9] || (A[9] = [
10320
+ v("span", { class: "desc" }, "链接", -1)
10321
+ ])]),
10322
+ _: 1
10323
+ }, 8, ["icon"]),
10324
+ S(re, {
10325
+ class: "dropdown-item",
10326
+ onClick: A[4] || (A[4] = (Te) => {
10327
+ var be;
10328
+ return (be = a.value) == null ? void 0 : be.chain().focus().setHorizontalRule().run();
10343
10329
  })
10344
- ]),
10345
- _: 1
10346
- })
10347
- ]),
10348
- default: T(() => [
10349
- A[11] || (A[11] = v("div", { style: { outline: "none", cursor: "pointer", "font-size": "14px" } }, [
10350
- v("i", { class: "ri-add-circle-fill" }),
10351
- v("span", null, "插入"),
10352
- v("i", { class: "ri-arrow-drop-down-line" })
10353
- ], -1))
10354
- ]),
10355
- _: 1
10356
- }, 8, ["disabled"]),
10357
- S(M(ea), {
10358
- editor: a.value,
10359
- editable: d.value
10360
- }, null, 8, ["editor", "editable"]),
10361
- S(X, { direction: "vertical" }),
10362
- S(He, {
10363
- type: "primary",
10364
- size: "small",
10365
- onClick: N
10366
- }, {
10367
- default: T(() => [...A[12] || (A[12] = [
10368
- _("保存", -1)
10369
- ])]),
10370
- _: 1
10371
- })
10372
- ]),
10330
+ }, {
10331
+ default: T(() => [...A[10] || (A[10] = [
10332
+ v("i", { class: "ri-separator" }, null, -1),
10333
+ v("span", { class: "desc" }, "分割线", -1)
10334
+ ])]),
10335
+ _: 1
10336
+ }),
10337
+ S(re, { class: "dropdown-item" }, {
10338
+ default: T(() => [
10339
+ S(M(oa), { "insert-content": b })
10340
+ ]),
10341
+ _: 1
10342
+ })
10343
+ ]),
10344
+ _: 1
10345
+ })
10346
+ ]),
10347
+ default: T(() => [
10348
+ A[11] || (A[11] = v("div", { style: { outline: "none", cursor: "pointer", "font-size": "14px" } }, [
10349
+ v("i", { class: "ri-add-circle-fill" }),
10350
+ v("span", null, "插入"),
10351
+ v("i", { class: "ri-arrow-drop-down-line" })
10352
+ ], -1))
10353
+ ]),
10354
+ _: 1
10355
+ }, 8, ["disabled"]),
10356
+ S(M(ea), {
10357
+ editor: a.value,
10358
+ editable: d.value
10359
+ }, null, 8, ["editor", "editable"]),
10360
+ S(X, { direction: "vertical" }),
10361
+ S(He, {
10362
+ type: "primary",
10363
+ size: "small",
10364
+ onClick: N
10365
+ }, {
10366
+ default: T(() => [...A[12] || (A[12] = [
10367
+ _("保存", -1)
10368
+ ])]),
10369
+ _: 1
10370
+ })
10371
+ ]),
10372
+ v("div", Cf, [
10373
10373
  v("div", kf, [
10374
10374
  v("div", {
10375
10375
  class: "catalogue-list",
@@ -10419,7 +10419,7 @@ const yf = /* @__PURE__ */ Se(gf, [["__scopeId", "data-v-7c7b1a7b"]]), bf = { cl
10419
10419
  };
10420
10420
  }
10421
10421
  });
10422
- const wf = /* @__PURE__ */ Se(vf, [["__scopeId", "data-v-e75ae4bc"]]), xf = { class: "excel-editor-container" }, Tf = ["id"], Af = /* @__PURE__ */ G({
10422
+ const wf = /* @__PURE__ */ Se(vf, [["__scopeId", "data-v-97cbf9b9"]]), xf = { class: "excel-editor-container" }, Tf = ["id"], Af = /* @__PURE__ */ G({
10423
10423
  __name: "ExcelEditor",
10424
10424
  props: {
10425
10425
  content: {},
@@ -10580,7 +10580,8 @@ const Ef = /* @__PURE__ */ Se(Af, [["__scopeId", "data-v-a8c6ba69"]]), Rf = { cl
10580
10580
  ]));
10581
10581
  }
10582
10582
  });
10583
- const Lf = /* @__PURE__ */ Se(Of, [["__scopeId", "data-v-9db96d3c"]]), $f = {
10583
+ const Lf = /* @__PURE__ */ Se(Of, [["__scopeId", "data-v-9db96d3c"]]);
10584
+ const $f = {
10584
10585
  install(n) {
10585
10586
  n.component("DocumentEditorPage", Lf);
10586
10587
  }