@netang/quasar 0.0.94 → 0.0.96

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 (259) hide show
  1. package/_docs/docs/.vuepress/configs/sidebar/zh.js +4 -9
  2. package/_docs/docs/utils/alert.md +16 -8
  3. package/_docs/docs/utils/area.md +101 -7
  4. package/_docs/docs/utils/arr.md +69 -7
  5. package/_docs/docs/utils/bus.md +10 -10
  6. package/_docs/docs/utils/confirm.md +21 -8
  7. package/_docs/docs/utils/copy.md +12 -8
  8. package/_docs/docs/utils/dialog.md +87 -7
  9. package/_docs/docs/utils/dict.md +39 -7
  10. package/_docs/docs/utils/dictOptions.md +16 -7
  11. package/_docs/docs/utils/form.md +17 -85
  12. package/_docs/docs/utils/getData.md +49 -7
  13. package/_docs/docs/utils/getFile.md +11 -8
  14. package/_docs/docs/utils/getImage.md +22 -7
  15. package/_docs/docs/utils/getTime.md +40 -7
  16. package/_docs/docs/utils/loading.md +10 -10
  17. package/_docs/docs/utils/notify.md +19 -8
  18. package/_docs/docs/utils/power.md +129 -22
  19. package/_docs/docs/utils/previewImage.md +4 -11
  20. package/_docs/docs/utils/price.md +34 -7
  21. package/_docs/docs/utils/rule.md +22 -10
  22. package/_docs/docs/utils/ruleValid.md +21 -8
  23. package/_docs/docs/utils/symbols.md +20 -8
  24. package/_docs/docs/utils/table.md +184 -7
  25. package/_docs/docs/utils/timestamp.md +16 -7
  26. package/_docs/docs/utils/toast.md +17 -8
  27. package/_docs/docs/utils/tree.md +163 -7
  28. package/_docs/docs/utils/uploader.md +21 -10
  29. package/components/field-table/index.vue +27 -16
  30. package/components/table/index.vue +6 -3
  31. package/docs/404.html +3 -3
  32. package/docs/assets/alert.html-b2a2a72f.js +5 -0
  33. package/docs/assets/alert.html-ba46d137.js +1 -0
  34. package/docs/assets/app-9f30aa4b.js +6 -0
  35. package/docs/assets/area.html-01b9b58d.js +42 -0
  36. package/docs/assets/area.html-9a4fce6a.js +1 -0
  37. package/docs/assets/arr.html-145d27e7.js +1 -0
  38. package/docs/assets/arr.html-674e65ab.js +11 -0
  39. package/docs/assets/{auth.html-a12587df.js → auth.html-579fa830.js} +1 -1
  40. package/docs/assets/bus.html-c71254aa.js +1 -0
  41. package/docs/assets/bus.html-dc7d3d19.js +6 -0
  42. package/docs/assets/{column-title.html-3c4ba6cd.js → column-title.html-e9316762.js} +1 -1
  43. package/docs/assets/confirm.html-ddfdc27f.js +10 -0
  44. package/docs/assets/confirm.html-ef3e2bef.js +1 -0
  45. package/docs/assets/copy.html-d20345b6.js +1 -0
  46. package/docs/assets/copy.html-ef8c8571.js +13 -0
  47. package/docs/assets/{data.html-0b3d1f41.js → data.html-a3b05d5b.js} +1 -1
  48. package/docs/assets/dialog.html-62902b83.js +68 -0
  49. package/docs/assets/dialog.html-baea77c9.js +1 -0
  50. package/docs/assets/dialog.html-bb082fc4.js +1 -0
  51. package/docs/assets/dict.html-1311da3d.js +23 -0
  52. package/docs/assets/dict.html-b96fbf0c.js +1 -0
  53. package/docs/assets/dictOptions.html-7c4f40a5.js +1 -0
  54. package/docs/assets/dictOptions.html-fb99d175.js +5 -0
  55. package/docs/assets/form.html-2b562c37.js +2 -0
  56. package/docs/assets/form.html-75104cd5.js +1 -0
  57. package/docs/assets/getData.html-990e3787.js +1 -0
  58. package/docs/assets/getData.html-bb72025f.js +34 -0
  59. package/docs/assets/getFile.html-42368004.js +1 -0
  60. package/docs/assets/getFile.html-99abd054.js +3 -0
  61. package/docs/assets/getImage.html-3429c5a1.js +1 -0
  62. package/docs/assets/getImage.html-4d886d83.js +3 -0
  63. package/docs/assets/getTime.html-7435f922.js +1 -0
  64. package/docs/assets/getTime.html-b37f49eb.js +20 -0
  65. package/docs/assets/img.html-7d1da657.js +1 -0
  66. package/docs/assets/list-menu-item.html-84ed5ab8.js +1 -0
  67. package/docs/assets/list-menu.html-28b4163f.js +1 -0
  68. package/docs/assets/loading.html-dae9e39d.js +6 -0
  69. package/docs/assets/loading.html-dc74c9e6.js +1 -0
  70. package/docs/assets/notify.html-e6c4c514.js +1 -0
  71. package/docs/assets/notify.html-f2c4d914.js +8 -0
  72. package/docs/assets/power-page.html-485e77da.js +1 -0
  73. package/docs/assets/{power.html-7c84e9af.js → power.html-d258cc19.js} +8 -3
  74. package/docs/assets/power.html-e490bd32.js +1 -0
  75. package/docs/assets/previewImage.html-6a6b4245.js +1 -0
  76. package/docs/assets/previewImage.html-c5b7e945.js +2 -0
  77. package/docs/assets/price.html-1882c548.js +19 -0
  78. package/docs/assets/price.html-94d3f5be.js +1 -0
  79. package/docs/assets/price.html-deaf880f.js +1 -0
  80. package/docs/assets/rule.html-2cd57fc2.js +13 -0
  81. package/docs/assets/rule.html-61662001.js +1 -0
  82. package/docs/assets/ruleValid.html-04fe2552.js +1 -0
  83. package/docs/assets/ruleValid.html-e0a776af.js +14 -0
  84. package/docs/assets/symbols.html-a6aea4bf.js +1 -0
  85. package/docs/assets/symbols.html-b1f65bad.js +21 -0
  86. package/docs/assets/table-column-fixed.html-e763c38b.js +1 -0
  87. package/docs/assets/table-pagination.html-c37ee2ac.js +1 -0
  88. package/docs/assets/table-summary.html-943c65a0.js +1 -0
  89. package/docs/assets/table.html-7f9c5d1b.js +38 -0
  90. package/docs/assets/table.html-ac99b9cb.js +1 -0
  91. package/docs/assets/timestamp.html-4e54f79b.js +13 -0
  92. package/docs/assets/timestamp.html-d0e1b88a.js +1 -0
  93. package/docs/assets/toast.html-58ecbe21.js +1 -0
  94. package/docs/assets/toast.html-c9b9d36b.js +6 -0
  95. package/docs/assets/tree.html-d07cbe79.js +23 -0
  96. package/docs/assets/tree.html-ea04193e.js +1 -0
  97. package/docs/assets/uploader.html-36da4394.js +2 -0
  98. package/docs/assets/uploader.html-6b5f3079.js +1 -0
  99. package/docs/components/column-title.html +3 -3
  100. package/docs/components/data.html +3 -3
  101. package/docs/components/dialog.html +3 -3
  102. package/docs/components/dragger.html +2 -2
  103. package/docs/components/editor-code.html +2 -2
  104. package/docs/components/empty.html +2 -2
  105. package/docs/components/field-date.html +2 -2
  106. package/docs/components/field-table.html +2 -2
  107. package/docs/components/field-text.html +2 -2
  108. package/docs/components/field-tree.html +2 -2
  109. package/docs/components/img.html +3 -3
  110. package/docs/components/input-number.html +2 -2
  111. package/docs/components/list-menu-item.html +3 -3
  112. package/docs/components/list-menu.html +3 -3
  113. package/docs/components/power-page.html +3 -3
  114. package/docs/components/price.html +3 -3
  115. package/docs/components/render.html +2 -2
  116. package/docs/components/search-item.html +2 -2
  117. package/docs/components/search.html +2 -2
  118. package/docs/components/select.html +2 -2
  119. package/docs/components/splitter.html +2 -2
  120. package/docs/components/table-column-fixed.html +3 -3
  121. package/docs/components/table-pagination.html +3 -3
  122. package/docs/components/table-splitter.html +2 -2
  123. package/docs/components/table-summary.html +3 -3
  124. package/docs/components/table.html +2 -2
  125. package/docs/components/thumbnail.html +2 -2
  126. package/docs/components/toolbar.html +2 -2
  127. package/docs/components/uploader-query.html +2 -2
  128. package/docs/components/uploader.html +2 -2
  129. package/docs/components/value-format.html +2 -2
  130. package/docs/index.html +2 -2
  131. package/docs/utils/alert.html +8 -5
  132. package/docs/utils/area.html +45 -5
  133. package/docs/utils/arr.html +14 -5
  134. package/docs/utils/auth.html +4 -4
  135. package/docs/utils/bus.html +9 -5
  136. package/docs/utils/confirm.html +13 -5
  137. package/docs/utils/copy.html +16 -5
  138. package/docs/utils/dialog.html +71 -5
  139. package/docs/utils/dict.html +26 -5
  140. package/docs/utils/dictOptions.html +8 -5
  141. package/docs/utils/form.html +4 -10
  142. package/docs/utils/getData.html +37 -5
  143. package/docs/utils/getFile.html +6 -5
  144. package/docs/utils/getImage.html +6 -5
  145. package/docs/utils/getTime.html +23 -5
  146. package/docs/utils/index.html +3 -3
  147. package/docs/utils/loading.html +9 -5
  148. package/docs/utils/notify.html +11 -5
  149. package/docs/utils/power.html +10 -5
  150. package/docs/utils/previewImage.html +5 -5
  151. package/docs/utils/price.html +22 -5
  152. package/docs/utils/rule.html +16 -5
  153. package/docs/utils/ruleValid.html +17 -5
  154. package/docs/utils/symbols.html +24 -5
  155. package/docs/utils/table.html +41 -5
  156. package/docs/utils/timestamp.html +16 -5
  157. package/docs/utils/toast.html +9 -5
  158. package/docs/utils/tree.html +26 -5
  159. package/docs/utils/uploader.html +5 -5
  160. package/package.json +1 -1
  161. package/utils/$form.js +2 -2
  162. package/utils/$power.js +2 -2
  163. package/utils/$table.js +51 -46
  164. package/utils/$tree.js +17 -9
  165. package/utils/alert.js +2 -2
  166. package/utils/area.js +11 -11
  167. package/utils/arr.js +4 -4
  168. package/utils/confirm.js +2 -2
  169. package/utils/copy.js +5 -2
  170. package/utils/dialog.js +6 -17
  171. package/utils/dictOptions.js +7 -3
  172. package/utils/getData.js +5 -0
  173. package/utils/getImage.js +9 -9
  174. package/utils/getTime.js +8 -8
  175. package/utils/index.js +0 -2
  176. package/utils/loading.js +1 -1
  177. package/utils/price.js +2 -2
  178. package/utils/symbols.js +12 -2
  179. package/utils/uploader.js +4 -4
  180. package/utils/{$search.js → useSearch.js} +3 -17
  181. package/_docs/docs/utils/search.md +0 -18
  182. package/_docs/docs/utils/useAuth.md +0 -18
  183. package/_docs/docs/utils/useRouter.md +0 -18
  184. package/_docs/docs/utils/useUploader.md +0 -18
  185. package/docs/assets/alert.html-1a9a4ff9.js +0 -1
  186. package/docs/assets/alert.html-454ee053.js +0 -2
  187. package/docs/assets/app-0f5fd00b.js +0 -6
  188. package/docs/assets/area.html-0181540e.js +0 -2
  189. package/docs/assets/area.html-30f7b9cd.js +0 -1
  190. package/docs/assets/arr.html-78f33cf7.js +0 -1
  191. package/docs/assets/arr.html-9bb9d2b1.js +0 -2
  192. package/docs/assets/bus.html-712d2dac.js +0 -2
  193. package/docs/assets/bus.html-8b9eed8a.js +0 -1
  194. package/docs/assets/confirm.html-4ae63e6e.js +0 -2
  195. package/docs/assets/confirm.html-97332a6b.js +0 -1
  196. package/docs/assets/copy.html-12d29fd4.js +0 -2
  197. package/docs/assets/copy.html-586e52cf.js +0 -1
  198. package/docs/assets/dialog.html-2c87dd53.js +0 -1
  199. package/docs/assets/dialog.html-b6610c1a.js +0 -2
  200. package/docs/assets/dialog.html-c7c36de9.js +0 -1
  201. package/docs/assets/dict.html-1e0c50e6.js +0 -1
  202. package/docs/assets/dict.html-b74236e0.js +0 -2
  203. package/docs/assets/dictOptions.html-02ec4809.js +0 -2
  204. package/docs/assets/dictOptions.html-c4a7a640.js +0 -1
  205. package/docs/assets/form.html-021b0fce.js +0 -8
  206. package/docs/assets/form.html-917d13ef.js +0 -1
  207. package/docs/assets/getData.html-0759b5bf.js +0 -1
  208. package/docs/assets/getData.html-a6b4be2e.js +0 -2
  209. package/docs/assets/getFile.html-1787616c.js +0 -2
  210. package/docs/assets/getFile.html-e86de8d1.js +0 -1
  211. package/docs/assets/getImage.html-85aaac88.js +0 -2
  212. package/docs/assets/getImage.html-b103e6bc.js +0 -1
  213. package/docs/assets/getTime.html-2ceda4c4.js +0 -2
  214. package/docs/assets/getTime.html-aaa34637.js +0 -1
  215. package/docs/assets/img.html-aec1ffc0.js +0 -1
  216. package/docs/assets/list-menu-item.html-d8f93d73.js +0 -1
  217. package/docs/assets/list-menu.html-9a3e1cfa.js +0 -1
  218. package/docs/assets/loading.html-b7c885b2.js +0 -1
  219. package/docs/assets/loading.html-ea638ea8.js +0 -2
  220. package/docs/assets/notify.html-50397a1d.js +0 -2
  221. package/docs/assets/notify.html-9ce7125e.js +0 -1
  222. package/docs/assets/power-page.html-36ca23bf.js +0 -1
  223. package/docs/assets/power.html-f450caf9.js +0 -1
  224. package/docs/assets/previewImage.html-0ebeb6e1.js +0 -1
  225. package/docs/assets/previewImage.html-7638537a.js +0 -2
  226. package/docs/assets/price.html-0400038c.js +0 -2
  227. package/docs/assets/price.html-0ea291bf.js +0 -1
  228. package/docs/assets/price.html-2ff075ef.js +0 -1
  229. package/docs/assets/rule.html-2cb24705.js +0 -2
  230. package/docs/assets/rule.html-88f282ae.js +0 -1
  231. package/docs/assets/ruleValid.html-dc28e81d.js +0 -2
  232. package/docs/assets/ruleValid.html-e57f1ded.js +0 -1
  233. package/docs/assets/search.html-b1498950.js +0 -2
  234. package/docs/assets/search.html-db50a877.js +0 -1
  235. package/docs/assets/symbols.html-482298ea.js +0 -1
  236. package/docs/assets/symbols.html-632ee16d.js +0 -2
  237. package/docs/assets/table-column-fixed.html-089bd772.js +0 -1
  238. package/docs/assets/table-pagination.html-bde73cd1.js +0 -1
  239. package/docs/assets/table-summary.html-63657ab8.js +0 -1
  240. package/docs/assets/table.html-cd4c0eb7.js +0 -2
  241. package/docs/assets/table.html-fa7d00ca.js +0 -1
  242. package/docs/assets/timestamp.html-4c9aca4f.js +0 -2
  243. package/docs/assets/timestamp.html-fed25e54.js +0 -1
  244. package/docs/assets/toast.html-15acc0a4.js +0 -1
  245. package/docs/assets/toast.html-d28672f2.js +0 -2
  246. package/docs/assets/tree.html-07ad391b.js +0 -1
  247. package/docs/assets/tree.html-d0e4a85a.js +0 -2
  248. package/docs/assets/uploader.html-c08870e2.js +0 -1
  249. package/docs/assets/uploader.html-da6b88d1.js +0 -2
  250. package/docs/assets/useAuth.html-094ec6e0.js +0 -2
  251. package/docs/assets/useAuth.html-d387bc77.js +0 -1
  252. package/docs/assets/useRouter.html-647976af.js +0 -1
  253. package/docs/assets/useRouter.html-b7c1d2b2.js +0 -2
  254. package/docs/assets/useUploader.html-1403cd91.js +0 -2
  255. package/docs/assets/useUploader.html-312ce628.js +0 -1
  256. package/docs/utils/search.html +0 -34
  257. package/docs/utils/useAuth.html +0 -34
  258. package/docs/utils/useRouter.html +0 -34
  259. package/docs/utils/useUploader.html +0 -34
