@fredwsw/frontend-rules 1.0.0

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 (81) hide show
  1. package/README.md +302 -0
  2. package/bin/cli.js +155 -0
  3. package/package.json +22 -0
  4. package/template/docs/uv-ui-docs/action-sheet-cn.md +180 -0
  5. package/template/docs/uv-ui-docs/album-cn.md +104 -0
  6. package/template/docs/uv-ui-docs/alert-cn.md +71 -0
  7. package/template/docs/uv-ui-docs/avatar-cn.md +149 -0
  8. package/template/docs/uv-ui-docs/back-top-cn.md +121 -0
  9. package/template/docs/uv-ui-docs/badge-cn.md +100 -0
  10. package/template/docs/uv-ui-docs/button-cn.md +181 -0
  11. package/template/docs/uv-ui-docs/calendar-cn.md +179 -0
  12. package/template/docs/uv-ui-docs/calendars-cn.md +264 -0
  13. package/template/docs/uv-ui-docs/cell-cn.md +163 -0
  14. package/template/docs/uv-ui-docs/checkbox-cn.md +164 -0
  15. package/template/docs/uv-ui-docs/code-cn.md +122 -0
  16. package/template/docs/uv-ui-docs/code-input-cn.md +127 -0
  17. package/template/docs/uv-ui-docs/collapse-cn.md +206 -0
  18. package/template/docs/uv-ui-docs/color-cn.md +122 -0
  19. package/template/docs/uv-ui-docs/count-down-cn.md +169 -0
  20. package/template/docs/uv-ui-docs/count-to-cn.md +125 -0
  21. package/template/docs/uv-ui-docs/datetime-picker-cn.md +167 -0
  22. package/template/docs/uv-ui-docs/divider-cn.md +90 -0
  23. package/template/docs/uv-ui-docs/drop-down-cn.md +287 -0
  24. package/template/docs/uv-ui-docs/empty-cn.md +76 -0
  25. package/template/docs/uv-ui-docs/form-cn.md +220 -0
  26. package/template/docs/uv-ui-docs/gap-cn.md +63 -0
  27. package/template/docs/uv-ui-docs/grid-cn.md +187 -0
  28. package/template/docs/uv-ui-docs/icon-cn.md +255 -0
  29. package/template/docs/uv-ui-docs/image-cn.md +170 -0
  30. package/template/docs/uv-ui-docs/index-list-cn.md +132 -0
  31. package/template/docs/uv-ui-docs/input-cn.md +157 -0
  32. package/template/docs/uv-ui-docs/keyboard-cn.md +156 -0
  33. package/template/docs/uv-ui-docs/layout-cn.md +215 -0
  34. package/template/docs/uv-ui-docs/line-cn.md +77 -0
  35. package/template/docs/uv-ui-docs/line-progress-cn.md +132 -0
  36. package/template/docs/uv-ui-docs/link-cn.md +97 -0
  37. package/template/docs/uv-ui-docs/list-cn.md +185 -0
  38. package/template/docs/uv-ui-docs/load-more-cn.md +144 -0
  39. package/template/docs/uv-ui-docs/loading-icon-cn.md +125 -0
  40. package/template/docs/uv-ui-docs/loading-page-cn.md +85 -0
  41. package/template/docs/uv-ui-docs/modal-cn.md +212 -0
  42. package/template/docs/uv-ui-docs/navbar-cn.md +171 -0
  43. package/template/docs/uv-ui-docs/no-network-cn.md +112 -0
  44. package/template/docs/uv-ui-docs/notice-bar-cn.md +119 -0
  45. package/template/docs/uv-ui-docs/notify-cn.md +185 -0
  46. package/template/docs/uv-ui-docs/number-box-cn.md +131 -0
  47. package/template/docs/uv-ui-docs/overlay-cn.md +122 -0
  48. package/template/docs/uv-ui-docs/parse-cn.md +177 -0
  49. package/template/docs/uv-ui-docs/pick-color-cn.md +147 -0
  50. package/template/docs/uv-ui-docs/picker-cn.md +159 -0
  51. package/template/docs/uv-ui-docs/popup-cn.md +184 -0
  52. package/template/docs/uv-ui-docs/qrcode-cn.md +150 -0
  53. package/template/docs/uv-ui-docs/radio-cn.md +166 -0
  54. package/template/docs/uv-ui-docs/rate-cn.md +91 -0
  55. package/template/docs/uv-ui-docs/read-more-cn.md +191 -0
  56. package/template/docs/uv-ui-docs/scroll-list-cn.md +188 -0
  57. package/template/docs/uv-ui-docs/search-cn.md +107 -0
  58. package/template/docs/uv-ui-docs/skeleton-cn.md +101 -0
  59. package/template/docs/uv-ui-docs/skeletons-cn.md +312 -0
  60. package/template/docs/uv-ui-docs/slider-cn.md +98 -0
  61. package/template/docs/uv-ui-docs/steps-cn.md +158 -0
  62. package/template/docs/uv-ui-docs/sticky-cn.md +82 -0
  63. package/template/docs/uv-ui-docs/subsection-cn.md +161 -0
  64. package/template/docs/uv-ui-docs/swipe-action-cn.md +207 -0
  65. package/template/docs/uv-ui-docs/swiper-cn.md +247 -0
  66. package/template/docs/uv-ui-docs/switch-cn.md +136 -0
  67. package/template/docs/uv-ui-docs/tabbar-cn.md +224 -0
  68. package/template/docs/uv-ui-docs/tabs-cn.md +260 -0
  69. package/template/docs/uv-ui-docs/tags-cn.md +191 -0
  70. package/template/docs/uv-ui-docs/text-cn.md +178 -0
  71. package/template/docs/uv-ui-docs/textarea-cn.md +132 -0
  72. package/template/docs/uv-ui-docs/toast-cn.md +110 -0
  73. package/template/docs/uv-ui-docs/tooltip-cn.md +91 -0
  74. package/template/docs/uv-ui-docs/transition-cn.md +202 -0
  75. package/template/docs/uv-ui-docs/upload-cn.md +156 -0
  76. package/template/docs/uv-ui-docs/vtabs-cn.md +190 -0
  77. package/template/docs/uv-ui-docs/waterfall-cn.md +276 -0
  78. package/template/rules/common.mdc +90 -0
  79. package/template/rules/uv-ui-docs.mdc +111 -0
  80. package/template/skills/code-simplifier/SKILL.md +109 -0
  81. package/template/skills/frontend-design/SKILL.md +44 -0
