wx-screen-ui 1.0.0 → 1.0.2

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
@@ -1,5 +1,164 @@
1
- # Vue 3 + Vite
1
+ # Wx Screen UI
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3
+ 一个基于 Vue 3 的组件库,提供了一系列常用的 UI 组件,帮助开发者快速构建前端界面。
4
4
 
5
- Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
5
+ ## 特性
6
+
7
+ - 基于 Vue 3 开发
8
+ - 支持按需引入
9
+ - 组件带有 Wx 前缀,避免命名冲突
10
+ - 响应式设计
11
+ - 易于使用和定制
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ # 使用 npm
17
+ npm install wx-screen-ui
18
+
19
+ # 使用 yarn
20
+ yarn add wx-screen-ui
21
+
22
+ # 使用 pnpm
23
+ pnpm add wx-screen-ui
24
+ ```
25
+
26
+ ## 快速开始
27
+
28
+ ### 全局引入
29
+
30
+ 在 `main.js` 中引入:
31
+
32
+ ```javascript
33
+ import { createApp } from "vue";
34
+ import App from "./App.vue";
35
+ import WxScreenUI from "wx-screen-ui";
36
+ import "wx-screen-ui/style.css";
37
+
38
+ const app = createApp(App);
39
+ app.use(WxScreenUI);
40
+ app.mount("#app");
41
+ ```
42
+
43
+ ### 按需引入
44
+
45
+ 在组件中按需引入:
46
+
47
+ ```javascript
48
+ import { WxEmpty, WxTable } from "wx-screen-ui";
49
+ import "wx-screen-ui/style.css";
50
+
51
+ export default {
52
+ components: {
53
+ WxEmpty,
54
+ WxTable,
55
+ },
56
+ };
57
+ ```
58
+
59
+ ## 组件列表
60
+
61
+ ### 基础组件
62
+
63
+ - **WxEmpty** - 空状态组件
64
+ - **WxRadio** - 单选框组件
65
+ - **WxPagination** - 分页组件
66
+
67
+ ### 数据展示
68
+
69
+ - **WxTable** - 表格组件
70
+ - **WxEcharts** - ECharts 图表组件
71
+
72
+ ### 媒体组件
73
+
74
+ - **WxVideoFromFlv** - FLV 视频播放器组件
75
+ - **WxVideoFromHls** - HLS 视频播放器组件
76
+
77
+ ### 消息提示
78
+
79
+ - **WxMessage** - 消息提示组件
80
+
81
+ ## 组件使用示例
82
+
83
+ ### WxEmpty 组件
84
+
85
+ ```vue
86
+ <template>
87
+ <WxEmpty />
88
+ </template>
89
+
90
+ <script setup>
91
+ import { WxEmpty } from "wx-screen-ui";
92
+ import "wx-screen-ui/style.css";
93
+ </script>
94
+ ```
95
+
96
+ ### WxTable 组件
97
+
98
+ ```vue
99
+ <template>
100
+ <WxTable :data="tableData" :columns="columns" />
101
+ </template>
102
+
103
+ <script setup>
104
+ import { WxTable } from "wx-screen-ui";
105
+ import "wx-screen-ui/style.css";
106
+
107
+ const tableData = [
108
+ { id: 1, name: "张三", age: 20 },
109
+ { id: 2, name: "李四", age: 22 },
110
+ ];
111
+
112
+ const columns = [
113
+ { prop: "id", label: "ID" },
114
+ { prop: "name", label: "姓名" },
115
+ { prop: "age", label: "年龄" },
116
+ ];
117
+ </script>
118
+ ```
119
+
120
+ ## 开发指南
121
+
122
+ ### 克隆项目
123
+
124
+ ```bash
125
+ git clone <repository-url>
126
+ cd wx-screen-ui
127
+ ```
128
+
129
+ ### 安装依赖
130
+
131
+ ```bash
132
+ npm install
133
+ ```
134
+
135
+ ### 开发模式
136
+
137
+ ```bash
138
+ npm run dev
139
+ ```
140
+
141
+ ### 构建组件库
142
+
143
+ ```bash
144
+ npm run build
145
+ ```
146
+
147
+ ## 浏览器支持
148
+
149
+ - Chrome (最新版本)
150
+ - Firefox (最新版本)
151
+ - Safari (最新版本)
152
+ - Edge (最新版本)
153
+
154
+ ## 许可证
155
+
156
+ MIT
157
+
158
+ ## 贡献
159
+
160
+ 欢迎提交 Issue 和 Pull Request 来改进这个组件库。
161
+
162
+ ## 联系我们
163
+
164
+ 如果您有任何问题或建议,请随时联系我们。