package/utils/copy.js CHANGED
@@ -5,13 +5,16 @@ import $n_toast from './toast'
5
5
  /**
6
6
  * 复制
7
7
  */
8
- export default function copy(text, message) {
8
+ export default function copy(text, message = null) {
9
9
 
10
10
  // 提示
11
- if (message) {
11
+ if (message !== false) {
12
12
 
13
+ // 如果为 true, 则 message 设为 text
13
14
  if (message === true) {
14
15
  message = `复制【${text}】成功`
16
+ } else if (! message) {
17
+ message = '复制成功'
15
18
  }
16
19
 
17
20
  // 轻提示
package/utils/dialog.js CHANGED
@@ -1,47 +1,36 @@
1
1
  import $n_has from 'lodash/has'
2
2
 
3
- import { inject } from 'vue'
4
3
  import { Dialog } from 'quasar'
5
4
 
6
5
  import DialogComponent from '../components/dialog'
7
- import { NDialogKey } from './symbols'
8
6
 
9
7
  /**
10
8
  * 创建对话框
11
9
  */
12
- function create(params) {
10
+ function create(options) {
13
11
  if (
14
12
  // 如果是路由组件
15
- $n_has(params, 'path')
13
+ $n_has(options, 'path')
16
14
  // 或自定义组件
17
- || $n_has(params, 'name')
15
+ || $n_has(options, 'name')
18
16
  ) {
19
17
  return Dialog.create({
20
18
  // 组件
21
19
  component: DialogComponent,
22
20
  // 组件声明
23
- componentProps: params,
21
+ componentProps: options,
24
22
  })
25
23
  }
26
24
 
27
- return Dialog.create(params)
25
+ return Dialog.create(options)
28
26
  }
29
27
 
30
28
  /**
31
- * 获取对话框注入数据
32
- */
33
- function onInject() {
34
- return inject(NDialogKey)
35
- }
36
-
37
- /**
38
- * 对话框业务
29
+ * 对话框
39
30
  */
40
31
  const dialog = {
41
32
  // 创建对话框
42
33
  create,
43
- // 获取对话框注入数据
44
- inject: onInject,
45
34
  }
46
35
 
47
36
  export default dialog
@@ -3,9 +3,13 @@ import $n_get from 'lodash/get'
3
3
  import { configs } from './config'
4
4
 
5
5
  /**
6
- * 数据字典选项
6
+ * 数据字典选项数组
7
+ * @param {String} key 字典键值
8
+ * @param {String} labelKey 标签键值
9
+ * @param {String} valueKey 值键值
10
+ * @returns {Array}
7
11
  */
8
- export default function dictOptions(key, textKey = 'label', valueKey = 'value') {
12
+ export default function dictOptions(key, labelKey = 'label', valueKey = 'value') {
9
13
 
10
14
  const lists = []
11
15
 
@@ -14,7 +18,7 @@ export default function dictOptions(key, textKey = 'label', valueKey = 'value')
14
18
  for (const item of dictItem) {
15
19
 
16
20
  const val = {}
17
- val[textKey] = item[0]
21
+ val[labelKey] = item[0]
18
22
  val[valueKey] = item[1]
19
23
 
20
24
  lists.push(val)
package/utils/getData.js CHANGED
@@ -9,6 +9,11 @@ import $n_config from './config'
9
9
 
10
10
  /**
11
11
  * 获取公共数据
12
+ * @param {String|Array} url 请求地址
13
+ * @param pageStatus 页面状态
14
+ * @param emptyDescription 空状态描述
15
+ * @param refValue 请求成功后设置值
16
+ * @returns
12
17
  */
13
18
  export default async function getData(url, pageStatus, emptyDescription, refValue) {
14
19
 
package/utils/getImage.js CHANGED
@@ -12,7 +12,7 @@ import $n_config from './config'
12
12
  /**
13
13
  * 获取图片
14
14
  */
15
- export default function getImage(src, params) {
15
+ export default function getImage(src, options) {
16
16
 
17
17
  if (src) {
18
18
 
@@ -23,8 +23,8 @@ export default function getImage(src, params) {
23
23
  // 如果为对象
24
24
  } else if ($n_isValidObject(src)) {
25
25
 
26
- if ($n_has(src, 'params')) {
27
- params = src.params
26
+ if ($n_has(src, 'options')) {
27
+ options = src.options
28
28
  }
29
29
 
30
30
  if ($n_has(src, 'img')) {
@@ -40,21 +40,21 @@ export default function getImage(src, params) {
40
40
  }
41
41
 
42
42
  // 如果为对象定义的规格
43
- if ($n_isValidObject(params)) {
43
+ if ($n_isValidObject(options)) {
44
44
 
45
45
  // 是否自动缩放
46
46
  // --------------------------------------------------
47
47
  // 如果有定义 w
48
- if ($n_has(params, 'w')) {
48
+ if ($n_has(options, 'w')) {
49
49
 
50
50
  let {
51
51
  w,
52
52
  maxWidth,
53
53
  zoom,
54
- } = params
54
+ } = options
55
55
 
56
56
  // 先设为 0
57
- params.w = 0
57
+ options.w = 0
58
58
 
59
59
  // 如果开启缩放 && 有宽度
60
60
  if (zoom && w) {
@@ -86,7 +86,7 @@ export default function getImage(src, params) {
86
86
  w = maxWidth
87
87
  }
88
88
 
89
- params.w = w
89
+ options.w = w
90
90
  }
91
91
  }
92
92
  }
@@ -118,7 +118,7 @@ export default function getImage(src, params) {
118
118
  q: 75,
119
119
  // 格式
120
120
  format: 'webp',
121
- }, params)
121
+ }, options)
122
122
 
123
123
  // 裁剪图片方式
124
124
  src += '?imageView2/2'
package/utils/getTime.js CHANGED
@@ -8,10 +8,10 @@ import { date as quasarDate } from 'quasar'
8
8
  /**
9
9
  * 获取时间
10
10
  */
11
- export default function getTime(time, params, defaultValue = '') {
11
+ export default function getTime(time, options, defaultValue = '') {
12
12
 
13
13
  if (! time) {
14
- return $n_isValidString(params) ? params : defaultValue
14
+ return $n_isValidString(options) ? options : defaultValue
15
15
  }
16
16
 
17
17
  let {
@@ -25,17 +25,17 @@ export default function getTime(time, params, defaultValue = '') {
25
25
  } = Object.assign({
26
26
  // 默认格式化
27
27
  format: 'MM-DD HH:mm',
28
- // 显示秒
28
+ // 是否显示秒
29
29
  showSecond: false,
30
- // 隐藏当前年份
30
+ // 是否隐藏当前年份
31
31
  hideCurrentYear: false,
32
- // 日历时间
32
+ // 是否显示日历格式
33
33
  calendar: false,
34
- // 显示日历今天
34
+ // 是否显示日历今天
35
35
  showCalendarToday: false,
36
- // 显示日历时间
36
+ // 是否显示日历时间
37
37
  showCalendarTime: false,
38
- }, params)
38
+ }, options)
39
39
 
40
40
  // 传入时间
41
41
  const date = $n_toDate(time)
package/utils/index.js CHANGED
@@ -3,7 +3,6 @@ import $form from './$form'
3
3
  import $power from './$power'
4
4
  import $rule from './$rule'
5
5
  import $ruleValid from './$ruleValid'
6
- import $search from './$search'
7
6
  import $table from './$table'
8
7
  import $tree from './$tree'
9
8
 
@@ -35,7 +34,6 @@ export default {
35
34
  $power,
36
35
  $rule,
37
36
  $ruleValid,
38
- $search,
39
37
  $table,
40
38
  $tree,
41
39
 
package/utils/loading.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Loading } from 'quasar'
2
2
 
3
3
  /**
4
- * 加载
4
+ * 全局加载
5
5
  */
6
6
  const loading = {
7
7
  show() {
package/utils/price.js CHANGED
@@ -5,7 +5,7 @@ import $n_config from './config'
5
5
  /**
6
6
  * 换算金额
7
7
  */
8
- export default function price(value, params) {
8
+ export default function price(value, options) {
9
9
 
10
10
  return $n_decimal(value, Object.assign({
11
11
  // 最小值
@@ -14,5 +14,5 @@ export default function price(value, params) {
14
14
  decimalLength: 2,
15
15
  // 是否开启人民币分转元(如值 189 -> 1.89)
16
16
  centToYuan: $n_config('priceCentToYuan') === true,
17
- }, params))
17
+ }, options))
18
18
  }
package/utils/symbols.js CHANGED
@@ -1,8 +1,18 @@
1
+
2
+ // 渲染组件注入符号
1
3
  export const NRenderKey = '_n_render_'
4
+
5
+ // 权限注入符号
2
6
  export const NPowerKey = '_n_power_'
3
- export const NLayoutKey = '_n_layout_'
7
+
8
+ // 表格注入符号
4
9
  export const NTableKey = '_n_table_'
10
+
11
+ // 表单注入符号
5
12
  export const NFormKey = '_n_form_'
13
+
14
+ // 对话框注入符号
6
15
  export const NDialogKey = '_n_dialog_'
7
- export const NFieldTableKey = '_n_field_table_'
16
+
17
+ // 上传器注入符号
8
18
  export const NUploaderKey = '_n_uploader_'
package/utils/uploader.js CHANGED
@@ -48,7 +48,7 @@ let _fileNum = 0
48
48
  /**
49
49
  * 创建上传器
50
50
  */
51
- function create(params) {
51
+ function create(options) {
52
52
 
53
53
  // ==========【数据】=========================================================================================
54
54
 
@@ -65,7 +65,7 @@ function create(params) {
65
65
  onUpdateModelValue: null,
66
66
  // 更新方法
67
67
  onUpdate: null,
68
- }, params)
68
+ }, options)
69
69
 
70
70
  // 声明属性
71
71
  const props = Object.assign({
@@ -88,10 +88,10 @@ function create(params) {
88
88
  loadInfo: false,
89
89
  // 单文件上传提示
90
90
  confirm: false,
91
- }, $n_get(params, 'props'))
91
+ }, $n_get(options, 'props'))
92
92
 
93
93
  // 上传文件列表
94
- const uploadFileLists = $n_has(params, 'uploadFileLists') && isRef(params.uploadFileLists) ? params.uploadFileLists : ref([])
94
+ const uploadFileLists = $n_has(options, 'uploadFileLists') && isRef(options.uploadFileLists) ? options.uploadFileLists : ref([])
95
95
 
96
96
  /**
97
97
  * 上传配置
@@ -188,7 +188,7 @@ function formatItemValueCompare(value, { compareOptions1 }) {
188
188
  /**
189
189
  * 从表格列获取原始值
190
190
  */
191
- function getRawData(tableColumns, query, searchFromQuery = true) {
191
+ export function getRawData(tableColumns, query, searchFromQuery = true) {
192
192
 
193
193
  // 原始参数
194
194
  const rawQuery = {}
@@ -313,7 +313,7 @@ function getRawData(tableColumns, query, searchFromQuery = true) {
313
313
  /**
314
314
  * 获取参数
315
315
  */
316
- async function getOptions(rawSearchOptions, format) {
316
+ export async function getOptions(rawSearchOptions, format) {
317
317
 
318
318
  const lists = []
319
319
 
@@ -395,7 +395,7 @@ async function getOptions(rawSearchOptions, format) {
395
395
  /**
396
396
  * 格式化值
397
397
  */
398
- function formatValue(rawSearchOptions, searchValue) {
398
+ export function formatValue(rawSearchOptions, searchValue) {
399
399
 
400
400
  const lists = []
401
401
 
@@ -494,17 +494,3 @@ function formatValue(rawSearchOptions, searchValue) {
494
494
 
495
495
  return lists
496
496
  }
497
-
498
- /**
499
- * 搜素业务
500
- */
501
- const $search = {
502
- // 获取原始值
503
- getRawData,
504
- // 获取参数
505
- getOptions,
506
- // 格式化值
507
- formatValue,
508
- }
509
-
510
- export default $search
@@ -1,18 +0,0 @@
1
- # xxxx xxxx
2
-
3
- ::: tip
4
- xxxxxxxx
5
- :::
6
-
7
- ### 使用示例
8
-
9
- ```javascript
10
-
11
- ```
12
-
13
-
14
- ### xxxx 参数
15
-
16
- | 参数名 | 类型 | 默认值 | 可选值 | 说明 |
17
- |-------|-------|-----|-----|-----|
18
- | xxxxx | xxxxx | - | - | - |
@@ -1,18 +0,0 @@
1
- # xxxx xxxx
2
-
3
- ::: tip
4
- xxxxxxxx
5
- :::
6
-
7
- ### 使用示例
8
-
9
- ```javascript
10
-
11
- ```
12
-
13
-
14
- ### xxxx 参数
15
-
16
- | 参数名 | 类型 | 默认值 | 可选值 | 说明 |
17
- |-------|-------|-----|-----|-----|
18
- | xxxxx | xxxxx | - | - | - |
@@ -1,18 +0,0 @@
1
- # xxxx xxxx
2
-
3
- ::: tip
4
- xxxxxxxx
5
- :::
6
-
7
- ### 使用示例
8
-
9
- ```javascript
10
-
11
- ```
12
-
13
-
14
- ### xxxx 参数
15
-
16
- | 参数名 | 类型 | 默认值 | 可选值 | 说明 |
17
- |-------|-------|-----|-----|-----|
18
- | xxxxx | xxxxx | - | - | - |
@@ -1,18 +0,0 @@
1
- # xxxx xxxx
2
-
3
- ::: tip
4
- xxxxxxxx
5
- :::
6
-
7
- ### 使用示例
8
-
9
- ```javascript
10
-
11
- ```
12
-
13
-
14
- ### xxxx 参数
15
-
16
- | 参数名 | 类型 | 默认值 | 可选值 | 说明 |
17
- |-------|-------|-----|-----|-----|
18
- | xxxxx | xxxxx | - | - | - |
@@ -1 +0,0 @@
1
- const e=JSON.parse('{"key":"v-7b1a2a14","path":"/utils/alert.html","title":"xxxx xxxx","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"使用示例","slug":"使用示例","link":"#使用示例","children":[]},{"level":3,"title":"xxxx 参数","slug":"xxxx-参数","link":"#xxxx-参数","children":[]}],"git":{"updatedTime":1675652908000,"contributors":[{"name":"junmiao","email":"mj287@163.com","commits":1}]},"filePathRelative":"utils/alert.md"}');export{e as data};
@@ -1,2 +0,0 @@
1
- import{_ as t,p as e,q as a,a1 as x}from"./framework-204010b2.js";const d={},r=x(`<h1 id="xxxx-xxxx" tabindex="-1"><a class="header-anchor" href="#xxxx-xxxx" aria-hidden="true">#</a> xxxx xxxx</h1><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>xxxxxxxx</p></div><h3 id="使用示例" tabindex="-1"><a class="header-anchor" href="#使用示例" aria-hidden="true">#</a> 使用示例</h3><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>
2
- </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="xxxx-参数" tabindex="-1"><a class="header-anchor" href="#xxxx-参数" aria-hidden="true">#</a> xxxx 参数</h3><table><thead><tr><th>参数名</th><th>类型</th><th>默认值</th><th>可选值</th><th>说明</th></tr></thead><tbody><tr><td>xxxxx</td><td>xxxxx</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>`,6),i=[r];function s(c,h){return e(),a("div",null,i)}const l=t(d,[["render",s],["__file","alert.html.vue"]]);export{l as default};