@@ -0,0 +1,220 @@
1
+ ---
2
+ group: 表单
3
+ category: Components
4
+ title: Form
5
+ subtitle: 表单
6
+ description: 用于表单场景,可配置 Input、Select 等,支持表单验证。
7
+ demo:
8
+ cols: 2
9
+ ---
10
+
11
+ ## 何时使用 {#when-to-use}
12
+
13
+ `uv-form` 一般用于表单验证、输入绑定、下拉选择等场景。每个表单域由 `uv-form-item` 组成,可放置 `uv-input`、`uv-textarea`、`uv-checkbox`、`uv-radio`、`uv-switch` 等。
14
+
15
+ > 完整示例下载地址:[uv-ui 插件市场](https://ext.dcloud.net.cn/plugin?name=uv-ui)
16
+
17
+ ## 平台兼容性 {#platform}
18
+
19
+ | App(vue) | App(nvue) | H5 | 小程序 | VUE2 | VUE3 |
20
+ | --- | --- | --- | --- | --- | --- |
21
+ | √ | √ | √ | √ | √ | √ |
22
+
23
+ **组件名:** `uv-form`
24
+
25
+ ## 注意事项 {#notice}
26
+
27
+ - 组件上的 `ref` 建议不要和组件重名,否则 vue3 的 setup 语法糖可能报错
28
+ - 使用 `v-if` 控制 `uv-form-item` 显示/隐藏时,建议加 `key`,否则 type="password" 可能失效
29
+ - app-nvue 下 input 设置 disabled 或 readonly 时,节点事件可能无效,可用 view 遮罩解决
30
+
31
+ ## 代码演示 {#examples}
32
+
33
+ ### 基本使用 {#basic}
34
+
35
+ 通过 `model` 绑定数据,`rules` 设置校验规则,`ref` 调用 `validate`、`resetFields` 等方法。
36
+
37
+ ```vue
38
+ <template>
39
+ <view>
40
+ <uv-form labelPosition="left" :model="model1" :rules="rules" ref="form">
41
+ <uv-form-item label="姓名" prop="userInfo.name" borderBottom>
42
+ <uv-input v-model="model1.userInfo.name" border="none"></uv-input>
43
+ </uv-form-item>
44
+ <uv-form-item label="性别" prop="userInfo.sex" borderBottom @click="showSexSelect">
45
+ <uv-input
46
+ v-model="model1.userInfo.sex"
47
+ disabled
48
+ disabledColor="#ffffff"
49
+ placeholder="请选择性别"
50
+ border="none"
51
+ ></uv-input>
52
+ <template v-slot:right>
53
+ <uv-icon name="arrow-right"></uv-icon>
54
+ </template>
55
+ </uv-form-item>
56
+ <uv-button type="primary" text="提交" customStyle="margin-top: 10px" @click="submit"></uv-button>
57
+ <uv-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></uv-button>
58
+ </uv-form>
59
+ <uv-action-sheet ref="sexSelect" :actions="actions" title="请选择性别" @select="sexSelect"></uv-action-sheet>
60
+ </view>
61
+ </template>
62
+ <script>
63
+ export default {
64
+ data() {
65
+ return {
66
+ model1: {
67
+ userInfo: { name: 'uv-ui', sex: '' }
68
+ },
69
+ actions: [{ name: '男' }, { name: '女' }, { name: '保密' }],
70
+ rules: {
71
+ 'userInfo.name': {
72
+ type: 'string',
73
+ required: true,
74
+ message: '请填写姓名',
75
+ trigger: ['blur', 'change']
76
+ },
77
+ 'userInfo.sex': {
78
+ type: 'string',
79
+ max: 1,
80
+ required: true,
81
+ message: '请选择男或女',
82
+ trigger: ['blur', 'change']
83
+ }
84
+ }
85
+ }
86
+ },
87
+ methods: {
88
+ submit() {
89
+ this.$refs.form.validate().then(res => {
90
+ uni.showToast({ icon: 'success', title: '校验通过' })
91
+ }).catch(errors => {
92
+ uni.showToast({ icon: 'error', title: '校验失败' })
93
+ })
94
+ },
95
+ reset() {
96
+ this.$refs.form.resetFields()
97
+ this.$refs.form.clearValidate()
98
+ },
99
+ showSexSelect() {
100
+ this.$refs.sexSelect.open()
101
+ uni.hideKeyboard()
102
+ },
103
+ sexSelect(e) {
104
+ this.model1.userInfo.sex = e.name
105
+ this.$refs.form.validateField('userInfo.sex', err => {})
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+ ```
111
+
112
+ ### 自定义校验规则 {#validator}
113
+
114
+ 使用 `validator` 自定义同步校验,`asyncValidator` 异步校验。某些平台不支持 props 传函数,需在 `onReady` 中调用 `this.$refs.form.setRules(this.rules)`。
115
+
116
+ ```vue
117
+ <template>
118
+ <view>
119
+ <uv-form :model="form" :rules="rules" ref="form">
120
+ <uv-form-item label="电话" prop="mobile">
121
+ <uv-input v-model="form.mobile" placeholder="请输入电话" />
122
+ </uv-form-item>
123
+ </uv-form>
124
+ <uv-button @click="submit">提交</uv-button>
125
+ </view>
126
+ </template>
127
+ <script>
128
+ export default {
129
+ data() {
130
+ return {
131
+ form: { mobile: '' },
132
+ rules: {
133
+ mobile: [
134
+ { required: true, message: '此为必填字段', trigger: ['blur', 'change'] },
135
+ {
136
+ validator: (rule, value) => uni.$uv.test.mobile(value),
137
+ message: '电话号码格式错误',
138
+ trigger: ['blur']
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ },
144
+ onReady() {
145
+ this.$refs.form.setRules(this.rules)
146
+ },
147
+ methods: {
148
+ submit() {
149
+ this.$refs.form.validate().then(res => {
150
+ uni.showToast({ icon: 'success', title: '校验通过' })
151
+ }).catch(() => {
152
+ uni.showToast({ icon: 'error', title: '校验失败' })
153
+ })
154
+ }
155
+ }
156
+ }
157
+ </script>
158
+ ```
159
+
160
+ ### 错误提示方式 {#error-type}
161
+
162
+ 通过 `errorType` 设置:`message`(文字)、`none`(不提示)、`border-bottom`(底线下划线变红)、`toast`(toast 提示)。
163
+
164
+ ```vue
165
+ <uv-form :error-type="errorType">...</uv-form>
166
+ ```
167
+
168
+ ## API {#api}
169
+
170
+ ### Form Props {#props}
171
+
172
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
173
+ | --- | --- | --- | --- | --- |
174
+ | model | 表单数据对象 | Object | - | - |
175
+ | rules | 校验规则,含自定义方法时需用 setRules | Object \| Function \| Array | - | - |
176
+ | errorType | 错误提示方式 | String | message | message \| toast \| border-bottom \| none |
177
+ | borderBottom | 是否显示表单域下划线 | Boolean | true | - |
178
+ | labelPosition | 提示文字位置 | String | left | top \| left |
179
+ | labelWidth | 提示文字宽度 px/rpx | String \| Number | 45 | - |
180
+ | labelAlign | label 对齐 | String | left | left \| center \| right |
181
+ | labelStyle | label 样式 | Object | - | - |
182
+
183
+ ### Form Methods {#methods}
184
+
185
+ 通过 ref 调用。
186
+
187
+ | 名称 | 说明 | 参数 |
188
+ | --- | --- | --- |
189
+ | validate | 整表校验 | - |
190
+ | setRules | 设置 rules(含自定义函数时必用) | Function(rules) |
191
+ | validateField | 部分字段校验 | Function(value, Function(errorsRes)) |
192
+ | resetFields | 重置为初始值并移除校验结果 | - |
193
+ | clearValidate | 清空校验结果 | Function(props) |
194
+
195
+ ### FormItem Props {#formitem-props}
196
+
197
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
198
+ | --- | --- | --- | --- | --- |
199
+ | label | 左侧提示文字 | String | - | - |
200
+ | prop | model 中的属性名 | String | - | - |
201
+ | borderBottom | 是否显示下边框 | String \| Boolean | true | true \| false |
202
+ | labelWidth | 覆盖 form 的 labelWidth | String \| Number | - | - |
203
+ | labelPosition | label 位置 | String | - | left \| top |
204
+ | leftIcon | 左侧图标 | String | - | - |
205
+ | leftIconStyle | 左侧图标样式 | String \| Object | - | - |
206
+ | required | 是否显示 * 号(仅展示,校验用 rules) | Boolean | false | true \| false |
207
+ | customStyle | 自定义样式 | Object | - | - |
208
+
209
+ ### FormItem Slots {#formitem-slots}
210
+
211
+ | 名称 | 说明 |
212
+ | --- | --- |
213
+ | default | form-item 内容 |
214
+ | right | 右侧自定义内容 |
215
+
216
+ ### FormItem Events {#formitem-events}
217
+
218
+ | 事件名 | 说明 | 回调参数 |
219
+ | --- | --- | --- |
220
+ | @click | 点击触发 | - |
@@ -0,0 +1,63 @@
1
+ ---
2
+ group: 布局
3
+ category: Components
4
+ title: Gap
5
+ subtitle: 间隔槽
6
+ description: 用于内容块之间的留白分隔区域,通常为一块背景色矩形,用于统一页面分段间距。
7
+ demo:
8
+ cols: 2
9
+ ---
10
+
11
+ ## 何时使用 {#when-to-use}
12
+
13
+ `uv-gap` 用于 **内容块之间的留白分隔**,例如:
14
+
15
+ - 列表区块之间的灰色间隔
16
+ - 页面模块之间的视觉分割
17
+
18
+ 通过统一使用 `uv-gap` 可以保持页面风格一致,减少重复写样式的工作量。
19
+
20
+ > 完整示例下载地址:[uv-ui 插件市场](https://ext.dcloud.net.cn/plugin?name=uv-ui)
21
+
22
+ ## 平台兼容性 {#platform}
23
+
24
+ | App(vue) | App(nvue) | H5 | 小程序 | VUE2 | VUE3 |
25
+ | --- | --- | --- | --- | --- | --- |
26
+ | √ | √ | √ | √ | √ | √ |
27
+
28
+ **组件名:** `uv-gap`
29
+
30
+ ## 代码演示 {#examples}
31
+
32
+ ### 基本使用 {#basic}
33
+
34
+ 直接引入即可,通过 `height` 与 `bgColor` 控制间隔块高度与背景色。
35
+
36
+ ```vue
37
+ <uv-gap height="80" bgColor="#bbb"></uv-gap>
38
+ ```
39
+
40
+ ### 与上下内容的距离 {#margin}
41
+
42
+ 通过 `marginTop`、`marginBottom` 单独控制与前后元素的间距。
43
+
44
+ ```vue
45
+ <uv-gap
46
+ height="40"
47
+ bgColor="#f5f5f5"
48
+ :marginTop="20"
49
+ :marginBottom="20"
50
+ ></uv-gap>
51
+ ```
52
+
53
+ ## API {#api}
54
+
55
+ ### Gap Props {#props}
56
+
57
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
58
+ | --- | --- | --- | --- | --- |
59
+ | bgColor | 背景颜色 | String | transparent(背景透明) | - |
60
+ | height | 间隔槽高度(px/rpx) | String \| Number | 20 | - |
61
+ | marginTop | 与前一个元素的距离(px/rpx) | String \| Number | 0 | - |
62
+ | marginBottom | 与后一个元素的距离(px/rpx) | String \| Number | 0 | - |
63
+
@@ -0,0 +1,187 @@
1
+ ---
2
+ group: 布局
3
+ category: Components
4
+ title: Grid
5
+ subtitle: 宫格布局
6
+ description: 多宫格布局组件,支持自定义列数、边框、对齐方式和点击事件,可扩展为左右滑动宫格。
7
+ demo:
8
+ cols: 2
9
+ ---
10
+
11
+ ## 何时使用 {#when-to-use}
12
+
13
+ `uv-grid` 一般用于同时展示多个同类项目的场景,如功能入口菜单、分类宫格等。
14
+ 支持为宫格项配合 `uv-badge`、`uv-icon` 等组件展示图标与徽标,也可结合 `swiper` 实现左右滑动的宫格页。
15
+
16
+ > 完整示例下载地址:[uv-ui 插件市场](https://ext.dcloud.net.cn/plugin?name=uv-ui)
17
+
18
+ ## 平台兼容性 {#platform}
19
+
20
+ | App(vue) | App(nvue) | H5 | 小程序 | VUE2 | VUE3 |
21
+ | --- | --- | --- | --- | --- | --- |
22
+ | √ | √ | √ | √(仅支持微信小程序) | √ | √ |
23
+
24
+ **组件名:** `uv-grid`、`uv-grid-item`
25
+
26
+ ## 代码演示 {#examples}
27
+
28
+ ### 基本使用 {#basic}
29
+
30
+ 外层使用 `uv-grid` 包裹,通过 `col` 设置列数,内部用 `uv-grid-item` 的 slot 定义内容;`border=false` 关闭宫格边框。
31
+
32
+ ```vue
33
+ <template>
34
+ <view>
35
+ <uv-grid :border="false">
36
+ <uv-grid-item v-for="(item, index) in baseList" :key="index">
37
+ <uv-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="item.name" :size="22"></uv-icon>
38
+ <text class="grid-text">{{ item.title }}</text>
39
+ </uv-grid-item>
40
+ </uv-grid>
41
+ </view>
42
+ </template>
43
+
44
+ <script>
45
+ export default {
46
+ data() {
47
+ return {
48
+ baseList: [
49
+ { name: 'photo', title: '李白' },
50
+ { name: 'lock', title: '韩信' },
51
+ { name: 'star', title: '刘备' }
52
+ ]
53
+ }
54
+ }
55
+ }
56
+ </script>
57
+
58
+ <style lang="scss">
59
+ .grid-text {
60
+ font-size: 14px;
61
+ color: #909399;
62
+ }
63
+ </style>
64
+ ```
65
+
66
+ ### 自定义列数与点击事件 {#col-click}
67
+
68
+ ```vue
69
+ <template>
70
+ <view>
71
+ <uv-grid :col="4" @click="click">
72
+ <uv-grid-item v-for="(item, index) in baseList" :key="index">
73
+ <uv-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="item.name" :size="22"></uv-icon>
74
+ <text class="grid-text">{{ item.title }}</text>
75
+ </uv-grid-item>
76
+ </uv-grid>
77
+ </view>
78
+ </template>
79
+
80
+ <script>
81
+ export default {
82
+ data() {
83
+ return {
84
+ baseList: [
85
+ { name: 'photo', title: '李白' },
86
+ { name: 'lock', title: '韩信' },
87
+ { name: 'star', title: '刘备' },
88
+ { name: 'star', title: '元芳' }
89
+ ]
90
+ }
91
+ },
92
+ methods: {
93
+ click(name) {
94
+ uni.showToast({
95
+ icon: 'none',
96
+ title: `点击了第${name}个`
97
+ })
98
+ }
99
+ }
100
+ }
101
+ </script>
102
+ ```
103
+
104
+ ### 实现宫格左右滑动 {#swiper}
105
+
106
+ 结合 uni `swiper` 可以实现宫格左右滑动;请指定 `swiper` 高度,否则不会被内容撑开。
107
+
108
+ ```vue
109
+ <template>
110
+ <view>
111
+ <swiper :indicator-dots="true" class="swiper">
112
+ <swiper-item>
113
+ <uv-grid :border="true" align="center">
114
+ <uv-grid-item
115
+ v-for="(item, index) in swiperList"
116
+ :key="index"
117
+ :index="index"
118
+ :customStyle="{ width: 220 + 'rpx', height: 220 + 'rpx' }"
119
+ >
120
+ <uv-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="item" :size="22"></uv-icon>
121
+ <text class="grid-text">{{ '宫格' + (index + 1) }}</text>
122
+ </uv-grid-item>
123
+ </uv-grid>
124
+ </swiper-item>
125
+ <!-- 省略第二、三页示例,整体结构一致,仅 index 偏移不同 -->
126
+ </swiper>
127
+ </view>
128
+ </template>
129
+
130
+ <script>
131
+ export default {
132
+ data() {
133
+ return {
134
+ swiperList: ['integral', 'kefuv-ermai', 'coupon', 'gift', 'scan', 'pause-circle', 'volume-off', 'email', 'list']
135
+ }
136
+ }
137
+ }
138
+ </script>
139
+
140
+ <style lang="scss">
141
+ .swiper {
142
+ height: 720rpx;
143
+ }
144
+ .grid-text {
145
+ font-size: 14px;
146
+ color: #909399;
147
+ padding: 10rpx 0 20rpx 0;
148
+ /* #ifndef APP-PLUS */
149
+ box-sizing: border-box;
150
+ /* #endif */
151
+ }
152
+ </style>
153
+ ```
154
+
155
+ ## API {#api}
156
+
157
+ ### Grid Props {#props}
158
+
159
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
160
+ | --- | --- | --- | --- | --- |
161
+ | col | 宫格列数 | String \| Number | 3 | - |
162
+ | border | 是否显示宫格边框 | Boolean | true | true \| false |
163
+ | align | 宫格对齐方式(控制只有一两个宫格时的对齐场景) | String | left | left \| center \| right |
164
+ | customStyle | 自定义外部样式 | Object | - | - |
165
+
166
+ ### GridItem Props {#item-props}
167
+
168
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
169
+ | --- | --- | --- | --- | --- |
170
+ | name | 宫格标识名 | String \| Number | - | - |
171
+ | bgColor | 宫格背景颜色 | String | transparent | - |
172
+
173
+ ### Grid Events {#events}
174
+
175
+ > 需在 `uv-grid` 上监听。
176
+
177
+ | 事件名 | 说明 | 回调参数 |
178
+ | --- | --- | --- |
179
+ | @click | 点击宫格触发 | name |
180
+
181
+ ### GridItem Events {#item-events}
182
+
183
+ > 需在 `uv-grid-item` 上监听。
184
+
185
+ | 事件名 | 说明 | 回调参数 |
186
+ | --- | --- | --- |
187
+ | @click | 点击宫格触发 | name |