@nebulars/primary 0.3.105
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/.prettierignore +0 -0
- package/.prettierrc.cjs +8 -0
- package/components/fqa/index.vue +128 -0
- package/components/fqa/markdown-notes.less +34 -0
- package/components/fqa-amixer/index.vue +105 -0
- package/components/fqa-aovery/index.vue +46 -0
- package/components/fqa-aovery/modify.less +3 -0
- package/components/fqa-arrow/index.vue +51 -0
- package/components/fqa-assist/index.vue +104 -0
- package/components/fqa-assist/menus-modify.less +38 -0
- package/components/fqa-assist/start-modify.less +3 -0
- package/components/fqa-attach/index.vue +51 -0
- package/components/fqa-attach/modify.less +3 -0
- package/components/fqa-boxer/index.vue +130 -0
- package/components/fqa-button/index.vue +105 -0
- package/components/fqa-control/index.vue +47 -0
- package/components/fqa-debug/index.vue +49 -0
- package/components/fqa-download/index.vue +65 -0
- package/components/fqa-footer/index.vue +25 -0
- package/components/fqa-fullscreen/index.vue +60 -0
- package/components/fqa-gap/index.vue +10 -0
- package/components/fqa-header/index.vue +105 -0
- package/components/fqa-header/poping-modify.less +48 -0
- package/components/fqa-icon/index.vue +36 -0
- package/components/fqa-input/index.vue +47 -0
- package/components/fqa-link/index.vue +184 -0
- package/components/fqa-lister/index.vue +61 -0
- package/components/fqa-logo/index.vue +34 -0
- package/components/fqa-markdown/index.vue +109 -0
- package/components/fqa-markdown/katex-modify.less +0 -0
- package/components/fqa-markdown/table-modify.less +5 -0
- package/components/fqa-markdown/table-ops.less +76 -0
- package/components/fqa-mask/index.vue +42 -0
- package/components/fqa-pagination/index.vue +44 -0
- package/components/fqa-pagination/modify.less +66 -0
- package/components/fqa-preloading/index.vue +70 -0
- package/components/fqa-profile/index.vue +141 -0
- package/components/fqa-reissue/index.vue +19 -0
- package/components/fqa-selection/index.vue +95 -0
- package/components/fqa-selection/modify.less +10 -0
- package/components/fqa-sider/index.vue +16 -0
- package/components/fqa-snapshot/index.vue +107 -0
- package/components/fqa-start/index.vue +321 -0
- package/components/fqa-start/modify.less +11 -0
- package/components/fqa-switcher/index.vue +94 -0
- package/components/fqa-table/index.vue +42 -0
- package/components/fqa-table/modify.less +56 -0
- package/components/fqa-text/index.vue +58 -0
- package/components/fqa-welcome/index.vue +29 -0
- package/components/fqa-worcha/index.vue +107 -0
- package/components/fqa-worry/index.vue +148 -0
- package/index.js +20 -0
- package/package.json +9 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<style lang="less" scoped>
|
|
2
|
+
.fqa-preloading {
|
|
3
|
+
& {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
z-index: 9999;
|
|
10
|
+
|
|
11
|
+
background-color: @color-app;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-svg,
|
|
15
|
+
&-text,
|
|
16
|
+
&-logo {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 50%;
|
|
19
|
+
left: 50%;
|
|
20
|
+
transform: translate(-50%, -50%);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-svg {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-text {
|
|
27
|
+
color: @color-text;
|
|
28
|
+
font-size: 18px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-logo {
|
|
32
|
+
filter: brightness(1.25) contrast(0.75);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<div class="fqa-preloading">
|
|
39
|
+
<img class="fqa-preloading-svg" :style="svg" src="@/assets/preloading.svg" />
|
|
40
|
+
<img class="fqa-preloading-logo" :style="logo" src="@/assets/logo.png" />
|
|
41
|
+
<!-- <span class="fqa-preloading-text">系统加载中,请稍后 ...</span> -->
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
export default {
|
|
47
|
+
props: {
|
|
48
|
+
size: {
|
|
49
|
+
type: [Number, String],
|
|
50
|
+
default: 256,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
computed: {
|
|
55
|
+
svg() {
|
|
56
|
+
return {
|
|
57
|
+
width: `${this.size}px`,
|
|
58
|
+
height: `${this.size}px`,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
logo() {
|
|
63
|
+
return {
|
|
64
|
+
width: `${this.size * 0.5}px`,
|
|
65
|
+
height: `${this.size * 0.5}px`,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
</script>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<style lang="less" scoped>
|
|
2
|
+
.fqa-profile {
|
|
3
|
+
&-background {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: @size-profile;
|
|
7
|
+
margin-bottom: @size-provert;
|
|
8
|
+
object-fit: cover;
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
background-size: cover;
|
|
11
|
+
background-position: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-info {
|
|
15
|
+
left: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: -@size-provert;
|
|
18
|
+
position: absolute;
|
|
19
|
+
padding-inline: @size-assispant;
|
|
20
|
+
|
|
21
|
+
h3,
|
|
22
|
+
h4 {
|
|
23
|
+
margin-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
h4 {
|
|
27
|
+
color: @color-subtext;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-setting {
|
|
32
|
+
left: calc(8rem + @size-assispant);
|
|
33
|
+
bottom: 0;
|
|
34
|
+
position: absolute;
|
|
35
|
+
cursor: pointer !important;
|
|
36
|
+
transition: transform 0.3s ease;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
transform: rotate(45deg);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div class="fqa-profile">
|
|
47
|
+
<div class="fqa-profile-background" :style="{ backgroundImage: `url(${image})` }">
|
|
48
|
+
<div class="fqa-profile-info">
|
|
49
|
+
<!-- Setting -->
|
|
50
|
+
<fqa-icon icon="SettingOutlined" class="fqa-profile-setting" :size="18" @click="setting" v-if="!app.mobile" />
|
|
51
|
+
|
|
52
|
+
<!-- Profile -->
|
|
53
|
+
<a-flex justify="space-between" align="flex-end">
|
|
54
|
+
<a-flex :gap="12" align="flex-end">
|
|
55
|
+
<a-avatar :size="92" :style="{ fontSize: `4rem`, border: `2px solid white` }" :src="app.user.avatar">{{ app.user.nickname?.charAt(0) }}</a-avatar>
|
|
56
|
+
<a-space direction="vertical" :size="4">
|
|
57
|
+
<h3>{{ app.user.nickname || app.user.phone }}</h3>
|
|
58
|
+
<h4>ID:{{ pad(app.user.id) }}</h4>
|
|
59
|
+
</a-space>
|
|
60
|
+
</a-flex>
|
|
61
|
+
|
|
62
|
+
<!-- Logout -->
|
|
63
|
+
<a-config-provider :auto-insert-space-in-button="false" v-if="false">
|
|
64
|
+
<a-button type="primary" shape="round" @click.stop="logout" v-if="!app.mobile">
|
|
65
|
+
{{ $t('account.logout') }}
|
|
66
|
+
</a-button>
|
|
67
|
+
</a-config-provider>
|
|
68
|
+
</a-flex>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<a-modal v-model:open="visible" title="个人设置" :footer="null">
|
|
73
|
+
<!-- <router-view /> -->
|
|
74
|
+
<component v-if="comp" :is="comp" />
|
|
75
|
+
</a-modal>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script>
|
|
80
|
+
export default {
|
|
81
|
+
data() {
|
|
82
|
+
return {
|
|
83
|
+
comp: null,
|
|
84
|
+
visible: false,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
computed: {
|
|
89
|
+
image() {
|
|
90
|
+
return `https://oss.billionsintelligence.com/finqa/fqa_profile.jpg`;
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
methods: {
|
|
95
|
+
pad(n, l = 8) {
|
|
96
|
+
return String(n).padStart(l, '0');
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
async setting() {
|
|
100
|
+
// Get Route
|
|
101
|
+
const personal = this.$router.resolve({ name: 'personal' });
|
|
102
|
+
|
|
103
|
+
// Set Comp
|
|
104
|
+
this.comp = personal.matched[1]?.components?.default;
|
|
105
|
+
|
|
106
|
+
// Set Visible
|
|
107
|
+
this.visible = true;
|
|
108
|
+
|
|
109
|
+
// Stop
|
|
110
|
+
return;
|
|
111
|
+
|
|
112
|
+
// Set Route
|
|
113
|
+
const route = { path: '/personal' };
|
|
114
|
+
|
|
115
|
+
// For Web
|
|
116
|
+
this.$util.message.send({ route }, () => {
|
|
117
|
+
// For MNP
|
|
118
|
+
this.$router.push(route);
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
async logout() {
|
|
123
|
+
// Remove Token
|
|
124
|
+
await this.$store.dispatch('app/LOGOUT');
|
|
125
|
+
|
|
126
|
+
// Set Route
|
|
127
|
+
const route = { name: 'login', origin: true };
|
|
128
|
+
|
|
129
|
+
// Reset Data
|
|
130
|
+
await this.$store.dispatch('chat/CLEAN');
|
|
131
|
+
await this.$store.dispatch('sseengine/CLEAN');
|
|
132
|
+
|
|
133
|
+
// For Web
|
|
134
|
+
this.$util.message.send({ route }, () => {
|
|
135
|
+
// For MNP
|
|
136
|
+
this.$router.push(route);
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<style lang="less" scoped>
|
|
2
|
+
.fqa-reissue {
|
|
3
|
+
}
|
|
4
|
+
</style>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="fqa-reissue"></div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
props: {
|
|
13
|
+
menus: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => [],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<style lang="less" scoped>
|
|
2
|
+
.fqa-selection {
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
</style>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<a-form-item :label="label ? option_name : ''" :overlay-style="style">
|
|
9
|
+
<!-- single selection dropdown -->
|
|
10
|
+
<template v-if="type === `single selection dropdown`">
|
|
11
|
+
<a-select class="fqa-selection" :show-search="false" v-bind:value="modelValue" :options="options" @change="changeHandler" />
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<!-- multiple selection dropdown -->
|
|
15
|
+
<template v-if="type === `multiple selection dropdown`">
|
|
16
|
+
<a-select class="fqa-selection" :show-search="false" v-bind:value="modelValue" mode="multiple" placeholder="已选 0" :options="options" :maxTagCount="0" @change="changeHandler">
|
|
17
|
+
<template #maxTagPlaceholder>
|
|
18
|
+
<span v-if="modelValue.length === 1">{{ modelValue[0] }}</span>
|
|
19
|
+
<span v-else>已选 {{ modelValue.length }}+</span>
|
|
20
|
+
</template>
|
|
21
|
+
</a-select>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<!-- toggle switch -->
|
|
25
|
+
<template v-if="type === `toggle switch`">
|
|
26
|
+
<a-switch :checked="modelValue" :checked-children="$t('global.open')" :un-checked-children="$t('global.close')" @change="changeHandler" />
|
|
27
|
+
</template>
|
|
28
|
+
</a-form-item>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
props: {
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: [String, Number, Boolean, Array, Object],
|
|
36
|
+
default: '',
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
type: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
field_name: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
option_name: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: '',
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
defaults: {
|
|
55
|
+
type: [String, Number, Boolean, Array, Object],
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
selections: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: [],
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
description: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: '',
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
label: {
|
|
70
|
+
type: [Boolean],
|
|
71
|
+
default: true,
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
style: {
|
|
75
|
+
type: [Object],
|
|
76
|
+
default: {},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// emits: ['update:modelValue'],
|
|
81
|
+
|
|
82
|
+
computed: {
|
|
83
|
+
options() {
|
|
84
|
+
return (this.selections || []).map(({ show_name: label, field_value: value }) => ({ label, value }));
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
methods: {
|
|
89
|
+
changeHandler(modelValue) {
|
|
90
|
+
modelValue = modelValue.filter(value => value);
|
|
91
|
+
return this.$emit('update:modelValue', modelValue);
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
</script>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<style lang="less">
|
|
2
|
+
.fqa-snapshot,
|
|
3
|
+
.fqa-snapshot-mobile {
|
|
4
|
+
.ant-modal {
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.fqa-snapshot {
|
|
10
|
+
.ant-modal {
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ant-modal-content {
|
|
15
|
+
max-height: calc(80vh);
|
|
16
|
+
}
|
|
17
|
+
.ant-modal-body {
|
|
18
|
+
flex: 1;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 20px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-container {
|
|
25
|
+
height: calc(80vh - 120px);
|
|
26
|
+
overflow: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-control {
|
|
30
|
+
height: 60px;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
border-radius: @atom;
|
|
35
|
+
color: @color-text;
|
|
36
|
+
background-color: @color-app;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition: all @flash;
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: darken(@color-app, 4%);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fqa-snapshot-mobile {
|
|
47
|
+
.ant-modal {
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
top: 4% !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ant-modal-content {
|
|
53
|
+
max-height: calc(92vh);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.fqa-snapshot-container {
|
|
57
|
+
height: calc(92vh - 120px);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<a-modal class="fqa-snapshot" v-model:open="open" :width="app.mobile ? '80%' : 540" :footer="null" :z-index="10" :wrap-class-name="app.mobile ? 'fqa-snapshot-mobile' : 'fqa-snapshot'">
|
|
64
|
+
<div class="fqa-snapshot-container">
|
|
65
|
+
<img :src="snap" />
|
|
66
|
+
</div>
|
|
67
|
+
<div class="fqa-snapshot-control" @click="$store.dispatch('sseengine/SNAP_DOWNLOAD', snap)">
|
|
68
|
+
<div class="fqa-snapshot-control-download">
|
|
69
|
+
<fqa-icon icon="CloudDownloadOutlined" :size="24" />
|
|
70
|
+
</div>
|
|
71
|
+
<!--
|
|
72
|
+
<div class="fqa-snapshot-control-copy" v-if="false">
|
|
73
|
+
<fqa-icon icon="CopyOutlined" :size="24" />
|
|
74
|
+
</div>
|
|
75
|
+
-->
|
|
76
|
+
</div>
|
|
77
|
+
</a-modal>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script>
|
|
81
|
+
export default {
|
|
82
|
+
props: {
|
|
83
|
+
visible: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
snap: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
emits: ['update:visible'],
|
|
95
|
+
|
|
96
|
+
computed: {
|
|
97
|
+
open: {
|
|
98
|
+
get() {
|
|
99
|
+
return this.visible;
|
|
100
|
+
},
|
|
101
|
+
set(value) {
|
|
102
|
+
this.$emit('update:visible', value);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
</script>
|