@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,148 @@
|
|
|
1
|
+
<style lang="less" scoped>
|
|
2
|
+
.fqa-worry {
|
|
3
|
+
&-control {
|
|
4
|
+
padding: @gap 0;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-container {
|
|
9
|
+
overflow: auto;
|
|
10
|
+
border-radius: @radiu;
|
|
11
|
+
max-height: 0;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
transition: all @effect;
|
|
14
|
+
// border: 1px solid darken(@color-text, 50%);
|
|
15
|
+
background-color: darken(@color-app, 4%);
|
|
16
|
+
|
|
17
|
+
&.open {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
max-height: 240px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-main {
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
padding: @gap @gap @gap 0;
|
|
26
|
+
transition: all @effect;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-content,
|
|
30
|
+
&-right {
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-content {
|
|
36
|
+
text-align: justify;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-right {
|
|
40
|
+
text-align: right;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div class="fqa-worry">
|
|
47
|
+
<!-- Control -->
|
|
48
|
+
<a-space class="fqa-worry-control" @click="open = !open">
|
|
49
|
+
<template v-if="complete">
|
|
50
|
+
<fqa-icon icon="BulbOutlined" />
|
|
51
|
+
<span>智能问答</span>
|
|
52
|
+
</template>
|
|
53
|
+
<template v-else>
|
|
54
|
+
<fqa-icon icon="LoadingOutlined" />
|
|
55
|
+
<span>智能生成中</span>
|
|
56
|
+
</template>
|
|
57
|
+
<fqa-arrow :open="open" v-if="can && !sseengine.produce" />
|
|
58
|
+
</a-space>
|
|
59
|
+
|
|
60
|
+
<!-- Container -->
|
|
61
|
+
<div class="fqa-worry-container" :class="{ open }" v-if="error">
|
|
62
|
+
<div class="fqa-worry-main">
|
|
63
|
+
<fqa-worcha :source="trees" :compliance="item.compliance" :up="item.up" :rag="item.rag" />
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="fqa-worry-container" :class="{ open }" v-else-if="can">
|
|
68
|
+
<div class="fqa-worry-main">
|
|
69
|
+
<fqa-worcha :source="trees" :compliance="item.compliance" :up="item.up" :rag="item.rag" @finish="value => (open = !value)" />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
export default {
|
|
77
|
+
props: {
|
|
78
|
+
source: {
|
|
79
|
+
type: [Object],
|
|
80
|
+
default: {},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
item: {
|
|
84
|
+
type: [Object],
|
|
85
|
+
default: {},
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
produce: {
|
|
89
|
+
type: [Boolean],
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
data() {
|
|
95
|
+
return {
|
|
96
|
+
open: true,
|
|
97
|
+
complete: false,
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
watch: {
|
|
102
|
+
produce: {
|
|
103
|
+
async handler(value) {
|
|
104
|
+
if (this.complete) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (value === false) {
|
|
109
|
+
this.complete = !value;
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
item: {
|
|
115
|
+
async handler({ finally_status }) {
|
|
116
|
+
if (finally_status === 1) {
|
|
117
|
+
this.complete = true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (finally_status === 2) {
|
|
121
|
+
this.item.compliance = false;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
deep: true,
|
|
126
|
+
immediate: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
computed: {
|
|
131
|
+
error() {
|
|
132
|
+
return this.item.finally_status === 2;
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
can() {
|
|
136
|
+
return this.source.length;
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
trees() {
|
|
140
|
+
return this.$util.thintree(this.source, [4, 12][this.item.rag - 0] * 60);
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
mounted() {
|
|
145
|
+
this.complete = this.item.type === 'success';
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
</script>
|
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Use Vue Scaff UMD
|
|
2
|
+
import { createRegister, componentRegister, lessRegister } from '@scaff/umd';
|
|
3
|
+
|
|
4
|
+
// Exporting as Program
|
|
5
|
+
export default app => {
|
|
6
|
+
// Register Components
|
|
7
|
+
componentRegister(
|
|
8
|
+
// App
|
|
9
|
+
app,
|
|
10
|
+
|
|
11
|
+
// Components Modules
|
|
12
|
+
import.meta.glob('./components/**/*.vue', { eager: true }),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
// Register Less
|
|
16
|
+
lessRegister(
|
|
17
|
+
// Css Modules
|
|
18
|
+
import.meta.glob('./components/**/*.less', { eager: true }),
|
|
19
|
+
);
|
|
20
|
+
};
|