Skip to content

Commit

Permalink
0
Browse files Browse the repository at this point in the history
  • Loading branch information
logoove committed Jun 11, 2023
1 parent e029a9f commit a70a7d6
Show file tree
Hide file tree
Showing 9 changed files with 183 additions and 282 deletions.
54 changes: 28 additions & 26 deletions weui/css/weuix.css
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,6 @@ label > * {
text-align: right;
font-size: 1rem;
font-weight: normal;
-webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent);
-webkit-mask-box-image: linear-gradient(to top, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent);
}
.weui-picker-modal .bar + .picker-items {
height: 10.8rem;
Expand Down Expand Up @@ -1484,18 +1482,6 @@ label > * {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.weui-picker-modal .picker-center-highlight:before {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 3) {
.weui-picker-modal .picker-center-highlight:before {
-webkit-transform: scaleY(0.33);
transform: scaleY(0.33);
}
}
.weui-picker-modal .picker-center-highlight:after {
content: '';
position: absolute;
Expand All @@ -1511,18 +1497,6 @@ label > * {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.weui-picker-modal .picker-center-highlight:after {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 3) {
.weui-picker-modal .picker-center-highlight:after {
-webkit-transform: scaleY(0.33);
transform: scaleY(0.33);
}
}
.weui-picker-modal .picker-3d .picker-items {
overflow: hidden;
-webkit-perspective: 1200px;
Expand Down Expand Up @@ -3733,6 +3707,34 @@ min-height:1em;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.weui-form-div{
width: 100%;
padding: 10px 0;
text-align: center;
}
.weui-form-radio-li{
display: inline-block;
padding:5px;
width:45%;
}
.weui-form-radio{
position: absolute;
z-index: -1;
opacity: 0;
}
.weui-form-radio + label{
text-align: center;
border: 1px solid #07c160;
border-radius: 5px;
line-height: 2;
display: inline-block;
width:100%;
}
.weui-form-radio:checked + label {
border-color: #07c160;
background-color: #07c160;
color: white;
}
/*
图片效果*/
.img-max {
Expand Down
47 changes: 35 additions & 12 deletions weui/demo/form13.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
$(".page-hd-desc").html(v)
})

$(document).on("click","#k2 .weui-form-radio",function(){

var v = $(this).val();
$(".page-hd-desc").html(v)
})
});


Expand Down Expand Up @@ -68,37 +73,55 @@ <h1 class="page-hd-title">
<div class="weui-form">

<div class="weui-form-li iblock">
<input class="weui-form-checkbox" name="f2" id="g1" value="中国" type="radio">
<input class="weui-form-checkbox" name="f2" id="g1" value="刘亦菲" type="radio">
<label for="g1" >
<i class="weui-icon-radio"></i>
<div class="weui-form-text"><p>刘亦菲</p></div>
</label>
</div>

<div class="weui-form-li iblock">
<input class="weui-form-checkbox" name="f2" id="g2" value="美国" type="radio">
<input class="weui-form-checkbox" name="f2" id="g2" value="杨幂" type="radio">
<label for="g2" >
<i class="weui-icon-radio"></i>
<div class="weui-form-text"><p>范冰冰</p></div>
<div class="weui-form-text"><p>杨幂</p></div>
</label>
</div>
<div class="weui-form-li iblock">
<input class="weui-form-checkbox" name="f2" id="g3" value="日本" type="radio">
<input class="weui-form-checkbox" name="f2" id="g3" value="杨紫" type="radio">
<label for="g3" >
<i class="weui-icon-radio"></i>
<div class="weui-form-text"><p>童菲</p></div>
<div class="weui-form-text"><p>杨紫</p></div>
</label>
</div>
<div class="weui-form-li iblock">
<input class="weui-form-checkbox" name="f2" id="g4" value="日本" type="radio">
<input class="weui-form-checkbox" name="f2" id="g4" value="迪丽热巴" type="radio">
<label for="g4" >
<i class="weui-icon-radio"></i>
<div class="weui-form-text"><p>徐佳琪</p></div>
<div class="weui-form-text"><p>迪丽热巴</p></div>
</label>
</div>

</div>

<div class="weui-cells__title weui-start">你经常用weui做项目吗</div>

<div class="weui-form-div" id="k2">
<div class="weui-form-radio-li">
<input class="weui-form-radio" checked name="a2" id="a1" value="1" type="radio">
<label for="a1" >
<div class="weui-form-text"><p></p></div>
</label>
</div>

<div class="weui-form-radio-li">
<input class="weui-form-radio" name="a2" id="a2" value="0" type="radio">
<label for="a2" >
<div class="weui-form-text"><p></p></div>
</label>
</div>

</div>

<div class="weui-cells__title weui-start"> 3 . 选择你的爱好?<span class="f-green">[多选题]</span></div>
<div class="weui-form">
Expand Down Expand Up @@ -130,29 +153,29 @@ <h1 class="page-hd-title">
</div>


<div class="weui-cells__title weui-start"> 4 . 哪些都是大公司老板?<span class="f-green">[多选题]</span></div>
<div class="weui-cells__title weui-start"> 4 . 哪些人不是中国人?<span class="f-green">[多选题]</span></div>
<div class="weui-form">

<div class="weui-form-li">
<input class="weui-form-checkbox" name="f4" id="j1" value="美术" type="checkbox">
<input class="weui-form-checkbox" name="f4" id="j1" value="马云" type="checkbox">
<label for="j1" >
<i class="weui-icon-checkbox"></i>
<div class="weui-form-text"><p>马云</p></div>
</label>
</div>

<div class="weui-form-li">
<input class="weui-form-checkbox" name="f4" id="j2" value="美国" type="checkbox">
<input class="weui-form-checkbox" name="f4" id="j2" value="马化腾" type="checkbox">
<label for="j2" >
<i class="weui-icon-checkbox"></i>
<div class="weui-form-text"><p>马化腾</p></div>
</label>
</div>
<div class="weui-form-li">
<input class="weui-form-checkbox" name="f4" id="j3" value="日本" type="checkbox">
<input class="weui-form-checkbox" name="f4" id="j3" value="马斯克" type="checkbox">
<label for="j3" >
<i class="weui-icon-checkbox"></i>
<div class="weui-form-text"><p>马赛克</p></div>
<div class="weui-form-text"><p>马斯克</p></div>
</label>
</div>

Expand Down
9 changes: 7 additions & 2 deletions weui/demo/form2.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
window.scrollTo(0, Math.max(scrollHeight - 1, 0));
}, 100);
})

