ui-process-h5 2.0.7-beta → 2.1.0-beta
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/README.md +11 -204
- package/build/configure/README.md +211 -0
- package/build/configure/package.json +32 -0
- package/debug.js +9 -0
- package/index.html +12 -0
- package/package.json +56 -25
- package/src/App.vue +233 -0
- package/src/assets/font-icon/iconfont.scss +57 -0
- package/src/assets/font-icon/iconfont.ttf +0 -0
- package/src/assets/img/add-file.png +0 -0
- package/src/assets/img/arrow-right.png +0 -0
- package/src/assets/img/arrow.png +0 -0
- package/src/assets/img/check.png +0 -0
- package/src/assets/img/del.png +0 -0
- package/src/assets/img/doc.png +0 -0
- package/src/assets/img/file.png +0 -0
- package/src/assets/img/image.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/process.png +0 -0
- package/src/assets/img/xls.png +0 -0
- package/src/assets/img/zip.png +0 -0
- package/src/assets/js/auth.js +65 -0
- package/src/assets/js/errorCode.js +6 -0
- package/src/assets/js/message.js +352 -0
- package/src/assets/js/request.js +99 -0
- package/src/assets/js/toast.js +239 -0
- package/src/assets/js/top.js +229 -0
- package/src/assets/js/utils.js +83 -0
- package/src/assets/js/vuePopper.js +123 -0
- package/src/assets/query.png +0 -0
- package/src/assets/status/check.png +0 -0
- package/src/assets/status/del.png +0 -0
- package/src/assets/status/error.png +0 -0
- package/src/assets/status/loading.png +0 -0
- package/src/assets/status/success.png +0 -0
- package/src/main.js +17 -0
- package/src/packages/attchUpload/index.js +375 -0
- package/src/packages/attchUpload/index.scss +143 -0
- package/src/packages/attchUpload/index.vue +173 -0
- package/src/packages/downSelect/index.js +119 -0
- package/src/packages/downSelect/index.scss +88 -0
- package/src/packages/downSelect/index.vue +62 -0
- package/src/packages/index.js +6 -0
- package/src/packages/popup/index.js +125 -0
- package/src/packages/popup/index.scss +178 -0
- package/src/packages/popup/index.vue +80 -0
- package/src/packages/preview/index.js +40 -0
- package/src/packages/preview/index.vue +15 -0
- package/src/packages/previewImage/index.js +286 -0
- package/src/packages/previewImage/index.scss +76 -0
- package/src/packages/previewImage/index.vue +53 -0
- package/src/packages/process/index.js +1016 -0
- package/src/packages/process/index.scss +188 -0
- package/src/packages/process/index.vue +291 -0
- package/src/packages/process/operation/backNode.vue +396 -0
- package/src/packages/process/operation/cancel.vue +425 -0
- package/src/packages/process/operation/ccTask.vue +256 -0
- package/src/packages/process/operation/complete.vue +1384 -0
- package/src/packages/process/operation/counterSign.vue +498 -0
- package/src/packages/process/operation/delegateTask.vue +493 -0
- package/src/packages/process/operation/index.js +8 -0
- package/src/packages/process/operation/index.scss +212 -0
- package/src/packages/process/operation/msgList.vue +174 -0
- package/src/packages/process/operation/treeNode.vue +901 -0
- package/src/packages/process/operation/treePerson.vue +304 -0
- package/src/packages/submitPopup/index.js +708 -0
- package/src/packages/submitPopup/index.scss +190 -0
- package/src/packages/submitPopup/index.vue +125 -0
- package/src/packages/tab/index.js +236 -0
- package/src/packages/tab/index.scss +177 -0
- package/src/packages/tab/index.vue +155 -0
- package/src/packages/tip/index.js +80 -0
- package/src/packages/tip/index.scss +121 -0
- package/src/packages/tip/index.vue +57 -0
- package/src/packages/viewAttchList/index.js +138 -0
- package/src/packages/viewAttchList/index.scss +76 -0
- package/src/packages/viewAttchList/index.vue +121 -0
- package/src/style.css +80 -0
- package/vite.config.ts +118 -0
- package/v2/style.css +0 -1
- package/v2/ui-process-h5.js +0 -9945
- package/v2/ui-process-h5.umd.cjs +0 -18
- package/v2.7/style.css +0 -1
- package/v2.7/ui-process-h5.js +0 -9322
- package/v2.7/ui-process-h5.umd.cjs +0 -18
- package/v3/style.css +0 -1
- package/v3/ui-process-h5.js +0 -6842
- package/v3/ui-process-h5.umd.cjs +0 -6
- /package/{scripts → build/scripts}/postinstall.mjs +0 -0
- /package/{scripts → build/scripts}/switch-cli.mjs +0 -0
- /package/{scripts → build/scripts}/utils.mjs +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { defineComponent } from "vue-demi";
|
|
2
|
+
import dsBridge from "dsbridge";
|
|
3
|
+
|
|
4
|
+
import PreView from "../preview/index.vue";
|
|
5
|
+
import TopPopup from "../popup/index.vue";
|
|
6
|
+
import PreviewImage from "../previewImage/index.vue";
|
|
7
|
+
|
|
8
|
+
import del from "@/assets/img/del.png";
|
|
9
|
+
import doc from "@/assets/img/doc.png";
|
|
10
|
+
import file from "@/assets/img/file.png";
|
|
11
|
+
import image from "@/assets/img/image.png";
|
|
12
|
+
import pdf from "@/assets/img/pdf.png";
|
|
13
|
+
import xls from "@/assets/img/xls.png";
|
|
14
|
+
import zip from "@/assets/img/zip.png";
|
|
15
|
+
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: "ViewAttchList",
|
|
18
|
+
components: {
|
|
19
|
+
PreView,
|
|
20
|
+
TopPopup,
|
|
21
|
+
PreviewImage,
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
del() {
|
|
25
|
+
return del;
|
|
26
|
+
},
|
|
27
|
+
doc() {
|
|
28
|
+
return doc;
|
|
29
|
+
},
|
|
30
|
+
file() {
|
|
31
|
+
return file;
|
|
32
|
+
},
|
|
33
|
+
image() {
|
|
34
|
+
return image;
|
|
35
|
+
},
|
|
36
|
+
pdf() {
|
|
37
|
+
return pdf;
|
|
38
|
+
},
|
|
39
|
+
xls() {
|
|
40
|
+
return xls;
|
|
41
|
+
},
|
|
42
|
+
zip() {
|
|
43
|
+
return zip;
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
inList: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default: () => [],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
listData: [],
|
|
55
|
+
imgIcon: ["jpg", "jpge", "png", "gif"],
|
|
56
|
+
docIcon: ["doc", "docx"],
|
|
57
|
+
xlsIcon: ["xls", "xlsx"],
|
|
58
|
+
zipIcon: ["zip", "rar", "7z"],
|
|
59
|
+
preList: [],
|
|
60
|
+
fileUrl: "",
|
|
61
|
+
visible: false,
|
|
62
|
+
|
|
63
|
+
visibleImg: false,
|
|
64
|
+
lists: [],
|
|
65
|
+
indexd: 0,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
watch: {
|
|
69
|
+
inList: {
|
|
70
|
+
handler(val, preVal) {
|
|
71
|
+
if (val.length) {
|
|
72
|
+
this.listData = val;
|
|
73
|
+
|
|
74
|
+
this.lists = [];
|
|
75
|
+
let arr = [];
|
|
76
|
+
val.map((v, i) => {
|
|
77
|
+
if (
|
|
78
|
+
this.imgIcon.includes(
|
|
79
|
+
v.name
|
|
80
|
+
.substring(v.name.lastIndexOf(".") + 1)
|
|
81
|
+
.toLowerCase()
|
|
82
|
+
)
|
|
83
|
+
) {
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
arr = val.filter((value) => {
|
|
87
|
+
return this.imgIcon.includes(
|
|
88
|
+
value.name
|
|
89
|
+
.substring(value.name.lastIndexOf(".") + 1)
|
|
90
|
+
.toLowerCase()
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
arr.forEach((v, i) => {
|
|
94
|
+
this.lists.push(v.url);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
immediate: true,
|
|
99
|
+
deep: true,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
viewFile(val) {
|
|
104
|
+
if (
|
|
105
|
+
this.imgIcon.includes(
|
|
106
|
+
val.url
|
|
107
|
+
.substring(val.url.lastIndexOf(".") + 1)
|
|
108
|
+
.toLowerCase()
|
|
109
|
+
)
|
|
110
|
+
) {
|
|
111
|
+
this.visibleImg = true;
|
|
112
|
+
this.indexd = this.lists.indexOf(val.url);
|
|
113
|
+
} else {
|
|
114
|
+
this.fileUrl = val.url;
|
|
115
|
+
this.visible = true;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
loadFile(val) {
|
|
119
|
+
// console.log("loadFile", val);
|
|
120
|
+
|
|
121
|
+
if (dsBridge.hasNativeMethod("vueUpLoadFile")) {
|
|
122
|
+
let res = dsBridge.call("vueUpLoadFile", val.url);
|
|
123
|
+
} else {
|
|
124
|
+
if (
|
|
125
|
+
"undefined" != typeof nativeMethod &&
|
|
126
|
+
nativeMethod?.vueUpLoadFile
|
|
127
|
+
) {
|
|
128
|
+
nativeMethod.vueUpLoadFile(val.url);
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
const a = document.createElement("a");
|
|
132
|
+
a.download = val.url?.match(/([^\/]+)$/g)[0];
|
|
133
|
+
a.href = val.url;
|
|
134
|
+
a.click();
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.wrap-header {
|
|
2
|
+
height: 40px;
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
}
|
|
8
|
+
.wrap-header-back {
|
|
9
|
+
transform: rotateY(180deg);
|
|
10
|
+
width: 18px;
|
|
11
|
+
height: 18px;
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
.wrap-header-back img {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
.wrap-header-title {
|
|
19
|
+
padding-left: calc(50% - 54px);
|
|
20
|
+
font-size: 18px;
|
|
21
|
+
color: #333;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.attch-list {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
.list-items {
|
|
28
|
+
display: flex;
|
|
29
|
+
margin-top: 18px;
|
|
30
|
+
padding: 0 20px 0 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.list-items-icon {
|
|
34
|
+
width: 36px;
|
|
35
|
+
height: 40px;
|
|
36
|
+
margin-right: 10px;
|
|
37
|
+
line-height: 44px;
|
|
38
|
+
}
|
|
39
|
+
.list-items-icon .icon-img {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.list-items-info {
|
|
45
|
+
width: 225px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.info-name {
|
|
49
|
+
font-size: 15px;
|
|
50
|
+
color: #333;
|
|
51
|
+
overflow-wrap: break-word;
|
|
52
|
+
}
|
|
53
|
+
.info-attribute {
|
|
54
|
+
color: #999;
|
|
55
|
+
font-size: 13px;
|
|
56
|
+
margin-top: 4px;
|
|
57
|
+
}
|
|
58
|
+
.info-attribute-time {
|
|
59
|
+
margin-right: 10px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.list-items-download {
|
|
63
|
+
width: 26px;
|
|
64
|
+
margin-left: auto;
|
|
65
|
+
color: #1389ff;
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
line-height: 44px;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.attch-list--white {
|
|
72
|
+
text-align: center;
|
|
73
|
+
margin-top: 50%;
|
|
74
|
+
font-size: 15px;
|
|
75
|
+
color: #333;
|
|
76
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="process-wrap">
|
|
3
|
+
<div class="attch-list" v-if="listData.length > 0">
|
|
4
|
+
<div v-for="(v, i) of listData" :key="v.id" class="list-items">
|
|
5
|
+
<div class="list-items-icon">
|
|
6
|
+
<img
|
|
7
|
+
v-if="
|
|
8
|
+
xlsIcon.includes(
|
|
9
|
+
v.name
|
|
10
|
+
.substring(v.name.lastIndexOf('.') + 1)
|
|
11
|
+
.toLowerCase()
|
|
12
|
+
)
|
|
13
|
+
"
|
|
14
|
+
class="icon-img"
|
|
15
|
+
:src="xls"
|
|
16
|
+
/>
|
|
17
|
+
<img
|
|
18
|
+
v-else-if="
|
|
19
|
+
imgIcon.includes(
|
|
20
|
+
v.name
|
|
21
|
+
.substring(v.name.lastIndexOf('.') + 1)
|
|
22
|
+
.toLowerCase()
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
class="icon-img"
|
|
26
|
+
:src="image"
|
|
27
|
+
/>
|
|
28
|
+
<img
|
|
29
|
+
v-else-if="
|
|
30
|
+
v.name
|
|
31
|
+
.substring(v.name.lastIndexOf('.') + 1)
|
|
32
|
+
.toLowerCase() == 'pdf'
|
|
33
|
+
"
|
|
34
|
+
class="icon-img"
|
|
35
|
+
:src="pdf"
|
|
36
|
+
/>
|
|
37
|
+
<img
|
|
38
|
+
v-else-if="
|
|
39
|
+
docIcon.includes(
|
|
40
|
+
v.name
|
|
41
|
+
.substring(v.name.lastIndexOf('.') + 1)
|
|
42
|
+
.toLowerCase()
|
|
43
|
+
)
|
|
44
|
+
"
|
|
45
|
+
class="icon-img"
|
|
46
|
+
:src="doc"
|
|
47
|
+
/>
|
|
48
|
+
<img
|
|
49
|
+
v-else-if="
|
|
50
|
+
zipIcon.includes(
|
|
51
|
+
v.name
|
|
52
|
+
.substring(v.name.lastIndexOf('.') + 1)
|
|
53
|
+
.toLowerCase()
|
|
54
|
+
)
|
|
55
|
+
"
|
|
56
|
+
class="icon-img"
|
|
57
|
+
:src="zip"
|
|
58
|
+
/>
|
|
59
|
+
<img v-else class="icon-img" :src="file" />
|
|
60
|
+
</div>
|
|
61
|
+
<div class="list-items-info" @click="viewFile(v)">
|
|
62
|
+
<div class="info-name">
|
|
63
|
+
<span class="info-name-text">{{ v.name }}</span>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="info-attribute">
|
|
66
|
+
<span class="info-attribute-time">{{
|
|
67
|
+
v.uploadTime
|
|
68
|
+
}}</span>
|
|
69
|
+
|
|
70
|
+
<span class="info-attribute-size"
|
|
71
|
+
>{{
|
|
72
|
+
v.size < 1024
|
|
73
|
+
? v.size
|
|
74
|
+
: v.size / 1024 > 1024
|
|
75
|
+
? parseFloat(
|
|
76
|
+
(v.size / 1024 / 1024).toFixed(2)
|
|
77
|
+
)
|
|
78
|
+
: parseFloat((v.size / 1024).toFixed(2))
|
|
79
|
+
}}{{
|
|
80
|
+
v.size < 1024
|
|
81
|
+
? "b"
|
|
82
|
+
: parseFloat((v.size / 1024).toFixed(2)) <
|
|
83
|
+
1024
|
|
84
|
+
? "kb"
|
|
85
|
+
: "M"
|
|
86
|
+
}}
|
|
87
|
+
</span>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="list-items-download" @click="loadFile(v)">
|
|
91
|
+
<span class="download-text">下载</span>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="attch-list" v-else>
|
|
96
|
+
<div class="attch-list--white">
|
|
97
|
+
<div class="attch-list--label">暂无附件</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<TopPopup
|
|
101
|
+
v-bind:visible="visible"
|
|
102
|
+
v-on:update:visible="(val) => (visible = val)"
|
|
103
|
+
ref="TopPopup"
|
|
104
|
+
titleText="附件预览"
|
|
105
|
+
isDrawer
|
|
106
|
+
:isIndex="99"
|
|
107
|
+
>
|
|
108
|
+
<PreView :file="fileUrl" />
|
|
109
|
+
</TopPopup>
|
|
110
|
+
<PreviewImage
|
|
111
|
+
:images="lists"
|
|
112
|
+
v-bind:visible="visibleImg"
|
|
113
|
+
v-on:update:visible="(val) => (visibleImg = val)"
|
|
114
|
+
:indexd="indexd"
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
118
|
+
<script src="./index.js"></script>
|
|
119
|
+
<style lang="scss" scoped>
|
|
120
|
+
@import "./index.scss";
|
|
121
|
+
</style>
|
package/src/style.css
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
-webkit-text-size-adjust: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: #646cff;
|
|
20
|
+
text-decoration: inherit;
|
|
21
|
+
}
|
|
22
|
+
a:hover {
|
|
23
|
+
color: #535bf2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
place-items: center;
|
|
30
|
+
min-width: 320px;
|
|
31
|
+
min-height: 100vh;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h1 {
|
|
35
|
+
font-size: 3.2em;
|
|
36
|
+
line-height: 1.1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
button {
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
padding: 0.6em 1.2em;
|
|
43
|
+
font-size: 1em;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
font-family: inherit;
|
|
46
|
+
background-color: #1a1a1a;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: border-color 0.25s;
|
|
49
|
+
}
|
|
50
|
+
button:hover {
|
|
51
|
+
border-color: #646cff;
|
|
52
|
+
}
|
|
53
|
+
button:focus,
|
|
54
|
+
button:focus-visible {
|
|
55
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card {
|
|
59
|
+
padding: 2em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#app {
|
|
63
|
+
max-width: 1280px;
|
|
64
|
+
margin: 0 auto;
|
|
65
|
+
padding: 2rem;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-color-scheme: light) {
|
|
70
|
+
:root {
|
|
71
|
+
color: #213547;
|
|
72
|
+
background-color: #ffffff;
|
|
73
|
+
}
|
|
74
|
+
a:hover {
|
|
75
|
+
color: #747bff;
|
|
76
|
+
}
|
|
77
|
+
button {
|
|
78
|
+
background-color: #f9f9f9;
|
|
79
|
+
}
|
|
80
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import { createVuePlugin } from "vite-plugin-vue2";
|
|
3
|
+
import * as compiler from "@vue/compiler-sfc";
|
|
4
|
+
import vue3 from "@vitejs/plugin-vue";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import { getLibDir } from "./build/scripts/utils.mjs";
|
|
7
|
+
import { isVue2, version } from "vue-demi";
|
|
8
|
+
import { baseConfig } from "./src/assets/js/utils.js";
|
|
9
|
+
import copy from "rollup-plugin-copy";
|
|
10
|
+
import relaxedUnit from "postcss-relaxed-unit";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
console.log("version", { version });
|
|
14
|
+
const resolve = (str) => {
|
|
15
|
+
return path.resolve(__dirname, str);
|
|
16
|
+
};
|
|
17
|
+
let isVueCode = 1;
|
|
18
|
+
if (version.startsWith("2.7.")) isVueCode = 2;
|
|
19
|
+
else if (version.startsWith("2.")) isVueCode = 1;
|
|
20
|
+
else isVueCode = 3;
|
|
21
|
+
|
|
22
|
+
// https://vitejs.dev/config/
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
resolve: {
|
|
25
|
+
alias: {
|
|
26
|
+
"@": resolve("src"),
|
|
27
|
+
vue:
|
|
28
|
+
isVueCode === 1
|
|
29
|
+
? path.resolve("./node_modules/vue2")
|
|
30
|
+
: isVueCode === 2
|
|
31
|
+
? path.resolve("./node_modules/vue2.7")
|
|
32
|
+
: path.resolve("./node_modules/vue3"),
|
|
33
|
+
"@vue/composition-api": resolve(
|
|
34
|
+
"./node_modules/@vue/composition-api"
|
|
35
|
+
),
|
|
36
|
+
// "checked-pick-app":
|
|
37
|
+
// isVueCode === 1
|
|
38
|
+
// ? path.resolve(
|
|
39
|
+
// "./node_modules/checked-pick-app/v2/checked-pick-app.umd.cjs"
|
|
40
|
+
// )
|
|
41
|
+
// : isVueCode === 2
|
|
42
|
+
// ? path.resolve(
|
|
43
|
+
// "./node_modules/checked-pick-app/v2.7/checked-pick-app.umd.cjs"
|
|
44
|
+
// )
|
|
45
|
+
// : path.resolve(
|
|
46
|
+
// "./node_modules/checked-pick-app/v3/checked-pick-app.umd.cjs"
|
|
47
|
+
// ),
|
|
48
|
+
// "checked-pick-app-style":
|
|
49
|
+
// isVueCode === 1
|
|
50
|
+
// ? path.resolve(
|
|
51
|
+
// "./node_modules/checked-pick-app/v2/style.css"
|
|
52
|
+
// )
|
|
53
|
+
// : isVueCode === 2
|
|
54
|
+
// ? path.resolve(
|
|
55
|
+
// "./node_modules/checked-pick-app/v2.7/style.css"
|
|
56
|
+
// )
|
|
57
|
+
// : path.resolve(
|
|
58
|
+
// "./node_modules/checked-pick-app/v3/style.css"
|
|
59
|
+
// ),
|
|
60
|
+
// dsbridge: path.resolve("./node_modules/dsbridge"),
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
build: {
|
|
64
|
+
lib: {
|
|
65
|
+
entry: resolve("./src/packages/index.js"),
|
|
66
|
+
name: "ui-process-h5",
|
|
67
|
+
fileName: "ui-process-h5",
|
|
68
|
+
},
|
|
69
|
+
cssTarget: "chrome61",
|
|
70
|
+
rollupOptions: {
|
|
71
|
+
// external: ['vue-demi', 'vue'],
|
|
72
|
+
external: ['vue', 'checked-pick-app', 'dsbridge'],
|
|
73
|
+
output: {
|
|
74
|
+
dir: getLibDir(version),
|
|
75
|
+
globals: {
|
|
76
|
+
vue: "Vue",
|
|
77
|
+
"checked-pick-app": "checked-pick-app",
|
|
78
|
+
dsbridge: "dsbridge"
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
terserOptions: {
|
|
83
|
+
compress: {
|
|
84
|
+
drop_console: true,
|
|
85
|
+
drop_debugger: true,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
optimizeDeps: {
|
|
90
|
+
// exclude: ['vue-demi']
|
|
91
|
+
},
|
|
92
|
+
plugins: [
|
|
93
|
+
isVue2 ? createVuePlugin() : vue3({ compiler: compiler }),
|
|
94
|
+
copy({
|
|
95
|
+
targets: [
|
|
96
|
+
{ src: "./build/configure/*", dest: "./ui-process-h5" },
|
|
97
|
+
{ src: "./build/scripts/*", dest: "./ui-process-h5/scripts" },
|
|
98
|
+
],
|
|
99
|
+
}),
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
],
|
|
103
|
+
css: {
|
|
104
|
+
postcss: {
|
|
105
|
+
// 配置自定义组件插件
|
|
106
|
+
plugins: [relaxedUnit({ rules: { rpx: "div(2).unit(px)" } })],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
server: {
|
|
110
|
+
proxy: {
|
|
111
|
+
[baseConfig.apiUrl]: {
|
|
112
|
+
target: process.env.domain || `http://59.53.91.231:2100`,
|
|
113
|
+
changeOrigin: true,
|
|
114
|
+
//rewrite: (path) => path.replace(/^\/api/, ""),
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
});
|