widget.qw 1.0.80 → 1.0.82
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/.env.development +9 -9
- package/.env.production +8 -8
- package/README.md +75 -75
- package/build/style.css +471 -471
- package/build/widget.qw.es.js +56 -56
- package/build/widget.qw.umd.js +56 -56
- package/index.html +17 -17
- package/package.json +47 -47
- package/src/App.vue +26 -26
- package/src/api/index.js +165 -165
- package/src/components/AuditBar.vue +396 -396
- package/src/components/BillCard.vue +164 -164
- package/src/components/CascaderPicker.vue +132 -132
- package/src/components/CascaderPop.vue +371 -371
- package/src/components/CheckGroup.vue +113 -113
- package/src/components/DatetimePicker/DatetimePop.vue +342 -342
- package/src/components/DatetimePicker/index.vue +124 -124
- package/src/components/DayDropdown.vue +56 -56
- package/src/components/FilePicker.vue +169 -169
- package/src/components/Input.vue +80 -80
- package/src/components/MonthDropdown.vue +51 -51
- package/src/components/MultiPicker.vue +123 -123
- package/src/components/ObjsEditor.vue +334 -334
- package/src/components/SecretNotify.js +5 -5
- package/src/components/Sheet.vue +92 -92
- package/src/components/SingleApiPicker.vue +108 -108
- package/src/components/SinglePicker.vue +102 -102
- package/src/components/SingleUserSelector.vue +425 -425
- package/src/components/Switch.vue +64 -64
- package/src/components/TreePicker.vue +113 -113
- package/src/components/UserPicker.vue +106 -106
- package/src/components/UserProfile.vue +129 -129
- package/src/components/UsersPicker.vue +118 -118
- package/src/components/YearDropdown.vue +59 -59
- package/src/components/data_selector.vue +303 -303
- package/src/components/image_picker.vue +123 -123
- package/src/components/images_picker.vue +195 -195
- package/src/components/index.js +162 -162
- package/src/components/mult_list_selector.vue +155 -155
- package/src/components/subdepartment_selector.vue +481 -481
- package/src/components/user_selector.vue +639 -639
- package/src/components/widget/DataPop.vue +95 -95
- package/src/components/widget/TreePop.vue +88 -88
- package/src/components/widget/UserPop.vue +347 -347
- package/src/env.d.ts +8 -8
- package/src/main.js +117 -117
- package/src/router/index.ts +173 -173
- package/src/util/array_util.js +32 -32
- package/src/util/auth_util.js +72 -72
- package/src/util/bool_util.js +5 -5
- package/src/util/bus.js +1 -1
- package/src/util/cache_util.js +18 -18
- package/src/util/errer_code.js +6 -6
- package/src/util/eval_util.js +19 -19
- package/src/util/icon_util.js +36 -36
- package/src/util/image_util.js +27 -27
- package/src/util/index.js +57 -57
- package/src/util/num_util.js +70 -70
- package/src/util/obj_util.js +28 -28
- package/src/util/request.js +73 -73
- package/src/util/request_json.js +71 -71
- package/src/util/request_json_mute.js +65 -65
- package/src/util/request_upload.js +79 -79
- package/src/util/route_util.js +31 -31
- package/src/util/str_util.js +143 -143
- package/src/util/time_util.js +406 -406
- package/src/util/toast_util.js +24 -24
- package/src/util/tree_util.js +153 -153
- package/src/util/uuid_util.js +9 -9
- package/src/util/validate.js +182 -182
- package/src/util/vue_filter.js +223 -223
- package/src/views/auditbar/index.vue +78 -78
- package/src/views/billcard/index.vue +48 -48
- package/src/views/cascaderpop/index.vue +90 -90
- package/src/views/checkgroup/index.vue +35 -35
- package/src/views/dataSelector/index.vue +48 -48
- package/src/views/datetimepicker/index.vue +34 -34
- package/src/views/daydropdown/index.vue +31 -31
- package/src/views/filepicker/index.vue +32 -32
- package/src/views/imagepicker/index.vue +31 -31
- package/src/views/imagespicker/index.vue +37 -31
- package/src/views/input/index.vue +35 -35
- package/src/views/monthdropdown/index.vue +31 -31
- package/src/views/multListSelector/index.vue +61 -61
- package/src/views/multipicker/index.vue +36 -36
- package/src/views/objseditor/index.vue +277 -277
- package/src/views/productSelector/index.vue +35 -35
- package/src/views/projectpicker/index.vue +41 -41
- package/src/views/secretnotify/index.vue +27 -27
- package/src/views/sheet/index.vue +45 -45
- package/src/views/singlepicker/index.vue +35 -35
- package/src/views/subdepartmentSelector/index.vue +40 -40
- package/src/views/switch/index.vue +34 -34
- package/src/views/treepicker/index.vue +41 -41
- package/src/views/userSelector/index.vue +54 -54
- package/src/views/userSelectorNew/index.vue +45 -45
- package/src/views/userpicker/index.vue +43 -43
- package/src/views/userprofile/index.vue +30 -30
- package/src/views/userspicker/index.vue +43 -43
- package/src/views/yeardropdown/index.vue +32 -32
- package/src/vm/index.js +1 -1
- package/tsconfig.json +19 -19
- package/tsconfig.node.json +8 -8
- package/vite.config.ts +122 -122
package/src/env.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import type { DefineComponent } from 'vue'
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
-
const component: DefineComponent<{}, {}, any>
|
|
7
|
-
export default component
|
|
8
|
-
}
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
+
const component: DefineComponent<{}, {}, any>
|
|
7
|
+
export default component
|
|
8
|
+
}
|
package/src/main.js
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
import router from "./router";
|
|
4
|
-
import util from "./util";
|
|
5
|
-
import {
|
|
6
|
-
Icon,
|
|
7
|
-
Image,
|
|
8
|
-
Button,
|
|
9
|
-
Toast,
|
|
10
|
-
Calendar,
|
|
11
|
-
Popup,
|
|
12
|
-
Cell,
|
|
13
|
-
CellGroup,
|
|
14
|
-
NavBar,
|
|
15
|
-
Field,
|
|
16
|
-
List,
|
|
17
|
-
PullRefresh,
|
|
18
|
-
Divider,
|
|
19
|
-
Loading,
|
|
20
|
-
Picker,
|
|
21
|
-
DropdownMenu,
|
|
22
|
-
DropdownItem,
|
|
23
|
-
Stepper,
|
|
24
|
-
Grid,
|
|
25
|
-
GridItem,
|
|
26
|
-
Form,
|
|
27
|
-
CheckboxGroup,
|
|
28
|
-
Checkbox,
|
|
29
|
-
RadioGroup,
|
|
30
|
-
Radio,
|
|
31
|
-
Uploader,
|
|
32
|
-
Notify,
|
|
33
|
-
Popover,
|
|
34
|
-
Tabbar,
|
|
35
|
-
TabbarItem,
|
|
36
|
-
Search,
|
|
37
|
-
Col,
|
|
38
|
-
Row,
|
|
39
|
-
Tab,
|
|
40
|
-
Tabs,
|
|
41
|
-
DatePicker,
|
|
42
|
-
TimePicker,
|
|
43
|
-
PickerGroup,
|
|
44
|
-
Step,
|
|
45
|
-
Steps,
|
|
46
|
-
Tag,
|
|
47
|
-
Switch,
|
|
48
|
-
TreeSelect
|
|
49
|
-
} from "vant";
|
|
50
|
-
import "vant/lib/index.css";
|
|
51
|
-
//本地测试 初始化组件
|
|
52
|
-
import { WidgetQw, setup } from "@/components";
|
|
53
|
-
setup({
|
|
54
|
-
urlCallback: () => {
|
|
55
|
-
return import.meta.env.VITE_DOMAIN;
|
|
56
|
-
},
|
|
57
|
-
tokenCallback: () => {
|
|
58
|
-
return util.getToken()
|
|
59
|
-
},
|
|
60
|
-
needLoginCallback: () => {
|
|
61
|
-
router.push({ path: "/login" });
|
|
62
|
-
},
|
|
63
|
-
gstepBaseUrlCallback: () => {
|
|
64
|
-
return `${import.meta.env.VITE_DOMAIN}/gstep-api`
|
|
65
|
-
},
|
|
66
|
-
fileUploadUrlCallback: ()=>{
|
|
67
|
-
return `${import.meta.env.VITE_DOMAIN}/ac-api/file/upload`
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
createApp(App)
|
|
72
|
-
.use(router)
|
|
73
|
-
.use(Popover)
|
|
74
|
-
.use(Icon)
|
|
75
|
-
.use(Image)
|
|
76
|
-
.use(Button)
|
|
77
|
-
.use(Toast)
|
|
78
|
-
.use(Calendar)
|
|
79
|
-
.use(Popup)
|
|
80
|
-
.use(CellGroup)
|
|
81
|
-
.use(Cell)
|
|
82
|
-
.use(NavBar)
|
|
83
|
-
.use(Field)
|
|
84
|
-
.use(List)
|
|
85
|
-
.use(PullRefresh)
|
|
86
|
-
.use(Divider)
|
|
87
|
-
.use(Loading)
|
|
88
|
-
.use(Picker)
|
|
89
|
-
.use(DropdownMenu)
|
|
90
|
-
.use(DropdownItem)
|
|
91
|
-
.use(Stepper)
|
|
92
|
-
.use(Grid)
|
|
93
|
-
.use(GridItem)
|
|
94
|
-
.use(Form)
|
|
95
|
-
.use(CheckboxGroup)
|
|
96
|
-
.use(Checkbox)
|
|
97
|
-
.use(RadioGroup)
|
|
98
|
-
.use(Radio)
|
|
99
|
-
.use(Uploader)
|
|
100
|
-
.use(Notify)
|
|
101
|
-
.use(Tabbar)
|
|
102
|
-
.use(Col)
|
|
103
|
-
.use(Row)
|
|
104
|
-
.use(TabbarItem)
|
|
105
|
-
.use(Search)
|
|
106
|
-
.use(Tab)
|
|
107
|
-
.use(Tabs)
|
|
108
|
-
.use(DatePicker)
|
|
109
|
-
.use(TimePicker)
|
|
110
|
-
.use(PickerGroup)
|
|
111
|
-
.use(Step)
|
|
112
|
-
.use(Steps)
|
|
113
|
-
.use(Tag)
|
|
114
|
-
.use(Switch)
|
|
115
|
-
.use(TreeSelect)
|
|
116
|
-
.use(WidgetQw)
|
|
117
|
-
.mount("#app");
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
import router from "./router";
|
|
4
|
+
import util from "./util";
|
|
5
|
+
import {
|
|
6
|
+
Icon,
|
|
7
|
+
Image,
|
|
8
|
+
Button,
|
|
9
|
+
Toast,
|
|
10
|
+
Calendar,
|
|
11
|
+
Popup,
|
|
12
|
+
Cell,
|
|
13
|
+
CellGroup,
|
|
14
|
+
NavBar,
|
|
15
|
+
Field,
|
|
16
|
+
List,
|
|
17
|
+
PullRefresh,
|
|
18
|
+
Divider,
|
|
19
|
+
Loading,
|
|
20
|
+
Picker,
|
|
21
|
+
DropdownMenu,
|
|
22
|
+
DropdownItem,
|
|
23
|
+
Stepper,
|
|
24
|
+
Grid,
|
|
25
|
+
GridItem,
|
|
26
|
+
Form,
|
|
27
|
+
CheckboxGroup,
|
|
28
|
+
Checkbox,
|
|
29
|
+
RadioGroup,
|
|
30
|
+
Radio,
|
|
31
|
+
Uploader,
|
|
32
|
+
Notify,
|
|
33
|
+
Popover,
|
|
34
|
+
Tabbar,
|
|
35
|
+
TabbarItem,
|
|
36
|
+
Search,
|
|
37
|
+
Col,
|
|
38
|
+
Row,
|
|
39
|
+
Tab,
|
|
40
|
+
Tabs,
|
|
41
|
+
DatePicker,
|
|
42
|
+
TimePicker,
|
|
43
|
+
PickerGroup,
|
|
44
|
+
Step,
|
|
45
|
+
Steps,
|
|
46
|
+
Tag,
|
|
47
|
+
Switch,
|
|
48
|
+
TreeSelect
|
|
49
|
+
} from "vant";
|
|
50
|
+
import "vant/lib/index.css";
|
|
51
|
+
//本地测试 初始化组件
|
|
52
|
+
import { WidgetQw, setup } from "@/components";
|
|
53
|
+
setup({
|
|
54
|
+
urlCallback: () => {
|
|
55
|
+
return import.meta.env.VITE_DOMAIN;
|
|
56
|
+
},
|
|
57
|
+
tokenCallback: () => {
|
|
58
|
+
return util.getToken()
|
|
59
|
+
},
|
|
60
|
+
needLoginCallback: () => {
|
|
61
|
+
router.push({ path: "/login" });
|
|
62
|
+
},
|
|
63
|
+
gstepBaseUrlCallback: () => {
|
|
64
|
+
return `${import.meta.env.VITE_DOMAIN}/gstep-api`
|
|
65
|
+
},
|
|
66
|
+
fileUploadUrlCallback: ()=>{
|
|
67
|
+
return `${import.meta.env.VITE_DOMAIN}/ac-api/file/upload`
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
createApp(App)
|
|
72
|
+
.use(router)
|
|
73
|
+
.use(Popover)
|
|
74
|
+
.use(Icon)
|
|
75
|
+
.use(Image)
|
|
76
|
+
.use(Button)
|
|
77
|
+
.use(Toast)
|
|
78
|
+
.use(Calendar)
|
|
79
|
+
.use(Popup)
|
|
80
|
+
.use(CellGroup)
|
|
81
|
+
.use(Cell)
|
|
82
|
+
.use(NavBar)
|
|
83
|
+
.use(Field)
|
|
84
|
+
.use(List)
|
|
85
|
+
.use(PullRefresh)
|
|
86
|
+
.use(Divider)
|
|
87
|
+
.use(Loading)
|
|
88
|
+
.use(Picker)
|
|
89
|
+
.use(DropdownMenu)
|
|
90
|
+
.use(DropdownItem)
|
|
91
|
+
.use(Stepper)
|
|
92
|
+
.use(Grid)
|
|
93
|
+
.use(GridItem)
|
|
94
|
+
.use(Form)
|
|
95
|
+
.use(CheckboxGroup)
|
|
96
|
+
.use(Checkbox)
|
|
97
|
+
.use(RadioGroup)
|
|
98
|
+
.use(Radio)
|
|
99
|
+
.use(Uploader)
|
|
100
|
+
.use(Notify)
|
|
101
|
+
.use(Tabbar)
|
|
102
|
+
.use(Col)
|
|
103
|
+
.use(Row)
|
|
104
|
+
.use(TabbarItem)
|
|
105
|
+
.use(Search)
|
|
106
|
+
.use(Tab)
|
|
107
|
+
.use(Tabs)
|
|
108
|
+
.use(DatePicker)
|
|
109
|
+
.use(TimePicker)
|
|
110
|
+
.use(PickerGroup)
|
|
111
|
+
.use(Step)
|
|
112
|
+
.use(Steps)
|
|
113
|
+
.use(Tag)
|
|
114
|
+
.use(Switch)
|
|
115
|
+
.use(TreeSelect)
|
|
116
|
+
.use(WidgetQw)
|
|
117
|
+
.mount("#app");
|
package/src/router/index.ts
CHANGED
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
|
2
|
-
|
|
3
|
-
const routes: Array<RouteRecordRaw> = [
|
|
4
|
-
{
|
|
5
|
-
path: "/",
|
|
6
|
-
redirect: "/home",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
path: "/home",
|
|
10
|
-
name: "Home",
|
|
11
|
-
component: () => import("../views/home/index.vue"),
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
path: "/auditbar",
|
|
15
|
-
name: "Auditbar",
|
|
16
|
-
component: () => import("../views/auditbar/index.vue"),
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
path: "/input",
|
|
20
|
-
name: "input",
|
|
21
|
-
component: () => import("../views/input/index.vue"),
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
path: "/singlepicker",
|
|
25
|
-
name: "singlepicker",
|
|
26
|
-
component: () => import("../views/singlepicker/index.vue"),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
path: "/multipicker",
|
|
30
|
-
name: "multipicker",
|
|
31
|
-
component: () => import("../views/multipicker/index.vue"),
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
path: "/checkgroup",
|
|
35
|
-
name: "checkgroup",
|
|
36
|
-
component: () => import("../views/checkgroup/index.vue"),
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
path: "/datetimepicker",
|
|
40
|
-
name: "datetimepicker",
|
|
41
|
-
component: () => import("../views/datetimepicker/index.vue"),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
path: "/secretnotify",
|
|
45
|
-
name: "secretnotify",
|
|
46
|
-
component: () => import("../views/secretnotify/index.vue"),
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
path: "/dataSelector",
|
|
50
|
-
name: "dataSelector",
|
|
51
|
-
component: () => import("../views/dataSelector/index.vue"),
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
path: "/multListSelector",
|
|
55
|
-
name: "multListSelector",
|
|
56
|
-
component: () => import("../views/multListSelector/index.vue"),
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
path: "/subdepartmentSelector",
|
|
60
|
-
name: "subdepartmentSelector",
|
|
61
|
-
component: () => import("../views/subdepartmentSelector/index.vue"),
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
path: "/userSelector",
|
|
65
|
-
name: "userSelector",
|
|
66
|
-
component: () => import("../views/userSelector/index.vue"),
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
path: "/userSelectorNew",
|
|
70
|
-
name: "userSelectorNew",
|
|
71
|
-
component: () => import("../views/userSelectorNew/index.vue"),
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
path: "/imagepicker",
|
|
75
|
-
name: "imagepicker",
|
|
76
|
-
component: () => import("../views/imagepicker/index.vue"),
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
path: "/imagespicker",
|
|
80
|
-
name: "imagespicker",
|
|
81
|
-
component: () => import("../views/imagespicker/index.vue"),
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
path: "/filepicker",
|
|
85
|
-
name: "filepicker",
|
|
86
|
-
component: () => import("../views/filepicker/index.vue"),
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
path: "/billcard",
|
|
90
|
-
name: "billcard",
|
|
91
|
-
component: () => import("../views/billcard/index.vue"),
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
path: "/userspicker",
|
|
95
|
-
name: "userspicker",
|
|
96
|
-
component: () => import("../views/userspicker/index.vue"),
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
path: "/userpicker",
|
|
100
|
-
name: "userpicker",
|
|
101
|
-
component: () => import("../views/userpicker/index.vue"),
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
path: "/userprofile",
|
|
105
|
-
name: "userprofile",
|
|
106
|
-
component: () => import("../views/userprofile/index.vue"),
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
path: "/yeardropdown",
|
|
110
|
-
name: "yeardropdown",
|
|
111
|
-
component: () => import("../views/yeardropdown/index.vue"),
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
path: "/monthdropdown",
|
|
115
|
-
name: "monthdropdown",
|
|
116
|
-
component: () => import("../views/monthdropdown/index.vue"),
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
path: "/daydropdown",
|
|
120
|
-
name: "daydropdown",
|
|
121
|
-
component: () => import("../views/daydropdown/index.vue"),
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
path: "/switch",
|
|
125
|
-
name: "switch",
|
|
126
|
-
component: () => import("../views/switch/index.vue"),
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
path: "/sheet",
|
|
130
|
-
name: "sheet",
|
|
131
|
-
component: () => import("../views/sheet/index.vue"),
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
path: "/treepicker",
|
|
135
|
-
name: "treepicker",
|
|
136
|
-
component: () => import("../views/treepicker/index.vue"),
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
path: "/cascaderpop",
|
|
140
|
-
name: "cascaderpop",
|
|
141
|
-
component: () => import("../views/cascaderpop/index.vue"),
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
path: "/cascaderpicker",
|
|
145
|
-
name: "cascaderpicker",
|
|
146
|
-
component: () => import("../views/cascaderpicker/index.vue"),
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
path: "/singleapipicker",
|
|
150
|
-
name: "singleapipicker",
|
|
151
|
-
component: () => import("../views/singleapipicker/index.vue"),
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
path: "/objseditor",
|
|
155
|
-
name: "objseditor",
|
|
156
|
-
component: () => import("../views/objseditor/index.vue"),
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
|
|
160
|
-
const router = createRouter({
|
|
161
|
-
history: createWebHashHistory(import.meta.env.BASE_URL),
|
|
162
|
-
routes,
|
|
163
|
-
scrollBehavior(to, from, savedPosition) {
|
|
164
|
-
return { top: 0 }; // 强制滚动到顶部
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
router.beforeEach((to, from, next) => {
|
|
169
|
-
console.log("+++路由回调++++++++++++++++++++++");
|
|
170
|
-
const showTabBar = to.meta.showTabBar ?? true // 默认显示
|
|
171
|
-
next();
|
|
172
|
-
});
|
|
173
|
-
|
|
1
|
+
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
|
2
|
+
|
|
3
|
+
const routes: Array<RouteRecordRaw> = [
|
|
4
|
+
{
|
|
5
|
+
path: "/",
|
|
6
|
+
redirect: "/home",
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
path: "/home",
|
|
10
|
+
name: "Home",
|
|
11
|
+
component: () => import("../views/home/index.vue"),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: "/auditbar",
|
|
15
|
+
name: "Auditbar",
|
|
16
|
+
component: () => import("../views/auditbar/index.vue"),
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
path: "/input",
|
|
20
|
+
name: "input",
|
|
21
|
+
component: () => import("../views/input/index.vue"),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: "/singlepicker",
|
|
25
|
+
name: "singlepicker",
|
|
26
|
+
component: () => import("../views/singlepicker/index.vue"),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: "/multipicker",
|
|
30
|
+
name: "multipicker",
|
|
31
|
+
component: () => import("../views/multipicker/index.vue"),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
path: "/checkgroup",
|
|
35
|
+
name: "checkgroup",
|
|
36
|
+
component: () => import("../views/checkgroup/index.vue"),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
path: "/datetimepicker",
|
|
40
|
+
name: "datetimepicker",
|
|
41
|
+
component: () => import("../views/datetimepicker/index.vue"),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
path: "/secretnotify",
|
|
45
|
+
name: "secretnotify",
|
|
46
|
+
component: () => import("../views/secretnotify/index.vue"),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
path: "/dataSelector",
|
|
50
|
+
name: "dataSelector",
|
|
51
|
+
component: () => import("../views/dataSelector/index.vue"),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
path: "/multListSelector",
|
|
55
|
+
name: "multListSelector",
|
|
56
|
+
component: () => import("../views/multListSelector/index.vue"),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: "/subdepartmentSelector",
|
|
60
|
+
name: "subdepartmentSelector",
|
|
61
|
+
component: () => import("../views/subdepartmentSelector/index.vue"),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
path: "/userSelector",
|
|
65
|
+
name: "userSelector",
|
|
66
|
+
component: () => import("../views/userSelector/index.vue"),
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
path: "/userSelectorNew",
|
|
70
|
+
name: "userSelectorNew",
|
|
71
|
+
component: () => import("../views/userSelectorNew/index.vue"),
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: "/imagepicker",
|
|
75
|
+
name: "imagepicker",
|
|
76
|
+
component: () => import("../views/imagepicker/index.vue"),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: "/imagespicker",
|
|
80
|
+
name: "imagespicker",
|
|
81
|
+
component: () => import("../views/imagespicker/index.vue"),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
path: "/filepicker",
|
|
85
|
+
name: "filepicker",
|
|
86
|
+
component: () => import("../views/filepicker/index.vue"),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: "/billcard",
|
|
90
|
+
name: "billcard",
|
|
91
|
+
component: () => import("../views/billcard/index.vue"),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
path: "/userspicker",
|
|
95
|
+
name: "userspicker",
|
|
96
|
+
component: () => import("../views/userspicker/index.vue"),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
path: "/userpicker",
|
|
100
|
+
name: "userpicker",
|
|
101
|
+
component: () => import("../views/userpicker/index.vue"),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
path: "/userprofile",
|
|
105
|
+
name: "userprofile",
|
|
106
|
+
component: () => import("../views/userprofile/index.vue"),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
path: "/yeardropdown",
|
|
110
|
+
name: "yeardropdown",
|
|
111
|
+
component: () => import("../views/yeardropdown/index.vue"),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
path: "/monthdropdown",
|
|
115
|
+
name: "monthdropdown",
|
|
116
|
+
component: () => import("../views/monthdropdown/index.vue"),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
path: "/daydropdown",
|
|
120
|
+
name: "daydropdown",
|
|
121
|
+
component: () => import("../views/daydropdown/index.vue"),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
path: "/switch",
|
|
125
|
+
name: "switch",
|
|
126
|
+
component: () => import("../views/switch/index.vue"),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
path: "/sheet",
|
|
130
|
+
name: "sheet",
|
|
131
|
+
component: () => import("../views/sheet/index.vue"),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
path: "/treepicker",
|
|
135
|
+
name: "treepicker",
|
|
136
|
+
component: () => import("../views/treepicker/index.vue"),
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
path: "/cascaderpop",
|
|
140
|
+
name: "cascaderpop",
|
|
141
|
+
component: () => import("../views/cascaderpop/index.vue"),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: "/cascaderpicker",
|
|
145
|
+
name: "cascaderpicker",
|
|
146
|
+
component: () => import("../views/cascaderpicker/index.vue"),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
path: "/singleapipicker",
|
|
150
|
+
name: "singleapipicker",
|
|
151
|
+
component: () => import("../views/singleapipicker/index.vue"),
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
path: "/objseditor",
|
|
155
|
+
name: "objseditor",
|
|
156
|
+
component: () => import("../views/objseditor/index.vue"),
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
const router = createRouter({
|
|
161
|
+
history: createWebHashHistory(import.meta.env.BASE_URL),
|
|
162
|
+
routes,
|
|
163
|
+
scrollBehavior(to, from, savedPosition) {
|
|
164
|
+
return { top: 0 }; // 强制滚动到顶部
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
router.beforeEach((to, from, next) => {
|
|
169
|
+
console.log("+++路由回调++++++++++++++++++++++");
|
|
170
|
+
const showTabBar = to.meta.showTabBar ?? true // 默认显示
|
|
171
|
+
next();
|
|
172
|
+
});
|
|
173
|
+
|
|
174
174
|
export default router;
|
package/src/util/array_util.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export function arySwapPrev(arr, index) {
|
|
2
|
-
if (index > 0 && index < arr.length) {
|
|
3
|
-
[arr[index - 1], arr[index]] = [arr[index], arr[index - 1]];
|
|
4
|
-
}
|
|
5
|
-
return arr;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function arySwapNext(arr, index) {
|
|
9
|
-
if (index >= 0 && index < arr.length - 1) {
|
|
10
|
-
[arr[index], arr[index + 1]] = [arr[index + 1], arr[index]];
|
|
11
|
-
}
|
|
12
|
-
return arr;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function uniq(ary){
|
|
16
|
-
// 去重
|
|
17
|
-
let newAry = [...new Set(ary)]
|
|
18
|
-
return newAry
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function uniqCode(arr) {
|
|
22
|
-
const uniqueMap = new Map();
|
|
23
|
-
for (const item of arr) {
|
|
24
|
-
const key = item.code
|
|
25
|
-
if (!uniqueMap.has(key)) {
|
|
26
|
-
uniqueMap.set(key, item);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return Array.from(uniqueMap.values());
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
export function arySwapPrev(arr, index) {
|
|
2
|
+
if (index > 0 && index < arr.length) {
|
|
3
|
+
[arr[index - 1], arr[index]] = [arr[index], arr[index - 1]];
|
|
4
|
+
}
|
|
5
|
+
return arr;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function arySwapNext(arr, index) {
|
|
9
|
+
if (index >= 0 && index < arr.length - 1) {
|
|
10
|
+
[arr[index], arr[index + 1]] = [arr[index + 1], arr[index]];
|
|
11
|
+
}
|
|
12
|
+
return arr;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function uniq(ary){
|
|
16
|
+
// 去重
|
|
17
|
+
let newAry = [...new Set(ary)]
|
|
18
|
+
return newAry
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function uniqCode(arr) {
|
|
22
|
+
const uniqueMap = new Map();
|
|
23
|
+
for (const item of arr) {
|
|
24
|
+
const key = item.code
|
|
25
|
+
if (!uniqueMap.has(key)) {
|
|
26
|
+
uniqueMap.set(key, item);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return Array.from(uniqueMap.values());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|