@opentiny/vue-docs 3.26.6 → 3.26.7

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/env/.env.saas CHANGED
@@ -1,5 +1,5 @@
1
1
  # 1、声明一个变量
2
- VITE_CONTEXT=/tiny-vue/
2
+ VITE_CONTEXT=/tiny-vue-saas/
3
3
  VITE_BUILD_TARGET='open'
4
4
  VITE_TINY_THEME='saas'
5
5
  # 官网应用类型:pc / mobile / mobile-first
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opentiny/vue-docs",
3
3
  "type": "module",
4
- "version": "3.26.6",
4
+ "version": "3.26.7",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
7
  "@docsearch/css": "^3.8.0",
@@ -29,22 +29,22 @@
29
29
  "zod": "^3.24.4",
30
30
  "@opentiny/utils": "~3.26.0",
31
31
  "@opentiny/vue": "~3.26.0",
32
- "@opentiny/vue-design-aurora": "~3.26.0",
33
32
  "@opentiny/vue-common": "~3.26.0",
33
+ "@opentiny/vue-design-aurora": "~3.26.0",
34
34
  "@opentiny/vue-design-saas": "~3.26.0",
35
35
  "@opentiny/vue-design-smb": "~3.26.0",
36
36
  "@opentiny/vue-directive": "~3.26.0",
37
- "@opentiny/vue-flowchart": "~3.26.0",
38
37
  "@opentiny/vue-hooks": "~3.26.0",
38
+ "@opentiny/vue-flowchart": "~3.26.0",
39
39
  "@opentiny/vue-huicharts": "~3.26.0",
40
+ "@opentiny/vue-icon-multicolor": "~3.26.0",
40
41
  "@opentiny/vue-icon": "~3.26.0",
41
- "@opentiny/vue-icon-saas": "~3.26.0",
42
42
  "@opentiny/vue-locale": "~3.26.0",
43
+ "@opentiny/vue-icon-saas": "~3.26.0",
43
44
  "@opentiny/vue-modal": "~3.26.0",
44
45
  "@opentiny/vue-renderless": "~3.26.0",
45
46
  "@opentiny/vue-theme": "~3.26.0",
46
- "@opentiny/vue-theme-saas": "~3.26.2",
47
- "@opentiny/vue-icon-multicolor": "~3.26.0"
47
+ "@opentiny/vue-theme-saas": "~3.26.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@playwright/test": "~1.49.0",
@@ -184,7 +184,9 @@ const getDemoCodeFn = async (demo, forceUpdate?: boolean) => {
184
184
  const demoName = apiModeFn.getDemoName(`${getWebdocPath(cmpId)}/${fileName}`)
185
185
  let code = ''
186
186
 
187
- const path = isMobileFirst.value ? `@demos/mobile-first/app/${demoName}` : `${staticDemoPath}/${demoName}`
187
+ const path = isMobileFirst.value
188
+ ? `@demos/mobile-first/app/${demoName.replace('mobile-first/', '')}`
189
+ : `${staticDemoPath}/${demoName}`
188
190
  code = await fetchDemosFile(path)
189
191
  .then((code) => {
190
192
  return code
package/src/main.js CHANGED
@@ -61,10 +61,7 @@ if (!location.href.includes('tiny-vue-plus')) {
61
61
  })
62
62
  }
63
63
 
64
- if (envTarget !== 'open') {
65
- // 支持本地开发和内网使用全局搜索
66
- doSearchEverySite()
67
- }
64
+ doSearchEverySite()
68
65
 
69
66
  // 实验后发现,先调用一次预热一下,后续再调用会有速度的提示,因此在main中预热一下。
70
67
  setTimeout(() => {
@@ -1,4 +1,5 @@
1
1
  const OPEN_TINY_URL = 'https://opentiny.design'
2
+ const isSaas = import.meta.env.VITE_TINY_THEME === 'saas'
2
3
 
3
4
  export const doSearchEverySite = () => {
4
5
  window.handleGlobalSearchData = (resolve) => {
@@ -7,6 +8,10 @@ export const doSearchEverySite = () => {
7
8
  data.content = data.content.replaceAll(OPEN_TINY_URL, window.location.origin)
8
9
  }
9
10
 
11
+ if (isSaas) {
12
+ data.content = data.content.replaceAll('/tiny-vue/', '/tiny-vue-saas/')
13
+ }
14
+
10
15
  resolve(data)
11
16
  }
12
17
  }
package/vite.extend.ts CHANGED
@@ -28,9 +28,6 @@ export const delStaticPlugin = () => {
28
28
 
29
29
  // 修改@docsearch依赖,使其支持内外网官网
30
30
  export const viteDocsearchPlugin = (env) => {
31
- if (env.VITE_BUILD_TARGET !== 'inner') {
32
- return null
33
- }
34
31
  return {
35
32
  name: 'vite-docsearch-plugin',
36
33
  enforce: 'pre',