Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
novlan1 committed Jul 8, 2024
1 parent 57479e7 commit 1b38038
Show file tree
Hide file tree
Showing 68 changed files with 127 additions and 102 deletions.
8 changes: 4 additions & 4 deletions packages/press-ui/docs/.vuepress/components/debug-online.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
Vue3
</button>
<button
v-if="false"
class="press-button press-button--default press-button--small"
@click.stop="clickVue2Pure"
>
Vue2 非 uni-app
</button>
<button
v-if="false"
class="press-button press-button--default press-button--small"
@click.stop="clickVue3Pure"
>
Expand All @@ -32,6 +30,8 @@
const STACKBLITZ_MAP = {
VUE3: 'https://stackblitz.com/~/github.com/novlan1/press-ui-demo-vue3?file=src/',
VUE2: 'https://stackblitz.com/~/github.com/novlan1/press-ui-demo-vue2?file=src/',
VUE2_PURE: 'https://stackblitz.com/~/github.com/novlan1/press-ui-demo-vue2-pure?file=src/',
VUE3_PURE: 'https://stackblitz.com/~/github.com/novlan1/press-ui-demo-vue3-pure?file=src/',
};
export default {
Expand All @@ -56,10 +56,10 @@ export default {
window.open(`${STACKBLITZ_MAP.VUE2}${this.currentComponent}.vue`);
},
clickVue2Pure() {
window.open(`${STACKBLITZ_MAP.VUE2_PURE}${this.currentComponent}.vue`);
},
clickVue3Pure() {
window.open(`${STACKBLITZ_MAP.VUE3_PURE}${this.currentComponent}.vue`);
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default {
...components,
};
export * from './packages/common/public/public';
`;
const CSS_BASE = `@import "./packages/common/style/press/index.scss";
@import "./packages/common/style/press/var.scss";
Expand Down
1 change: 0 additions & 1 deletion packages/press-ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,3 @@ export default {
...components,
};
export * from './packages/common/public/public';

1 change: 1 addition & 0 deletions packages/press-ui/src/packages/common/im/helper/tim.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import TIM_WEB from 'tim-js-sdk';
// eslint-disable-next-line @typescript-eslint/naming-convention
export type TIM_TYPE = typeof TIM_WEB;
/**
* @type {TIM_TYPE}
Expand Down
1 change: 1 addition & 0 deletions packages/press-ui/src/packages/common/im/im.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { IChatSDK, EventCallback } from './types';
import type TIM_TYPE from 'tim-js-sdk/tim-js';
export declare class IM {
tim: IChatSDK;
// eslint-disable-next-line @typescript-eslint/naming-convention
TIM: typeof TIM_TYPE;
constructor({ appId, logLevel }: {
appId: number;
Expand Down
6 changes: 3 additions & 3 deletions packages/press-ui/src/packages/common/public/public.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export { timeStampFormat } from '../format/time';
export { showFunctionalComponent, selectComponent } from '../functional-component'
export { showFunctionalComponent, selectComponent } from '../functional-component';
export { setData } from '../component-handler/set-data';
export { initH5Instance } from '../component-handler/h5-handler'
export { initH5Instance } from '../component-handler/h5-handler';

export { saveMpImage } from '../utils/save-mp-image';
export { isNotInUni } from '../utils/utils'
export { isNotInUni } from '../utils/utils';

export { forceUpdate } from '../vue3/adapter';
export { getWindowWidth } from '../dom/rect';
Expand Down
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-action-sheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ export default {
| appParameter | 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效 | _string_ | - |


## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-avatar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,7 @@ export default {
| 事件名 | 说明 | 参数 |
| -------- | ------------ | ---- |
| showMore | 点击展示更多 | - |

## 在线调试

<debug-online />
3 changes: 3 additions & 0 deletions packages/press-ui/src/packages/press-badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,6 @@ export default {
| default | 徽标包裹的子元素 |
| content | 自定义徽标内容 |

## 在线调试

<debug-online />
6 changes: 5 additions & 1 deletion packages/press-ui/src/packages/press-barcode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,8 @@ const DEFAULT_OPTIONS = {
marginLeft: undefined, // 设置条形码周围的左边距
marginRight: undefined, // 设置条形码周围的右边距
};
```
```

## 在线调试

<debug-online />
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ export default {
- e-sport-border


## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,7 @@ export default {
| 方法名 | 说明 | 参数 | 返回值 |
| ------ | ---------------------- | ---- | ------ |
| reset | 重置选中的日期到默认值 | - | - |

## 在线调试

<debug-online />
2 changes: 2 additions & 0 deletions packages/press-ui/src/packages/press-card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,6 @@ export default {
| cover | 卡片头部 |
| title | 操作栏 |

## 在线调试

<debug-online />
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-cell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ export default {
| icon | 自定义`icon`显示内容,如果设置了`icon`属性则不生效 |
| right-icon | 自定义右侧按钮,默认是`arrow`,如果设置了`is-link`属性则不生效 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ export default {
| ------ | ---- | ------ | ------------ |
| toggle | - | - | 切换选中状态 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-circle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ Page({
| ---- | ---------------------------------------------------------- |
| - | 自定义文字内容,如果设置了`fill`,插槽内容会被原生组件覆盖 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-code-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ export default {
| change | 输入内容发生改变时触发 | `value` |
| input | 输入内容发生改变时触发 | `value` |
| finish | 输入字符个数达到`maxlength`值时触发 | `value` |

## 在线调试

<debug-online />
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-collapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ export default {
| title | 自定义`title` |
| right-icon | 自定义右侧按钮,默认是`arrow` |

## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-count-down/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ export default {
| pause | - | - | 暂停倒计时 |
| reset | - | - | 重设倒计时,若`auto-start``true`,重设后会自动开始倒计时 |

## 在线调试

<debug-online />

## 常见问题

### 多个 CountDown 组件互相影响
Expand Down
6 changes: 4 additions & 2 deletions packages/press-ui/src/packages/press-count-to/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,13 @@ export default {
| resume | 暂停的情况下,重新开始 |
| reStart | 暂定状态,重新再开始滚动;或者滚动状态下,暂停 |



### Events

| 事件名 | 说明 | 参数 |
| ------ | ---------------------- | ---- |
| end | 数值滚动到目标值时触发 | - |
| change | 数值改变 | - |

## 在线调试

<debug-online />
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,7 @@ export default {
| getValues() | 获取所有列中被选中的值,返回一个数组 |
| setValues(values) | `values`为一个数组,设置所有列中被选中的值 |

## 在线调试

<debug-online />

4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-dialog-plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,7 @@ export default {
| 名称 | 说明 |
| ----- | ---------------------------------------------------- |
| title | 自定义`title`显示内容,如果设置了`title`属性则不生效 |

## 在线调试

<debug-online />
3 changes: 3 additions & 0 deletions packages/press-ui/src/packages/press-dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,6 @@ export default {
| field-value | 输入框内容 | _string_ | - |
| field-placeHolder | 输入框占位文字 | _string_ | - |

## 在线调试

<debug-online />
4 changes: 2 additions & 2 deletions packages/press-ui/src/packages/press-divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ export default {
| ---- | -------------- |
| 默认 | 自定义文本内容 |

## 主题定制
## 在线调试

<theme-config type="divider"/>
<debug-online />
3 changes: 3 additions & 0 deletions packages/press-ui/src/packages/press-dropdown-menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,6 @@ export default {
| value | 标识符 | _number \| string_ |
| icon | 左侧[图标名称](./press-icon-plus)或图片链接 | _string_ |

## 在线调试

<debug-online />
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-empty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ Empty 组件内置了多种占位图片类型,可以在不同业务场景下
| image | 自定义图标 |
| description | 自定义描述文字 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-fab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,7 @@ export default {
| direction | 展开菜单显示方式。horizontal:水平显示,vertical:垂直显示 | _string_ | horizontal |
| content | 展开菜单内容配置项 | _Array_ | - |
| top | 顶部高度 | _number_ | - |

## 在线调试

<debug-online />
4 changes: 2 additions & 2 deletions packages/press-ui/src/packages/press-field/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,6 @@ export default {

`value` 字段 在 Vue3 中使用的是 `model-value`

## 主题定制
## 在线调试

<theme-config type="field"/>
<debug-online />
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,7 @@ export default {
| - | 自定义宫格的所有内容,需要设置`use-slot`属性 |
| icon | 自定义图标,如果设置了`use-slot`或者`icon`属性则不生效 |
| text | 自定义文字,如果设置了`use-slot`或者`text`属性则不生效 |

## 在线调试

<debug-online />
6 changes: 5 additions & 1 deletion packages/press-ui/src/packages/press-icon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,8 @@ export default {
| number | 竖条个数,支持`1-5` | _number_ | `3` |
| color | 图标颜色 | _string_ | `#2979ff` |
| width | 图标整体高度 | _string_ | `40px` |
| height | 图标整体宽度 | _string_ | `50px` |
| height | 图标整体宽度 | _string_ | `50px` |

## 在线调试

<debug-online />
3 changes: 3 additions & 0 deletions packages/press-ui/src/packages/press-image-preview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ imagePreview({
| close | 关闭时触发 | - |
| change | 切换图片时触发 | active(当前索引) |

## 在线调试

<debug-online />
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export function imagePreview(options) {
});
}

export const imagePreviewHandler = imagePreview;
export const imagePreviewHandler = imagePreview;
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-index-bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ export default {
| ---- | -------------------------------- |
| - | 锚点位置显示内容,默认为索引字符 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
4 changes: 4 additions & 0 deletions packages/press-ui/src/packages/press-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export default {
| loading | 自定义底部加载中提示 |
| finished | 自定义加载完成后的提示文案 |

## 在线调试

<debug-online />


## 常见问题

Expand Down
2 changes: 2 additions & 0 deletions packages/press-ui/src/packages/press-loading-plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,7 @@ export default {
| ---- | -------- |
| - | 加载文案 |

## 在线调试

<debug-online />

4 changes: 2 additions & 2 deletions packages/press-ui/src/packages/press-loading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export default {
| loading-bg | `loading`背景色 | _string_ | - |
| loading-scenes | `loading`的场景,可选项:`page/btn` | _string_ | `page` |

## 在线调试



<debug-online />

## 常见问题

Expand Down
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-nav-bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ export default {
| click-left | 点击左侧按钮时触发 | - |
| click-right | 点击右侧按钮时触发 | - |

## 主题定制

<theme-config />

## 在线调试

Expand Down
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-notice-bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ export default {
| --notice-bar-icon-size | _16px_ | - |
| --notice-bar-icon-min-width | _24px_ | - |

## 主题定制

<theme-config />

## 在线调试

Expand Down
5 changes: 1 addition & 4 deletions packages/press-ui/src/packages/press-notify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ Notify({
| onClose | 关闭时的回调函数 | _Function_ | - |
| safeAreaInsetTop | 是否留出顶部安全距离(状态栏高度) | _boolean_ | `false` |

## 主题定制

<theme-config />

## 在线调试

<debug-online />
<debug-online />
3 changes: 0 additions & 3 deletions packages/press-ui/src/packages/press-overlay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ export default {
| ---- | ---------------------------------- |
| - | 默认插槽,用于在遮罩层上方嵌入内容 |

## 主题定制

<theme-config />

## 在线调试

Expand Down
Loading

0 comments on commit 1b38038

Please sign in to comment.