Skip to content

Commit

Permalink
feat: 添加基础组件以及更新组件包名称
Browse files Browse the repository at this point in the history
  • Loading branch information
三少 committed Aug 16, 2021
1 parent af128a1 commit 36744ac
Show file tree
Hide file tree
Showing 53 changed files with 2,649 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 20,4 @@
- [@antmjs/cache](https://www.npmjs.com/package/@antmjs/cache)
- [@antmjs/trace](https://www.npmjs.com/package/@antmjs/trace)
- [@antmjs/utils](https://www.npmjs.com/package/@antmjs/utils)
- [@antmjs/weui](https://www.npmjs.com/package/@antmjs/weui)
- [@antmjs/antmui](https://www.npmjs.com/package/@antmjs/antmui)
2 changes: 1 addition & 1 deletion packages/weui-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 110,7 @@
"@antmjs/global-state": "1.3.0",
"@antmjs/mini-fix": "1.3.0",
"@antmjs/trace": "1.3.0",
"@antmjs/weui": "1.3.0",
"@antmjs/antmui": "1.3.0",
"@babel/runtime-corejs3": "^7.14.7",
"@tarojs/components": "3.3.2",
"@tarojs/react": "3.3.2",
Expand Down
8 changes: 8 additions & 0 deletions packages/weui-demo/src/apiFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 13,11 @@ Taro.useRouter = function useRouter<
}
return route
}

const canIUseBak = Taro.canIUse
Taro.canIUse = function canIUse(schema: string): boolean {
if (process.env.TARO_ENV !== 'h5') {
return canIUseBak(schema)
}
return false
}
1 change: 1 addition & 0 deletions packages/weui-demo/src/pages/ui/index.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 1 @@
export default {}
133 changes: 71 additions & 62 deletions packages/weui-demo/src/pages/ui/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 19,11 @@ import {
IDialogRef,
HalfScreen,
IHalfScreenRef,
} from '@antmjs/weui'
import '@antmjs/weui/dist/style/components/miniBar.less'
import '@antmjs/weui/dist/style/components/loading.less'
import '@antmjs/weui/dist/style/components/button.less'
import '@antmjs/weui/dist/style/components/icon.less'
import '@antmjs/weui/dist/style/components/actionSheet.less'
import '@antmjs/weui/dist/style/components/searchBar.less'
import '@antmjs/weui/dist/style/components/modal.less'
import '@antmjs/weui/dist/style/components/dialog.less'
import '@antmjs/weui/dist/style/components/halfScreen.less'
Badge,
Progress,
Calendar,
} from '@antmjs/antmui'
import '@antmjs/antmui/dist/style/index.less'

export default function Index() {
const showRef = useRef<IActionSheetRef>()
Expand All @@ -51,7 46,9 @@ export default function Index() {

return (
<View className="pages-index-index">
<MiniBar homeUrl="pages/ui/index" title="首页" />
{process.env.TARO_ENV !== 'h5' && (
<MiniBar homeUrl="pages/ui/index" title="首页" />
)}
<SearchBar
cref={searchRef}
onInput={() => {
Expand All @@ -64,6 61,12 @@ export default function Index() {
console.log(',,,,,', searchRef.current?.value)
}}
/>
<Calendar
marks={[{ value: '2021/11/10' }]}
isMultiSelect
currentDate={{ start: '2021/11/1', end: '2021/11/11' }}
/>
<Progress percent={70} status="progress" />
<Button
size="around"
type="primary"
Expand Down Expand Up @@ -186,7 189,7 @@ export default function Index() {
<Button size="full" type="primary">
<>
<Image
className="weui-btn_cell__icon"
className="antmui-btn_cell__icon"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAVFBMVEXx8fHMzMzr6 vn5 fv7 /t7e3d3d2 vr7W1tbHx8eysrKdnZ3p6enk5OTR0dG7u7u3t7ejo6PY2Njh4eHf39/T09PExMSvr6 goKCqqqqnp6e4uLgcLY/OAAAAnklEQVRIx 3RSRLDIAxE0QYhAbGZPNu5/z0zrXHiqiz5W72FqhqtVuuXAl3iOV7iPV/iSsAqZa9BS7YOmMXnNNX4TWGxRMn3R6SxRNgy0bzXOW8EBO8SAClsPdB3psqlvG Lw7ONXg/pTld52BjgSSkA3PV2OOemjIDcZQWgVvONw60q7sIpR38EnHPSMDQ4MjDjLPozhAkGrVbr/z0ANjAF4AcbXmYAAAAASUVORK5CYII="
/>
强调行按钮
Expand All @@ -204,97 207,102 @@ export default function Index() {
<Button type="warn" size="small">
按钮
</Button>
<Badge value="NEW">
<Button size="normal" type="primary" loading>
页面主操作
</Button>
</Badge>
<View>
weui-round-minus
<Icon name="weui-round-minus" />
antmui-round-minus
<Icon name="antmui-round-minus" />
</View>
<View>
weui-round-minus-fill
<Icon name="weui-round-minus-fill" />
antmui-round-minus-fill
<Icon name="antmui-round-minus-fill" />
</View>
<View>
weui-close
<Icon name="weui-close" />
antmui-close
<Icon name="antmui-close" />
</View>
<View>
weui-round-check-fill
antmui-round-check-fill
<Icon name="" />
</View>
<View>
weui-round-check
<Icon name="weui-round-check" />
antmui-round-check
<Icon name="antmui-round-check" />
</View>
<View>
weui-round-close-fill
<Icon name="weui-round-close-fill" />
antmui-round-close-fill
<Icon name="antmui-round-close-fill" />
</View>
<View>
weui-round-close
<Icon name="weui-round-close" />
antmui-round-close
<Icon name="antmui-round-close" />
</View>
<View>
weui-round-arrow-fill
<Icon name="weui-round-arrow-fill" />
antmui-round-arrow-fill
<Icon name="antmui-round-arrow-fill" />
</View>
<View>
weui-round-arrow
<Icon name="weui-round-arrow" />
antmui-round-arrow
<Icon name="antmui-round-arrow" />
</View>
<View>
weui-search
<Icon name="weui-search" />
antmui-search
<Icon name="antmui-search" />
</View>
<View>
weui-round-time-fill
<Icon name="weui-round-time-fill" />
antmui-round-time-fill
<Icon name="antmui-round-time-fill" />
</View>
<View>
weui-round-time
<Icon name="weui-round-time" />
antmui-round-time
<Icon name="antmui-round-time" />
</View>
<View>
weui-arrow
<Icon name="weui-arrow" />
antmui-arrow
<Icon name="antmui-arrow" />
</View>
<View>
weui-round-question-fill
<Icon name="weui-round-question-fill" />
antmui-round-question-fill
<Icon name="antmui-round-question-fill" />
</View>
<View>
weui-round-question
<Icon name="weui-round-question" />
antmui-round-question
<Icon name="antmui-round-question" />
</View>
<View>
weui-top
<Icon name="weui-top" />
antmui-top
<Icon name="antmui-top" />
</View>
<View>
weui-refresh
<Icon name="weui-refresh" />
antmui-refresh
<Icon name="antmui-refresh" />
</View>
<View>
weui-delete-fill
<Icon name="weui-delete-fill" />
antmui-delete-fill
<Icon name="antmui-delete-fill" />
</View>
<View>
weui-delete
<Icon name="weui-delete" />
antmui-delete
<Icon name="antmui-delete" />
</View>
<View>
weui-round
<Icon name="weui-round" />
antmui-round
<Icon name="antmui-round" />
</View>
<View>
weui-round-info-fill
<Icon name="weui-round-info-fill" />
antmui-round-info-fill
<Icon name="antmui-round-info-fill" />
</View>
<View>
weui-round-info
<Icon name="weui-round-info" />
antmui-round-info
<Icon name="antmui-round-info" />
</View>
<View>
weui-check
<Icon name="weui-check" />
antmui-check
<Icon name="antmui-check" />
</View>
<ActionSheet cref={showRef} title="dddddj哈哈哈" subTitle="dddddj哈哈哈">
<ActionSheetItem
Expand Down Expand Up @@ -328,6 336,7 @@ export default function Index() {
/>
<Dialog
cref={dialogRef}
closeIconPosition="bottom-center"
onClose={() => {
console.log('取消了')
}}
Expand All @@ -340,19 349,19 @@ export default function Index() {
console.log('确定了')
}}
>
<View className="weui-half-screen-dialog__bd">
<View className="weui-half-screen-dialog__desc">
<View className="antmui-half-screen-dialog__bd">
<View className="antmui-half-screen-dialog__desc">
辅助描述内容,可根据实际需要安排
</View>
<View className="weui-half-screen-dialog__tips">
<View className="antmui-half-screen-dialog__tips">
辅助提示内容,可根据实际需要安排
</View>
</View>
<View className="weui-half-screen-dialog__ft">
<View className="antmui-half-screen-dialog__ft">
<Button type="default">辅助操作</Button>
<Button
type="primary"
className="weui-btn weui-btn_primary"
className="antmui-btn antmui-btn_primary"
onClick={() => {
halfScreenRef.current!.hide()
}}
Expand Down
Loading

0 comments on commit 36744ac

Please sign in to comment.