@gmcb/uv-ui 0.2.27 → 0.3.1

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 (135) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +21 -0
  3. package/README.md +95 -141
  4. package/docs/api/configs/color.md +52 -0
  5. package/docs/api/index.md +77 -0
  6. package/docs/api/mixins/mpShare.md +95 -0
  7. package/docs/api/request/apiManage.md +88 -0
  8. package/docs/api/request/http.md +451 -0
  9. package/docs/api/utils/colorSwitch.md +78 -0
  10. package/docs/api/utils/debounce.md +104 -0
  11. package/docs/api/utils/fastUse.md +246 -0
  12. package/docs/api/utils/getRect.md +238 -0
  13. package/docs/api/utils/guid.md +41 -0
  14. package/docs/api/utils/index.md +55 -0
  15. package/docs/api/utils/intro.md +25 -0
  16. package/docs/api/utils/object.md +171 -0
  17. package/docs/api/utils/queryParams.md +68 -0
  18. package/docs/api/utils/random.md +23 -0
  19. package/docs/api/utils/randomArray.md +28 -0
  20. package/docs/api/utils/route.md +121 -0
  21. package/docs/api/utils/test.md +237 -0
  22. package/docs/api/utils/time.md +81 -0
  23. package/docs/api/utils/trim.md +24 -0
  24. package/docs/components/actionSheet.md +236 -0
  25. package/docs/components/addQQGroup.md +5 -0
  26. package/docs/components/album.md +91 -0
  27. package/docs/components/alert.md +83 -0
  28. package/docs/components/avatar.md +152 -0
  29. package/docs/components/backTop.md +181 -0
  30. package/docs/components/badge.md +117 -0
  31. package/docs/components/button.md +196 -0
  32. package/docs/components/calendar.md +398 -0
  33. package/docs/components/calendars.md +294 -0
  34. package/docs/components/cell.md +185 -0
  35. package/docs/components/checkbox.md +281 -0
  36. package/docs/components/circleProgress.md +5 -0
  37. package/docs/components/code.md +162 -0
  38. package/docs/components/codeInput.md +175 -0
  39. package/docs/components/collapse.md +250 -0
  40. package/docs/components/color.md +324 -0
  41. package/docs/components/common.md +126 -0
  42. package/docs/components/countDown.md +166 -0
  43. package/docs/components/countTo.md +140 -0
  44. package/docs/components/datetimePicker.md +283 -0
  45. package/docs/components/diff1.x.md +190 -0
  46. package/docs/components/divider.md +88 -0
  47. package/docs/components/downloadSetting.md +54 -0
  48. package/docs/components/dropDown.md +375 -0
  49. package/docs/components/empty.md +99 -0
  50. package/docs/components/feature.md +261 -0
  51. package/docs/components/form.md +736 -0
  52. package/docs/components/gap.md +49 -0
  53. package/docs/components/grid.md +225 -0
  54. package/docs/components/icon.md +101 -0
  55. package/docs/components/image.md +182 -0
  56. package/docs/components/index.md +110 -0
  57. package/docs/components/indexList.md +133 -0
  58. package/docs/components/input.md +250 -0
  59. package/docs/components/install.md +59 -0
  60. package/docs/components/intro.md +32 -0
  61. package/docs/components/keyboard.md +226 -0
  62. package/docs/components/layout.md +310 -0
  63. package/docs/components/line.md +85 -0
  64. package/docs/components/lineProgress.md +141 -0
  65. package/docs/components/link.md +89 -0
  66. package/docs/components/list.md +223 -0
  67. package/docs/components/loadMore.md +140 -0
  68. package/docs/components/loadingIcon.md +144 -0
  69. package/docs/components/loadingPage.md +92 -0
  70. package/docs/components/modal.md +230 -0
  71. package/docs/components/more.md +13 -0
  72. package/docs/components/navbar.md +192 -0
  73. package/docs/components/noNetwork.md +116 -0
  74. package/docs/components/noticeBar.md +131 -0
  75. package/docs/components/notify.md +204 -0
  76. package/docs/components/npmSetting.md +64 -0
  77. package/docs/components/numberBox.md +257 -0
  78. package/docs/components/nvue.md +170 -0
  79. package/docs/components/overlay.md +117 -0
  80. package/docs/components/parse.md +204 -0
  81. package/docs/components/pickColor.md +112 -0
  82. package/docs/components/picker.md +357 -0
  83. package/docs/components/popup.md +221 -0
  84. package/docs/components/problem.md +300 -0
  85. package/docs/components/qrcode.md +169 -0
  86. package/docs/components/quickstart.md +33 -0
  87. package/docs/components/radio.md +256 -0
  88. package/docs/components/rate.md +128 -0
  89. package/docs/components/read.md +163 -0
  90. package/docs/components/readMore.md +227 -0
  91. package/docs/components/resource.md +17 -0
  92. package/docs/components/scrollList.md +218 -0
  93. package/docs/components/search.md +160 -0
  94. package/docs/components/setting.md +111 -0
  95. package/docs/components/settingDesc.md +66 -0
  96. package/docs/components/skeleton.md +105 -0
  97. package/docs/components/skeletons.md +323 -0
  98. package/docs/components/slider.md +157 -0
  99. package/docs/components/steps.md +189 -0
  100. package/docs/components/sticky.md +76 -0
  101. package/docs/components/subsection.md +183 -0
  102. package/docs/components/swipeAction.md +279 -0
  103. package/docs/components/swiper.md +352 -0
  104. package/docs/components/switch.md +216 -0
  105. package/docs/components/tabbar.md +263 -0
  106. package/docs/components/table.md +5 -0
  107. package/docs/components/tabs.md +364 -0
  108. package/docs/components/tag.md +227 -0
  109. package/docs/components/testPic.md +20 -0
  110. package/docs/components/text.md +157 -0
  111. package/docs/components/textarea.md +121 -0
  112. package/docs/components/toast.md +124 -0
  113. package/docs/components/tooltip.md +98 -0
  114. package/docs/components/transition.md +404 -0
  115. package/docs/components/upload.md +253 -0
  116. package/docs/components/vtabs.md +332 -0
  117. package/docs/components/vueUse.md +45 -0
  118. package/docs/components/vuexDetail.md +103 -0
  119. package/docs/components/waterfall.md +651 -0
  120. package/docs/faq/index.md +53 -0
  121. package/docs/guide/codeHint.md +44 -0
  122. package/docs/guide/customIcon.md +168 -0
  123. package/docs/guide/demo.md +92 -0
  124. package/docs/guide/design.md +56 -0
  125. package/docs/guide/globalVariable.md +239 -0
  126. package/docs/guide/i18n.md +194 -0
  127. package/docs/guide/index.md +28 -0
  128. package/docs/guide/note.md +74 -0
  129. package/docs/guide/safeAreaInset.md +64 -0
  130. package/docs/guide/theme.md +67 -0
  131. package/docs/index.md +88 -0
  132. package/libs/config/config.js +0 -10
  133. package/libs/css/color.scss +15 -14
  134. package/package.json +7 -2
  135. package/theme.scss +2 -1