$(document).on('change','#select2',function(){
let val=$(this).val()
alert(val)
let val1=$(this).find('option:selected').text()
alert(val1)
})
});

var countdown=60;
Expand Down Expand Up @@ -229,7 +234,7 @@ <h1 class="page-hd-title">
<label for="" class="weui-label">国家/地区</label>
</div>
<div class="weui-cell__bd">
<select class="weui-select" name="select2">
<select class="weui-select" name="select2" id="select2">
<option value="1">中国</option>
<option value="2">美国</option>
<option value="3">英国</option>
Expand Down
104 changes: 104 additions & 0 deletions weui/demo/p80.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="../css/weui.css"/>
<link rel="stylesheet" href="../css/weuix.css"/>
<script src="../js/tv.js"></script>

</head>

<body ontouchstart>
<div class="page-hd">
<h1 class="page-hd-title">
tradingview画图
</h1>
<p class="page-hd-desc">LightweightCharts<a href="https://aitrade.ga/books/lightweight-charts-docs-cn/">中文</a></p>
</div>
<div class="page-bd-15">
<div id="myChart" height="300"></div>
<br>
<br>
<div id="myChart2" height="300"></div>
<script>
function ispc() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone","SymbianOS", "Windows Phone","iPad", "iPod"];
var flagPc = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flagPc = false;
break;
}
}
return flagPc;
}
var width=ispc()?800:400;
var height=ispc()?600:300;
const chart = LightweightCharts.createChart(document.getElementById("myChart"), { width: 400, height: 300 });
chart.resize(width, height);
const lineSeries = chart.addLineSeries();
lineSeries.setData([
{ time: '2019-04-11', value: 80.01 },
{ time: '2019-04-12', value: 96.63 },
{ time: '2019-04-13', value: 76.64 },
{ time: '2019-04-14', value: 81.89 },
{ time: '2019-04-15', value: 74.43 },
{ time: '2019-04-16', value: 80.01 },
{ time: '2019-04-17', value: 96.63 },
{ time: '2019-04-18', value: 76.64 },
{ time: '2019-04-19', value: 81.89 },
{ time: '2019-04-20', value: 74.43 },
]);

