@opentiny/vue-docs 3.18.4 → 3.18.5

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="content">
3
3
  <tiny-button @click="visible = !visible" :reset-time="0">自定义底部</tiny-button>
4
- <tiny-modal v-model="visible" show-footer>
4
+ <tiny-modal v-model="visible" footer-dragable show-footer>
5
5
  <template #footer>
6
6
  <tiny-button>自定义底部信息</tiny-button>
7
7
  </template>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="content">
3
3
  <tiny-button @click="visible = !visible" :reset-time="0">自定义底部</tiny-button>
4
- <tiny-modal v-model="visible" show-footer>
4
+ <tiny-modal v-model="visible" footer-dragable show-footer>
5
5
  <template #footer>
6
6
  <tiny-button>自定义底部信息</tiny-button>
7
7
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-docs",
3
- "version": "3.18.4",
3
+ "version": "3.18.5",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "@opentiny/vue-repl": "^1.1.2",
@@ -17,17 +17,17 @@
17
17
  "vue-i18n": "^9.1.10",
18
18
  "vue-router": "4.1.5",
19
19
  "@opentiny/vue": "~3.18.0",
20
- "@opentiny/vue-design-saas": "~3.18.0",
21
- "@opentiny/vue-common": "~3.18.0",
20
+ "@opentiny/vue-design-aurora": "~3.18.0",
22
21
  "@opentiny/vue-directive": "~3.18.0",
22
+ "@opentiny/vue-design-smb": "~3.18.0",
23
+ "@opentiny/vue-common": "~3.18.0",
24
+ "@opentiny/vue-design-saas": "~3.18.0",
23
25
  "@opentiny/vue-icon": "~3.18.0",
24
- "@opentiny/vue-design-aurora": "~3.18.0",
26
+ "@opentiny/vue-theme": "~3.18.1",
25
27
  "@opentiny/vue-icon-saas": "~3.18.0",
26
- "@opentiny/vue-design-smb": "~3.18.0",
28
+ "@opentiny/vue-vite-import": "~1.2.0",
27
29
  "@opentiny/vue-theme-mobile": "~3.18.0",
28
- "@opentiny/vue-theme": "~3.18.1",
29
- "@opentiny/vue-theme-saas": "~3.18.0",
30
- "@opentiny/vue-vite-import": "~1.2.0"
30
+ "@opentiny/vue-theme-saas": "~3.18.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@playwright/test": "~1.42.0",
@@ -451,7 +451,7 @@ export default defineComponent({
451
451
  })
452
452
  }
453
453
  }
454
- }, 600)
454
+ }, 0)
455
455
  }
456
456
 
457
457
  // 在singleDemo情况时,才需要滚动示例区域到顶
@@ -557,7 +557,12 @@ export default defineComponent({
557
557
  }
558
558
 
559
559
  // F5刷新加载时,跳到当前示例
560
- scrollByHash(hash)
560
+ // 应当在所有demo渲染完毕后在滚动,否则滚动完位置后,demo渲染会使滚动位置错位
561
+ setTimeout(() => {
562
+ nextTick(() => {
563
+ scrollByHash(hash)
564
+ })
565
+ }, 0)
561
566
  })
562
567
  .finally(() => {
563
568
  // 获取组件贡献者
@@ -645,11 +650,12 @@ export default defineComponent({
645
650
  router.push(data.link)
646
651
  } else if (apiModeState.demoMode === 'default' && data.link.startsWith('#')) {
647
652
  // 多示例模式,自动会切到相应的位置。只需要记录singleDemo就好了
653
+ e.preventDefault()
648
654
  const hash = data.link.slice(1)
649
655
  state.currDemoId = hash
650
656
  state.singleDemo = state.currJson.demos.find((d) => d.demoId === hash)
651
-
652
- e.preventDefault()
657
+ router.push(data.link)
658
+ scrollByHash(hash)
653
659
  }
654
660
  }
655
661
  }