Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Fixes style issues with document anchors #2266

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions examples/react-site/src/views/components/componentsDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
</div>
</div>
</template>

<script lang="jsx">
import { defineComponent, reactive, computed, toRefs, watch, onMounted, onUnmounted, nextTick, h } from 'vue';
import { defineComponent, reactive, computed, toRefs, watch, onMounted, onUnmounted, nextTick } from 'vue';
import { marked } from 'marked';
import DOMPurify from 'dompurify';
import demo from '@demo';
Expand Down Expand Up @@ -183,7 +184,7 @@ function loadPage() {
const json = JSON.parse(jsonStr);
state.currJson = {
...json,
demos: $clone(json['demos'] || []), // 克隆一下,避免保存上次的isOpen
demos: $clone(json.demos || []), // 克隆一下,避免保存上次的isOpen
column: json.column || '1', // columns可能为空
title: json.title || state.cmpId,
};
Expand All @@ -195,7 +196,7 @@ function loadPage() {

if (!hash) return;

if (hash.indexOf('/') > -1) {
if (hash.includes('/')) {
hash = hash.slice(1);
}

Expand Down Expand Up @@ -241,7 +242,7 @@ const fn = {

export default defineComponent({
name: 'CmpDetail',
components: { demo },
components: { Demo: demo },
setup() {
watch(
() => router.currentRoute.value.params.cmpId,
Expand Down Expand Up @@ -271,6 +272,7 @@ export default defineComponent({
},
});
</script>

<style lang="less">
.types-table a,
.api-table a {
Expand All @@ -289,7 +291,6 @@ export default defineComponent({
max-height: 80vh;
}
.tiny-anchor-link {
margin-bottom: 10px;
max-width: 150px;
font-size: 12px;
a {
Expand Down
1 change: 0 additions & 1 deletion examples/sites/src/views/components/components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,6 @@ export default defineComponent({
}

:deep(.tiny-anchor-link) {
margin-bottom: 10px;
font-size: 12px;

a {
Expand Down
Loading