vuepress-theme-uniapp-official 1.4.32 → 1.4.34
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.
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
searchBox: { placeholder, buttonText, searchBy },
|
|
160
160
|
resultsScreen: { resultsText, noResultsText, askNoResultsText },
|
|
161
161
|
},
|
|
162
|
+
extraFacetFilters = []
|
|
162
163
|
} = searchPageConfig;
|
|
163
164
|
const crawlerUrl = 'https://zh.uniapp.dcloud.io/'
|
|
164
165
|
|
|
@@ -358,11 +359,8 @@
|
|
|
358
359
|
searchByAlgolia() {
|
|
359
360
|
const { searchParameters = {} } = this.options;
|
|
360
361
|
let categoryArr = [`category:${this.currentCategory.text}`];
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
categoryArr.push('tag:UTS', 'tag:插件')
|
|
364
|
-
categoryArr = [categoryArr];
|
|
365
|
-
}
|
|
362
|
+
categoryArr.push(...extraFacetFilters)
|
|
363
|
+
categoryArr = [categoryArr];
|
|
366
364
|
if (this.currentCategory.text === 'uni-app x') {
|
|
367
365
|
// category:uni-app OR tag:UTS OR tag:插件
|
|
368
366
|
categoryArr.push('tag:插件', 'tag:工程化')
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import Popover from './Popover.vue'
|
|
3
3
|
|
|
4
4
|
const props = defineProps({
|
|
5
|
-
table: String
|
|
5
|
+
table: String,
|
|
6
6
|
})
|
|
7
7
|
|
|
8
8
|
/** @type {MdTableOptions} */
|
|
9
9
|
const TABLE_OPTIONS = JSON.parse(props.table.replace(/\\/g, ''))
|
|
10
10
|
const iconWidth = '22px'
|
|
11
11
|
|
|
12
|
-
const resolveTableCelContent =
|
|
12
|
+
const resolveTableCelContent = content => {
|
|
13
13
|
if (/~~.+~~/.test(content)) {
|
|
14
14
|
return `<s>${content}</s>`
|
|
15
15
|
}
|
|
@@ -19,6 +19,7 @@ const resolveTableCelContent = (content) => {
|
|
|
19
19
|
const SUPPORTED = 'SUPPORTED'
|
|
20
20
|
const NOT_SUPPORTED = 'NOT_SUPPORTED'
|
|
21
21
|
const PARTIALLY_SUPPORTED = 'PARTIALLY_SUPPORTED'
|
|
22
|
+
const PERCH = 'PERCH'
|
|
22
23
|
|
|
23
24
|
let status = PARTIALLY_SUPPORTED
|
|
24
25
|
|
|
@@ -41,6 +42,8 @@ if (typeof TABLE_OPTIONS.rows === 'object') {
|
|
|
41
42
|
status = SUPPORTED
|
|
42
43
|
} else if (!hasDefaultTag && hasNotSupportedTag && !hasSupportedTag) {
|
|
43
44
|
status = NOT_SUPPORTED
|
|
45
|
+
} else if (hasDefaultTag && !hasNotSupportedTag && !hasSupportedTag) {
|
|
46
|
+
status = PERCH
|
|
44
47
|
} else {
|
|
45
48
|
status = PARTIALLY_SUPPORTED
|
|
46
49
|
}
|
|
@@ -51,37 +54,78 @@ if (typeof TABLE_OPTIONS.rows === 'object') {
|
|
|
51
54
|
<Popover>
|
|
52
55
|
<template #reference>
|
|
53
56
|
<span class="info">
|
|
54
|
-
<svg
|
|
55
|
-
|
|
57
|
+
<svg
|
|
58
|
+
v-if="status === SUPPORTED"
|
|
59
|
+
:width="iconWidth"
|
|
60
|
+
:height="iconWidth"
|
|
61
|
+
t="1716284589535"
|
|
62
|
+
class="icon"
|
|
63
|
+
viewBox="0 0 1024 1024"
|
|
64
|
+
version="1.1"
|
|
65
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
+
p-id="6703"
|
|
67
|
+
fill="#0B6316"
|
|
68
|
+
>
|
|
56
69
|
<path d="M384 691.2L204.8 512l-59.744 59.744L384 810.656l512-512-59.744-59.712L384 691.2z" p-id="6704"></path>
|
|
57
70
|
</svg>
|
|
58
|
-
<svg
|
|
59
|
-
|
|
71
|
+
<svg
|
|
72
|
+
v-else-if="status === PARTIALLY_SUPPORTED"
|
|
73
|
+
:width="iconWidth"
|
|
74
|
+
:height="iconWidth"
|
|
75
|
+
t="1716284768743"
|
|
76
|
+
class="icon"
|
|
77
|
+
viewBox="0 0 1024 1024"
|
|
78
|
+
version="1.1"
|
|
79
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
80
|
+
p-id="7063"
|
|
81
|
+
fill="#4D5702"
|
|
82
|
+
>
|
|
60
83
|
<path
|
|
61
84
|
d="M941.82716 685.195062L733.234568 476.602469l111.249383-111.249383 3.792592-3.792592 93.550617-93.550617c15.17037-15.17037 15.17037-41.718519 0-56.888889l-1.264197-1.264198c-15.17037-15.17037-41.718519-15.17037-56.888889 0L675.081481 418.449383 466.488889 209.85679c-15.17037-15.17037-41.718519-15.17037-56.888889 0l-1.264198 1.264198c-7.585185 7.585185-11.377778 17.698765-12.641975 27.812345s3.792593 20.22716 11.377778 29.076544l208.592593 208.592592-207.328396 208.592593c-1.264198 1.264198-3.792593 3.792593-5.05679 6.320987L366.617284 728.177778 140.325926 499.358025c-16.434568-16.434568-41.718519-16.434568-58.153086 0-16.434568 16.434568-16.434568 41.718519 0 58.153086l255.367901 255.367901c7.585185 7.585185 18.962963 11.377778 29.076543 11.377778 10.11358 0 21.491358-3.792593 29.076543-11.377778l278.123457-278.123456 208.592593 208.592592c15.17037 15.17037 41.718519 15.17037 56.888888 0l1.264198-1.264197c16.434568-16.434568 16.434568-41.718519 1.264197-56.888889z"
|
|
62
|
-
p-id="7064"
|
|
85
|
+
p-id="7064"
|
|
86
|
+
></path>
|
|
63
87
|
</svg>
|
|
64
|
-
<svg
|
|
65
|
-
|
|
88
|
+
<svg
|
|
89
|
+
v-else-if="status === NOT_SUPPORTED"
|
|
90
|
+
:width="iconWidth"
|
|
91
|
+
:height="iconWidth"
|
|
92
|
+
t="1716284801363"
|
|
93
|
+
class="icon"
|
|
94
|
+
viewBox="0 0 1024 1024"
|
|
95
|
+
version="1.1"
|
|
96
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
97
|
+
p-id="7267"
|
|
98
|
+
fill="#86261A"
|
|
99
|
+
>
|
|
66
100
|
<path
|
|
67
101
|
d="M810.688 273.472l-60.16-60.16L512 451.84 273.472 213.312l-60.16 60.16L451.84 512l-238.528 238.464 60.16 60.16L512 572.16l238.528 238.464 60.16-60.16L572.16 512l238.528-238.528z"
|
|
68
|
-
p-id="7268"
|
|
102
|
+
p-id="7268"
|
|
103
|
+
></path>
|
|
69
104
|
</svg>
|
|
105
|
+
<template v-else>
|
|
106
|
+
<div :style="{ width: iconWidth, height: iconWidth, textAlign: 'center' }">-</div>
|
|
107
|
+
</template>
|
|
70
108
|
</span>
|
|
71
109
|
</template>
|
|
72
110
|
<table>
|
|
73
111
|
<thead>
|
|
74
112
|
<tr>
|
|
75
|
-
<th
|
|
76
|
-
|
|
113
|
+
<th
|
|
114
|
+
v-for="header in TABLE_OPTIONS.headers"
|
|
115
|
+
:style="header.align ? { textAlign: header.align } : ''"
|
|
116
|
+
:key="header.title"
|
|
117
|
+
>
|
|
77
118
|
{{ header.title }}
|
|
78
119
|
</th>
|
|
79
120
|
</tr>
|
|
80
121
|
</thead>
|
|
81
122
|
<tbody>
|
|
82
123
|
<tr v-for="(row, rowIndex) in TABLE_OPTIONS.rows">
|
|
83
|
-
<td
|
|
84
|
-
|
|
124
|
+
<td
|
|
125
|
+
v-for="(cel, celIndex) in row"
|
|
126
|
+
:key="celIndex"
|
|
127
|
+
:style="TABLE_OPTIONS.headers[rowIndex].align ? { textAlign: TABLE_OPTIONS.headers[rowIndex].align } : ''"
|
|
128
|
+
>
|
|
85
129
|
<span v-html="resolveTableCelContent(cel)" />
|
|
86
130
|
</td>
|
|
87
131
|
</tr>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, useSlots
|
|
2
|
+
import { ref, useSlots } from 'vue'
|
|
3
3
|
import { getNavbarHeight } from '../util'
|
|
4
4
|
|
|
5
5
|
const emit = defineEmits(['show', 'hide'])
|
|
@@ -121,6 +121,10 @@ const vPopover = {
|
|
|
121
121
|
padding: 10px;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
.popover-reference-wrapper {
|
|
125
|
+
display: inline-block;
|
|
126
|
+
}
|
|
127
|
+
|
|
124
128
|
.fade-in-enter-active,.fade-in-leave-active {
|
|
125
129
|
transition: all .15s cubic-bezier(.55,0,.1,1)
|
|
126
130
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-theme-uniapp-official",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.34",
|
|
4
4
|
"description": "uni-app official website theme for vuepress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"vuepress-plugin-named-chunks": "^1.1.4",
|
|
42
42
|
"vuepress-plugin-zooming": "^1.1.8",
|
|
43
43
|
"vuepress-plugin-check-md2": "^1.0.5",
|
|
44
|
-
"vuepress-plugin-expandable-row": "^1.0.
|
|
44
|
+
"vuepress-plugin-expandable-row": "^1.0.10"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"publish:patch": "npm version patch && npm publish",
|