houwenjian 1.0.11 → 1.0.13

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/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "houwenjian",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Vue-based npm package built with Vite (JavaScript version)",
5
5
  "main": "dist/houwenjian.umd.js",
6
6
  "module": "dist/houwenjian.es.js",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "src"
9
10
  ],
10
11
  "type": "module",
11
12
  "types": "dist/houwenjian.d.ts",
package/src/index.css ADDED
@@ -0,0 +1,4 @@
1
+
2
+ .main{
3
+ color:#323133,
4
+ }
package/src/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import RichEditor from './test.vue';
2
+
3
+ // 定义插件安装方法(Vue3标准方式)
4
+ export default {
5
+ install(app) {
6
+ // 注册全局组件
7
+ app.component('RichEditor', RichEditor);
8
+ }
9
+ };
10
+
11
+ // 兼容直接导入组件(按需引入)
12
+ export { RichEditor };
package/src/test.vue ADDED
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div>
3
+ <h2>npm module test</h2>
4
+ <h2>作者 侯文建</h2>
5
+ <div>
6
+ <button class="buttons">{{ message }}</button>
7
+ </div>
8
+ </div>
9
+ </template>
10
+ <script setup>
11
+ import { ref } from 'vue';
12
+ import './index.css'
13
+ const message = ref("hello world")
14
+
15
+ </script>
16
+
17
+ <style scoped>
18
+ .buttons{
19
+ color:red;
20
+ }
21
+ </style>