officialblock 1.0.1 → 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.
Files changed (40) hide show
  1. package/README.md +25 -1
  2. package/dist/official-block.cjs.js +195 -1
  3. package/dist/official-block.es.js +27230 -72
  4. package/dist/official-block.umd.js +195 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +13 -2
  7. package/src/App.vue +32 -82
  8. package/src/components/ArticleList/article.vue +73 -0
  9. package/src/components/ArticleList/contact.vue +95 -0
  10. package/src/components/ArticleList/index.vue +220 -46
  11. package/src/components/ArticleList/setting.vue +709 -0
  12. package/src/components/Button/index.vue +183 -0
  13. package/src/components/Media/index.vue +327 -0
  14. package/src/components/Operate/index.vue +74 -0
  15. package/src/components/RichTextEditor/RichTextEditor.vue +277 -0
  16. package/src/components/RichTextEditor/index.ts +7 -0
  17. package/src/components/ThemePreview/ThemePreview.vue +462 -0
  18. package/src/components/ThemePreview/index.ts +4 -0
  19. package/src/components/index.ts +3 -0
  20. package/src/composables/useTheme.ts +205 -0
  21. package/src/index.ts +15 -4
  22. package/src/main.ts +16 -1
  23. package/src/router/index.ts +96 -0
  24. package/src/style.css +2 -4
  25. package/src/styles/editor.scss +649 -0
  26. package/src/styles/test.scss +20 -0
  27. package/src/styles/variables.scss +669 -0
  28. package/src/utils/common.ts +13 -0
  29. package/src/utils/theme.ts +335 -0
  30. package/src/views/Layout.vue +250 -0
  31. package/src/views/NotFound.vue +114 -0
  32. package/src/views/components/ArticleListDemo.vue +166 -0
  33. package/src/views/components/DragLimitDemo.vue +573 -0
  34. package/src/views/components/DragSortDemo.vue +610 -0
  35. package/src/views/components/HeroSlideDemo.vue +353 -0
  36. package/src/views/components/RichTextEditorDemo.vue +53 -0
  37. package/src/views/components/ThemeDemo.vue +477 -0
  38. package/src/views/guide/Installation.vue +234 -0
  39. package/src/views/guide/Introduction.vue +174 -0
  40. package/src/views/guide/QuickStart.vue +265 -0
@@ -0,0 +1,166 @@
1
+ <template>
2
+ <div class="demo-page">
3
+ <ArticleList
4
+ v-model="articleListData"
5
+ @handle-copy="handleCopy"
6
+ @handle-delete="handleDelete"
7
+ />
8
+ </div>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import { ref } from 'vue'
13
+ import ArticleList from '@/components/ArticleList/index.vue'
14
+
15
+ const articleListData = ref()
16
+
17
+ const handleCopy = () => {
18
+ console.log('handleCopy')
19
+ }
20
+
21
+ const handleDelete = () => {
22
+ console.log('handleDelete')
23
+ }
24
+ </script>
25
+
26
+ <style scoped>
27
+ .demo-page {
28
+ background: #fff;
29
+ }
30
+ .description {
31
+ font-size: 16px;
32
+ line-height: 1.6;
33
+ color: #606266;
34
+ margin-bottom: 32px;
35
+ }
36
+
37
+ .demo-section {
38
+ margin: 32px 0;
39
+ border: 1px solid #e4e7ed;
40
+ border-radius: 8px;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .demo-container {
45
+ padding: 24px;
46
+ background: #fff;
47
+ }
48
+
49
+ .demo-code {
50
+ background: #f8f9fa;
51
+ border-top: 1px solid #e4e7ed;
52
+ }
53
+
54
+ .demo-code pre {
55
+ margin: 0;
56
+ padding: 20px;
57
+ overflow-x: auto;
58
+ }
59
+
60
+ .demo-code code {
61
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
62
+ font-size: 14px;
63
+ line-height: 1.5;
64
+ color: #303133;
65
+ }
66
+
67
+ .size-demo {
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: 16px;
71
+ }
72
+
73
+ .size-item {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 12px;
77
+ }
78
+
79
+ .size-item label {
80
+ width: 80px;
81
+ font-weight: 500;
82
+ color: #303133;
83
+ }
84
+
85
+ .event-log {
86
+ margin-top: 20px;
87
+ padding: 16px;
88
+ background: #f8f9fa;
89
+ border-radius: 8px;
90
+ }
91
+
92
+ .event-log h4 {
93
+ margin: 0 0 12px 0;
94
+ color: #303133;
95
+ }
96
+
97
+ .event-log ul {
98
+ margin: 0;
99
+ padding: 0;
100
+ list-style: none;
101
+ }
102
+
103
+ .event-log li {
104
+ padding: 4px 0;
105
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
106
+ font-size: 12px;
107
+ color: #606266;
108
+ }
109
+
110
+ .api-section {
111
+ margin: 48px 0;
112
+ }
113
+
114
+ .api-table {
115
+ width: 100%;
116
+ border-collapse: collapse;
117
+ border: 1px solid #e4e7ed;
118
+ border-radius: 8px;
119
+ overflow: hidden;
120
+ margin: 16px 0;
121
+ }
122
+
123
+ .api-table th,
124
+ .api-table td {
125
+ padding: 12px 16px;
126
+ text-align: left;
127
+ border-bottom: 1px solid #e4e7ed;
128
+ }
129
+
130
+ .api-table th {
131
+ background: #f8f9fa;
132
+ font-weight: 600;
133
+ color: #303133;
134
+ }
135
+
136
+ .api-table td {
137
+ color: #606266;
138
+ }
139
+
140
+ .api-table tr:last-child td {
141
+ border-bottom: none;
142
+ }
143
+
144
+ h1 {
145
+ color: #303133;
146
+ font-size: 32px;
147
+ font-weight: 600;
148
+ margin-bottom: 24px;
149
+ }
150
+
151
+ h2 {
152
+ color: #303133;
153
+ font-size: 24px;
154
+ font-weight: 600;
155
+ margin: 48px 0 16px 0;
156
+ border-bottom: 1px solid #e4e7ed;
157
+ padding-bottom: 8px;
158
+ }
159
+
160
+ h3 {
161
+ color: #303133;
162
+ font-size: 18px;
163
+ font-weight: 600;
164
+ margin: 24px 0 12px 0;
165
+ }
166
+ </style>