@kyfe/fms-vue2-components 0.0.2-beta.0
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/dist/assets/css/fms-ks-decrypt.css +1 -0
- package/dist/fms-copy-box/index.js +69 -0
- package/dist/fms-copy-box/style.css +1 -0
- package/dist/fms-empty/index.js +42 -0
- package/dist/fms-empty/style.css +1 -0
- package/dist/fms-ks-decrypt/index.js +9 -0
- package/dist/fms-ks-decrypt.bcc12f44.js +335 -0
- package/dist/fms-ks-file-upload/index.js +148 -0
- package/dist/fms-ks-file-upload/style.css +1 -0
- package/dist/fms-ks-file-view/index.js +286 -0
- package/dist/fms-ks-file-view/style.css +1 -0
- package/dist/fms-scroll-list/index.js +241 -0
- package/dist/fms-scroll-list/style.css +1 -0
- package/dist/index.js +37 -0
- package/dist/plugin-vue2_normalizer.ed7092a9.js +30 -0
- package/package.json +31 -0
- package/src/assets/images/code.png +0 -0
- package/src/assets/images/copy-icon.png +0 -0
- package/src/assets/images/tag-gkbk.png +0 -0
- package/src/assets/style/common.less +62 -0
- package/src/components/fms-copy-box/fms-copy-box.vue +97 -0
- package/src/components/fms-copy-box/index.js +7 -0
- package/src/components/fms-copy-box//345/244/215/345/210/266.md +0 -0
- package/src/components/fms-empty/assets/default.png +0 -0
- package/src/components/fms-empty/assets/search.png +0 -0
- package/src/components/fms-empty/fms-empty.vue +57 -0
- package/src/components/fms-empty/index.js +7 -0
- package/src/components/fms-ks-decrypt/component/call/index.vue +283 -0
- package/src/components/fms-ks-decrypt/component/call/mixin.less +50 -0
- package/src/components/fms-ks-decrypt/component/custom-call/index.vue +50 -0
- package/src/components/fms-ks-decrypt/fms-ks-decrypt.vue +257 -0
- package/src/components/fms-ks-decrypt/index.js +7 -0
- package/src/components/fms-ks-decrypt/phone.svg +24 -0
- package/src/components/fms-ks-decrypt//346/225/217/346/204/237/347/233/221/346/216/247/347/273/204/344/273/266.md +140 -0
- package/src/components/fms-ks-file-upload/assets/icon_close.png +0 -0
- package/src/components/fms-ks-file-upload/fms-ks-file-upload.vue +254 -0
- package/src/components/fms-ks-file-upload/index.js +7 -0
- package/src/components/fms-ks-file-upload//344/270/212/344/274/240/347/273/204/344/273/266.md +0 -0
- package/src/components/fms-ks-file-view/assets/icon_default.svg +23 -0
- package/src/components/fms-ks-file-view/assets/icon_default_new.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_excel.svg +20 -0
- package/src/components/fms-ks-file-view/assets/icon_excel_new.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_file.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_pdf_new.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_ppt.svg +20 -0
- package/src/components/fms-ks-file-view/assets/icon_ppt_new.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_preview_file.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_txt.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_word.svg +19 -0
- package/src/components/fms-ks-file-view/assets/icon_word_new.png +0 -0
- package/src/components/fms-ks-file-view/assets/icon_xmind.png +0 -0
- package/src/components/fms-ks-file-view/components/attachment.vue +343 -0
- package/src/components/fms-ks-file-view/fms-ks-file-view.vue +165 -0
- package/src/components/fms-ks-file-view/index.js +7 -0
- package/src/components/fms-ks-file-view/utils/index.js +27 -0
- package/src/components/fms-ks-file-view//346/226/207/344/273/266/351/242/204/350/247/210.md +23 -0
- package/src/components/fms-scroll-list/Waterfall.js +91 -0
- package/src/components/fms-scroll-list/fms-scroll-list.vue +294 -0
- package/src/components/fms-scroll-list/index.js +7 -0
- package/src/components/fms-scroll-list//346/273/232/345/212/250.md +0 -0
- package/src/index.js +37 -0
- package/vite.config.js +82 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import './../fms-copy-box/style.css';
|
|
2
|
+
import f from "../fms-empty/index.js";
|
|
3
|
+
import { MaxDecrypt as d } from "@kyfe/decrypt";
|
|
4
|
+
import { n as g } from "../plugin-vue2_normalizer.ed7092a9.js";
|
|
5
|
+
import './style.css';class p {
|
|
6
|
+
constructor({ gap: t } = {}) {
|
|
7
|
+
this.observer = null, this.intersectionObserver = null, this.container = null, this.refScroll = null, this.leftHeight = 0, this.rightHeight = 0, this.intersectionRatio = 0, this.gap = t || [0, 0], this.init();
|
|
8
|
+
}
|
|
9
|
+
get containerHeight() {
|
|
10
|
+
return Math.max(this.leftHeight, this.rightHeight);
|
|
11
|
+
}
|
|
12
|
+
init() {
|
|
13
|
+
this.initMutationObserver(), this.initIntersectionObserver();
|
|
14
|
+
}
|
|
15
|
+
observe(t, e) {
|
|
16
|
+
this.refScroll = t, this.container = e, this.observer.observe(e, {
|
|
17
|
+
childList: !0
|
|
18
|
+
}), this.intersectionObserver.observe(this.refScroll), e.defaultCssText = e.defaultCssTex || e.style.cssText;
|
|
19
|
+
}
|
|
20
|
+
dispose() {
|
|
21
|
+
this.observer.disconnect(), this.intersectionObserver.disconnect(), this.container.style.cssText = this.container.defaultCssText, delete this.container.defaultCssText, Array.from(this.container.children).forEach((t) => {
|
|
22
|
+
t.style.cssText = t.defaultCssText, delete t.defaultCssText, delete t.nodeHeight;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
initMutationObserver() {
|
|
26
|
+
const t = new MutationObserver(() => {
|
|
27
|
+
this.intersectionRatio !== 0 && this.handleNode();
|
|
28
|
+
});
|
|
29
|
+
this.observer = t;
|
|
30
|
+
}
|
|
31
|
+
initIntersectionObserver() {
|
|
32
|
+
const t = new IntersectionObserver((e) => {
|
|
33
|
+
this.intersectionRatio = e[0].intersectionRatio, !(e[0].intersectionRatio <= 0) && this.handleNode();
|
|
34
|
+
});
|
|
35
|
+
this.intersectionObserver = t;
|
|
36
|
+
}
|
|
37
|
+
handleNode() {
|
|
38
|
+
const t = Array.from(this.container.children);
|
|
39
|
+
this.leftHeight = 0, this.rightHeight = 0;
|
|
40
|
+
const [e, i] = this.gap;
|
|
41
|
+
t.forEach((r) => {
|
|
42
|
+
const a = r.nodeHeight || r.offsetHeight;
|
|
43
|
+
r.nodeHeight = a;
|
|
44
|
+
const n = this.leftHeight <= this.rightHeight;
|
|
45
|
+
"defaultCssText" in r || (r.defaultCssText = r.style.cssText, r.style.cssText = `
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: calc(50% - ${i / 2}px);
|
|
48
|
+
top: ${n ? this.leftHeight : this.rightHeight}px;
|
|
49
|
+
${n ? "left: 0" : "right: 0"};
|
|
50
|
+
`), n ? this.leftHeight += a + e : this.rightHeight += a + e;
|
|
51
|
+
}), this.container.style.height = this.containerHeight + "px";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const c = {
|
|
55
|
+
page: 1,
|
|
56
|
+
pageSize: 20
|
|
57
|
+
}, u = {
|
|
58
|
+
id: "151349933249281652",
|
|
59
|
+
title: "OA\u7533\u8BF7"
|
|
60
|
+
}, m = {
|
|
61
|
+
name: "FmsScrollList",
|
|
62
|
+
props: {
|
|
63
|
+
config: Object,
|
|
64
|
+
params: Object,
|
|
65
|
+
onRefreshBefore: Function,
|
|
66
|
+
isEnabledMultiCol: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
gap: {
|
|
71
|
+
type: Array,
|
|
72
|
+
default: () => [12, 12]
|
|
73
|
+
},
|
|
74
|
+
isGrid: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
77
|
+
},
|
|
78
|
+
finishedTips: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: "\u5DF2\u65E0\u66F4\u591A\u6570\u636E"
|
|
81
|
+
},
|
|
82
|
+
emptyType: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "default"
|
|
85
|
+
},
|
|
86
|
+
isInitEmpty: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !1
|
|
89
|
+
},
|
|
90
|
+
connStyle: {
|
|
91
|
+
type: Object,
|
|
92
|
+
default() {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
isBigScreen: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !1
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
components: {
|
|
102
|
+
FmsEmpty: f
|
|
103
|
+
},
|
|
104
|
+
data() {
|
|
105
|
+
return {
|
|
106
|
+
maxDecrypt: null,
|
|
107
|
+
setConfig: {
|
|
108
|
+
refresher: !0,
|
|
109
|
+
finishedTips: this.finishedTips,
|
|
110
|
+
autoInit: !0,
|
|
111
|
+
api: ""
|
|
112
|
+
},
|
|
113
|
+
setParams: {
|
|
114
|
+
...c
|
|
115
|
+
},
|
|
116
|
+
loading: !1,
|
|
117
|
+
refreshing: !1,
|
|
118
|
+
finished: !1,
|
|
119
|
+
list: []
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
computed: {
|
|
123
|
+
scrollContentStyle() {
|
|
124
|
+
const s = {
|
|
125
|
+
...this.connStyle
|
|
126
|
+
}, { gap: t } = this;
|
|
127
|
+
return this.isGrid && this.isBigScreen && (s.gap = `${t[0]}px ${t[1]}px`), s;
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
isBigScreen: {
|
|
132
|
+
immediate: !0,
|
|
133
|
+
handler(s) {
|
|
134
|
+
this.isGrid || !this.isEnabledMultiCol || this.$nextTick(() => {
|
|
135
|
+
if (!s) {
|
|
136
|
+
this.destroyObserver();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.initObserver();
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
created() {
|
|
145
|
+
this.updatedConfig(), this.updatedParams(), this.setConfig.autoInit && this.initData();
|
|
146
|
+
},
|
|
147
|
+
beforeDestroy() {
|
|
148
|
+
this.destroyObserver();
|
|
149
|
+
},
|
|
150
|
+
methods: {
|
|
151
|
+
initObserver() {
|
|
152
|
+
this.waterFall = new p({
|
|
153
|
+
gap: this.gap
|
|
154
|
+
}), this.waterFall.observe(this.$refs.refScroll, this.$refs.scrollListContentRef);
|
|
155
|
+
},
|
|
156
|
+
destroyObserver() {
|
|
157
|
+
!this.waterFall || (this.waterFall.dispose(), this.waterFall = null);
|
|
158
|
+
},
|
|
159
|
+
updatedConfig(s) {
|
|
160
|
+
const { setConfig: t, config: e } = this;
|
|
161
|
+
this.setConfig = { ...t, ...e, ...s };
|
|
162
|
+
},
|
|
163
|
+
reSetParams() {
|
|
164
|
+
const { params: s } = this;
|
|
165
|
+
this.setParams = { ...c, ...s };
|
|
166
|
+
},
|
|
167
|
+
updatedParams(s) {
|
|
168
|
+
const { setParams: t, params: e } = this;
|
|
169
|
+
this.setParams = { ...t, ...e, ...s };
|
|
170
|
+
},
|
|
171
|
+
onRefresh() {
|
|
172
|
+
this.onRefreshBefore && this.onRefreshBefore(), this.initData();
|
|
173
|
+
},
|
|
174
|
+
async initData(s, t = {}) {
|
|
175
|
+
const { isLoading: e = !0 } = t;
|
|
176
|
+
e && this.$toast.loading({
|
|
177
|
+
forbidClick: !0,
|
|
178
|
+
duration: 0
|
|
179
|
+
}), s && this.updatedParams(s), this.setParams.page = 1;
|
|
180
|
+
const i = await this.getData(t, !0);
|
|
181
|
+
return this.$emit("initData", i), i;
|
|
182
|
+
},
|
|
183
|
+
async getData(s = {}, t = !1) {
|
|
184
|
+
const { isLoading: e = !0 } = s;
|
|
185
|
+
this.setConfig.api || this.$toast("API\u4E0D\u80FD\u4E3A\u7A7A");
|
|
186
|
+
try {
|
|
187
|
+
const i = await this.$http(this.setConfig.api, "55668", this.setParams), { pageTotal: r, rows: a, rowTotal: n } = i, { page: o } = this.setParams;
|
|
188
|
+
o === 1 || t ? (this.setParams.page = 1, this.list = this.initMaxDecrypt(a)) : (this.maxDecrypt.addData(a), this.list = this.maxDecrypt.getData()), console.log("this.list", this.list), this.setParams.page = o + 1, this.loading = !1, this.refreshing = !1, this.finished = o >= +r, e && this.$toast.clear();
|
|
189
|
+
const h = { list: this.list, params: this.setParams, rowTotal: n, pageTotal: r, currentRows: a };
|
|
190
|
+
return this.$emit("getData", h), h;
|
|
191
|
+
} catch (i) {
|
|
192
|
+
this.loading = !1, this.refreshing = !1, this.finished = !0, this.list = [], this.$emit("getData", { list: [], params: this.setParams }), this.$bus.$emit("EXECUTE_NET_ERROR"), console.log(i);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
initMaxDecrypt(s) {
|
|
196
|
+
let t = [];
|
|
197
|
+
try {
|
|
198
|
+
this.maxDecrypt = new d({
|
|
199
|
+
data: s,
|
|
200
|
+
apiCode: this.setConfig.api,
|
|
201
|
+
menuId: u.id,
|
|
202
|
+
change(...e) {
|
|
203
|
+
console.log("\u6570\u636E\u88AB\u89E3\u5BC6", ...e);
|
|
204
|
+
},
|
|
205
|
+
maxChange(...e) {
|
|
206
|
+
console.log("\u8D85\u8FC7\u6700\u5927\u89E3\u5BC6\u6B21\u6570", ...e);
|
|
207
|
+
}
|
|
208
|
+
}), t = this.maxDecrypt.getData();
|
|
209
|
+
} catch (e) {
|
|
210
|
+
console.log("initMaxDecrypt", e), t = s;
|
|
211
|
+
}
|
|
212
|
+
return t || (t = s), t;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
var y = function() {
|
|
217
|
+
var t = this, e = t._self._c;
|
|
218
|
+
return e("div", { ref: "refScroll", staticClass: "ky-scroll-list" }, [e("van-pull-refresh", { on: { refresh: t.onRefresh }, model: { value: t.refreshing, callback: function(i) {
|
|
219
|
+
t.refreshing = i;
|
|
220
|
+
}, expression: "refreshing" } }, [e("van-list", { attrs: { finished: t.finished, "immediate-check": !1 }, on: { load: t.getData }, scopedSlots: t._u([{ key: "finished", fn: function() {
|
|
221
|
+
return [t.list.length > 0 ? e("div", [t._v(t._s(t.setConfig.finishedTips))]) : t._e()];
|
|
222
|
+
}, proxy: !0 }]), model: { value: t.loading, callback: function(i) {
|
|
223
|
+
t.loading = i;
|
|
224
|
+
}, expression: "loading" } }, [e("div", { ref: "scrollListContentRef", staticClass: "ky-scroll-list__content", class: { isGrid: t.isEnabledMultiCol && t.isGrid }, style: t.scrollContentStyle }, [t._t("default", null, { scrollData: t.list, params: t.setParams })], 2)]), (t.finished || t.isInitEmpty) && !t.loading && t.list.length === 0 ? e("fms-empty", { attrs: { image: t.emptyType } }) : t._e()], 1)], 1);
|
|
225
|
+
}, v = [], b = /* @__PURE__ */ g(
|
|
226
|
+
m,
|
|
227
|
+
y,
|
|
228
|
+
v,
|
|
229
|
+
!1,
|
|
230
|
+
null,
|
|
231
|
+
"131609e2",
|
|
232
|
+
null,
|
|
233
|
+
null
|
|
234
|
+
);
|
|
235
|
+
const l = b.exports;
|
|
236
|
+
l.install = function(s) {
|
|
237
|
+
s.component(l.name, l);
|
|
238
|
+
};
|
|
239
|
+
export {
|
|
240
|
+
l as default
|
|
241
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ky-scroll-list[data-v-131609e2] .van-list__finished-text{font-size:14px;line-height:40px}.ky-scroll-list[data-v-131609e2] .van-loading__text,.ky-scroll-list[data-v-131609e2] .van-pull-refresh__head{font-size:14px}.ky-scroll-list .ky-scroll-list__content[data-v-131609e2]{position:relative;min-height:10px}@media (min-width: 600px){.ky-scroll-list .ky-scroll-list__content.isGrid.isGrid[data-v-131609e2]{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-flow:row}}@media (horizontal-viewport-segments: 2){.ky-scroll-list .ky-scroll-list__content.isGrid.isGrid[data-v-131609e2]{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-flow:row}}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import './fms-copy-box/style.css';
|
|
2
|
+
import s from "./fms-copy-box/index.js";
|
|
3
|
+
import { default as w } from "./fms-copy-box/index.js";
|
|
4
|
+
import t from "./fms-empty/index.js";
|
|
5
|
+
import { default as C } from "./fms-empty/index.js";
|
|
6
|
+
import "./fms-ks-decrypt/index.js";
|
|
7
|
+
import r from "./fms-ks-file-upload/index.js";
|
|
8
|
+
import { default as L } from "./fms-ks-file-upload/index.js";
|
|
9
|
+
import e from "./fms-ks-file-view/index.js";
|
|
10
|
+
import { default as U } from "./fms-ks-file-view/index.js";
|
|
11
|
+
import p from "./fms-scroll-list/index.js";
|
|
12
|
+
import { default as h } from "./fms-scroll-list/index.js";
|
|
13
|
+
import { F as f } from "./fms-ks-decrypt.bcc12f44.js";
|
|
14
|
+
import { F as g } from "./fms-ks-decrypt.bcc12f44.js";
|
|
15
|
+
const a = [
|
|
16
|
+
s,
|
|
17
|
+
t,
|
|
18
|
+
f,
|
|
19
|
+
r,
|
|
20
|
+
e,
|
|
21
|
+
p
|
|
22
|
+
], i = function(m) {
|
|
23
|
+
a.forEach((o) => {
|
|
24
|
+
m.component(o.name, o);
|
|
25
|
+
});
|
|
26
|
+
}, y = {
|
|
27
|
+
install: i
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
w as FmsCopyBox,
|
|
31
|
+
C as FmsEmpty,
|
|
32
|
+
g as FmsKsDecrypt,
|
|
33
|
+
L as FmsKsFileUpload,
|
|
34
|
+
U as FmsKsFileView,
|
|
35
|
+
h as FmsScrollList,
|
|
36
|
+
y as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function v(r, a, d, h, i, t, f, u) {
|
|
2
|
+
var e = typeof r == "function" ? r.options : r;
|
|
3
|
+
a && (e.render = a, e.staticRenderFns = d, e._compiled = !0), h && (e.functional = !0), t && (e._scopeId = "data-v-" + t);
|
|
4
|
+
var o;
|
|
5
|
+
if (f ? (o = function(n) {
|
|
6
|
+
n = n || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !n && typeof __VUE_SSR_CONTEXT__ < "u" && (n = __VUE_SSR_CONTEXT__), i && i.call(this, n), n && n._registeredComponents && n._registeredComponents.add(f);
|
|
7
|
+
}, e._ssrRegister = o) : i && (o = u ? function() {
|
|
8
|
+
i.call(
|
|
9
|
+
this,
|
|
10
|
+
(e.functional ? this.parent : this).$root.$options.shadowRoot
|
|
11
|
+
);
|
|
12
|
+
} : i), o)
|
|
13
|
+
if (e.functional) {
|
|
14
|
+
e._injectStyles = o;
|
|
15
|
+
var l = e.render;
|
|
16
|
+
e.render = function(p, _) {
|
|
17
|
+
return o.call(_), l(p, _);
|
|
18
|
+
};
|
|
19
|
+
} else {
|
|
20
|
+
var s = e.beforeCreate;
|
|
21
|
+
e.beforeCreate = s ? [].concat(s, o) : [o];
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
exports: r,
|
|
25
|
+
options: e
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
v as n
|
|
30
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kyfe/fms-vue2-components",
|
|
3
|
+
"version": "0.0.2-beta.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"dev:build": "npm run build && yalc publish && yalc link"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue2": "^1.1.2",
|
|
17
|
+
"@vitejs/plugin-vue2-jsx": "^1.1.1",
|
|
18
|
+
"vite": "3.2.10",
|
|
19
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
20
|
+
"vite-plugin-libcss": "^1.1.2"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@kyfe/decrypt": "^0.0.7",
|
|
24
|
+
"@kyfe/fms-utils": "workspace:^",
|
|
25
|
+
"dayjs": "^1.11.13",
|
|
26
|
+
"vant": "2.5.6"
|
|
27
|
+
},
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"**/*.css"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// 卡片样式的圆角
|
|
2
|
+
@card-border-radius: 6px;
|
|
3
|
+
|
|
4
|
+
/* 以下均为van-collapse组件的新样式
|
|
5
|
+
*新UI规范:手风琴展开后title的下边框需要贯穿左右,连接左右边界
|
|
6
|
+
* class="collapse-title--expend_border-bottom-hidden"
|
|
7
|
+
* @import url('../style/common'); */
|
|
8
|
+
.collapse-wrap {
|
|
9
|
+
border-radius: @card-border-radius;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.collapse-title--expend_border-bottom-hidden {
|
|
14
|
+
/deep/ .van-collapse-item__title--expanded {
|
|
15
|
+
&::after {
|
|
16
|
+
right: 0 !important; // 因为公共组件中使用了id选择器,只能使用这个才能覆盖公共组件中设置的right:16px
|
|
17
|
+
left: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 自写input输入框的样式:背景为灰色/圆角(type=textarea会有limit数字显示)
|
|
23
|
+
// 参照:报销申请-报销事由
|
|
24
|
+
.field-reason {
|
|
25
|
+
display: block;
|
|
26
|
+
|
|
27
|
+
/deep/ .van-field__value {
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
background-color: #f7f8fa;
|
|
30
|
+
margin-top: 8px;
|
|
31
|
+
|
|
32
|
+
.van-field__body {
|
|
33
|
+
padding: 0;
|
|
34
|
+
line-height: 20px;
|
|
35
|
+
|
|
36
|
+
input.van-field__control {
|
|
37
|
+
height: 40px;
|
|
38
|
+
padding: 0 12px;
|
|
39
|
+
}
|
|
40
|
+
textarea.van-field__control {
|
|
41
|
+
padding: 12px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// padding-left: 20px;
|
|
45
|
+
.van-field__right-icon {
|
|
46
|
+
position: absolute;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
right: 16px;
|
|
49
|
+
height: 32px;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.van-field__word-limit {
|
|
57
|
+
margin-right: 16px;
|
|
58
|
+
color: #858793;
|
|
59
|
+
padding-bottom: 8px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="copy-box">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
<span v-if="text">{{ text }}</span>
|
|
5
|
+
<fms-ks-decrypt
|
|
6
|
+
v-else
|
|
7
|
+
:fieldNameStr="fieldNameStr"
|
|
8
|
+
:value="formData[fieldName]"
|
|
9
|
+
:formData="formData"
|
|
10
|
+
:fieldName="fieldName"
|
|
11
|
+
:menuCode="menuCode"
|
|
12
|
+
@decryptData="decryptData"
|
|
13
|
+
v-bind="decryptConfig"
|
|
14
|
+
></fms-ks-decrypt>
|
|
15
|
+
<i class="copy-icon" @click="onCopy"></i>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<script>
|
|
19
|
+
import FmsKsEecrypt from '../fms-ks-decrypt/fms-ks-decrypt.vue'
|
|
20
|
+
const Toast = window.vant && window.vant.Toast
|
|
21
|
+
export default {
|
|
22
|
+
name: 'FmsCopyBox',
|
|
23
|
+
props: {
|
|
24
|
+
text: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
formData: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default() {
|
|
31
|
+
return {
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
fieldNameStr: String,
|
|
36
|
+
fieldName: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '',
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* 格式如下
|
|
42
|
+
* {
|
|
43
|
+
moduleCode: 'f1cd4185576d437d8fc2e0270b94cc56',
|
|
44
|
+
moduleName: '预存开户',
|
|
45
|
+
},
|
|
46
|
+
*/
|
|
47
|
+
menuCode: Object,
|
|
48
|
+
decryptConfig: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
components: {
|
|
54
|
+
FmsKsEecrypt,
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
return {
|
|
58
|
+
value: '',
|
|
59
|
+
decryptVal: '',
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
computed: {},
|
|
63
|
+
methods: {
|
|
64
|
+
// 复制
|
|
65
|
+
onCopy() {
|
|
66
|
+
const { text, formData, fieldName, decryptVal } = this
|
|
67
|
+
const str = text || decryptVal || formData[fieldName]
|
|
68
|
+
window.ks.callFunc({ method: 'paste', params: { str } }).catch(() => {
|
|
69
|
+
Toast.fail('复制失败')
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
// 解密回调
|
|
73
|
+
decryptData(val) {
|
|
74
|
+
this.decryptVal = val
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
<style lang="less" scoped>
|
|
80
|
+
.copy-box {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
height: 14px;
|
|
83
|
+
font-size: 12px;
|
|
84
|
+
font-weight: 400;
|
|
85
|
+
color: #1b2240;
|
|
86
|
+
line-height: 14px;
|
|
87
|
+
align-items: center;
|
|
88
|
+
.copy-icon {
|
|
89
|
+
width: 12px;
|
|
90
|
+
height: 12px;
|
|
91
|
+
background: url('@/assets/images/copy-icon.png') no-repeat center / contain;
|
|
92
|
+
background-clip: content-box;
|
|
93
|
+
padding: 0 4px;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ky-empty">
|
|
3
|
+
<div class="empty-image">
|
|
4
|
+
<img v-if="image === 'default'" src="./assets/default.png">
|
|
5
|
+
<img v-else-if="image === 'search'" src="./assets/search.png">
|
|
6
|
+
</div>
|
|
7
|
+
<p class="description">{{ description || emptyMap[image].description }}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'FmsEmpty',
|
|
15
|
+
props: {
|
|
16
|
+
image: { type: String, default: 'default' },
|
|
17
|
+
description: String
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
emptyMap: {
|
|
22
|
+
'default': {
|
|
23
|
+
description: '暂无内容'
|
|
24
|
+
},
|
|
25
|
+
'search': {
|
|
26
|
+
description: '无搜索结果'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="less">
|
|
35
|
+
.ky-empty {
|
|
36
|
+
margin: 20% auto;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
.empty-image {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
width: 140px;
|
|
45
|
+
height: 140px;
|
|
46
|
+
img {
|
|
47
|
+
height: auto;
|
|
48
|
+
// object-fit: contain;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.description {
|
|
53
|
+
color: #888EA6;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</style>
|