Pen,pineapple,apple
How do I make an pen,pineapple,apple?
What is a pen,pineapple,apple? How do you make a pen,pineapple,apple? This script and codes were developed by Eric on 07 December 2022, Wednesday.
Pen,pineapple,apple - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>pen,pineapple,apple</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="app"> <button v-on:click="add('pen')">新增 pen</button> <button v-on:click="add('pineapple')">新增 pineapple</button> <button v-on:click="add('apple')">新增 apple</button> <div class="total">總數: 列表共有 {{items.length}} 項,筆 {{totals.pen}} 隻,鳳梨 {{totals.pineapple}} 顆,蘋果 {{totals.apple}} 粒</div> <div class="status">狀態: {{status}}</div> <div class="items"> <div class="item" v-for="(id,item) in items" track-by="$index"> <div class="name">{{id+1}}. {{item}}</div><img v-if="item=='pen'" src="https://goo.gl/yOaNjD"/><img v-if="item=='apple'" src="https://goo.gl/DLN0vH"/><img v-if="item=='pineapple'" src="https://tinyurl.com/koy7da4"/> <button v-on:click="remove(id,item)">X</button> </div> </div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.28/vue.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Pen,pineapple,apple - Script Codes CSS Codes
@charset "UTF-8";
* { font-family: 微軟正黑體;
}
body { padding: 20px;
}
.total, .items, .status { margin-top: 15px;
}
button { background: none; border: none; border: 1px solid #aaa; padding: 5px 10px; cursor: pointer; transition: all 0.5s;
}
button:hover { background-color: #333; color: #fff;
}
.item { border: 1px solid #bbb; width: 210px; padding: 8px;
}
.item * { display: inline-block; vertical-align: middle;
}
.item img { width: 30px;
}
.item .name { display: inline-block; width: 120px;
}
.item button { margin-left: 10px;
}
Pen,pineapple,apple - Script Codes JS Codes
var myData = [ "pen", "pineapple", "apple", "pen"];
var vm = new Vue({ el: "#app", data: { items: myData, status: "" }, methods:{ remove: function(id,fname){ this.items.splice(id,1); this.status="第 "+(id+1)+" 項 "+fname+" 已被移除"; }, add: function(data){ this.items.push(data); this.status="剛新增 "+data; } }, computed: { totals: function(){ var total = { pen:0, pineapple:0, apple:0 } for(var i=0;i<this.items.length;i++){ total[this.items[i]]+=1; } return total } }
});
Developer | Eric |
Username | ericyericy |
Uploaded | December 07, 2022 |
Rating | 3 |
Size | 3,333 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Eric | 1,212 Kb |
NameCard | 2,801 Kb |
Transition-duration | 1,935 Kb |
Vue | 4,864 Kb |
CSS resume | 6,784 Kb |
V-on | 3,337 Kb |
Vue add del | 2,236 Kb |
Brand Guideline | 4,033 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Subtle site navigation with description | Necks | 3,206 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
Ball Physics | Getsetbro | 3,149 Kb |
Polygon Logo in CSS | Kai | 3,412 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Blank Starter | Mhartington | 2,171 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
A Pen by Dalton Liu | Liudalton | 12,437 Kb |
Hello People | Danburrows | 2,365 Kb |
Zip Button test | Lje7462 | 1,932 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!