diff --git a/docs/.vitepress/components/GImg.ts b/docs/.vitepress/components/GImg.ts new file mode 100644 index 0000000..d8cd569 --- /dev/null +++ b/docs/.vitepress/components/GImg.ts @@ -0,0 +1,22 @@ +import { defineComponent, h } from 'vue'; +import { NImage } from './naive'; +import { convertSrc } from '../utils/img'; + +const GImg = defineComponent<{ + src: string; + width?: number | string; +}>( + (props) => { + return () => { + return h(NImage, { + src: convertSrc(props.src), + width: props.width, + }); + }; + }, + { + props: ['src', 'width'], + }, +); + +export default GImg; diff --git a/docs/.vitepress/components/ImageTable.vue b/docs/.vitepress/components/ImageTable.vue index 75a713b..b0ea118 100644 --- a/docs/.vitepress/components/ImageTable.vue +++ b/docs/.vitepress/components/ImageTable.vue @@ -1,6 +1,6 @@ - ## 下载安装 {#install} - 镜像加速 diff --git a/docs/guide/what-is-gkd.md b/docs/guide/what-is-gkd.md index b4f1d8e..95ab00f 100644 --- a/docs/guide/what-is-gkd.md +++ b/docs/guide/what-is-gkd.md @@ -18,7 +18,7 @@ GKD 是一款基于无障碍,高级选择器,订阅规则的自定义屏幕 diff --git a/docs/selector/index.md b/docs/selector/index.md index 95851b9..99805ed 100644 --- a/docs/selector/index.md +++ b/docs/selector/index.md @@ -1,10 +1,5 @@ # 选择器 {#title} - - 一个类似 CSS 选择器的选择器, 能联系节点上下文信息, 更容易也更精确找到目标节点 ## 为什么需要选择器 {#why} @@ -263,6 +258,8 @@ import { GImg } from '/.vitepress/utils/img.ts' 关系操作符 表示查找节点的方向, 有 5 种关系操作符, `+`, `-`, `>`, `<`, `<<` + + | 操作符 | 名称 | 图例 | 选择器 | | :----: | :----------------: | :---------------------------------: | :-----------------------------------------------------------------------: | | + | 前置兄弟节点 | | [\* + \[\_id=33\]](https://i.gkd.li/i/14045424?gkd=KiArIFtfaWQ9MzNd) | @@ -271,6 +268,8 @@ import { GImg } from '/.vitepress/utils/img.ts' | < | 直接子节点 | | [\* < \[\_id=89\]](https://i.gkd.li/i/14045424?gkd=KiA8IFtfaWQ9ODld) | | << | 子孙节点(深度先序) | | [\* <<2 \[\_id=29\]](https://i.gkd.li/i/14045424?gkd=KiA8PDIgW19pZD0yOV0) | + + 将 关系操作符 和 关系表达式 连接起来就得到了 关系选择器 `A +(a1,a2,a3,a_n) B` : A 是 B 的前置兄弟节点, 并且 A.index 满足 B.index-(a_m), 其中 a_m 是元组的任意一个数字 @@ -326,12 +325,12 @@ TextView[id=`com.byted.pangle:id/tt_item_tv`][text=`不感兴趣`] -- -- -- -- -- +- [快照-14045424](https://i.gkd.li/i/14045424) +- [快照-14034770](https://i.gkd.li/i/14034770) +- [快照-14031920](https://i.gkd.li/i/14031920) +- [快照-14018243](https://i.gkd.li/i/14018243) +- [快照-14011298](https://i.gkd.li/i/14011298) +- [快照-13999908](https://i.gkd.li/i/13999908) ## 一些注意 {#note}