File tree Expand file tree Collapse file tree 4 files changed +6
-38
lines changed
Expand file tree Collapse file tree 4 files changed +6
-38
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,12 @@ watchEffect(() => {
4646 ></svg >
4747</template >
4848<style >
49- :root {
50- --svg-h : 1em ;
51- }
5249.SvgIcon {
5350 display : block ;
5451 overflow : hidden ;
52+ height : var (--svg-h , 1em );
53+ }
54+ .SvgIcon :not ([fill ]) {
5555 fill : currentColor ;
56- height : var (--svg-h );
5756}
58- /* --svg-h:initial */
5957 </style >
Original file line number Diff line number Diff line change 77 height : var (--win-h );
88}
99
10- body {
11- width : var (--gkd-w );
12- & .body-auto-w {
13- --gkd-w : 100vw ;
14- }
15- }
16-
1710.page-size ,
1811[page-size ] {
1912 width : var (--gkd-w );
Original file line number Diff line number Diff line change 11import type { LocationQuery } from 'vue-router' ;
22import { message } from './discrete' ;
3- import root from './root' ;
43import { Teleport } from 'vue' ;
54import BodyScrollbar from '@/components/BodyScrollbar.vue' ;
65
@@ -66,24 +65,6 @@ export const copy = (() => {
6665 } ;
6766} ) ( ) ;
6867
69- const useAutoCls = ( el : Element , cls : string ) => {
70- el . classList . add ( cls ) ;
71- onMounted ( ( ) => {
72- el . classList . add ( cls ) ;
73- } ) ;
74- onUnmounted ( ( ) => {
75- el . classList . remove ( cls ) ;
76- } ) ;
77- } ;
78-
79- export const useAutoHeight = ( ) => {
80- useAutoCls ( root , 'app-auto-h' ) ;
81- } ;
82-
83- export const useAutoWidth = ( ) => {
84- useAutoCls ( document . body , 'body-auto-w' ) ;
85- } ;
86-
8768export const timeAgo = ( date : number ) => {
8869 const seconds = Math . floor ( ( Date . now ( ) - date ) / 1000 ) ;
8970 const interval = Math . floor ( seconds / 31536000 ) ;
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import SelectorText from ' @/components/SelectorText.vue' ;
3- import { useAutoHeight , useAutoWidth } from ' @/utils/others' ;
43import {
54 AstNode ,
6- Selector ,
75 GkdException ,
6+ Selector ,
87 SyntaxException ,
98} from ' @gkd-kit/selector' ;
109import * as base64url from ' universal-base64url' ;
1110
12- useAutoHeight ();
13- useAutoWidth ();
14-
1511const route = useRoute ();
1612const router = useRouter ();
1713
@@ -68,7 +64,7 @@ const error = computed(() => {
6864});
6965 </script >
7066<template >
71- <div page-size flex items-center gap-16px pt-12px px-12px >
67+ <div flex items-center gap-16px pt-12px px-12px >
7268 <NTooltip placement =" right" >
7369 <template #trigger >
7470 <NButton text >
@@ -83,7 +79,7 @@ const error = computed(() => {
8379 </template >
8480 回到首页
8581 </NTooltip >
86- <div flex gap-16px >
82+ <div flex gap-16px items-center >
8783 <div text-18px >测试选择器</div >
8884 <div >语法高亮/错误解析</div >
8985 </div >
You can’t perform that action at this time.
0 commit comments