Pen,pineapple,apple

Developer
Size
3,333 Kb
Views
6,072

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 Previews

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	}	}
});
Pen,pineapple,apple - Script Codes
Pen,pineapple,apple - Script Codes
Home Page Home
Developer Eric
Username ericyericy
Uploaded December 07, 2022
Rating 3
Size 3,333 Kb
Views 6,072
Do you need developer help for Pen,pineapple,apple?

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!

Eric (ericyericy) Script Codes
Name
A Pen by Eric
NameCard
Transition-duration
Vue
CSS resume
V-on
Vue add del
Brand Guideline
Create amazing SEO content with AI!

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!