提交 75cd33b9 编写于 作者: Y yurj26

chore: remove invalid css

上级 a12c8953
...@@ -40,9 +40,8 @@ ...@@ -40,9 +40,8 @@
height: 80px; height: 80px;
} }
.uni-hello-text { .uni-text-box {
margin-bottom: 20px; margin-bottom: 20px;
color: #7A7E83;
} }
.hello-text { .hello-text {
...@@ -155,4 +154,4 @@ ...@@ -155,4 +154,4 @@
} }
.arrow-down { .arrow-down {
transform: rotate(-135deg); transform: rotate(-135deg);
} }
\ No newline at end of file
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
.uni-input { .uni-input {
height: 50rpx; height: 50rpx;
padding: 15rpx 25rpx; padding: 15rpx 25rpx;
line-height: 50rpx; /* line-height: 50rpx;
font-size: 28rpx; font-size: 28rpx; */
background: #FFF; background: #FFF;
flex: 1; flex: 1;
box-sizing: content-box; box-sizing: content-box;
...@@ -116,17 +116,14 @@ ...@@ -116,17 +116,14 @@
/* 背景色 */ /* 背景色 */
.uni-bg-red { .uni-bg-red {
background: #F76260; background: #F76260;
color: #FFF;
} }
.uni-bg-green { .uni-bg-green {
background: #09BB07; background: #09BB07;
color: #FFF;
} }
.uni-bg-blue { .uni-bg-blue {
background: #007AFF; background: #007AFF;
color: #FFF;
} }
.uni-btn-v { .uni-btn-v {
...@@ -154,6 +151,6 @@ ...@@ -154,6 +151,6 @@
.uni-textarea { .uni-textarea {
padding: 18rpx; padding: 18rpx;
line-height: 1.6; /* line-height: 1.6;
font-size: 28rpx; font-size: 28rpx; */
} }
\ No newline at end of file
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
.uni-collapse-item__title { .uni-collapse-item__title {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
line-height: 22px;
padding: 12px; padding: 12px;
background-color: #fff; background-color: #fff;
} }
......
...@@ -292,8 +292,8 @@ ...@@ -292,8 +292,8 @@
.uni-input { .uni-input {
height: 28px; height: 28px;
line-height: 28px; /* line-height: 28px;
font-size: 15px; font-size: 15px; */
padding: 0px; padding: 0px;
flex: 1; flex: 1;
background-color: #ffffff; background-color: #ffffff;
......
...@@ -206,8 +206,6 @@ ...@@ -206,8 +206,6 @@
.swiper-item { .swiper-item {
width: 100%; width: 100%;
height: 300rpx; height: 300rpx;
line-height: 300rpx;
text-align: center;
} }
.swiper-item-Text { .swiper-item-Text {
......
...@@ -135,8 +135,6 @@ export default { ...@@ -135,8 +135,6 @@ export default {
.flex-item-V { .flex-item-V {
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
text-align: center;
line-height: 150rpx;
} }
.text-box { .text-box {
......
<template> <template>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<scroll-view style="flex: 1"> <scroll-view style="flex: 1">
<!-- #endif --> <!-- #endif -->
<view class="uni-container"> <view class="uni-container">
<view class="uni-header-logo"> <view class="uni-header-logo">
<image class="uni-header-image" src="/static/apiIndex.png"></image> <image class="uni-header-image" src="/static/apiIndex.png"></image>
</view> </view>
<view class="uni-hello-text"> <view class="uni-text-box">
<text class="hello-text">以下将演示uni-app接口能力,详细文档见:</text> <text class="hello-text">以下将演示uni-app接口能力,详细文档见:</text>
<u-link :href="'https://uniapp.dcloud.io/api/'" :text="'https://uniapp.dcloud.io/api/'" :inWhiteList="true"></u-link> <u-link :href="'https://uniapp.dcloud.io/api/'" :text="'https://uniapp.dcloud.io/api/'"
</view> :inWhiteList="true"></u-link>
</view>
<uni-collapse> <uni-collapse>
<template v-for="item in list" :key="item.id"> <template v-for="item in list" :key="item.id">
<uni-collapse-item :title="item.name" class="item"> <uni-collapse-item :title="item.name" class="item">
<view class="uni-navigate-item" :hover-class="page.enable == false?'':'is--active'" v-for="(page, key) in item.pages" :key="key" @click="goDetailPage(page)"> <view class="uni-navigate-item" :hover-class="page.enable == false?'':'is--active'"
<text class="uni-navigate-text" :class="page.enable == false ? 'text-disabled' : ''">{{ page.name }}</text> v-for="(page, key) in item.pages" :key="key" @click="goDetailPage(page)">
<image :src="arrowRightIcon" class="uni-icon"></image> <text class="uni-navigate-text"
</view> :class="page.enable == false ? 'text-disabled' : ''">{{ page.name }}</text>
</uni-collapse-item> <image :src="arrowRightIcon" class="uni-icon"></image>
</template> </view>
</uni-collapse> </uni-collapse-item>
</template>
</uni-collapse>
</view> </view>
<!-- #ifdef APP --> <!-- #ifdef APP -->
</scroll-view> </scroll-view>
<!-- #endif --> <!-- #endif -->
<view ref="pop" @click="hidePop()" style="width: 100%; height: 100%; position: absolute;align-items: center;justify-content: center; display: none;background-color: rgba(16, 16, 16, 0.5);"> <view ref="pop" @click="hidePop()"
<view style="width: 90%;background-color: white;" @click="stopClickPop"> style="width: 100%; height: 100%; position: absolute;align-items: center;justify-content: center; display: none;background-color: rgba(16, 16, 16, 0.5);">
<api-set-tabbar></api-set-tabbar> <view style="width: 90%;background-color: white;" @click="stopClickPop">
</view> <api-set-tabbar></api-set-tabbar>
</view>
</view> </view>
</template> </template>
<script lang="uts"> <script lang="uts">
type Page = { type Page = {
name : string name : string
url : string url : string
enable ?: boolean enable ?: boolean
api ?: Array<string> api ?: Array<string>
} }
type ListItem = { type ListItem = {
id : string id : string
name : string name : string
open : boolean open : boolean
pages : Page[] pages : Page[]
url ?: string url ?: string
enable ?: boolean enable ?: boolean
} }
export default { export default {
data() { data() {
return { return {
list: [ list: [
{
id: 'globle',
name: '全局',
open: false,
pages: [
{
name: 'getApp',
url: 'get-app',
},
{
name: 'getCurrentPages',
url: 'get-current-pages',
}
] as Page[],
},
{ {
id: 'base', id: 'globle',
name: '基础', name: '全局',
open: false, open: false,
pages: [ pages: [
{ {
name: '事件总线event-bus', name: 'getApp',
url: 'event-bus', url: 'get-app',
api:["$on","$once","$off","$emit"] },
}, {
{ name: 'getCurrentPages',
name: '获取启动参数', url: 'get-current-pages',
url: 'get-launch-options-sync', }
}, ] as Page[],
{ },
name: '退出应用', {
url: 'exit', id: 'base',
}, name: '基础',
] as Page[], open: false,
}, pages: [
{ {
id: 'page', name: '事件总线event-bus',
name: '页面和路由', url: 'event-bus',
open: false, api: ["$on", "$once", "$off", "$emit"]
pages: [ },
{ {
name: '页面跳转', name: '获取启动参数',
url: 'navigator', url: 'get-launch-options-sync',
api:["navigator","reLaunch","navigateBack","redirectTo","switchTab"] },
}, {
/* name: '退出应用',
{ url: 'exit',
name: '设置导航条标题', },
url: 'set-navigation-bar-title', ] as Page[],
enable: false, },
}, */ {
{ id: 'page',
name: '设置导航条颜色', name: '页面和路由',
url: 'set-navigation-bar-color', open: false,
}, pages: [
{ {
name: '设置TabBar', name: '页面跳转',
url: 'set-tabbar', url: 'navigator',
api:["showTabBar","hideTabBar","showTabBarRedDot","hideTabBarRedDot","setTabBarBadge","removeTabBarBadge","setTabBarStyle","setTabBarItem"] api: ["navigator", "reLaunch", "navigateBack", "redirectTo", "switchTab"]
}, },
{ /*
name: '页面下拉刷新', {
url: 'pull-down-refresh', name: '设置导航条标题',
api:["stopPullDownRefresh"] url: 'set-navigation-bar-title',
}, enable: false,
{ }, */
name: '将页面滚动到指定位置', {
url: 'page-scroll-to', name: '设置导航条颜色',
}, url: 'set-navigation-bar-color',
] as Page[], },
}, {
{ name: '设置TabBar',
id: 'network', url: 'set-tabbar',
name: '网络', api: ["showTabBar", "hideTabBar", "showTabBarRedDot", "hideTabBarRedDot", "setTabBarBadge", "removeTabBarBadge", "setTabBarStyle", "setTabBarItem"]
open: false, },
pages: [ {
{ name: '页面下拉刷新',
name: '发起一个请求', url: 'pull-down-refresh',
url: 'request', api: ["stopPullDownRefresh"]
}, },
{ {
name: '上传文件', name: '将页面滚动到指定位置',
url: 'upload-file', url: 'page-scroll-to',
}, },
{ ] as Page[],
name: '下载文件', },
url: 'download-file', {
}, id: 'network',
{ name: '网络',
name: '获取设备网络状态', open: false,
url: 'get-network-type', pages: [
}, {
{ name: '发起一个请求',
name: 'socketTask', url: 'request',
url: 'websocket-socketTask', },
api:[""] //它不是uni.的api {
}, name: '上传文件',
{ url: 'upload-file',
name: '全局websocket', },
url: 'websocket-global', {
api:["connectSocket","onSocketOpen","onSocketError","sendSocketMessage","onSocketMessage","closeSocket","onSocketClose"] name: '下载文件',
}, url: 'download-file',
] as Page[], },
{
name: '获取设备网络状态',
url: 'get-network-type',
},
{
name: 'socketTask',
url: 'websocket-socketTask',
api: [""] //它不是uni.的api
},
{
name: '全局websocket',
url: 'websocket-global',
api: ["connectSocket", "onSocketOpen", "onSocketError", "sendSocketMessage", "onSocketMessage", "closeSocket", "onSocketClose"]
},
] as Page[],
},
{
id: 'ui',
name: '界面',
open: false,
pages: [
/* {
name: "创建动画",
url: "animation",
enable: false
},
{
name: "创建绘画",
url: "canvas",
enable: false
},
{
name: "节点布局交互状态",
url: "intersection-observer",
enable: false
}, */
{
name: '节点信息',
url: 'nodes-info',
api: ["createSelectorQuery"]
},
{
name: '显示操作菜单',
url: 'action-sheet',
},
{
name: '显示模态弹窗',
url: 'modal',
api: ["showModal"]
},
{
name: '显示加载提示框',
url: 'show-loading',
},
{
name: '显示消息提示框',
url: 'toast',
api: ["showToast"]
},
{
name: '动态加载字体',
url: 'load-font-face',
},
] as Page[],
},
{
id: 'device',
name: '设备',
open: false,
pages: [
{
name: '获取系统信息',
url: 'get-system-info',
},
{
name: '获取设备信息',
url: 'get-device-info',
},
{
name: '获取窗口信息',
url: 'get-window-info',
},
{
name: '获取APP基础信息',
url: 'get-app-base-info',
},
{
name: '获取APP授权设置',
url: 'get-app-authorize-setting',
},
{
name: '获取系统设置',
url: 'get-system-setting',
},
{
name: '电量',
url: 'get-battery-info',
},
/* {
name: "打电话",
url: "make-phone-call",
},
{
name: "震动",
url: "vibrate",
},
{
name: "添加手机联系人",
url: "add-phone-contact",
},
{
name: "扫码",
url: "scan-code",
},
{
name: "剪贴板",
url: "clipboard",
},
{
name: "屏幕亮度",
url: "brightness",
},
{
name: "蓝牙",
url: "bluetooth",
},
{
name: "生物认证",
url: "soter",
},
{
name: "iBeacon",
url: "ibeacon",
},
{
name: "监听加速度传感器",
url: "on-accelerometer-change",
},
{
name: "监听罗盘数据",
url: "on-compass-change",
},
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
}, */
] as Page[],
},
{
id: 'media',
name: '媒体',
open: false,
pages: [
{
name: '图片选择和预览',
url: 'preview-image',
api: ["previewImage", "closePreviewImage", "chooseImage"]
},
{
name: "保存图片到相册",
url: 'save-image-to-album'
}
/* {
name: "图片选择和拍照",
url: "image",
enable: false
},{
name: "音频",
url: "inner-audio",
},
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
{
name: "视频选择和拍照",
url: "video",
enable: false
},
{
name: "文件",
url: "file",
},
{
name: "保存媒体到本地",
url: "save-media",
}, */
] as Page[],
},
{
id: 'location',
name: '位置',
open: false,
pages: [
{
name: '获取当前位置',
url: 'get-location',
},
/* {
name: "使用地图查看位置",
url: "open-location",
},
{
name: "使用地图选择位置",
url: "choose-location",
},
{
name: "地图控制",
url: "map",
},
{
name: "地图搜索",
url: "map-search",
}, */
] as Page[],
}, },
{ {
id: 'ui', id: 'storage',
name: '界面', name: '数据存储',
open: false, open: false,
pages: [ pages: [
/* { {
name: "创建动画", name: 'storage(key-value存储)',
url: "animation", url: 'storage',
enable: false api: ["uni.getStorageInfo", "uni.getStorageInfoSync", "uni.getStorage", "uni.getStorageSync", "uni.setStorage", "uni.setStorageSync", "uni.removeStorage", "uni.removeStorageSync", "uni.clearStorage", "uni.clearStorageSync"]
}, },
{ ] as Page[],
name: "创建绘画", },
url: "canvas", /* {
enable: false id: "rewarded-video-ad",
}, url: "rewarded-video-ad",
{ name: "激励视频广告",
name: "节点布局交互状态", open: false,
url: "intersection-observer", enable: false,
enable: false pages: [] as Page[]
}, */ },
{ {
name: '节点信息', id: "full-screen-video-ad",
url: 'nodes-info', url: "full-screen-video-ad",
api:["createSelectorQuery"] name: "全屏视频广告",
}, open: false,
{ enable: false,
name: '显示操作菜单', pages: [] as Page[]
url: 'action-sheet', },
}, {
{ id: "login",
name: '显示模态弹窗', name: "登录",
url: 'modal', open: false,
api:["showModal"] pages: [
}, {
{ name: "登录",
name: '显示加载提示框', url: "login",
url: 'show-loading', },
}, {
{ name: "获取用户信息",
name: '显示消息提示框', url: "get-user-info",
url: 'toast', },
api:["showToast"] ] as Page[],
}, },
{ {
name: '动态加载字体', id: "share",
url: 'load-font-face', name: "分享",
}, open: false,
] as Page[], pages: [
}, {
{ name: "分享",
id: 'device', url: "share",
name: '设备', },
open: false, ] as Page[],
pages: [ },
{ {
name: '获取系统信息', id: "payment",
url: 'get-system-info', name: "支付",
}, open: false,
{ pages: [
name: '获取设备信息', {
url: 'get-device-info', name: "发起支付",
}, url: "request-payment",
{ },
name: '获取窗口信息', ] as Page[],
url: 'get-window-info', },
}, {
{ id: "speech",
name: '获取APP基础信息', name: "语音",
url: 'get-app-base-info', open: false,
}, pages: [
{ {
name: '获取APP授权设置', name: "语音识别",
url: 'get-app-authorize-setting', url: "/platforms/app-plus/speech/speech",
}, },
{ ] as Page[],
name: '获取系统设置', },
url: 'get-system-setting', {
}, id: "push",
{ name: "推送",
name: '电量', open: false,
url: 'get-battery-info', pages: [
}, {
/* { name: "推送",
name: "打电话", url: "/platforms/app-plus/push/push",
url: "make-phone-call", },
}, ] as Page[],
{ }, */
name: "震动", ] as ListItem[],
url: "vibrate", arrowUpIcon: '/static/icons/arrow-up.png',
}, arrowDownIcon: '/static/icons/arrow-down.png',
{ arrowRightIcon: '/static/icons/arrow-right.png',
name: "添加手机联系人", }
url: "add-phone-contact", },
}, methods: {
{ triggerCollapse(index ?: number, item : ListItem) {
name: "扫码", if (item.pages.length == 0) {
url: "scan-code", const page : Page = {
}, name: item.name,
{ enable: item.enable,
name: "剪贴板", url: item.url!,
url: "clipboard", }
}, this.goDetailPage(page)
{ return
name: "屏幕亮度", }
url: "brightness", for (var i = 0; i < this.list.length; ++i) {
}, if (index == i) {
{ this.list[i].open = !this.list[i].open
name: "蓝牙", } else {
url: "bluetooth", this.list[i].open = false
}, }
{ }
name: "生物认证", },
url: "soter", goDetailPage(e : Page) {
}, if (e.enable == false) {
{ uni.showToast({
name: "iBeacon", title: '暂不支持',
url: "ibeacon", icon: 'none',
}, })
{ return
name: "监听加速度传感器", }
url: "on-accelerometer-change", if (e.url === 'set-tabbar') {
}, this.showPop()
{ return;
name: "监听罗盘数据",
url: "on-compass-change",
},
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
}, */
] as Page[],
},
{
id: 'media',
name: '媒体',
open: false,
pages: [
{
name: '图片选择和预览',
url: 'preview-image',
api: ["previewImage","closePreviewImage","chooseImage"]
},
{
name: "保存图片到相册",
url: 'save-image-to-album'
}
/* {
name: "图片选择和拍照",
url: "image",
enable: false
},{
name: "音频",
url: "inner-audio",
},
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
{
name: "视频选择和拍照",
url: "video",
enable: false
},
{
name: "文件",
url: "file",
},
{
name: "保存媒体到本地",
url: "save-media",
}, */
] as Page[],
},
{
id: 'location',
name: '位置',
open: false,
pages: [
{
name: '获取当前位置',
url: 'get-location',
},
/* {
name: "使用地图查看位置",
url: "open-location",
},
{
name: "使用地图选择位置",
url: "choose-location",
},
{
name: "地图控制",
url: "map",
},
{
name: "地图搜索",
url: "map-search",
}, */
] as Page[],
},
{
id: 'storage',
name: '数据存储',
open: false,
pages: [
{
name: 'storage(key-value存储)',
url: 'storage',
api:["uni.getStorageInfo","uni.getStorageInfoSync","uni.getStorage","uni.getStorageSync","uni.setStorage","uni.setStorageSync","uni.removeStorage","uni.removeStorageSync","uni.clearStorage","uni.clearStorageSync"]
},
] as Page[],
},
/* {
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
name: "全屏视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
{
id: "login",
name: "登录",
open: false,
pages: [
{
name: "登录",
url: "login",
},
{
name: "获取用户信息",
url: "get-user-info",
},
] as Page[],
},
{
id: "share",
name: "分享",
open: false,
pages: [
{
name: "分享",
url: "share",
},
] as Page[],
},
{
id: "payment",
name: "支付",
open: false,
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
{
id: "speech",
name: "语音",
open: false,
pages: [
{
name: "语音识别",
url: "/platforms/app-plus/speech/speech",
},
] as Page[],
},
{
id: "push",
name: "推送",
open: false,
pages: [
{
name: "推送",
url: "/platforms/app-plus/push/push",
},
] as Page[],
}, */
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url!,
}
this.goDetailPage(page)
return
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open
} else {
this.list[i].open = false
}
}
},
goDetailPage(e : Page) {
if (e.enable == false) {
uni.showToast({
title: '暂不支持',
icon: 'none',
})
return
}
if (e.url === 'set-tabbar') {
this.showPop()
return;
} }
const url = const url =
e.url.indexOf('platform') > -1 ? e.url : `/pages/API/${e.url}/${e.url}` e.url.indexOf('platform') > -1 ? e.url : `/pages/API/${e.url}/${e.url}`
uni.navigateTo({ uni.navigateTo({
url, url,
}) })
}, },
showPop: function () { showPop: function () {
(this.$refs["pop"] as INode).style.setProperty("display","flex") (this.$refs["pop"] as INode).style.setProperty("display", "flex")
}, },
hidePop: function () { hidePop: function () {
(this.$refs["pop"] as INode).style.setProperty("display","none") (this.$refs["pop"] as INode).style.setProperty("display", "none")
}, },
stopClickPop: function (e:MouseEvent) { stopClickPop: function (e : MouseEvent) {
e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件 e.stopPropagation() //点击到pop的非灰色区域,拦截点击事件
} }
}, },
} }
</script> </script>
<style> <style>
@import '../../common/uni-uvue.css'; @import '../../common/uni-uvue.css';
.item { .item {
margin-bottom: 12px; margin-bottom: 12px;
} }
</style> </style>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="uni-header-logo"> <view class="uni-header-logo">
<image class="uni-header-image" src="/static/cssIndex.png"></image> <image class="uni-header-image" src="/static/cssIndex.png"></image>
</view> </view>
<view class="uni-hello-text"> <view class="uni-text-box">
<text class="hello-text">uni-app x目前已支持的CSS属性,展示样式仅供参考,文档详见:</text> <text class="hello-text">uni-app x目前已支持的CSS属性,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'" <u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'"
:inWhiteList="true"></u-link> :inWhiteList="true"></u-link>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
src="/static/componentIndex.png" src="/static/componentIndex.png"
></image> ></image>
</view> </view>
<view class="uni-hello-text"> <view class="uni-text-box">
<text class="hello-text" <text class="hello-text"
>uni-app内置组件,展示样式仅供参考,文档详见:</text >uni-app内置组件,展示样式仅供参考,文档详见:</text
> >
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="uni-header-logo"> <view class="uni-header-logo">
<image class="uni-header-image" src="/static/templateIndex.png"></image> <image class="uni-header-image" src="/static/templateIndex.png"></image>
</view> </view>
<view class="uni-hello-text"> <view class="uni-text-box">
<text class="hello-text">以下是部分模板示例,更多模板见插件市场:</text> <text class="hello-text">以下是部分模板示例,更多模板见插件市场:</text>
<u-link <u-link
class="hello-link" class="hello-link"
......
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
} }
.description { .description {
line-height: 14px; /* line-height: 14px; */
} }
.description-text { .description-text {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册