@netang/quasar 0.0.94 → 0.0.95
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/_docs/docs/.vuepress/configs/sidebar/zh.js +4 -9
- package/_docs/docs/utils/alert.md +16 -8
- package/_docs/docs/utils/area.md +101 -7
- package/_docs/docs/utils/arr.md +69 -7
- package/_docs/docs/utils/bus.md +10 -10
- package/_docs/docs/utils/confirm.md +21 -8
- package/_docs/docs/utils/copy.md +12 -8
- package/_docs/docs/utils/dialog.md +87 -7
- package/_docs/docs/utils/dict.md +39 -7
- package/_docs/docs/utils/dictOptions.md +16 -7
- package/_docs/docs/utils/form.md +17 -85
- package/_docs/docs/utils/getData.md +49 -7
- package/_docs/docs/utils/getFile.md +11 -8
- package/_docs/docs/utils/getImage.md +22 -7
- package/_docs/docs/utils/getTime.md +40 -7
- package/_docs/docs/utils/loading.md +10 -10
- package/_docs/docs/utils/notify.md +19 -8
- package/_docs/docs/utils/power.md +129 -22
- package/_docs/docs/utils/previewImage.md +4 -11
- package/_docs/docs/utils/price.md +34 -7
- package/_docs/docs/utils/rule.md +22 -10
- package/_docs/docs/utils/ruleValid.md +21 -8
- package/_docs/docs/utils/symbols.md +20 -8
- package/_docs/docs/utils/table.md +184 -7
- package/_docs/docs/utils/timestamp.md +16 -7
- package/_docs/docs/utils/toast.md +17 -8
- package/_docs/docs/utils/tree.md +163 -7
- package/_docs/docs/utils/uploader.md +21 -10
- package/components/field-table/index.vue +4 -4
- package/components/table/index.vue +6 -3
- package/docs/404.html +3 -3
- package/docs/assets/alert.html-b2a2a72f.js +5 -0
- package/docs/assets/alert.html-ba46d137.js +1 -0
- package/docs/assets/app-9f30aa4b.js +6 -0
- package/docs/assets/area.html-01b9b58d.js +42 -0
- package/docs/assets/area.html-9a4fce6a.js +1 -0
- package/docs/assets/arr.html-145d27e7.js +1 -0
- package/docs/assets/arr.html-674e65ab.js +11 -0
- package/docs/assets/{auth.html-a12587df.js → auth.html-579fa830.js} +1 -1
- package/docs/assets/bus.html-c71254aa.js +1 -0
- package/docs/assets/bus.html-dc7d3d19.js +6 -0
- package/docs/assets/{column-title.html-3c4ba6cd.js → column-title.html-e9316762.js} +1 -1
- package/docs/assets/confirm.html-ddfdc27f.js +10 -0
- package/docs/assets/confirm.html-ef3e2bef.js +1 -0
- package/docs/assets/copy.html-d20345b6.js +1 -0
- package/docs/assets/copy.html-ef8c8571.js +13 -0
- package/docs/assets/{data.html-0b3d1f41.js → data.html-a3b05d5b.js} +1 -1
- package/docs/assets/dialog.html-62902b83.js +68 -0
- package/docs/assets/dialog.html-baea77c9.js +1 -0
- package/docs/assets/dialog.html-bb082fc4.js +1 -0
- package/docs/assets/dict.html-1311da3d.js +23 -0
- package/docs/assets/dict.html-b96fbf0c.js +1 -0
- package/docs/assets/dictOptions.html-7c4f40a5.js +1 -0
- package/docs/assets/dictOptions.html-fb99d175.js +5 -0
- package/docs/assets/form.html-2b562c37.js +2 -0
- package/docs/assets/form.html-75104cd5.js +1 -0
- package/docs/assets/getData.html-990e3787.js +1 -0
- package/docs/assets/getData.html-bb72025f.js +34 -0
- package/docs/assets/getFile.html-42368004.js +1 -0
- package/docs/assets/getFile.html-99abd054.js +3 -0
- package/docs/assets/getImage.html-3429c5a1.js +1 -0
- package/docs/assets/getImage.html-4d886d83.js +3 -0
- package/docs/assets/getTime.html-7435f922.js +1 -0
- package/docs/assets/getTime.html-b37f49eb.js +20 -0
- package/docs/assets/img.html-7d1da657.js +1 -0
- package/docs/assets/list-menu-item.html-84ed5ab8.js +1 -0
- package/docs/assets/list-menu.html-28b4163f.js +1 -0
- package/docs/assets/loading.html-dae9e39d.js +6 -0
- package/docs/assets/loading.html-dc74c9e6.js +1 -0
- package/docs/assets/notify.html-e6c4c514.js +1 -0
- package/docs/assets/notify.html-f2c4d914.js +8 -0
- package/docs/assets/power-page.html-485e77da.js +1 -0
- package/docs/assets/{power.html-7c84e9af.js → power.html-d258cc19.js} +8 -3
- package/docs/assets/power.html-e490bd32.js +1 -0
- package/docs/assets/previewImage.html-6a6b4245.js +1 -0
- package/docs/assets/previewImage.html-c5b7e945.js +2 -0
- package/docs/assets/price.html-1882c548.js +19 -0
- package/docs/assets/price.html-94d3f5be.js +1 -0
- package/docs/assets/price.html-deaf880f.js +1 -0
- package/docs/assets/rule.html-2cd57fc2.js +13 -0
- package/docs/assets/rule.html-61662001.js +1 -0
- package/docs/assets/ruleValid.html-04fe2552.js +1 -0
- package/docs/assets/ruleValid.html-e0a776af.js +14 -0
- package/docs/assets/symbols.html-a6aea4bf.js +1 -0
- package/docs/assets/symbols.html-b1f65bad.js +21 -0
- package/docs/assets/table-column-fixed.html-e763c38b.js +1 -0
- package/docs/assets/table-pagination.html-c37ee2ac.js +1 -0
- package/docs/assets/table-summary.html-943c65a0.js +1 -0
- package/docs/assets/table.html-7f9c5d1b.js +38 -0
- package/docs/assets/table.html-ac99b9cb.js +1 -0
- package/docs/assets/timestamp.html-4e54f79b.js +13 -0
- package/docs/assets/timestamp.html-d0e1b88a.js +1 -0
- package/docs/assets/toast.html-58ecbe21.js +1 -0
- package/docs/assets/toast.html-c9b9d36b.js +6 -0
- package/docs/assets/tree.html-d07cbe79.js +23 -0
- package/docs/assets/tree.html-ea04193e.js +1 -0
- package/docs/assets/uploader.html-36da4394.js +2 -0
- package/docs/assets/uploader.html-6b5f3079.js +1 -0
- package/docs/components/column-title.html +3 -3
- package/docs/components/data.html +3 -3
- package/docs/components/dialog.html +3 -3
- package/docs/components/dragger.html +2 -2
- package/docs/components/editor-code.html +2 -2
- package/docs/components/empty.html +2 -2
- package/docs/components/field-date.html +2 -2
- package/docs/components/field-table.html +2 -2
- package/docs/components/field-text.html +2 -2
- package/docs/components/field-tree.html +2 -2
- package/docs/components/img.html +3 -3
- package/docs/components/input-number.html +2 -2
- package/docs/components/list-menu-item.html +3 -3
- package/docs/components/list-menu.html +3 -3
- package/docs/components/power-page.html +3 -3
- package/docs/components/price.html +3 -3
- package/docs/components/render.html +2 -2
- package/docs/components/search-item.html +2 -2
- package/docs/components/search.html +2 -2
- package/docs/components/select.html +2 -2
- package/docs/components/splitter.html +2 -2
- package/docs/components/table-column-fixed.html +3 -3
- package/docs/components/table-pagination.html +3 -3
- package/docs/components/table-splitter.html +2 -2
- package/docs/components/table-summary.html +3 -3
- package/docs/components/table.html +2 -2
- package/docs/components/thumbnail.html +2 -2
- package/docs/components/toolbar.html +2 -2
- package/docs/components/uploader-query.html +2 -2
- package/docs/components/uploader.html +2 -2
- package/docs/components/value-format.html +2 -2
- package/docs/index.html +2 -2
- package/docs/utils/alert.html +8 -5
- package/docs/utils/area.html +45 -5
- package/docs/utils/arr.html +14 -5
- package/docs/utils/auth.html +4 -4
- package/docs/utils/bus.html +9 -5
- package/docs/utils/confirm.html +13 -5
- package/docs/utils/copy.html +16 -5
- package/docs/utils/dialog.html +71 -5
- package/docs/utils/dict.html +26 -5
- package/docs/utils/dictOptions.html +8 -5
- package/docs/utils/form.html +4 -10
- package/docs/utils/getData.html +37 -5
- package/docs/utils/getFile.html +6 -5
- package/docs/utils/getImage.html +6 -5
- package/docs/utils/getTime.html +23 -5
- package/docs/utils/index.html +3 -3
- package/docs/utils/loading.html +9 -5
- package/docs/utils/notify.html +11 -5
- package/docs/utils/power.html +10 -5
- package/docs/utils/previewImage.html +5 -5
- package/docs/utils/price.html +22 -5
- package/docs/utils/rule.html +16 -5
- package/docs/utils/ruleValid.html +17 -5
- package/docs/utils/symbols.html +24 -5
- package/docs/utils/table.html +41 -5
- package/docs/utils/timestamp.html +16 -5
- package/docs/utils/toast.html +9 -5
- package/docs/utils/tree.html +26 -5
- package/docs/utils/uploader.html +5 -5
- package/package.json +1 -1
- package/utils/$form.js +2 -2
- package/utils/$power.js +2 -2
- package/utils/$table.js +27 -17
- package/utils/$tree.js +17 -9
- package/utils/alert.js +2 -2
- package/utils/area.js +11 -11
- package/utils/arr.js +4 -4
- package/utils/confirm.js +2 -2
- package/utils/copy.js +5 -2
- package/utils/dialog.js +6 -17
- package/utils/dictOptions.js +7 -3
- package/utils/getData.js +5 -0
- package/utils/getImage.js +9 -9
- package/utils/getTime.js +8 -8
- package/utils/index.js +0 -2
- package/utils/loading.js +1 -1
- package/utils/price.js +2 -2
- package/utils/symbols.js +12 -2
- package/utils/uploader.js +4 -4
- package/utils/{$search.js → useSearch.js} +3 -17
- package/_docs/docs/utils/search.md +0 -18
- package/_docs/docs/utils/useAuth.md +0 -18
- package/_docs/docs/utils/useRouter.md +0 -18
- package/_docs/docs/utils/useUploader.md +0 -18
- package/docs/assets/alert.html-1a9a4ff9.js +0 -1
- package/docs/assets/alert.html-454ee053.js +0 -2
- package/docs/assets/app-0f5fd00b.js +0 -6
- package/docs/assets/area.html-0181540e.js +0 -2
- package/docs/assets/area.html-30f7b9cd.js +0 -1
- package/docs/assets/arr.html-78f33cf7.js +0 -1
- package/docs/assets/arr.html-9bb9d2b1.js +0 -2
- package/docs/assets/bus.html-712d2dac.js +0 -2
- package/docs/assets/bus.html-8b9eed8a.js +0 -1
- package/docs/assets/confirm.html-4ae63e6e.js +0 -2
- package/docs/assets/confirm.html-97332a6b.js +0 -1
- package/docs/assets/copy.html-12d29fd4.js +0 -2
- package/docs/assets/copy.html-586e52cf.js +0 -1
- package/docs/assets/dialog.html-2c87dd53.js +0 -1
- package/docs/assets/dialog.html-b6610c1a.js +0 -2
- package/docs/assets/dialog.html-c7c36de9.js +0 -1
- package/docs/assets/dict.html-1e0c50e6.js +0 -1
- package/docs/assets/dict.html-b74236e0.js +0 -2
- package/docs/assets/dictOptions.html-02ec4809.js +0 -2
- package/docs/assets/dictOptions.html-c4a7a640.js +0 -1
- package/docs/assets/form.html-021b0fce.js +0 -8
- package/docs/assets/form.html-917d13ef.js +0 -1
- package/docs/assets/getData.html-0759b5bf.js +0 -1
- package/docs/assets/getData.html-a6b4be2e.js +0 -2
- package/docs/assets/getFile.html-1787616c.js +0 -2
- package/docs/assets/getFile.html-e86de8d1.js +0 -1
- package/docs/assets/getImage.html-85aaac88.js +0 -2
- package/docs/assets/getImage.html-b103e6bc.js +0 -1
- package/docs/assets/getTime.html-2ceda4c4.js +0 -2
- package/docs/assets/getTime.html-aaa34637.js +0 -1
- package/docs/assets/img.html-aec1ffc0.js +0 -1
- package/docs/assets/list-menu-item.html-d8f93d73.js +0 -1
- package/docs/assets/list-menu.html-9a3e1cfa.js +0 -1
- package/docs/assets/loading.html-b7c885b2.js +0 -1
- package/docs/assets/loading.html-ea638ea8.js +0 -2
- package/docs/assets/notify.html-50397a1d.js +0 -2
- package/docs/assets/notify.html-9ce7125e.js +0 -1
- package/docs/assets/power-page.html-36ca23bf.js +0 -1
- package/docs/assets/power.html-f450caf9.js +0 -1
- package/docs/assets/previewImage.html-0ebeb6e1.js +0 -1
- package/docs/assets/previewImage.html-7638537a.js +0 -2
- package/docs/assets/price.html-0400038c.js +0 -2
- package/docs/assets/price.html-0ea291bf.js +0 -1
- package/docs/assets/price.html-2ff075ef.js +0 -1
- package/docs/assets/rule.html-2cb24705.js +0 -2
- package/docs/assets/rule.html-88f282ae.js +0 -1
- package/docs/assets/ruleValid.html-dc28e81d.js +0 -2
- package/docs/assets/ruleValid.html-e57f1ded.js +0 -1
- package/docs/assets/search.html-b1498950.js +0 -2
- package/docs/assets/search.html-db50a877.js +0 -1
- package/docs/assets/symbols.html-482298ea.js +0 -1
- package/docs/assets/symbols.html-632ee16d.js +0 -2
- package/docs/assets/table-column-fixed.html-089bd772.js +0 -1
- package/docs/assets/table-pagination.html-bde73cd1.js +0 -1
- package/docs/assets/table-summary.html-63657ab8.js +0 -1
- package/docs/assets/table.html-cd4c0eb7.js +0 -2
- package/docs/assets/table.html-fa7d00ca.js +0 -1
- package/docs/assets/timestamp.html-4c9aca4f.js +0 -2
- package/docs/assets/timestamp.html-fed25e54.js +0 -1
- package/docs/assets/toast.html-15acc0a4.js +0 -1
- package/docs/assets/toast.html-d28672f2.js +0 -2
- package/docs/assets/tree.html-07ad391b.js +0 -1
- package/docs/assets/tree.html-d0e4a85a.js +0 -2
- package/docs/assets/uploader.html-c08870e2.js +0 -1
- package/docs/assets/uploader.html-da6b88d1.js +0 -2
- package/docs/assets/useAuth.html-094ec6e0.js +0 -2
- package/docs/assets/useAuth.html-d387bc77.js +0 -1
- package/docs/assets/useRouter.html-647976af.js +0 -1
- package/docs/assets/useRouter.html-b7c1d2b2.js +0 -2
- package/docs/assets/useUploader.html-1403cd91.js +0 -2
- package/docs/assets/useUploader.html-312ce628.js +0 -1
- package/docs/utils/search.html +0 -34
- package/docs/utils/useAuth.html +0 -34
- package/docs/utils/useRouter.html +0 -34
- package/docs/utils/useUploader.html +0 -34
package/utils/dictOptions.js
CHANGED
|
@@ -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,
|
|
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[
|
|
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,
|
|
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, '
|
|
27
|
-
|
|
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(
|
|
43
|
+
if ($n_isValidObject(options)) {
|
|
44
44
|
|
|
45
45
|
// 是否自动缩放
|
|
46
46
|
// --------------------------------------------------
|
|
47
47
|
// 如果有定义 w
|
|
48
|
-
if ($n_has(
|
|
48
|
+
if ($n_has(options, 'w')) {
|
|
49
49
|
|
|
50
50
|
let {
|
|
51
51
|
w,
|
|
52
52
|
maxWidth,
|
|
53
53
|
zoom,
|
|
54
|
-
} =
|
|
54
|
+
} = options
|
|
55
55
|
|
|
56
56
|
// 先设为 0
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
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,
|
|
11
|
+
export default function getTime(time, options, defaultValue = '') {
|
|
12
12
|
|
|
13
13
|
if (! time) {
|
|
14
|
-
return $n_isValidString(
|
|
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
|
-
},
|
|
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
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,
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
},
|
|
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(
|
|
91
|
+
}, $n_get(options, 'props'))
|
|
92
92
|
|
|
93
93
|
// 上传文件列表
|
|
94
|
-
const uploadFileLists = $n_has(
|
|
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 +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};
|