@@ -0,0 +1,116 @@
1
+ ## NoNetwork 无网络提示 <to-api/>
2
+
3
+ <demo-model url="/pages/componentsC/noNetwork/noNetwork"></demo-model>
4
+
5
+ ::: tip ✈
6
+
7
+ **组件名:uv-no-network**
8
+
9
+ [点击下载&安装](https://ext.dcloud.net.cn/plugin?name=uv-no-network)
10
+
11
+ :::
12
+
13
+ 该组件无需任何配置,内部自动处理所有功能和事件,有如下特点:
14
+ - 如果没有网络,该组件会以`fixed`定位,并且以很大的`z-index`值覆盖原来的内容。一旦有网络了,会自动隐藏该组件,实现自动化
15
+ - 在APP上,嵌入了5+接口,可以直接打开手机的设置页面,方便用户进行网络相关的设置
16
+
17
+ ::: warning 说明
18
+ 1. 应用有网络时,是不会触发本组件的,为了测试此功能,请关闭手机的数据连接以及WiFi即可
19
+ 2. 由于普通的组件无法覆盖原生组件,所以本组件不适用那些有`video`,`map`等原生表现的组件的页面,可以自行使用uni的`cover-view`组件修改
20
+ :::
21
+
22
+ ### 平台兼容性
23
+
24
+ |App(vue)|App(nvue)|H5|小程序|VUE2|VUE3|
25
+ |:-:|:-:|:-:|:-:|:-:|:-:|
26
+ |√|√|√|√|√|√|
27
+
28
+ ### 基本使用
29
+
30
+ ```vue
31
+ <template>
32
+ <view>
33
+ <uv-no-network @disconnected="disconnected" @connected="connected" @retry="retry"></uv-no-network>
34
+ <!-- 下方是自己的业务代码 -->
35
+ <view class="uv-content">
36
+ <view class="uv-content__circle">
37
+ <uv-icon name="checkbox-mark" color="#fff" size="30"></uv-icon>
38
+ </view>
39
+ <text class="uv-content__normal">网络正常</text>
40
+ </view>
41
+ </view>
42
+ </template>
43
+ <script setup>
44
+ function disconnected() {
45
+ console.log('disconnected');
46
+ }
47
+ function connected() {
48
+ console.log('connected');
49
+ }
50
+ function retry() {
51
+ console.log('retry');
52
+ }
53
+
54
+ </script>
55
+ <style lang="scss" scoped>
56
+ @mixin flex($direction: row) {
57
+ /* #ifndef APP-NVUE */
58
+ display: flex;
59
+ /* #endif */
60
+ flex-direction: $direction;
61
+ }
62
+ .uv-content {
63
+ padding: 150px 60px 0;
64
+ @include flex(column);
65
+ align-items: center;
66
+ justify-content: center;
67
+ &__circle {
68
+ background-color: #5ac725;
69
+ @include flex;
70
+ border-radius: 100px;
71
+ width: 60px;
72
+ height: 60px;
73
+ align-items: center;
74
+ justify-content: center;
75
+ }
76
+ &__normal {
77
+ font-size: 30rpx;
78
+ color: #5ac725;
79
+ margin-top: 30rpx;
80
+ }
81
+ }
82
+ </style>
83
+ ```
84
+
85
+ ### 完整示例
86
+
87
+ ::: tip 完整示例下载地址
88
+
89
+ [https://ext.dcloud.net.cn/plugin?name=uv-ui](https://ext.dcloud.net.cn/plugin?name=uv-ui)
90
+
91
+ :::
92
+
93
+ ### API
94
+ ---
95
+
96
+ ### NoNetwork Props
97
+
98
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
99
+ | :- | :- | :- | :- | :- |
100
+ | tips | 没有网络时的提示语 | String | 哎呀,网络信号丢失 | - |
101
+ | image | 无网络的图片提示,可用的src地址或base64图片 | String | - | - |
102
+
103
+ ### NoNetwork Events
104
+
105
+
106
+ | 事件名 | 说明 | 回调参数 |
107
+ | :- | :- | :- |
108
+ | @retry | 用户点击页面的"重试"按钮时触发 | - |
109
+ | @connected | "重试"后,有网络触发 | - |
110
+ | @disconnected | "重试"后,无网络触发 | - |
111
+
112
+ <style scoped>
113
+ h3[id=nonetwork-events] + table thead tr th:nth-child(2){
114
+ width: 50%;
115
+ }
116
+ </style>
@@ -0,0 +1,131 @@
1
+ ## NoticeBar 滚动通知 <to-api/>
2
+
3
+ <demo-model url="/pages/componentsC/noticeBar/noticeBar"></demo-model>
4
+
5
+ ::: tip ✈
6
+
7
+ **组件名:uv-notice-bar**
8
+
9
+ [点击下载&安装](https://ext.dcloud.net.cn/plugin?name=uv-notice-bar)
10
+
11
+ :::
12
+
13
+ 该组件一般用于滚动公告等场景,灵活配置,有多种模式可供选择。
14
+
15
+ ### 平台兼容性
16
+
17
+ |App(vue)|App(nvue)|H5|小程序|VUE2|VUE3|
18
+ |:-:|:-:|:-:|:-:|:-:|:-:|
19
+ |√|√|√|√|√|√|
20
+
21
+ ### 基本使用
22
+
23
+ 通过`text`属性设置需要滚动的内容
24
+
25
+ ```vue
26
+ <template>
27
+ <view>
28
+ <uv-notice-bar :text="text"></uv-notice-bar>
29
+ </view>
30
+ </template>
31
+ <script setup>
32
+ import { ref } from 'vue';
33
+
34
+ const text = ref('uv-ui众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让您快速集成,开箱即用');
35
+
36
+ </script>
37
+ ```
38
+
39
+ ### 竖向滚动
40
+
41
+ 通过 `direction` 配置为 `column` 可以竖向滚动,默认为 `row`
42
+
43
+ ```vue
44
+ <template>
45
+ <view>
46
+ <uv-notice-bar :text="text" direction="column"></uv-notice-bar>
47
+ </view>
48
+ </template>
49
+ <script setup>
50
+ import { ref } from 'vue';
51
+
52
+ const text = ref(['uv-ui众多组件覆盖开发过程的各个需求', '组件功能丰富,多端兼容', '让您快速集成,开箱即用']);
53
+
54
+ </script>
55
+ ```
56
+
57
+ ### 可关闭
58
+
59
+ 通过`mode`配置为`closable`让右侧显示关闭按钮
60
+
61
+ ```vue
62
+ <template>
63
+ <view>
64
+ <uv-notice-bar :text="text" mode="closable"></uv-notice-bar>
65
+ </view>
66
+ </template>
67
+ <script setup>
68
+ import { ref } from 'vue';
69
+
70
+ const text = ref('uv-ui众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让您快速集成,开箱即用');
71
+
72
+ </script>
73
+ ```
74
+
75
+ ### 配置滚动速度和跳转
76
+
77
+ - `speed`可配置横向滚动速度
78
+ - `url`可配置跳转
79
+
80
+ ```vue
81
+ <template>
82
+ <view>
83
+ <uv-notice-bar :text="text" mode="closable" speed="250" url="/pages/componentsB/tag/tag"></uv-notice-bar>
84
+ </view>
85
+ </template>
86
+ <script setup>
87
+ import { ref } from 'vue';
88
+
89
+ const text = ref('uv-ui众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让您快速集成,开箱即用');
90
+
91
+ </script>
92
+ ```
93
+
94
+ ### 完整示例
95
+
96
+ ::: tip 完整示例下载地址
97
+
98
+ [https://ext.dcloud.net.cn/plugin?name=uv-ui](https://ext.dcloud.net.cn/plugin?name=uv-ui)
99
+
100
+ :::
101
+
102
+ ### API
103
+ ---
104
+
105
+ ### NoticeBar Props
106
+
107
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 | 平台差异性说明 |
108
+ |:- |:- |:- |:- |:- |:- |
109
+ | text | 显示的内容,`direction`为`column`时要求为数组, 为`row`时要求为字符串 | Array &#124; String | - | - |
110
+ | direction | 通告滚动模式,`row`-横向滚动,`column`-竖向滚动 | String | row | row &#124; column |- |
111
+ | step | `direction = "row"`时,是否使用步进形式滚动 | Boolean | false | true &#124; false |- |
112
+ | icon | 左侧的音量图标,不显示`:icon="false"`或传空 | String | volume | - |
113
+ | mode | 通告模式,`link`-显示右箭头,`closable`-显示右侧关闭图标 | String | - | link &#124; closable |- |
114
+ | color | 文字颜色 | String | #f9ae3d | - |- |
115
+ | bgColor | 背景颜色 | String | #fdf6ec | - |- |
116
+ | speed | 水平滚动时的滚动速度,即每秒滚动多少`px(rpx)`,这有利于控制文字无论多少时,都能有一个恒定的速度 | String &#124; Number | 80 | - |- |
117
+ | fontSize | 字体大小 | String &#124; Number | 14 | - |
118
+ | duration | 滚动一个周期的时间长,单位`ms` | String &#124; Number | 2000 | - |- |
119
+ | url | 跳转的页面路径 | String | - | - |- |
120
+ | linkType | 页面跳转的类型 | String | navigateTo| - |- |
121
+ | disableTouch | 是否禁止用手滑动切换,仅`direction="column"生效` | Boolean | true | true &#124; false | App 2.5.5+、H5 2.5.5+、支付宝小程序、抖音小程序与飞书小程序(只在初始化时有效,不能动态变更)|
122
+ | disableScroll <badge text="1.0.4"/> | 是否禁止自动滚动,仅`direction="column"生效` | Boolean | false | true &#124; false |- |
123
+ | customStyle | 定义需要用到的外部样式 | Object | -| - |- |
124
+
125
+ ### NoticeBar Events
126
+
127
+ | 事件名| 说明 | 回调参数 |
128
+ | :- | :- | :- |
129
+ | @click | 点击通告文字触发 | index: 点击的text的索引 |
130
+ | @close | 点击右侧关闭图标触发 | - |
131
+ | @change | `direction` 为 `column` 滚动时触发| index: 索引 |
@@ -0,0 +1,204 @@
1
+ ## Notify 消息提示 <to-api/>
2
+
3
+ <demo-model url="/pages/componentsC/notify/notify"></demo-model>
4
+
5
+ ::: tip ✈
6
+
7
+ **组件名:uv-notify**
8
+
9
+ [点击下载&安装](https://ext.dcloud.net.cn/plugin?name=uv-notify)
10
+
11
+ :::
12
+
13
+ 该组件一般用于页面顶部向下滑出一个提示,后自动收起的场景。
14
+
15
+ ### 平台兼容性
16
+
17
+ |App(vue)|App(nvue)|H5|小程序|VUE2|VUE3|
18
+ |:-:|:-:|:-:|:-:|:-:|:-:|
19
+ |√|√|√|√|√|√|
20
+
21
+ ### 基本使用
22
+
23
+ 使用`ref`调用组件`show`方法进行显示组件,更多参数参考API
24
+
25
+ ```vue
26
+ <template>
27
+ <uv-notify ref="notify" message="Hi uv-ui" type="success"></uv-notify>
28
+ </template>
29
+ <script setup>
30
+ import { ref } from 'vue';
31
+ import { onReady } from '@dcloudio/uni-app';
32
+
33
+ const notify = ref(null);
34
+ onReady(() => {
35
+ notify.value.show();
36
+ });
37
+
38
+ </script>
39
+ ```
40
+
41
+ ### 主题形式调用
42
+
43
+ 组件内置了多个主题方法:`primary` `success` `error` `warning`。可以直接用`ref`进行调用,调用参数为提示文本,如下:
44
+
45
+ ```vue
46
+ <template>
47
+ <uv-notify ref="notify"></uv-notify>
48
+ </template>
49
+ <script setup>
50
+ import { ref } from 'vue';
51
+ import { onReady } from '@dcloudio/uni-app';
52
+
53
+ const notify = ref(null);
54
+ onReady(() => {
55
+ notify.value.primary('Primary主题');
56
+ });
57
+
58
+ </script>
59
+ ```
60
+
61
+ ### 自定义图标
62
+
63
+ 通过插槽的方式自定义图标
64
+
65
+ ```vue
66
+ <template>
67
+ <uv-notify ref="notify" :duration="10*1000" type="error" message="HI uvui">
68
+ <template v-slot:icon>
69
+ <image src="https://via.placeholder.com/50x50.png/2878ff" style="width: 30rpx;height: 30rpx;" mode="aspectFit"></image>
70
+ </template>
71
+ </uv-notify>
72
+ </template>
73
+ <script setup>
74
+ import { ref } from 'vue';
75
+ import { onReady } from '@dcloudio/uni-app';
76
+
77
+ const notify = ref(null);
78
+ onReady(() => {
79
+ notify.value.show();
80
+ });
81
+
82
+ </script>
83
+ ```
84
+
85
+ ### 使用show方法传参
86
+
87
+ 组件还提供了另一种传递参数的方式,参数直接通过`show`方法传递,如下:
88
+
89
+ ```vue
90
+ <template>
91
+ <uv-notify ref="notify"></uv-notify>
92
+ </template>
93
+ <script setup>
94
+ import { ref } from 'vue';
95
+ import { onReady } from '@dcloudio/uni-app';
96
+
97
+ const notify = ref(null);
98
+ onReady(() => {
99
+ notify.value.show({
100
+ top: 10,
101
+ type: 'error',
102
+ color: '#000',
103
+ bgColor: '#e8e8e8',
104
+ message: 'Hi uv-ui',
105
+ duration: 1000 * 3,
106
+ fontSize: '20rpx',
107
+ safeAreaInsetTop: true
108
+ });
109
+ });
110
+
111
+ </script>
112
+ ```
113
+
114
+ ### 手动关闭提示
115
+
116
+ 该组件通过`duration`参数控制显示时间,时间到会自动关闭,当然也可以使用`close`手动关闭
117
+
118
+ ```vue
119
+ <template>
120
+ <uv-notify ref="notify"></uv-notify>
121
+ </template>
122
+ <script setup>
123
+ import { ref } from 'vue';
124
+ import { onReady } from '@dcloudio/uni-app';
125
+
126
+ const notify = ref(null);
127
+ onReady(() => {
128
+ notify.value.show({
129
+ top: 10,
130
+ type: 'error',
131
+ color: '#000',
132
+ bgColor: '#e8e8e8',
133
+ message: 'Hi uv-ui',
134
+ duration: 1000 * 3,
135
+ fontSize: '20rpx',
136
+ safeAreaInsetTop: true
137
+ });
138
+ // 显示1秒主动关闭
139
+ setTimeout(() => {
140
+ notify.value.close();
141
+ }, 1000);
142
+ });
143
+
144
+ </script>
145
+ ```
146
+
147
+ ### 完整示例
148
+
149
+ ::: tip 完整示例下载地址
150
+
151
+ [https://ext.dcloud.net.cn/plugin?name=uv-ui](https://ext.dcloud.net.cn/plugin?name=uv-ui)
152
+
153
+ :::
154
+
155
+ ### API
156
+ ---
157
+
158
+ ### Notify Props
159
+
160
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
161
+ | :- | :- | :- | :- | :- |
162
+ | top | 到顶部的距离 | String &#124; Number | 0 | - |
163
+ | type | 主题,`primary`,`success`,`warning`,`error` | String | primary | - |
164
+ | color | 字体颜色 | String | #ffffff | - |
165
+ | bgColor | 背景颜色 | String | - | - |
166
+ | message | 展示的文字内容 | String | - | - |
167
+ | duration | 展示时长,为0时不消失,单位`ms` | String &#124; Number | 3000 | - |
168
+ | fontSize | 字体大小,单位`px(rpx)` | String &#124; Number | 15 | - |
169
+ | safeAreaInsetTop | 是否留出顶部安全距离(状态栏高度) | Boolean | false | true &#124; false |
170
+ | customStyle | 自定义外部样式 | Object | - | - |
171
+
172
+ ### Show Methods Params
173
+
174
+ 与上面的Notify Props重复的参数作用和效果一致
175
+
176
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 |
177
+ | :- | :- | :- | :- | :- |
178
+ | top | 到顶部的距离 | String &#124; Number | 0 | - |
179
+ | type | 主题,`primary`,`success`,`warning`,`error` | String | primary | - |
180
+ | color | 字体颜色 | String | #ffffff | - |
181
+ | bgColor | 背景颜色 | String | - | - |
182
+ | message | 展示的文字内容 | String | - | - |
183
+ | duration | 展示时长,为0时不消失,单位`ms` | String &#124; Number | 3000 | - |
184
+ | fontSize | 字体大小,单位`px(rpx)` | String &#124; Number | 15 | - |
185
+ | safeAreaInsetTop | 是否留出顶部安全距离(状态栏高度) | Boolean | false | true &#124; false |
186
+
187
+ ### Notify Methods
188
+ | 事件名 | 参数 | 说明 |
189
+ | :- | :- | :- |
190
+ | show | - | 显示并加载配置 |
191
+ | primary &#124; success &#124; warning &#124; error| - | 显示当前主题消息提示 |
192
+ | close | - | 关闭消息提示 |
193
+
194
+ ### Notify Slots
195
+
196
+ | 参数 | 说明 |
197
+ | :- | :- |
198
+ | icon | 通知内容 |
199
+
200
+ <style scoped>
201
+ h3[id=notify-slots] + table thead tr th:nth-child(2){
202
+ width: 70%;
203
+ }
204
+ </style>
@@ -0,0 +1,64 @@
1
+ ## NPM 安装方式配置
2
+
3
+ ### 安装
4
+
5
+ ```sh
6
+ npm install @gmcb/uv-ui
7
+ ```
8
+
9
+ uv-ui 依赖 SCSS,CLI 项目请确认已安装:
10
+
11
+ ```sh
12
+ npm i sass -D
13
+ ```
14
+
15
+ ### 注册插件
16
+
17
+ ```js
18
+ // main.js
19
+ import App from './App';
20
+ import { createSSRApp } from 'vue';
21
+ import uvUI from '@gmcb/uv-ui';
22
+
23
+ export function createApp() {
24
+ const app = createSSRApp(App);
25
+ app.use(uvUI);
26
+ return { app };
27
+ }
28
+ ```
29
+
30
+ ### 引入主题变量
31
+
32
+ ```scss
33
+ /* uni.scss */
34
+ @import '@gmcb/uv-ui/theme.scss';
35
+ ```
36
+
37
+ ### 引入基础样式
38
+
39
+ ```vue
40
+ <!-- App.vue -->
41
+ <style lang="scss">
42
+ @import '@gmcb/uv-ui/index.scss';
43
+ </style>
44
+ ```
45
+
46
+ ### easycom
47
+
48
+ ```json
49
+ {
50
+ "easycom": {
51
+ "^uv-(.*)": "@gmcb/uv-ui/components/uv-$1/uv-$1.vue"
52
+ }
53
+ }
54
+ ```
55
+
56
+ ### transpileDependencies
57
+
58
+ 如果 CLI 构建环境需要转译依赖,可在 `vue.config.js` 中加入:
59
+
60
+ ```js
61
+ module.exports = {
62
+ transpileDependencies: ['@gmcb/uv-ui']
63
+ };
64
+ ```