z-certificate-editor 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/README.md +22 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,7 +31,7 @@ pnpm add z-certificate-editor
31
31
 
32
32
  <script setup>
33
33
  import { CertificateEditor } from 'z-certificate-editor'
34
- import 'z-certificate-editor/dist/style.css'
34
+ import 'z-certificate-editor/style.css'
35
35
 
36
36
  const handleSave = (certificateData) => {
37
37
  console.log('证书配置数据:', certificateData)
@@ -50,8 +50,11 @@ const handleSave = (certificateData) => {
50
50
  </template>
51
51
 
52
52
  <script setup>
53
- import { CertificateEditor, SYSTEM_FIELDS } from 'z-certificate-editor'
54
- import 'z-certificate-editor/dist/style.css'
53
+ import {
54
+ CertificateEditor,
55
+ SYSTEM_FIELDS
56
+ } from 'z-certificate-editor'
57
+ import 'z-certificate-editor/style.css'
55
58
 
56
59
  const customSystemFields = [
57
60
  {
@@ -84,7 +87,7 @@ const handleSave = (certificateData) => {
84
87
  <script setup>
85
88
  import { ref } from 'vue'
86
89
  import { CertificateEditor } from 'z-certificate-editor'
87
- import 'z-certificate-editor/dist/style.css'
90
+ import 'z-certificate-editor/style.css'
88
91
 
89
92
  const certificateEditorRef = ref(null)
90
93
 
@@ -205,7 +208,7 @@ npm run preview
205
208
 
206
209
  `CertificateEditor` 组件支持通过 `systemFields` prop 传入自定义系统字段配置,实现灵活的字段管理。
207
210
 
208
- #### 在 App.vue 中使用
211
+ #### 在项目中使用
209
212
 
210
213
  ```vue
211
214
  <template>
@@ -214,8 +217,11 @@ npm run preview
214
217
 
215
218
  <script setup>
216
219
  import { ref } from 'vue'
217
- import CertificateEditor from './components/CertificateEditor.vue'
218
- import { SYSTEM_FIELDS } from './utils/fieldManager.js'
220
+ import {
221
+ CertificateEditor,
222
+ SYSTEM_FIELDS
223
+ } from 'z-certificate-editor'
224
+ import 'z-certificate-editor/style.css'
219
225
 
220
226
  // 定义自定义系统字段
221
227
  const customSystemFields = ref([
@@ -443,7 +449,8 @@ const customSystemFields = ref([
443
449
 
444
450
  <script setup>
445
451
  import { ref } from 'vue'
446
- import CertificateEditor from './components/CertificateEditor.vue'
452
+ import { CertificateEditor } from 'z-certificate-editor'
453
+ import 'z-certificate-editor/style.css'
447
454
 
448
455
  const handleSave = (certificateData) => {
449
456
  console.log('接收到保存的数据:', certificateData)
@@ -472,7 +479,8 @@ const handleSave = (certificateData) => {
472
479
 
473
480
  <script setup>
474
481
  import { ref } from 'vue'
475
- import CertificateEditor from './components/CertificateEditor.vue'
482
+ import { CertificateEditor } from 'z-certificate-editor'
483
+ import 'z-certificate-editor/style.css'
476
484
 
477
485
  const certificateEditorRef = ref(null)
478
486
 
@@ -500,8 +508,11 @@ const getData = () => {
500
508
 
501
509
  <script setup>
502
510
  import { ref } from 'vue'
503
- import CertificateEditor from './components/CertificateEditor.vue'
504
- import { SYSTEM_FIELDS } from './utils/fieldManager.js'
511
+ import {
512
+ CertificateEditor,
513
+ SYSTEM_FIELDS
514
+ } from 'z-certificate-editor'
515
+ import 'z-certificate-editor/style.css'
505
516
 
506
517
  const customSystemFields = ref([...SYSTEM_FIELDS])
507
518
  const certificateEditorRef = ref(null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "z-certificate-editor",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "一个功能强大的基于 Vue 3 的可视化证书编辑器,支持拖拽编辑、系统字段关联、模板管理、图片/二维码处理等功能",
5
5
  "type": "module",
6
6
  "main": "./dist/z-certificate-editor.umd.js",