const chart2 = LightweightCharts.createChart(document.getElementById("myChart2"));
chart2.resize(width, height);
const cand = chart2.addCandlestickSeries({title:"k线图",upColor: "#FA5151",downColor: "#07C160", borderUpColor: "#FA5151",borderDownColor: "#07C160", wickUpColor: "#FA5151",wickDownColor: "#07C160"});
cand.setData([
{
time: "2018-12-19",
open: 141.77,
high: 170.39,
low: 120.25,
close: 145.72
},
{
time: "2018-12-20",
open: 145.72,
high: 147.99,
low: 100.11,
close: 108.19
},
{ time: "2018-12-21", open: 108.19, high: 118.43, low: 74.22, close: 75.16 },
{ time: "2018-12-22", open: 75.16, high: 82.84, low: 36.16, close: 45.72 },
{ time: "2018-12-23", open: 45.12, high: 53.9, low: 45.12, close: 48.09 },
{ time: "2018-12-24", open: 60.71, high: 60.71, low: 53.39, close: 59.29 },
{ time: "2018-12-25", open: 68.26, high: 68.26, low: 59.04, close: 60.5 },
{ time: "2018-12-26", open: 67.71, high: 105.85, low: 66.67, close: 91.04 },
{ time: "2018-12-27", open: 91.04, high: 121.4, low: 82.7, close: 111.4 },
{
time: "2018-12-28",
open: 111.51,
high: 142.83,
low: 103.34,
close: 131.25
},
{ time: "2018-12-29", open: 131.33, high: 151.17, low: 77.68, close: 96.43 },
{ time: "2018-12-30", open: 106.33, high: 110.2, low: 90.39, close: 98.1 },
{ time: "2018-12-31", open: 109.87, high: 114.69, low: 85.66, close: 111.26 },

]);
</script>
</div>
<br>
<br>
<div class="weui-footer weui-footer_fixed-bottom">
<p class="weui-footer__links">
<a href="../index.html" class="weui-footer__link">WeUI首页</a>
</p>
<p class="weui-footer__text">Copyright &copy; Yoby</p>
</div>
</body>
</html>
12 changes: 0 additions & 12 deletions weui/js/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -1123,18 +1123,6 @@ export function tpl(a,d){let c=function(l){let j,h=[],g=[];for(j in l){h.push(j)
*/
export const browser={version:function(){let u=navigator.userAgent.toLowerCase(),app=navigator.appVersion;return{ie:u.indexOf("trident")>-1,opera:u.indexOf("tresto")>-1,webKit:u.indexOf("applewebkit")>-1,firefox:u.indexOf("gecko")>-1&&u.indexOf("khtml")==-1,mobile:!!u.match(/applewebkit.*mobile.*/),ios:!!u.match(/\(i[^;]+;( u;)? cpu.+mac os x/),android:u.indexOf("android")>-1||u.indexOf("linux")>-1,iphone:u.indexOf("iphone")>-1,ipad:u.indexOf("ipad")>-1,weixin:u.match(/micromessenger/i)=="micromessenger"}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase(),wifi:!function(t){let e=!0,n=t.navigator.userAgent,i=t.navigator.connection;if(/MicroMessenger/.test(n))if(/NetType/.test(n)){let o=n.match(/NetType\/(\S)+/)[0].replace("NetType/","");o&&"WIFI"!=o&&(e=!1)}else document.addEventListener("WeixinJSBridgeReady",function(){WeixinJSBridge.invoke("getNetworkType",{},function(t){"network_type:wifi"!=t.err_msg&&(e=!1)})});else if(i){let a=i.type;"wifi"!=a&&"2"!=a&&"unknown"!=a&&(e=!1)}t.wifi=e}(window)};

/**
*
* @param key 支持字符串
* @param value 只能字符串
* @param time 过期时间 秒
* @return 设置cookie
*/
export function setCookie(key, value, time){
let d = new Date();
d.setTime(d.getTime() + time*1000);
document.cookie = key + "=" + value + "; expires=" + d.toGMTString();
}
/**
* ls.set("text", "this is string",3);
* ls.get("text")
Expand Down
228 changes: 0 additions & 228 deletions weui/js/picker.city1.js

This file was deleted.

7 changes: 7 additions & 0 deletions weui/js/tv.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion weui/js/zepto.weui.js
Original file line number Diff line number Diff line change
Expand Up @@ -3818,7 +3818,7 @@ function gallery(url, options = {}) {
}, options);

const $gallery = $(render(`<div class="weui-gallery <%= className %>" role="dialog" aria-modal="true" tabindex="-1">
<button class="weui-hidden_abs weui-gallery__close">关闭</button>
<button class="weui-hidden_abs weui-gallery__close right">关闭</button>
<span class="weui-gallery__img" style="background-image: url(<%= url %>);" role="img" src="<%= url %>"></span>
<div class="weui-gallery__opr">
<a href="javascript:" class="weui-gallery__del" role="button" aria-label="删除">
Expand Down
2 changes: 1 addition & 1 deletion weui/php/ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.09|2022-4-15
6.10|2023-06-11

0 comments on commit a70a7d6

Please sign in to comment.