@opentinyvue/vue-docs 3.21.7 → 3.21.8
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/package.json +3 -6
- package/src/views/components-doc/common.vue +6 -6
- package/src/views/components-doc/components/anchor.vue +6 -2
- package/src/views/components-doc/components/api-docs.vue +4 -1
- package/src/views/components-doc/components/contributor.vue +2 -0
- package/src/views/components-doc/components/header.vue +3 -0
- package/src/views/components-doc/saas.vue +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-docs",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@playwright/test": "~1.49.0",
|
|
@@ -57,16 +57,14 @@
|
|
|
57
57
|
"vue-i18n": "^9.1.10",
|
|
58
58
|
"vue-router": "4.1.5",
|
|
59
59
|
"@opentiny-internal/unplugin-virtual-template": "~0.1.1-beta.0",
|
|
60
|
-
"@opentiny/
|
|
61
|
-
"@opentiny/utils": "npm:@opentinyvue/utils@~3.21.1",
|
|
60
|
+
"@opentiny/utils": "npm:@opentinyvue/utils@~3.21.2",
|
|
62
61
|
"@opentiny/vue": "~3.21.2",
|
|
63
62
|
"@opentiny/vue-common": "~3.21.0",
|
|
64
|
-
"@opentiny/vue-design-aurora": "~3.21.0",
|
|
65
63
|
"@opentiny/vue-design-saas": "~3.21.0",
|
|
64
|
+
"@opentiny/vue-design-aurora": "~3.21.0",
|
|
66
65
|
"@opentiny/vue-design-smb": "~3.21.0",
|
|
67
66
|
"@opentiny/vue-directive": "~3.21.0",
|
|
68
67
|
"@opentiny/vue-flowchart": "~3.21.0",
|
|
69
|
-
"@opentiny/vue-hooks": "npm:@opentinyvue/vue-hooks@~3.21.1",
|
|
70
68
|
"@opentiny/vue-icon": "~3.21.0",
|
|
71
69
|
"@opentiny/vue-icon-multicolor": "~3.21.0",
|
|
72
70
|
"@opentiny/vue-icon-saas": "~3.21.0",
|
|
@@ -74,7 +72,6 @@
|
|
|
74
72
|
"@opentiny/vue-modal": "~3.21.0",
|
|
75
73
|
"@opentiny/vue-renderless": "~3.21.0",
|
|
76
74
|
"@opentiny/vue-theme": "~3.21.2",
|
|
77
|
-
"@opentiny/vue-theme-mobile": "~3.21.0",
|
|
78
75
|
"@opentiny/vue-theme-saas": "~3.21.0"
|
|
79
76
|
},
|
|
80
77
|
"scripts": {
|
|
@@ -87,23 +87,24 @@ import { reactive, computed, watch, onMounted, nextTick, ref } from 'vue'
|
|
|
87
87
|
import { useRoute } from 'vue-router'
|
|
88
88
|
import { TinyTabs, TinyTabItem } from '@opentiny/vue'
|
|
89
89
|
import { debounce } from '@opentiny/utils'
|
|
90
|
-
import { i18nByKey, getWord, $clone,
|
|
91
|
-
import demoConfig from '@demos/config.js'
|
|
90
|
+
import { i18nByKey, getWord, $clone, useApiMode } from '@/tools'
|
|
92
91
|
import { router } from '@/router.js'
|
|
93
92
|
import { getWebdocPath } from './cmp-config'
|
|
94
|
-
import DemoBox from './components/demo'
|
|
93
|
+
import DemoBox from './components/demo.vue'
|
|
95
94
|
import AsideAnchor from './components/anchor.vue'
|
|
96
95
|
import ComponentHeader from './components/header.vue'
|
|
97
96
|
import ComponentContributor from './components/contributor.vue'
|
|
98
97
|
import ApiDocs from './components/api-docs.vue'
|
|
99
98
|
import useTasksFinish from './composition/useTasksFinish'
|
|
100
99
|
|
|
100
|
+
const props = defineProps({ loadData: {}, appMode: {}, demoKey: {} })
|
|
101
|
+
|
|
102
|
+
const emit = defineEmits(['single-demo-change', 'load-page'])
|
|
103
|
+
|
|
101
104
|
defineOptions({
|
|
102
105
|
name: 'CmpPageVue'
|
|
103
106
|
})
|
|
104
107
|
|
|
105
|
-
const props = defineProps({ loadData: {}, appMode: {}, demoKey: {} })
|
|
106
|
-
|
|
107
108
|
const scrollRef = ref()
|
|
108
109
|
const { apiModeState } = useApiMode()
|
|
109
110
|
const isRunningTest = localStorage.getItem('tiny-e2e-test') === 'true'
|
|
@@ -127,7 +128,6 @@ const state = reactive({
|
|
|
127
128
|
chartCode: false
|
|
128
129
|
})
|
|
129
130
|
|
|
130
|
-
const emit = defineEmits(['single-demo-change', 'load-page'])
|
|
131
131
|
watch(
|
|
132
132
|
() => state.singleDemo,
|
|
133
133
|
(val) => {
|
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
</tiny-anchor>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
|
+
|
|
15
16
|
<script setup lang="ts">
|
|
16
|
-
import {
|
|
17
|
+
import { computed } from 'vue'
|
|
17
18
|
import { TinyAnchor } from '@opentiny/vue'
|
|
19
|
+
|
|
18
20
|
const props = defineProps({ anchorAffix: {}, currentJson: {}, activeTab: {}, langKey: {}, apiTypes: {} })
|
|
19
21
|
|
|
22
|
+
const emit = defineEmits(['link-click'])
|
|
23
|
+
|
|
20
24
|
// 实例锚点
|
|
21
25
|
const demoAnchorLinks = computed(() => {
|
|
22
26
|
const links =
|
|
@@ -57,11 +61,11 @@ const apiAnchorLinks = computed(() => {
|
|
|
57
61
|
return apiAnchorLinks
|
|
58
62
|
})
|
|
59
63
|
const links = computed(() => (props.activeTab === 'demos' ? demoAnchorLinks.value : apiAnchorLinks.value))
|
|
60
|
-
const emit = defineEmits(['link-click'])
|
|
61
64
|
const handleAnchorClick = (...args) => {
|
|
62
65
|
emit('link-click', ...args)
|
|
63
66
|
}
|
|
64
67
|
</script>
|
|
68
|
+
|
|
65
69
|
<style scoped lang="less">
|
|
66
70
|
.cmp-page-anchor {
|
|
67
71
|
:deep(.tiny-anchor__affix) {
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
</div>
|
|
92
92
|
</div>
|
|
93
93
|
</template>
|
|
94
|
+
|
|
94
95
|
<script setup>
|
|
95
96
|
import { ref } from 'vue'
|
|
96
97
|
import { TinyGrid, TinyGridColumn } from '@opentiny/vue'
|
|
@@ -102,6 +103,8 @@ import VersionTip from './version-tip.vue'
|
|
|
102
103
|
|
|
103
104
|
const props = defineProps({ currentJson: {}, chartCode: {}, tableData: {} })
|
|
104
105
|
|
|
106
|
+
const emit = defineEmits(['jump-to-demo'])
|
|
107
|
+
|
|
105
108
|
const OuterLink = iconOuterLink()
|
|
106
109
|
|
|
107
110
|
const columnWidth = {
|
|
@@ -122,7 +125,6 @@ const apiExpandConf = {
|
|
|
122
125
|
showIcon: true // 配置是否显示展开图标
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
const emit = defineEmits(['jump-to-demo'])
|
|
126
128
|
// 点击 api区域的 name列时
|
|
127
129
|
const jumpToDemo = (demoId) => {
|
|
128
130
|
emit('jump-to-demo', demoId)
|
|
@@ -163,6 +165,7 @@ const jumpToApi = (hash) => {
|
|
|
163
165
|
|
|
164
166
|
defineExpose({ jumpToApi })
|
|
165
167
|
</script>
|
|
168
|
+
|
|
166
169
|
<style scoped lang="less">
|
|
167
170
|
.api-list {
|
|
168
171
|
flex-wrap: wrap;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
|
+
|
|
16
17
|
<script setup>
|
|
17
18
|
import { computed } from 'vue'
|
|
18
19
|
import { TinyTooltip } from '@opentiny/vue'
|
|
@@ -23,6 +24,7 @@ const contributors = computed(() => {
|
|
|
23
24
|
return getCmpContributors(props.componentId)
|
|
24
25
|
})
|
|
25
26
|
</script>
|
|
27
|
+
|
|
26
28
|
<style scoped lang="less">
|
|
27
29
|
.cmp-contributor {
|
|
28
30
|
margin-top: 48px;
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
<span class="docs-header-spacer"></span>
|
|
14
14
|
</header>
|
|
15
15
|
</template>
|
|
16
|
+
|
|
16
17
|
<script setup>
|
|
17
18
|
import { computed } from 'vue'
|
|
18
19
|
import hljs from 'highlight.js'
|
|
19
20
|
import { marked } from 'marked'
|
|
20
21
|
import VersionTip from './version-tip.vue'
|
|
22
|
+
|
|
21
23
|
const props = defineProps({ currentJson: {}, mdString: {} })
|
|
22
24
|
const mdContent = computed(() =>
|
|
23
25
|
marked(props.mdString, {
|
|
@@ -29,6 +31,7 @@ const mdContent = computed(() =>
|
|
|
29
31
|
})
|
|
30
32
|
)
|
|
31
33
|
</script>
|
|
34
|
+
|
|
32
35
|
<style scoped lang="less">
|
|
33
36
|
.docs-header {
|
|
34
37
|
padding: 16px 40px;
|