@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.
Files changed (53) hide show
  1. package/.prettierignore +0 -0
  2. package/.prettierrc.cjs +8 -0
  3. package/components/fqa/index.vue +128 -0
  4. package/components/fqa/markdown-notes.less +34 -0
  5. package/components/fqa-amixer/index.vue +105 -0
  6. package/components/fqa-aovery/index.vue +46 -0
  7. package/components/fqa-aovery/modify.less +3 -0
  8. package/components/fqa-arrow/index.vue +51 -0
  9. package/components/fqa-assist/index.vue +104 -0
  10. package/components/fqa-assist/menus-modify.less +38 -0
  11. package/components/fqa-assist/start-modify.less +3 -0
  12. package/components/fqa-attach/index.vue +51 -0
  13. package/components/fqa-attach/modify.less +3 -0
  14. package/components/fqa-boxer/index.vue +130 -0
  15. package/components/fqa-button/index.vue +105 -0
  16. package/components/fqa-control/index.vue +47 -0
  17. package/components/fqa-debug/index.vue +49 -0
  18. package/components/fqa-download/index.vue +65 -0
  19. package/components/fqa-footer/index.vue +25 -0
  20. package/components/fqa-fullscreen/index.vue +60 -0
  21. package/components/fqa-gap/index.vue +10 -0
  22. package/components/fqa-header/index.vue +105 -0
  23. package/components/fqa-header/poping-modify.less +48 -0
  24. package/components/fqa-icon/index.vue +36 -0
  25. package/components/fqa-input/index.vue +47 -0
  26. package/components/fqa-link/index.vue +184 -0
  27. package/components/fqa-lister/index.vue +61 -0
  28. package/components/fqa-logo/index.vue +34 -0
  29. package/components/fqa-markdown/index.vue +109 -0
  30. package/components/fqa-markdown/katex-modify.less +0 -0
  31. package/components/fqa-markdown/table-modify.less +5 -0
  32. package/components/fqa-markdown/table-ops.less +76 -0
  33. package/components/fqa-mask/index.vue +42 -0
  34. package/components/fqa-pagination/index.vue +44 -0
  35. package/components/fqa-pagination/modify.less +66 -0
  36. package/components/fqa-preloading/index.vue +70 -0
  37. package/components/fqa-profile/index.vue +141 -0
  38. package/components/fqa-reissue/index.vue +19 -0
  39. package/components/fqa-selection/index.vue +95 -0
  40. package/components/fqa-selection/modify.less +10 -0
  41. package/components/fqa-sider/index.vue +16 -0
  42. package/components/fqa-snapshot/index.vue +107 -0
  43. package/components/fqa-start/index.vue +321 -0
  44. package/components/fqa-start/modify.less +11 -0
  45. package/components/fqa-switcher/index.vue +94 -0
  46. package/components/fqa-table/index.vue +42 -0
  47. package/components/fqa-table/modify.less +56 -0
  48. package/components/fqa-text/index.vue +58 -0
  49. package/components/fqa-welcome/index.vue +29 -0
  50. package/components/fqa-worcha/index.vue +107 -0
  51. package/components/fqa-worry/index.vue +148 -0
  52. package/index.js +20 -0
  53. 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
+ };
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@nebulars/primary",
3
+ "version": "0.3.105",
4
+ "main": "index.js",
5
+ "type": "module",
6
+ "author": "Joenix",
7
+ "license": "MIT",
8
+ "gitHead": "3a5caba7a4a72e3c6ada61420f2d932c461cf7be"
9
+ }