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.
- package/README.md +22 -11
- 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/
|
|
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 {
|
|
54
|
-
|
|
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/
|
|
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
|
-
####
|
|
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
|
|
218
|
-
|
|
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 '
|
|
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 '
|
|
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
|
|
504
|
-
|
|
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)
|