@netang/quasar 0.0.102 → 0.0.104

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 (162) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +11 -11
  3. package/_docs/docs/.vuepress/client.js +8 -8
  4. package/_docs/docs/.vuepress/config.js +40 -40
  5. package/_docs/docs/.vuepress/configs/index.js +2 -2
  6. package/_docs/docs/.vuepress/configs/navbar/index.js +1 -1
  7. package/_docs/docs/.vuepress/configs/navbar/zh.js +16 -16
  8. package/_docs/docs/.vuepress/configs/sidebar/index.js +1 -1
  9. package/_docs/docs/.vuepress/configs/sidebar/zh.js +75 -75
  10. package/_docs/docs/.vuepress/public/css/index.css +3 -3
  11. package/_docs/docs/.vuepress/styles/index.scss +3 -3
  12. package/_docs/docs/components/column-title.md +25 -25
  13. package/_docs/docs/components/data.md +66 -66
  14. package/_docs/docs/components/dialog.md +59 -59
  15. package/_docs/docs/components/dragger.md +26 -26
  16. package/_docs/docs/components/editor-code.md +16 -16
  17. package/_docs/docs/components/empty.md +13 -13
  18. package/_docs/docs/components/field-date.md +16 -16
  19. package/_docs/docs/components/field-text.md +57 -57
  20. package/_docs/docs/components/field-tree.md +14 -14
  21. package/_docs/docs/components/img.md +25 -25
  22. package/_docs/docs/components/input-number.md +21 -21
  23. package/_docs/docs/components/list-menu-item.md +21 -21
  24. package/_docs/docs/components/list-menu.md +21 -21
  25. package/_docs/docs/components/power-page.md +21 -21
  26. package/_docs/docs/components/price.md +21 -21
  27. package/_docs/docs/components/render.md +12 -12
  28. package/_docs/docs/components/search-item.md +10 -10
  29. package/_docs/docs/components/search.md +12 -12
  30. package/_docs/docs/components/select.md +11 -11
  31. package/_docs/docs/components/splitter.md +15 -15
  32. package/_docs/docs/components/table-column-fixed.md +20 -20
  33. package/_docs/docs/components/table-pagination.md +20 -20
  34. package/_docs/docs/components/table-splitter.md +20 -20
  35. package/_docs/docs/components/table-summary.md +20 -20
  36. package/_docs/docs/components/table.md +25 -25
  37. package/_docs/docs/components/thumbnail.md +18 -18
  38. package/_docs/docs/components/toolbar.md +9 -9
  39. package/_docs/docs/components/uploader-query.md +19 -19
  40. package/_docs/docs/components/uploader.md +16 -16
  41. package/_docs/docs/components/value-format.md +26 -26
  42. package/_docs/docs/index.md +1 -1
  43. package/_docs/docs/utils/alert.md +26 -26
  44. package/_docs/docs/utils/area.md +112 -112
  45. package/_docs/docs/utils/arr.md +80 -80
  46. package/_docs/docs/utils/auth.md +101 -101
  47. package/_docs/docs/utils/bus.md +18 -18
  48. package/_docs/docs/utils/confirm.md +31 -31
  49. package/_docs/docs/utils/copy.md +22 -22
  50. package/_docs/docs/utils/dialog.md +98 -98
  51. package/_docs/docs/utils/dict.md +50 -50
  52. package/_docs/docs/utils/dictOptions.md +27 -27
  53. package/_docs/docs/utils/form.md +33 -33
  54. package/_docs/docs/utils/getData.md +60 -60
  55. package/_docs/docs/utils/getFile.md +21 -21
  56. package/_docs/docs/utils/getImage.md +33 -33
  57. package/_docs/docs/utils/getTime.md +51 -51
  58. package/_docs/docs/utils/index.md +1 -1
  59. package/_docs/docs/utils/loading.md +18 -18
  60. package/_docs/docs/utils/notify.md +29 -29
  61. package/_docs/docs/utils/power.md +353 -353
  62. package/_docs/docs/utils/previewImage.md +11 -11
  63. package/_docs/docs/utils/price.md +45 -45
  64. package/_docs/docs/utils/rule.md +30 -30
  65. package/_docs/docs/utils/ruleValid.md +31 -31
  66. package/_docs/docs/utils/symbols.md +30 -30
  67. package/_docs/docs/utils/table.md +194 -194
  68. package/_docs/docs/utils/timestamp.md +27 -27
  69. package/_docs/docs/utils/toast.md +27 -27
  70. package/_docs/docs/utils/tree.md +174 -174
  71. package/_docs/docs/utils/uploader.md +29 -29
  72. package/_docs/package.json +11 -11
  73. package/components/column-title/index.vue +37 -37
  74. package/components/data/index.vue +20 -20
  75. package/components/dialog/index.vue +372 -372
  76. package/components/dragger/index.vue +203 -203
  77. package/components/drawer/index.vue +303 -303
  78. package/components/editor-code/index.vue +289 -289
  79. package/components/empty/index.vue +71 -71
  80. package/components/field-date/index.vue +850 -850
  81. package/components/field-date/methods.js +100 -100
  82. package/components/field-table/index.vue +1222 -1222
  83. package/components/field-text/index.vue +165 -165
  84. package/components/field-tree/index.vue +103 -81
  85. package/components/img/index.vue +202 -202
  86. package/components/input-number/index.vue +546 -546
  87. package/components/list-menu/index.vue +149 -149
  88. package/components/list-menu-item/index.vue +79 -79
  89. package/components/power-page/index.vue +92 -92
  90. package/components/price/index.vue +188 -188
  91. package/components/private/components/index.js +11 -11
  92. package/components/private/components/move-to-tree/index.vue +154 -154
  93. package/components/private/edit-power-data/index.vue +816 -816
  94. package/components/private/table-visible-columns-button/index.vue +109 -109
  95. package/components/render/index.vue +150 -150
  96. package/components/search/index.vue +4 -2
  97. package/components/search-item/index.vue +4 -2
  98. package/components/splitter/index.vue +415 -415
  99. package/components/table/index.vue +456 -456
  100. package/components/table-column-fixed/index.vue +112 -112
  101. package/components/table-pagination/index.vue +192 -192
  102. package/components/table-splitter/index.vue +360 -360
  103. package/components/table-summary/index.vue +110 -110
  104. package/components/thumbnail/index.vue +72 -72
  105. package/components/toolbar/container.vue +31 -31
  106. package/components/toolbar/index.vue +136 -136
  107. package/components/uploader/index.vue +158 -158
  108. package/components/uploader-query/index.vue +758 -758
  109. package/components/value-format/index.vue +274 -274
  110. package/configs/area3.js +1 -1
  111. package/docs/css/index.css +3 -3
  112. package/package.json +1 -1
  113. package/sass/common.scss +5 -0
  114. package/sass/index.scss +14 -14
  115. package/sass/line.scss +39 -39
  116. package/sass/quasar/btn.scss +46 -46
  117. package/sass/quasar/common.scss +3 -3
  118. package/sass/quasar/dialog.scss +7 -7
  119. package/sass/quasar/drawer.scss +6 -6
  120. package/sass/quasar/field.scss +243 -243
  121. package/sass/quasar/loading.scss +6 -6
  122. package/sass/quasar/menu.scss +8 -8
  123. package/sass/quasar/table.scss +150 -150
  124. package/sass/quasar/toolbar.scss +22 -22
  125. package/store/index.js +29 -29
  126. package/utils/$auth.js +127 -127
  127. package/utils/$form.js +56 -56
  128. package/utils/$power.js +1215 -1215
  129. package/utils/$rule.js +13 -13
  130. package/utils/$ruleValid.js +10 -10
  131. package/utils/$table.js +999 -999
  132. package/utils/$tree.js +713 -713
  133. package/utils/alert.js +12 -12
  134. package/utils/area.js +400 -400
  135. package/utils/arr.js +51 -51
  136. package/utils/bus.js +6 -6
  137. package/utils/config.js +52 -52
  138. package/utils/confirm.js +11 -11
  139. package/utils/copy.js +30 -30
  140. package/utils/dialog.js +36 -36
  141. package/utils/dict.js +21 -21
  142. package/utils/dictOptions.js +28 -28
  143. package/utils/getData.js +73 -73
  144. package/utils/getFile.js +40 -40
  145. package/utils/getImage.js +153 -153
  146. package/utils/getTime.js +106 -106
  147. package/utils/index.js +61 -61
  148. package/utils/loading.js +15 -15
  149. package/utils/notify.js +13 -13
  150. package/utils/previewImage.js +10 -10
  151. package/utils/price.js +18 -18
  152. package/utils/symbols.js +18 -18
  153. package/utils/timestamp.js +18 -18
  154. package/utils/toast.js +13 -13
  155. package/utils/uploader/aliyun.js +6 -6
  156. package/utils/uploader/local.js +8 -8
  157. package/utils/uploader/qiniu.js +321 -321
  158. package/utils/uploader.js +1059 -1059
  159. package/utils/useAuth.js +30 -30
  160. package/utils/useRouter.js +47 -47
  161. package/utils/useSearch.js +0 -6
  162. package/utils/useUploader.js +53 -53
