Skip to content

Commit

Permalink
fix: codesandbox import style bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PengYYYYY committed Dec 21, 2021
1 parent f7832e3 commit 1c38575
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
21 changes: 0 additions & 21 deletions site/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
<template>
<router-view />
</template>

<style lang="less">
.action-online {
width: 32px;
height: 32px;
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px;
transition: all 0.2s linear;
cursor: pointer;
border-radius: 3px;
color: var(--text-secondary);
&:hover {
color: var(--text-primary);
background-color: var(--bg-color-demo-hover, rgb(243, 243, 243));
}
}
</style>
47 changes: 45 additions & 2 deletions site/src/components/codesandbox/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,29 @@
import pkg from '@/package.json';
import packageJSON from './package.json';
import mainJsContent from './main.js?raw';
import styleContent from './index.css?raw';
const styleContent = `
/* 竖排展示 demo 行间距 16px */
.tdesign-demo-block-column {
display: flex;
flex-direction: column;
row-gap: 16px;
}
/* 竖排展示 demo 行间距 32px */
.tdesign-demo-block-column-large {
display: flex;
flex-direction: column;
row-gap: 32px;
}
/* 横排排展示 demo 列间距 16px */
.tdesign-demo-block-row {
display: flex;
column-gap: 16px;
align-items: center;
}
`;
packageJSON.dependencies['tdesign-vue'] = pkg.version;
packageJSON.dependencies['tdesign-icons-vue'] = pkg.dependencies['tdesign-icons-vue'];
Expand All @@ -36,7 +58,7 @@ function getDemoContent(demoContent) {
}
export default {
name: "code-sandbox",
name: 'code-sandbox',
props: {
code: String,
demoName: String,
Expand Down Expand Up @@ -90,3 +112,24 @@ export default {
},
};
</script>

<style lang="less">
.action-online {
width: 32px;
height: 32px;
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px;
transition: all 0.2s linear;
cursor: pointer;
border-radius: 3px;
color: var(--text-secondary);
&:hover {
color: var(--text-primary);
background-color: var(--bg-color-demo-hover, rgb(243, 243, 243));
}
}
</style>

0 comments on commit 1c38575

Please sign in to comment.