Skip to content

Commit

Permalink
feat: support uview-ui 1 & 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Feb 19, 2024
1 parent 5f533a2 commit 073733b
Show file tree
Hide file tree
Showing 99 changed files with 2,962 additions and 3,906 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Install the supported ui component library in your project and install the plug-
- next-ui 2
- arco-design/react 2
- arco-design/vue 2
- uview-ui 1
- uview-ui 1、2

### [antdv demo](assets/antdv.gif)

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- next-ui 2
- arco-design/react 2
- arco-design/vue 2
- uview-ui 1
- uview-ui 1、2

### [antdv demo](assets/antdv.gif)

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"shadcnVue0",
"radixVue1",
"arcoDesign2",
"arcoDesignVue2"
"arcoDesignVue2",
"uview1",
"uview2"
]
},
"description": "Choose the UI framework. If your selection includes `auto`, the extension will ignore the config and automatically detect the UI framework."
Expand Down
63 changes: 63 additions & 0 deletions src/ui/uview/uview1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ import keyboard from './keyboard.json'
import lazyLoad from './lazyLoad.json'
import line from './line.json'
import lineProgress from './lineProgress.json'
import circleProgress from './circleProgress.json'
import checkbox from './checkbox.json'
import checkboxGroup from './checkboxGroup.json'
import col from './col.json'
import collapse from './collapse.json'
import collapseItem from './collapseItem.json'
import countDown from './countDown.json'
import countTo from './countTo.json'
import divider from './divider.json'
import dropdown from './dropdown.json'
import dropdownItem from './dropdownItem.json'
import empty from './empty.json'
import link from './link.json'
import loading from './loading.json'
import loadmore from './loadmore.json'
Expand Down Expand Up @@ -42,6 +54,15 @@ import steps from './steps.json'
import sticky from './sticky.json'
import subsection from './subsection.json'
import swipeAction from './swipeAction.json'
import actionSheet from './actionSheet.json'
import alertTips from './alertTips.json'
import avatar from './avatar.json'
import avatarCropper from './avatarCropper.json'
import backTop from './backTop.json'
import badge from './badge.json'
import button from './button.json'
import calendar from './calendar.json'
import card from './card.json'
import swiper from './swiper.json'
import uswitch from './switch.json'
import tabbar from './tabbar.json'
Expand Down Expand Up @@ -79,6 +100,18 @@ export function uview1() {
lazyLoad,
line,
lineProgress,
circleProgress,
checkbox,
checkboxGroup,
col,
collapse,
collapseItem,
countDown,
countTo,
divider,
dropdown,
dropdownItem,
empty,
link,
loading,
loadmore,
Expand Down Expand Up @@ -106,6 +139,15 @@ export function uview1() {
sticky,
subsection,
swipeAction,
actionSheet,
alertTips,
avatar,
avatarCropper,
backTop,
badge,
button,
calendar,
card,
swiper,
uswitch,
tabbar,
Expand Down Expand Up @@ -148,6 +190,18 @@ export function uview1Components() {
[lazyLoad, lazyLoad.name, `<${lazyLoad.name}></${lazyLoad.name}>`],
[line, line.name, `<${line.name}></${line.name}>`],
[lineProgress, lineProgress.name, `<${lineProgress.name}></${lineProgress.name}>`],
[circleProgress, circleProgress.name, `<${circleProgress.name}></${circleProgress.name}>`],
[checkbox, checkbox.name, `<${checkbox.name}></${checkbox.name}>`],
[checkboxGroup, checkboxGroup.name, `<${checkboxGroup.name}></${checkboxGroup.name}>`],
[col, col.name, `<${col.name}></${col.name}>`],
[collapse, collapse.name, `<${collapse.name}></${collapse.name}>`],
[collapseItem, collapseItem.name, `<${collapseItem.name}></${collapseItem.name}>`],
[countDown, countDown.name, `<${countDown.name}></${countDown.name}>`],
[countTo, countTo.name, `<${countTo.name}></${countTo.name}>`],
[divider, divider.name, `<${divider.name}></${divider.name}>`],
[dropdown, dropdown.name, `<${dropdown.name}></${dropdown.name}>`],
[dropdownItem, dropdownItem.name, `<${dropdownItem.name}></${dropdownItem.name}>`],
[empty, empty.name, `<${empty.name}></${empty.name}>`],
[link, link.name, `<${link.name}></${link.name}>`],
[loading, loading.name, `<${loading.name}></${loading.name}>`],
[loadmore, loadmore.name, `<${loadmore.name}></${loadmore.name}>`],
Expand Down Expand Up @@ -175,6 +229,15 @@ export function uview1Components() {
[sticky, sticky.name, `<${sticky.name}></${sticky.name}>`],
[subsection, subsection.name, `<${subsection.name}></${subsection.name}>`],
[swipeAction, swipeAction.name, `<${swipeAction.name}></${swipeAction.name}>`],
[actionSheet, actionSheet.name, `<${actionSheet.name}></${actionSheet.name}>`],
[alertTips, alertTips.name, `<${alertTips.name}></${alertTips.name}>`],
[avatar, avatar.name, `<${avatar.name}></${avatar.name}>`],
[avatarCropper, avatarCropper.name, `<${avatarCropper.name}></${avatarCropper.name}>`],
[backTop, backTop.name, `<${backTop.name}></${backTop.name}>`],
[badge, badge.name, `<${badge.name}></${badge.name}>`],
[button, button.name, `<${button.name}></${button.name}>`],
[calendar, calendar.name, `<${calendar.name}></${calendar.name}>`],
[card, card.name, `<${card.name}></${card.name}>`],
[swiper, swiper.name, `<${swiper.name}></${swiper.name}>`],
[uswitch, uswitch.name, `<${uswitch.name}></${uswitch.name}>`],
[tabbar, tabbar.name, `<${tabbar.name}></${tabbar.name}>`],
Expand Down
2 changes: 1 addition & 1 deletion src/ui/uview/uview1/loadmore.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ULoadMore",
"name": "ULoadmore",
"props": {
"status": {
"description": "Component status",
Expand Down
177 changes: 138 additions & 39 deletions src/ui/uview/uview2/actionSheet.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,138 @@
{
"name": "UActionSheet",
"props": {
":v-model": {
"description": "You can control the pop-up and collapse of a v-model variable with a boolean value, and the value of the v-model is bound in both directions",
"description_zh": "通过v-model绑定一个值为布尔值的变量控制组件的弹出与收起,v-model的值是双向绑定的",
":show": {
"description": "Whether it is displayed or not",
"description_zh": "是否展示",
"default": "false",
"value": "",
"type": "Boolean",
"required": true
},
":list": {
"title": {
"description": "Set the title",
"description_zh": "设置标题",
"default": "-",
"value": "",
"type": "String",
"required": true
},
"description": {
"description": "For the description above the options, see the example above",
"description_zh": "选项上方的描述信息,见上方文档示例",
"default": "-",
"value": "",
"type": "String"
},
":actions": {
"description": "The text array of the button is shown in the document above for an example",
"description_zh": "按钮的文字数组,见上方文档示例",
"default": "[ ]",
"value": "",
"type": "Array<Object>",
"required": true
},
"tips": {
"description": "For the prompt text at the top, see the example above",
"description_zh": "顶部的提示文字,见上方文档示例",
"cancelText": {
"description": "The text of the cancel button is displayed when the button is not empty",
"description_zh": "取消按钮的文字,不为空时显示按钮",
"default": "-",
"value": "",
"type": "String"
},
"closeOnClickAction": {
"description": "Whether to close the pop-up window when clicking on a menu item is shown in the document example above",
"description_zh": "点击某个菜单项时是否关闭弹窗,见上方文档示例",
"default": "-",
"value": "",
"type": "Object"
"type": "String"
},
"cancel-btn": {
"description": "Whether to display the cancel button at the bottom",
"description_zh": "是否显示底部的取消按钮",
"default": "true",
"safeAreaInsetBottom": {
"description": "Whether to enable the bottom safe zone adaptation",
"description_zh": "是否开启底部安全区适配",
"default": "false",
"value": "",
"type": "Boolean"
},
"border-radius": {
"description": "The fillet values on the left and right sides of the pop-up section in rpx",
"description_zh": "弹出部分顶部左右的圆角值,单位rpx",
"default": "0",
"openType": {
"description": "How the applet is opened",
"description_zh": "小程序的打开方式",
"default": "-",
"value": "",
"type": "Number \\ String"
"type": "String"
},
"mask-close-able": {
"description": "Click to see if the mask can be turned off",
"description_zh": "点击遮罩是否可以关闭",
"default": "true",
"closeOnClickOverlay": {
"description": "Whether to click on the mask to be closed, see the above document example (note: the closing event needs to be handled by yourself, and will only click on the mask layer to execute the close callback after closeOnClickOverlay is enabled)",
"description_zh": "点击遮罩是否允许关闭,见上方文档示例(注意:关闭事件需要自行处理,只会在开启closeOnClickOverlay后点击遮罩层执行close回调)",
"default": "-",
"value": "",
"type": "Boolean"
},
"safe-area-inset-bottom": {
"description": "Whether to enable the bottom safe zone adaptation",
"description_zh": "是否开启底部安全区适配",
"default": "false",
"round": {
"description": "Fillet value, no fillet by default",
"description_zh": "圆角值,默认无圆角",
"default": "0",
"value": "",
"type": "Boolean"
"type": "String | Number"
},
"lang": {
"description": "Specify the language in which the user information is returned, zh_CN Chinese Simplified, zh_TW Chinese Traditional, EN English",
"description_zh": "指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文",
"default": "en",
"value": "",
"type": "zh_CN | zh_TW | en"
},
"sessionFrom": {
"description": "The session source is valid when open-type=\"contact\". Only WeChat Mini Programs are valid",
"description_zh": "会话来源,open-type=\"contact\"时有效。只微信小程序有效",
"default": "-",
"value": "",
"type": "String"
},
"sendMessageTitle": {
"description": "The title of the in-session message card is valid if openType=\"contact\".",
"description_zh": "会话内消息卡片标题,openType=\"contact\"时有效",
"default": "-",
"value": "",
"type": "String"
},
"z-index": {
"description": "z-index值",
"description_zh": "z-index值",
"default": "1075",
"sendMessagePath": {
"description": "The in-session message card is valid when you click to jump to the path of the Mini Program, openType=\"contact\".",
"description_zh": "会话内消息卡片点击跳转小程序路径,openType=\"contact\"时有效",
"default": "-",
"value": "",
"type": "String"
},
"sendMessageImg": {
"description": "会话内消息卡片图片,openType=\"contact\"时有效",
"description_zh": "会话内消息卡片图片,openType=\"contact\"时有效",
"default": "-",
"value": "",
"type": "String"
},
"showMessageCard": {
"description": "Whether to display the in-session message card, set this parameter to true, the user will enter the customer service session will display a prompt of \"Mini Program may be sent\" in the lower right corner, and the user can quickly send the Mini Program message after clicking, which is valid when openType=\"contact\".",
"description_zh": "是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示\"可能要发送的小程序\"提示,用户点击后可以快速发送小程序消息,openType=\"contact\"时有效",
"default": "false",
"value": "",
"type": "Number \\ String"
"type": "Boolean"
},
"cancel-text": {
"description": "Cancel button tooltip",
"description_zh": "取消按钮的提示文字",
"default": "取消",
"appParameter": {
"description": "When the APP is opened, the parameters passed to the APP, openType=launchApp, are valid",
"description_zh": "打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效",
"default": "-",
"value": "",
"type": "String"
}
},
"link": "https://v1.uviewui.com/components/actionSheet.html",
"link_zh": "https://v1.uviewui.com/components/actionSheet.html",
"link": "https://uviewui.com/components/actionSheet.html",
"link_zh": "https://uviewui.com/components/actionSheet.html",
"typeDetail": {},
"events": [
{
"name": "click",
"name": "select",
"description": "Triggered when an ActionSheet list item is clicked",
"description_zh": "点击ActionSheet列表项时触发",
"params": "index: 点击了第几个,从0开始",
"params": "-",
"value": ""
},
{
Expand All @@ -84,6 +141,48 @@
"description_zh": "点击取消按钮时触发",
"params": "-",
"value": ""
},
{
"name": "getuserinfo",
"description": "When the user clicks this button, the obtained user information will be returned, and the detail data of the callback is the same as that returned by wx.getUserInfo, which is valid when openType=\"getUserInfo\".",
"description_zh": "用户点击该按钮时,会返回获取到的用户信息,回调的 detail 数据与 wx.getUserInfo 返回的一致,openType=\"getUserInfo\"时有效",
"params": "detail",
"value": ""
},
{
"name": "contact",
"description": "客服消息回调,openType=\"contact\"时有效",
"description_zh": "客服消息回调,openType=\"contact\"时有效",
"params": "-",
"value": ""
},
{
"name": "getphonenumber",
"description": "The callback to get the user's mobile phone number is valid when openType=\"getPhoneNumber\".",
"description_zh": "获取用户手机号回调,openType=\"getPhoneNumber\"时有效",
"params": "-",
"value": ""
},
{
"name": "error",
"description": "When using open capability, an error callback occurs, which is valid when openType=\"error\" occurs",
"description_zh": "当使用开放能力时,发生错误的回调,openType=\"error\"时有效",
"params": "-",
"value": ""
},
{
"name": "launchapp",
"description": "The callback of the successful opening of the APP, openType=\"launchApp\", is valid",
"description_zh": "打开 APP 成功的回调,openType=\"launchApp\"时有效",
"params": "-",
"value": ""
},
{
"name": "opensetting",
"description": "After opening the authorization settings page, the callback is valid when openType=\"openSetting\".",
"description_zh": "在打开授权设置页后回调,openType=\"openSetting\"时有效",
"params": "-",
"value": ""
}
],
"methods": [],
Expand Down

0 comments on commit 073733b

Please sign in to comment.