@@ -1,27 +1,27 @@
1
- # dictOptions 数据字典选项
2
-
3
- ::: tip
4
- `@netang/quasar/utils/dictOptions.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/dictOptions.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/dictOptions.js)
5
- :::
6
-
7
- - 示例
8
-
9
- ```javascript
10
- dictOptions('DICT_STATUS') // 返回:[ { label: '正常', value: 1 }, { label: '禁用', value: 0 } ]
11
-
12
- dictOptions('DICT_YESNO', 'title', 'id') // 返回:[ { title: '正常', id: 1 }, { title: '禁用', id: 0 } ]
13
- ```
14
-
15
- - 类型
16
-
17
- ```javascript
18
- dictOptions(key: String, textKey: String, valueKey: String): Array
19
- ```
20
-
21
- 返回数据字典选项数组
22
-
23
- | 参数名 | 说明 | 类型 | 默认值 |
24
- |----------|------|----------|-------|
25
- | key | 字典键值 | `String` | - |
26
- | labelKey | 标签键值 | `String` | label |
27
- | valueKey | 值键值 | `String` | value |
1
+ # dictOptions 数据字典选项
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/dictOptions.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/dictOptions.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/dictOptions.js)
5
+ :::
6
+
7
+ - 示例
8
+
9
+ ```javascript
10
+ dictOptions('DICT_STATUS') // 返回:[ { label: '正常', value: 1 }, { label: '禁用', value: 0 } ]
11
+
12
+ dictOptions('DICT_YESNO', 'title', 'id') // 返回:[ { title: '正常', id: 1 }, { title: '禁用', id: 0 } ]
13
+ ```
14
+
15
+ - 类型
16
+
17
+ ```javascript
18
+ dictOptions(key: String, textKey: String, valueKey: String): Array
19
+ ```
20
+
21
+ 返回数据字典选项数组
22
+
23
+ | 参数名 | 说明 | 类型 | 默认值 |
24
+ |----------|------|----------|-------|
25
+ | key | 字典键值 | `String` | - |
26
+ | labelKey | 标签键值 | `String` | label |
27
+ | valueKey | 值键值 | `String` | value |
@@ -1,33 +1,33 @@
1
- # $form 表单
2
-
3
- ::: tip
4
- `@netang/quasar/utils/$form.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/%24form.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/%24form.js)
5
-
6
- 表单工具
7
- :::
8
-
9
- ## $form.create
10
-
11
- 创建表格实例
12
-
13
- - 类型
14
-
15
- ```javascript
16
- $form.create(options: Object): Object
17
- ```
18
-
19
- ### options 参数
20
-
21
- | 参数名 | 说明 | 类型 | 可选值 | 默认值 | 示例 |
22
- |-----------|--------|------------|-----|-----|-----|
23
- | $power | 权限实例 | `Object` | - | - | - |
24
- | formData | 初始表单数据 | `Object` | - | { } | - |
25
- | resetForm | 重置表单方法 | `Function` | - | - | - |
26
-
27
- ### 返回数据
28
-
29
- | 参数名 | 说明 | 类型 | 可在 `<q-form>` 组件中使用 |
30
- |-------------|--------|---------------|---------------------|
31
- | formRef | 表单节点 | `ref()` | ref="formRef" |
32
- | rawFormData | 原始表单数据 | `Object` | - |
33
- | formData | 表单数据 | `ref(Object)` | - |
1
+ # $form 表单
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/$form.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/%24form.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/%24form.js)
5
+
6
+ 表单工具
7
+ :::
8
+
9
+ ## $form.create
10
+
11
+ 创建表格实例
12
+
13
+ - 类型
14
+
15
+ ```javascript
16
+ $form.create(options: Object): Object
17
+ ```
18
+
19
+ ### options 参数
20
+
21
+ | 参数名 | 说明 | 类型 | 可选值 | 默认值 | 示例 |
22
+ |-----------|--------|------------|-----|-----|-----|
23
+ | $power | 权限实例 | `Object` | - | - | - |
24
+ | formData | 初始表单数据 | `Object` | - | { } | - |
25
+ | resetForm | 重置表单方法 | `Function` | - | - | - |
26
+
27
+ ### 返回数据
28
+
29
+ | 参数名 | 说明 | 类型 | 可在 `<q-form>` 组件中使用 |
30
+ |-------------|--------|---------------|---------------------|
31
+ | formRef | 表单节点 | `ref()` | ref="formRef" |
32
+ | rawFormData | 原始表单数据 | `Object` | - |
33
+ | formData | 表单数据 | `ref(Object)` | - |
@@ -1,60 +1,60 @@
1
- # getData 获取公共数据
2
-
3
- ::: tip
4
- `@netang/quasar/utils/getData.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getData.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getData.js)
5
- :::
6
-
7
- - 请求公共数据地址设置
8
-
9
- ```javascript
10
- import { settings } from '@netang/quasar/utils/config'
11
-
12
- /**
13
- * 配置设置
14
- */
15
- settings({
16
- // 用户配置
17
- userConfig: {
18
- apiDataUrl: '公共数据地址',
19
- },
20
- })
21
- ```
22
-
23
- - 示例
24
-
25
- ```javascript
26
-
27
- // 页面状态
28
- const pageStatus = ref(false)
29
- // 空状态描述
30
- const emptyDescription = ref('')
31
- // 仓库列表
32
- const warehouseLists = ref([])
33
-
34
- // 获取仓库列表
35
- const res1 = await getData('get_warehouse', pageStatus, emptyDescription, warehouseLists)
36
- if (res1 === false) {
37
- return
38
- }
39
- console.log(warehouseLists.value)
40
-
41
- // 获取获取多条公共数据
42
- const res2 = await getData(['get_admin_group', 'get_admin_post', 'get_admin_role'], pageStatus, emptyDescription)
43
- if (res2 === false) {
44
- return
45
- }
46
- console.log(res2[1], res2[2], res2[3])
47
- ```
48
-
49
- - 类型
50
-
51
- ```javascript
52
- await getData(url, pageStatus, emptyDescription, refValue)
53
- ```
54
-
55
- | 参数名 | 说明 | 类型 | 默认值 |
56
- |----------|--|----------|-------|
57
- | url | 请求地址 | `String` / `Array` | - |
58
- | pageStatus | 页面状态 | `ref(Boolean)` | - |
59
- | emptyDescription | 空状态描述 | `ref(String)` | - |
60
- | refValue | 请求成功后设置值 | `ref()` | - |
1
+ # getData 获取公共数据
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/getData.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getData.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getData.js)
5
+ :::
6
+
7
+ - 请求公共数据地址设置
8
+
9
+ ```javascript
10
+ import { settings } from '@netang/quasar/utils/config'
11
+
12
+ /**
13
+ * 配置设置
14
+ */
15
+ settings({
16
+ // 用户配置
17
+ userConfig: {
18
+ apiDataUrl: '公共数据地址',
19
+ },
20
+ })
21
+ ```
22
+
23
+ - 示例
24
+
25
+ ```javascript
26
+
27
+ // 页面状态
28
+ const pageStatus = ref(false)
29
+ // 空状态描述
30
+ const emptyDescription = ref('')
31
+ // 仓库列表
32
+ const warehouseLists = ref([])
33
+
34
+ // 获取仓库列表
35
+ const res1 = await getData('get_warehouse', pageStatus, emptyDescription, warehouseLists)
36
+ if (res1 === false) {
37
+ return
38
+ }
39
+ console.log(warehouseLists.value)
40
+
41
+ // 获取获取多条公共数据
42
+ const res2 = await getData(['get_admin_group', 'get_admin_post', 'get_admin_role'], pageStatus, emptyDescription)
43
+ if (res2 === false) {
44
+ return
45
+ }
46
+ console.log(res2[1], res2[2], res2[3])
47
+ ```
48
+
49
+ - 类型
50
+
51
+ ```javascript
52
+ await getData(url, pageStatus, emptyDescription, refValue)
53
+ ```
54
+
55
+ | 参数名 | 说明 | 类型 | 默认值 |
56
+ |----------|--|----------|-------|
57
+ | url | 请求地址 | `String` / `Array` | - |
58
+ | pageStatus | 页面状态 | `ref(Boolean)` | - |
59
+ | emptyDescription | 空状态描述 | `ref(String)` | - |
60
+ | refValue | 请求成功后设置值 | `ref()` | - |
@@ -1,21 +1,21 @@
1
- # getFile 获取文件地址
2
-
3
- ::: tip
4
- `@netang/quasar/utils/getFile.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getFile.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getFile.js)
5
- :::
6
-
7
- - 示例
8
-
9
- ```javascript
10
- getFile('https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png')
11
- ```
12
-
13
- - 类型
14
-
15
- ```javascript
16
- await getFile(src)
17
- ```
18
-
19
- | 参数名 | 说明 | 类型 | 默认值 |
20
- |----------|--|----------|-------|
21
- | src | 文件地址 | `String` / `Array` | - |
1
+ # getFile 获取文件地址
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/getFile.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getFile.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getFile.js)
5
+ :::
6
+
7
+ - 示例
8
+
9
+ ```javascript
10
+ getFile('https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png')
11
+ ```
12
+
13
+ - 类型
14
+
15
+ ```javascript
16
+ await getFile(src)
17
+ ```
18
+
19
+ | 参数名 | 说明 | 类型 | 默认值 |
20
+ |----------|--|----------|-------|
21
+ | src | 文件地址 | `String` / `Array` | - |
@@ -1,33 +1,33 @@
1
- # getImage 获取图片地址
2
-
3
- ::: tip
4
- `@netang/quasar/utils/getImage.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getImage.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getImage.js)
5
- :::
6
-
7
- - 示例
8
-
9
- ```javascript
10
- getImage('https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png')
11
- ```
12
-
13
- - 类型
14
-
15
- ```javascript
16
- await getImage(src, options)
17
- ```
18
-
19
- | 参数名 | 说明 | 类型 | 默认值 |
20
- |----------|--|----------|-------|
21
- | src | 图片地址 | `String` / `Array` / `Object` | - |
22
- | options | 参数 | `Object` | - |
23
-
24
- options 参数
25
-
26
- | 参数名 | 说明 | 类型 | 默认值 |
27
- |----------|--|----------|-------|
28
- | w | 图片宽 | `Number` | - |
29
- | h | 图片高 | `Number` | - |
30
- | q | 图片质量 | `Number` | 75 |
31
- | format | 图片格式 | `String` | webp |
32
- | maxWidth | 图片最大宽度 | `Number` | - |
33
- | zoom | 是否自动缩放 | `Boolean` | false |
1
+ # getImage 获取图片地址
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/getImage.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getImage.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getImage.js)
5
+ :::
6
+
7
+ - 示例
8
+
9
+ ```javascript
10
+ getImage('https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png')
11
+ ```
12
+
13
+ - 类型
14
+
15
+ ```javascript
16
+ await getImage(src, options)
17
+ ```
18
+
19
+ | 参数名 | 说明 | 类型 | 默认值 |
20
+ |----------|--|----------|-------|
21
+ | src | 图片地址 | `String` / `Array` / `Object` | - |
22
+ | options | 参数 | `Object` | - |
23
+
24
+ options 参数
25
+
26
+ | 参数名 | 说明 | 类型 | 默认值 |
27
+ |----------|--|----------|-------|
28
+ | w | 图片宽 | `Number` | - |
29
+ | h | 图片高 | `Number` | - |
30
+ | q | 图片质量 | `Number` | 75 |
31
+ | format | 图片格式 | `String` | webp |
32
+ | maxWidth | 图片最大宽度 | `Number` | - |
33
+ | zoom | 是否自动缩放 | `Boolean` | false |
@@ -1,51 +1,51 @@
1
- # getTime 获取时间
2
-
3
- ::: tip
4
- `@netang/quasar/utils/getTime.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getTime.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getTime.js)
5
- :::
6
-
7
- - 示例
8
-
9
- ```javascript
10
- // 如果没有时间, 则显示默认值:无
11
- getTime(0, '无')
12
-
13
- // 显示秒
14
- getTime(Date.now(), { showSecond: true, }, '-')
15
-
16
- // 自定义格式
17
- getTime(Date.now(), { format: 'MM-DD', })
18
-
19
- // 显示日历格式
20
- getTime(Date.now() - 86401000, { calendar: true, })
21
-
22
- getTime(Date.now() - 172800000, { calendar: true, })
23
-
24
- // 隐藏当前年份
25
- // 如果是今年则隐藏当前年份, 否则显示年份
26
- getTime(Date.now(), { hideCurrentYear: true, })
27
- getTime(Date.now() - 31536000000, { hideCurrentYear: true, })
28
- ```
29
-
30
- - 类型
31
-
32
- ```javascript
33
- getTime(time, options, defaultValue)
34
- ```
35
-
36
- | 参数名 | 说明 | 类型 | 默认值 |
37
- |----------|--|----------|-------|
38
- | time | 秒时间戳 / 毫秒时间戳 | `Number` | - |
39
- | options | 参数 | `Object` | - |
40
- | defaultValue | 默认值 | `Any` | - |
41
-
42
- options 参数
43
-
44
- | 参数名 | 说明 | 类型 | 默认值 |
45
- |----------|--|----------|-------|
46
- | format | 默认格式化 | `String` | MM-DD HH:mm |
47
- | showSecond | 是否显示秒 | `Boolean` | false|
48
- | hideCurrentYear | 是否隐藏当前年份 | `Boolean` | false|
49
- | calendar | 是否显示日历格式 | `Boolean` | false|
50
- | showCalendarToday | 是否显示日历今天 | `Boolean` | false|
51
- | showCalendarTime | 是否显示日历时间 | `Boolean` | false|
1
+ # getTime 获取时间
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/getTime.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/getTime.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/getTime.js)
5
+ :::
6
+
7
+ - 示例
8
+
9
+ ```javascript
10
+ // 如果没有时间, 则显示默认值:无
11
+ getTime(0, '无')
12
+
13
+ // 显示秒
14
+ getTime(Date.now(), { showSecond: true, }, '-')
15
+
16
+ // 自定义格式
17
+ getTime(Date.now(), { format: 'MM-DD', })
18
+
19
+ // 显示日历格式
20
+ getTime(Date.now() - 86401000, { calendar: true, })
21
+
22
+ getTime(Date.now() - 172800000, { calendar: true, })
23
+
24
+ // 隐藏当前年份
25
+ // 如果是今年则隐藏当前年份, 否则显示年份
26
+ getTime(Date.now(), { hideCurrentYear: true, })
27
+ getTime(Date.now() - 31536000000, { hideCurrentYear: true, })
28
+ ```
29
+
30
+ - 类型
31
+
32
+ ```javascript
33
+ getTime(time, options, defaultValue)
34
+ ```
35
+
36
+ | 参数名 | 说明 | 类型 | 默认值 |
37
+ |----------|--|----------|-------|
38
+ | time | 秒时间戳 / 毫秒时间戳 | `Number` | - |
39
+ | options | 参数 | `Object` | - |
40
+ | defaultValue | 默认值 | `Any` | - |
41
+
42
+ options 参数
43
+
44
+ | 参数名 | 说明 | 类型 | 默认值 |
45
+ |----------|--|----------|-------|
46
+ | format | 默认格式化 | `String` | MM-DD HH:mm |
47
+ | showSecond | 是否显示秒 | `Boolean` | false|
48
+ | hideCurrentYear | 是否隐藏当前年份 | `Boolean` | false|
49
+ | calendar | 是否显示日历格式 | `Boolean` | false|
50
+ | showCalendarToday | 是否显示日历今天 | `Boolean` | false|
51
+ | showCalendarTime | 是否显示日历时间 | `Boolean` | false|
@@ -1 +1 @@
1
- # utils
1
+ # utils
@@ -1,18 +1,18 @@
1
- # loading 全局加载
2
-
3
- ::: tip
4
- `@netang/quasar/utils/loading.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/loading.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/loading.js)
5
-
6
- 继承 `Loading` 所有特性
7
- [中文文档](http://www.quasarchs.com/quasar-plugins/loading) [英文文档](https://quasar.dev/quasar-plugins/loading)
8
- :::
9
-
10
- - 示例
11
-
12
- ```javascript
13
- // 全局加载
14
- loading.show()
15
-
16
- // 取消全局加载
17
- loading.hide()
18
- ```
1
+ # loading 全局加载
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/loading.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/loading.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/loading.js)
5
+
6
+ 继承 `Loading` 所有特性
7
+ [中文文档](http://www.quasarchs.com/quasar-plugins/loading) [英文文档](https://quasar.dev/quasar-plugins/loading)
8
+ :::
9
+
10
+ - 示例
11
+
12
+ ```javascript
13
+ // 全局加载
14
+ loading.show()
15
+
16
+ // 取消全局加载
17
+ loading.hide()
18
+ ```
@@ -1,29 +1,29 @@
1
- # notify 通知
2
-
3
- ::: tip
4
- `@netang/quasar/utils/notify.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/notify.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/notify.js)
5
-
6
- 继承 `Notify.create()` 所有特性
7
- [中文文档](http://www.quasarchs.com/quasar-plugins/notify) [英文文档](https://quasar.dev/quasar-plugins/notify)
8
- :::
9
-
10
- - 示例
11
-
12
- ```javascript
13
- notify({
14
- color: 'green-4',
15
- textColor: 'white',
16
- icon: 'cloud_done',
17
- message: '修改成功'
18
- })
19
- ```
20
-
21
- - 类型
22
-
23
- ```javascript
24
- notify(options: Object): void
25
- ```
26
-
27
- | 参数名 | 说明 | 类型 |
28
- |---------|-----|----------|
29
- | options | 参数 | `Object` |
1
+ # notify 通知
2
+
3
+ ::: tip
4
+ `@netang/quasar/utils/notify.js` [Github](https://github.com/netangsoft/netang-quasar/blob/main/utils/notify.js) [Gitee](https://gitee.com/jinmarcus/netang-quasar/blob/main/utils/notify.js)
5
+
6
+ 继承 `Notify.create()` 所有特性
7
+ [中文文档](http://www.quasarchs.com/quasar-plugins/notify) [英文文档](https://quasar.dev/quasar-plugins/notify)
8
+ :::
9
+
10
+ - 示例
11
+
12
+ ```javascript
13
+ notify({
14
+ color: 'green-4',
15
+ textColor: 'white',
16
+ icon: 'cloud_done',
17
+ message: '修改成功'
18
+ })
19
+ ```
20
+
21
+ - 类型
22
+
23
+ ```javascript
24
+ notify(options: Object): void
25
+ ```
26
+
27
+ | 参数名 | 说明 | 类型 |
28
+ |---------|-----|----------|
29
+ | options | 参数 | `Object` |