@netang/quasar 0.0.56 → 0.0.58
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/client.js +0 -31
- package/_docs/docs/.vuepress/configs/sidebar/zh.js +21 -0
- package/_docs/docs/components/column-title.md +10 -0
- package/_docs/docs/components/data.md +21 -0
- package/_docs/docs/components/dialog.md +23 -0
- package/_docs/docs/components/dragger.md +26 -0
- package/_docs/docs/components/editor-code.md +16 -0
- package/_docs/docs/components/empty.md +11 -0
- package/_docs/docs/components/field-date.md +16 -0
- package/_docs/docs/components/field-table.md +57 -63
- package/_docs/docs/components/field-text.md +57 -0
- package/_docs/docs/components/field-tree.md +20 -0
- package/_docs/docs/components/input-number.md +21 -0
- package/_docs/docs/components/render.md +12 -0
- package/_docs/docs/components/search-item.md +10 -0
- package/_docs/docs/components/search.md +12 -0
- package/_docs/docs/components/select.md +11 -0
- package/_docs/docs/components/splitter.md +15 -0
- package/_docs/docs/components/table-splitter.md +20 -0
- package/_docs/docs/components/table.md +25 -0
- package/_docs/docs/components/thumbnail.md +11 -0
- package/_docs/docs/components/toolbar.md +9 -0
- package/_docs/docs/components/uploader-query.md +19 -0
- package/_docs/docs/components/uploader.md +16 -0
- package/_docs/docs/components/value-format.md +26 -0
- package/_docs/package.json +11 -17
- package/components/dialog/index.vue +6 -6
- package/components/dragger/index.vue +1 -1
- package/components/editor-code/index.vue +1 -1
- package/components/field-date/index.vue +25 -16
- package/components/field-table/index.vue +6 -6
- package/components/field-tree/index.vue +5 -6
- package/components/input-number/index.vue +6 -6
- package/components/search/index.vue +3 -7
- package/components/table/index.vue +2 -2
- package/components/table-splitter/index.vue +4 -0
- package/components/thumbnail/index.vue +1 -1
- package/components/toolbar/index.vue +1 -3
- package/components/uploader-query/index.vue +1 -1
- package/components/value-format/index.vue +2 -2
- package/package.json +1 -1
- package/sass/common.scss +0 -2
- package/sass/variables.scss +138 -0
- package/utils/{auth.js → $auth.js} +2 -2
- package/utils/{form.js → $form.js} +2 -2
- package/utils/{power.js → $power.js} +5 -4
- package/utils/{rule.js → $rule.js} +1 -1
- package/utils/{ruleValid.js → $ruleValid.js} +1 -1
- package/utils/{search.js → $search.js} +2 -2
- package/utils/{table.js → $table.js} +9 -9
- package/utils/{tree.js → $tree.js} +2 -2
- package/utils/config.js +20 -16
- package/utils/getData.js +3 -8
- package/utils/getFile.js +8 -4
- package/utils/getImage.js +9 -3
- package/utils/index.js +18 -16
- package/utils/uploader/qiniu.js +3 -9
- package/utils/uploader.js +3 -2
- package/utils/useRouter.js +7 -7
- package/_docs/docs/.vuepress/components/test.vue +0 -23
- package/components/dialog-table/index.vue +0 -94
- package/package2.json +0 -30
- package/sass/var.scss +0 -141
|
@@ -35,12 +35,13 @@ import $n_http from '@netang/utils/http'
|
|
|
35
35
|
import { statePower } from '../store'
|
|
36
36
|
import { NRenderKey, NPowerKey, NFormKey, NTableKey } from './symbols'
|
|
37
37
|
|
|
38
|
-
import $n_config from './config'
|
|
39
38
|
import $n_getData from './getData'
|
|
40
39
|
import $n_toast from './toast'
|
|
41
40
|
import $n_confirm from './confirm'
|
|
42
41
|
import $n_bus from './bus'
|
|
43
42
|
|
|
43
|
+
import $n_config from './config'
|
|
44
|
+
|
|
44
45
|
import { configs } from './config'
|
|
45
46
|
|
|
46
47
|
const {
|
|
@@ -540,7 +541,7 @@ async function getData() {
|
|
|
540
541
|
if (! statePower.value.v) {
|
|
541
542
|
|
|
542
543
|
// 获取权限数据
|
|
543
|
-
const res = await $n_getData($n_config('
|
|
544
|
+
const res = await $n_getData($n_config('apiDataPowerName'))
|
|
544
545
|
if (res === false) {
|
|
545
546
|
statePower.value = {
|
|
546
547
|
// 权限版本
|
|
@@ -1150,7 +1151,7 @@ function getPageData($route) {
|
|
|
1150
1151
|
/**
|
|
1151
1152
|
* 权限业务
|
|
1152
1153
|
*/
|
|
1153
|
-
const power = {
|
|
1154
|
+
const $power = {
|
|
1154
1155
|
// 创建
|
|
1155
1156
|
create,
|
|
1156
1157
|
// 设置权限数据
|
|
@@ -1165,4 +1166,4 @@ const power = {
|
|
|
1165
1166
|
request,
|
|
1166
1167
|
}
|
|
1167
1168
|
|
|
1168
|
-
export default power
|
|
1169
|
+
export default $power
|
|
@@ -498,7 +498,7 @@ function formatValue(rawSearchOptions, searchValue) {
|
|
|
498
498
|
/**
|
|
499
499
|
* 搜素业务
|
|
500
500
|
*/
|
|
501
|
-
const search = {
|
|
501
|
+
const $search = {
|
|
502
502
|
// 获取原始值
|
|
503
503
|
getRawData,
|
|
504
504
|
// 获取参数
|
|
@@ -507,4 +507,4 @@ const search = {
|
|
|
507
507
|
formatValue,
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
export default search
|
|
510
|
+
export default $search
|
|
@@ -28,8 +28,8 @@ import $n_toDate from '@netang/utils/toDate'
|
|
|
28
28
|
import $n_slash from '@netang/utils/slash'
|
|
29
29
|
import $n_http from '@netang/utils/http'
|
|
30
30
|
|
|
31
|
-
import $
|
|
32
|
-
import $
|
|
31
|
+
import $n_$search, { setItemValue } from './$search'
|
|
32
|
+
import $n_$power from './$power'
|
|
33
33
|
import $n_dict from './dict'
|
|
34
34
|
import $n_price from './price'
|
|
35
35
|
|
|
@@ -284,7 +284,7 @@ function create(params) {
|
|
|
284
284
|
// 首次表格搜索值(如果表格搜索参数中带了初始值, 则设置初始值)
|
|
285
285
|
firstTableSearchValue,
|
|
286
286
|
// 表格搜索值(如果表格搜索参数中带了初始值, 则设置初始值)
|
|
287
|
-
} = $
|
|
287
|
+
} = $n_$search.getRawData(tableColumns, Object.assign({}, $route.query), o.searchFromQuery)
|
|
288
288
|
|
|
289
289
|
// 表格搜索数据值
|
|
290
290
|
const tableSearchValue = ref($route.fullPath ? firstTableSearchValue : [])
|
|
@@ -305,7 +305,7 @@ function create(params) {
|
|
|
305
305
|
const lists = []
|
|
306
306
|
|
|
307
307
|
// 先格式化权限按钮列表
|
|
308
|
-
$n_forEach($
|
|
308
|
+
$n_forEach($n_$power.formatBtns($power.powerBtns.value), function(item) {
|
|
309
309
|
|
|
310
310
|
// 如果是固定按钮
|
|
311
311
|
if (item.fixed) {
|
|
@@ -671,7 +671,7 @@ function create(params) {
|
|
|
671
671
|
})
|
|
672
672
|
|
|
673
673
|
// 获取搜索值
|
|
674
|
-
const search = $
|
|
674
|
+
const search = $n_$search.formatValue(rawSearchOptions, tableSearchValue.value)
|
|
675
675
|
if ($n_isValidArray(search)) {
|
|
676
676
|
data.n_search = $n_has(data, 'n_search') ? $n_concat(data.n_search, search) : search
|
|
677
677
|
}
|
|
@@ -871,14 +871,14 @@ function create(params) {
|
|
|
871
871
|
* 设置表格搜索参数
|
|
872
872
|
*/
|
|
873
873
|
async function setTableSearchOptions(format) {
|
|
874
|
-
tableSearchOptions.value = await $
|
|
874
|
+
tableSearchOptions.value = await $n_$search.getOptions(rawSearchOptions, format)
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
/**
|
|
878
878
|
* 是否有表格搜索值
|
|
879
879
|
*/
|
|
880
880
|
function hasTableSearchValue() {
|
|
881
|
-
return !! $
|
|
881
|
+
return !! $n_$search.formatValue(rawSearchOptions, tableSearchValue.value).length
|
|
882
882
|
}
|
|
883
883
|
|
|
884
884
|
// 如果开启搜索
|
|
@@ -987,11 +987,11 @@ function config(routePath, path, defaultValue) {
|
|
|
987
987
|
/**
|
|
988
988
|
* 业务表格
|
|
989
989
|
*/
|
|
990
|
-
const table = {
|
|
990
|
+
const $table = {
|
|
991
991
|
// 创建表格
|
|
992
992
|
create,
|
|
993
993
|
// 获取表格配置
|
|
994
994
|
config,
|
|
995
995
|
}
|
|
996
996
|
|
|
997
|
-
export default table
|
|
997
|
+
export default $table
|
package/utils/config.js
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import $n_get from 'lodash/get'
|
|
2
2
|
import $n_merge from 'lodash/merge'
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
// 用户配置 参数
|
|
6
|
+
// userConfig: {
|
|
7
|
+
// // api 请求公共数据地址
|
|
8
|
+
// apiDataUrl: '',
|
|
9
|
+
// // api 文件请求地址
|
|
10
|
+
// apiFileUrl: '',
|
|
11
|
+
// // api 请求权限标识
|
|
12
|
+
// apiDataPowerName: '',
|
|
13
|
+
// // 是否开启人民币分转元
|
|
14
|
+
// priceCentToYuan: false,
|
|
15
|
+
// // 上传器
|
|
16
|
+
// uploader: {
|
|
17
|
+
// upload: {
|
|
18
|
+
// type: '',
|
|
19
|
+
// domain: '',
|
|
20
|
+
// },
|
|
21
|
+
// },
|
|
22
|
+
// },
|
|
23
|
+
|
|
4
24
|
// 配置
|
|
5
25
|
export const configs = {
|
|
6
|
-
// api 请求公共数据地址
|
|
7
|
-
apiDataUrl: '',
|
|
8
|
-
// api 文件请求地址
|
|
9
|
-
apiFileUrl: '',
|
|
10
26
|
// 用户配置
|
|
11
27
|
userConfig: {},
|
|
12
28
|
// 用户字典
|
|
@@ -19,18 +35,6 @@ export const configs = {
|
|
|
19
35
|
tablesConfig: {},
|
|
20
36
|
// 对话框组件
|
|
21
37
|
dialogComponents: {},
|
|
22
|
-
// 是否开启人民币分转元
|
|
23
|
-
priceCentToYuan: false,
|
|
24
|
-
// 上传器
|
|
25
|
-
uploader: {
|
|
26
|
-
upload: {},
|
|
27
|
-
limit: {
|
|
28
|
-
image: {
|
|
29
|
-
maxSize: 10,
|
|
30
|
-
exts: [ 'jpg', 'png', 'gif' ]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
/**
|
package/utils/getData.js
CHANGED
|
@@ -5,12 +5,7 @@ import $n_map from 'lodash/map'
|
|
|
5
5
|
|
|
6
6
|
import $n_http from '@netang/utils/http'
|
|
7
7
|
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
// 请求公共数据地址
|
|
12
|
-
apiDataUrl,
|
|
13
|
-
} = configs
|
|
8
|
+
import $n_config from './config'
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* 获取公共数据
|
|
@@ -25,7 +20,7 @@ export default async function getData(url, pageStatus, emptyDescription, refValu
|
|
|
25
20
|
|
|
26
21
|
const result = await $n_http($n_map(url, function (item) {
|
|
27
22
|
return {
|
|
28
|
-
url: apiDataUrl + item,
|
|
23
|
+
url: $n_config('apiDataUrl') + item,
|
|
29
24
|
warn,
|
|
30
25
|
}
|
|
31
26
|
}))
|
|
@@ -51,7 +46,7 @@ export default async function getData(url, pageStatus, emptyDescription, refValu
|
|
|
51
46
|
// 单个请求
|
|
52
47
|
// --------------------------------------------------
|
|
53
48
|
const { status, data } = await $n_http({
|
|
54
|
-
url: apiDataUrl + url,
|
|
49
|
+
url: $n_config('apiDataUrl') + url,
|
|
55
50
|
warn,
|
|
56
51
|
})
|
|
57
52
|
if (! status) {
|
package/utils/getFile.js
CHANGED
|
@@ -2,7 +2,7 @@ import $n_isValidArray from '@netang/utils/isValidArray'
|
|
|
2
2
|
import $n_isValidString from '@netang/utils/isValidString'
|
|
3
3
|
import $n_slash from '@netang/utils/slash'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import $n_config from './config'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* 获取文件
|
|
@@ -23,11 +23,15 @@ export default function getFile(src) {
|
|
|
23
23
|
return src
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const {
|
|
27
|
+
type,
|
|
28
|
+
domain,
|
|
29
|
+
} = $n_config('uploader.upload')
|
|
30
|
+
|
|
31
|
+
switch (type) {
|
|
28
32
|
// 七牛云
|
|
29
33
|
case 'qiniu':
|
|
30
|
-
return $n_slash(
|
|
34
|
+
return $n_slash(domain, 'end', true) + src
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
}
|
package/utils/getImage.js
CHANGED
|
@@ -86,8 +86,14 @@ export default function getImage(src, params) {
|
|
|
86
86
|
// --------------------------------------------------
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
|
|
90
|
+
const {
|
|
91
|
+
type,
|
|
92
|
+
domain,
|
|
93
|
+
} = $n_config('uploader.upload')
|
|
94
|
+
|
|
95
|
+
switch (type) {
|
|
96
|
+
|
|
91
97
|
// 七牛云
|
|
92
98
|
case 'qiniu':
|
|
93
99
|
|
|
@@ -138,7 +144,7 @@ export default function getImage(src, params) {
|
|
|
138
144
|
src += '/format/' + format
|
|
139
145
|
}
|
|
140
146
|
|
|
141
|
-
return $n_slash(
|
|
147
|
+
return $n_slash(domain, 'end', true) + src
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
}
|
package/utils/index.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import $auth from './$auth'
|
|
2
|
+
import $form from './$form'
|
|
3
|
+
import $power from './$power'
|
|
4
|
+
import $rule from './$rule'
|
|
5
|
+
import $ruleValid from './$ruleValid'
|
|
6
|
+
import $search from './$search'
|
|
7
|
+
import $table from './$table'
|
|
8
|
+
import $tree from './$tree'
|
|
9
|
+
|
|
1
10
|
import alert from './alert'
|
|
2
11
|
import area from './area'
|
|
3
12
|
import arr from './arr'
|
|
4
|
-
import auth from './auth'
|
|
5
13
|
import bus from './bus'
|
|
6
14
|
import config from './config'
|
|
7
15
|
import confirm from './confirm'
|
|
@@ -9,30 +17,31 @@ import copy from './copy'
|
|
|
9
17
|
import dialog from './dialog'
|
|
10
18
|
import dict from './dict'
|
|
11
19
|
import dictOptions from './dictOptions'
|
|
12
|
-
import form from './form'
|
|
13
20
|
import getData from './getData'
|
|
14
21
|
import getFile from './getFile'
|
|
15
22
|
import getImage from './getImage'
|
|
16
23
|
import getTime from './getTime'
|
|
17
24
|
import loading from './loading'
|
|
18
25
|
import notify from './notify'
|
|
19
|
-
import power from './power'
|
|
20
26
|
import previewImage from './previewImage'
|
|
21
27
|
import price from './price'
|
|
22
|
-
import rule from './rule'
|
|
23
|
-
import ruleValid from './ruleValid'
|
|
24
|
-
import search from './search'
|
|
25
|
-
import table from './table'
|
|
26
28
|
import timestamp from './timestamp'
|
|
27
29
|
import toast from './toast'
|
|
28
|
-
import tree from './tree'
|
|
29
30
|
import uploader from './uploader'
|
|
30
31
|
|
|
31
32
|
export default {
|
|
33
|
+
$auth,
|
|
34
|
+
$form,
|
|
35
|
+
$power,
|
|
36
|
+
$rule,
|
|
37
|
+
$ruleValid,
|
|
38
|
+
$search,
|
|
39
|
+
$table,
|
|
40
|
+
$tree,
|
|
41
|
+
|
|
32
42
|
alert,
|
|
33
43
|
area,
|
|
34
44
|
arr,
|
|
35
|
-
auth,
|
|
36
45
|
bus,
|
|
37
46
|
config,
|
|
38
47
|
confirm,
|
|
@@ -40,22 +49,15 @@ export default {
|
|
|
40
49
|
dialog,
|
|
41
50
|
dict,
|
|
42
51
|
dictOptions,
|
|
43
|
-
form,
|
|
44
52
|
getData,
|
|
45
53
|
getFile,
|
|
46
54
|
getImage,
|
|
47
55
|
getTime,
|
|
48
56
|
loading,
|
|
49
57
|
notify,
|
|
50
|
-
power,
|
|
51
58
|
previewImage,
|
|
52
59
|
price,
|
|
53
|
-
rule,
|
|
54
|
-
ruleValid,
|
|
55
|
-
search,
|
|
56
|
-
table,
|
|
57
60
|
timestamp,
|
|
58
61
|
toast,
|
|
59
|
-
tree,
|
|
60
62
|
uploader,
|
|
61
63
|
}
|
package/utils/uploader/qiniu.js
CHANGED
|
@@ -8,13 +8,7 @@ import $n_isValidString from '@netang/utils/isValidString'
|
|
|
8
8
|
import $n_http from '@netang/utils/http'
|
|
9
9
|
|
|
10
10
|
import $n_toast from '../toast'
|
|
11
|
-
|
|
12
|
-
import { configs } from '../config'
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
// api 文件请求地址
|
|
16
|
-
apiFileUrl,
|
|
17
|
-
} = configs
|
|
11
|
+
import $n_config from '../config'
|
|
18
12
|
|
|
19
13
|
import {
|
|
20
14
|
UPLOAD_STATUS,
|
|
@@ -27,7 +21,7 @@ async function getQiniuToken(bucket = 'public') {
|
|
|
27
21
|
|
|
28
22
|
// 请求数据
|
|
29
23
|
const { status, data } = await $n_http({
|
|
30
|
-
url: apiFileUrl + 'get_qiniu_token',
|
|
24
|
+
url: $n_config('apiFileUrl') + 'get_qiniu_token',
|
|
31
25
|
data: {
|
|
32
26
|
bucket,
|
|
33
27
|
},
|
|
@@ -133,7 +127,7 @@ export default async function ({ waitUploadFileLists, uploadFileLists, checkFile
|
|
|
133
127
|
|
|
134
128
|
// 请求 - 上传文件至 cdn
|
|
135
129
|
const { status: statusCallback, data: resCallback } = await $n_http({
|
|
136
|
-
url: apiFileUrl + 'upload_cdn_callback',
|
|
130
|
+
url: $n_config('apiFileUrl') + 'upload_cdn_callback',
|
|
137
131
|
data: query,
|
|
138
132
|
// 关闭错误提示
|
|
139
133
|
warn: false,
|
package/utils/uploader.js
CHANGED
|
@@ -20,11 +20,12 @@ import $n_isValidValue from '@netang/utils/isValidValue'
|
|
|
20
20
|
import $n_copy from '@netang/utils/copy'
|
|
21
21
|
import $n_http from '@netang/utils/http'
|
|
22
22
|
|
|
23
|
-
import $n_config from './config'
|
|
24
23
|
import $n_toast from './toast'
|
|
25
24
|
import $n_confirm from './confirm'
|
|
26
25
|
import $n_alert from './alert'
|
|
27
26
|
|
|
27
|
+
import $n_config from './config'
|
|
28
|
+
|
|
28
29
|
import { configs } from './config'
|
|
29
30
|
|
|
30
31
|
const {
|
|
@@ -106,7 +107,7 @@ function create(params) {
|
|
|
106
107
|
const configLimit = Object.assign({
|
|
107
108
|
maxSize: 100,
|
|
108
109
|
exts: [],
|
|
109
|
-
},
|
|
110
|
+
}, $n_config('uploader.limit.' + props.type))
|
|
110
111
|
|
|
111
112
|
// 如果有单个文件的最大大小
|
|
112
113
|
if (props.maxSize) {
|
package/utils/useRouter.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import $n_isNil from 'lodash/isNil'
|
|
1
2
|
import $n_has from 'lodash/has'
|
|
2
3
|
import $n_get from 'lodash/get'
|
|
3
4
|
|
|
@@ -6,20 +7,19 @@ import $n_slash from '@netang/utils/slash'
|
|
|
6
7
|
|
|
7
8
|
import { configs } from './config'
|
|
8
9
|
|
|
9
|
-
const {
|
|
10
|
-
// 自定义路由
|
|
11
|
-
routers,
|
|
12
|
-
} = configs
|
|
13
|
-
|
|
14
10
|
/**
|
|
15
11
|
* 获取路由
|
|
16
12
|
*/
|
|
17
|
-
export function getRouters(mainRouter, errorRouter) {
|
|
13
|
+
export function getRouters(mainRouter, errorRouter, routers = null) {
|
|
18
14
|
|
|
19
15
|
const routes = [
|
|
20
|
-
mainRouter
|
|
16
|
+
mainRouter,
|
|
21
17
|
]
|
|
22
18
|
|
|
19
|
+
if ($n_isNil(routers)) {
|
|
20
|
+
routers = $n_get(configs, 'routers')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
23
|
$n_forIn(routers, function(item, key) {
|
|
24
24
|
|
|
25
25
|
// 如果没有 meta
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-badge color="blue">
|
|
3
|
-
#4D96F2
|
|
4
|
-
</q-badge>
|
|
5
|
-
<q-btn
|
|
6
|
-
label="test"
|
|
7
|
-
@click="onTest"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import uniq from 'lodash/uniq'
|
|
13
|
-
import test from 'utils/test'
|
|
14
|
-
export default {
|
|
15
|
-
setup() {
|
|
16
|
-
return {
|
|
17
|
-
onTest() {
|
|
18
|
-
console.log(3333, test)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot
|
|
3
|
-
:click="onDialog"
|
|
4
|
-
/>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import $n_dialog from '../../utils/dialog'
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 标识
|
|
14
|
-
*/
|
|
15
|
-
name: 'NDialogTable',
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 声明属性
|
|
19
|
-
*/
|
|
20
|
-
props: {
|
|
21
|
-
// 值
|
|
22
|
-
modelValue: [String, Number, Array, Object],
|
|
23
|
-
// 标题
|
|
24
|
-
title: String,
|
|
25
|
-
// 路由组件路径
|
|
26
|
-
route: String,
|
|
27
|
-
// 宽
|
|
28
|
-
width: {
|
|
29
|
-
type: [Number, String],
|
|
30
|
-
default: '80%',
|
|
31
|
-
},
|
|
32
|
-
// 组件传参
|
|
33
|
-
props: Object,
|
|
34
|
-
// 是否多选
|
|
35
|
-
multiple: Boolean,
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* 声明事件
|
|
40
|
-
*/
|
|
41
|
-
emits: [
|
|
42
|
-
'update:modelValue',
|
|
43
|
-
],
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 组合式
|
|
47
|
-
*/
|
|
48
|
-
setup(props) {
|
|
49
|
-
|
|
50
|
-
// ==========【方法】=============================================================================================
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* 弹出对话框
|
|
54
|
-
*/
|
|
55
|
-
function onDialog() {
|
|
56
|
-
|
|
57
|
-
// 创建对话框
|
|
58
|
-
$n_dialog.create({
|
|
59
|
-
// 标题
|
|
60
|
-
title: props.title,
|
|
61
|
-
// 宽
|
|
62
|
-
width: props.width,
|
|
63
|
-
// width: 1000,
|
|
64
|
-
// 路由组件路径
|
|
65
|
-
route: props.route,
|
|
66
|
-
// 组件传参
|
|
67
|
-
props: Object.assign({
|
|
68
|
-
multiple: props.multiple,
|
|
69
|
-
}, props.props),
|
|
70
|
-
// 对话框传参
|
|
71
|
-
dialogProps: {
|
|
72
|
-
// 不能通过按 ESC 键关闭对话框
|
|
73
|
-
noEscDismiss: true,
|
|
74
|
-
// 不能通过在对话框外单击来关闭对话框
|
|
75
|
-
noBackdropDismiss: true,
|
|
76
|
-
},
|
|
77
|
-
// 显示取消按钮
|
|
78
|
-
cancel: true,
|
|
79
|
-
// 点击确认执行
|
|
80
|
-
async onConfirm(data) {
|
|
81
|
-
console.log('----data---', data)
|
|
82
|
-
},
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ==========【返回】=============================================================================================
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
// 弹出对话框
|
|
90
|
-
onDialog,
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</script>
|
package/package2.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@netang/quasar",
|
|
3
|
-
"version": "0.0.54",
|
|
4
|
-
"description": "netang-quasar",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
-
},
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/netangsoft/netang-quasar.git"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"netang-quasar"
|
|
14
|
-
],
|
|
15
|
-
"author": "Netang",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/netangsoft/netang-quasar/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://github.com/netangsoft/netang-quasar#readme",
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@netang/node-utils": "^0.2.61",
|
|
23
|
-
"@netang/utils": "^0.4.2",
|
|
24
|
-
"@netang/vue-utils": "^3.0.23",
|
|
25
|
-
"lodash": "^4.17.21",
|
|
26
|
-
"quasar": "^2.11.5",
|
|
27
|
-
"vue": "^3.2.47",
|
|
28
|
-
"vue-router": "^4.1.6"
|
|
29
|
-
}
|
|
30
|
-
}
|