当前位置: 首页 > news >正文

付费网站搭建html编辑器在哪里

付费网站搭建,html编辑器在哪里,淄博网站排名seo,常州网站推广机构vue3 简单的TodList 地址#xff1a; https://gitee.com/cheng_yong_xu/vue3-composition-api-todo-app-my 效果 step-1 初始化项项目 我们不采用vue cli 搭建项目 直接将上图文件夹#xff0c;复制到vscode编辑器#xff0c;清空App.vue的内容 安装包 # 安装包 npm…vue3 简单的TodList 地址 https://gitee.com/cheng_yong_xu/vue3-composition-api-todo-app-my 效果 step-1 初始化项项目 我们不采用vue cli 搭建项目 直接将上图文件夹复制到vscode编辑器清空App.vue的内容 安装包 # 安装包 npm i # 启动 npm run servestep-2 先写样式结构 !-- src\App.vue -- templateh1ToDo App/h1formlabel for添加待办项/labelinput typetext namenewTodo autocompleteoff /button添 加/button/formh2待办列表/h2ullispan代办列表/spanbutton删 除/button/li/ul /templatescript export default {} /scriptstyle langscss $size1: 6px; $size2: 12px; $size3: 18px; $size4: 24px; $size5: 48px; $backgroundColor: #27292d; $primaryColor: #EC23F3; $secondTextColor: #1f2023;$border: 2px solid rgba($color: white,$alpha: 0.35,);$textColor: white; $border_r: 2px solid red; $border_y: 2px solid rgb(241, 229, 50); $border_g: 2px solid rgb(50, 241, 50); $border_w: 2px solid white;body {margin: 0;padding: 0;font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background-color: $backgroundColor;color: $textColor;#app {max-width: 600px;margin-left: auto;margin-right: auto;padding: 20px;// border: $border_w;h1 {font-weight: bold;font-size: 28px;text-align: center;// border: $border_r;}form {display: flex;flex-direction: column;width: 100%;label {font-size: 14px;font-weight: bold;}input,button {height: $size5;box-shadow: none;outline: none;padding-left: $size2;padding-right: $size2;border-radius: $size1;font-size: 18px;margin-top: $size1;margin-bottom: $size2;transition: all 0.2s ease-in-out;/* 添加过渡效果使变化平滑 */}input {background-color: transparent;border: $border;color: inherit;}input:hover {border: 2px solid rgb(236, 35, 243);}button {cursor: pointer;background-color: rgb(236, 35, 243);border: 1px solid $primaryColor;font-weight: bold;color: white;border-radius: $size1;}}h2 {// border: $border_g;font-size: 22px;border-bottom: $border;padding-bottom: $size1;}ul {padding: 10px;li {display: flex;justify-content: space-between;align-items: center;border: $border;padding: 10px;border-radius: $size1;margin-bottom: $size2;span {cursor: pointer;}button {cursor: pointer;font-size: $size2;background-color: rgb(236, 35, 243);border: 1px solid $primaryColor;font-weight: bold;color: white;padding: 5px 15px;border-radius: $size1;}}}} } /stylestep-3 双向绑定数据 !-- src\App.vue -- templateh1ToDo App/h1form submit.preventaddTodo()label for添加待办项/labelinput typetext namenewTodo autocompleteoff v-modelnewTodo/button添 加/button/formh2待办列表/h2ullispan代办列表/spanbutton删 除/button/li/ul /templatescript import {ref } from vue; export default {name: App,setup(){const newTodo ref();function addTodo(){if(newTodo.value){console.log(newTodo.value);}}return {newTodo,addTodo}} } /script step-4 定义数据并将数据变成响应式的 将数据持久化到本地 定义数据并将数据变成响应式的 script import { ref } from vue; export default {name: App,setup() {const newTodo ref();const defaultData ref([{done: false,content: 今天要学习Vue}]);const todos ref(defaultData);function addTodo() {if (newTodo.value) {todos.value.push({done: false,content: newTodo.value})}console.log(todos.value)}return {newTodo,addTodo}} } /script将数据持久化到本地 script import { ref } from vue; export default {name: App,setup() {const newTodo ref();const defaultData ref([{done: false,content: 今天要学习Vue}]);const todos ref(defaultData);function addTodo() {if (newTodo.value) {todos.value.push({done: false,content: newTodo.value})}saveData()console.log(sessionStorage.getItem(todos))}function saveData () {const storageData JSON.stringify(todos.value)sessionStorage.setItem(todos, storageData)}return {newTodo,addTodo}} } /scriptstep-5 渲染待办列表 h2待办列表/h2ulli v-for(todo, index) in todos :keyindexspan{{ todo.content }}/spanbutton删 除/button/li/ul点击文字划横线 点击删除从待办列表移除 !-- src\App.vue -- templateh1ToDo App/h1form submit.preventaddTodo()label for添加待办项/labelinput typetext namenewTodo autocompleteoff v-modelnewTodo /button添 加/button/formh2待办列表/h2ulli v-for(todo, index) in todos :keyindexspan:class{ done: todo.done }clicktodo.done !todo.done{{ todo.content }}/spanbutton clickremoveTodo(index)删 除/button/li/ul /templatescript import { ref } from vue; export default {name: App,setup() {const newTodo ref();const defaultData ref([{done: false,content: 今天要学习Vue}]);const todos ref(defaultData);function addTodo() {if (newTodo.value) {todos.value.push({done: false,content: newTodo.value})newTodo.value }saveData()console.log(sessionStorage.getItem(todos))}function removeTodo(index) {todos.value.splice(index, 1)saveData()}function saveData() {const storageData JSON.stringify(todos.value)sessionStorage.setItem(todos, storageData)}return {newTodo,todos,addTodo,removeTodo}} } /script style langscss $size1: 6px; $size2: 12px; $size3: 18px; $size4: 24px; $size5: 48px; $backgroundColor: #27292d; $primaryColor: #EC23F3; $secondTextColor: #1f2023;$border: 2px solid rgba($color: white,$alpha: 0.35,);$textColor: white; $border_r: 2px solid red; $border_y: 2px solid rgb(241, 229, 50); $border_g: 2px solid rgb(50, 241, 50); $border_w: 2px solid white;body {margin: 0;padding: 0;font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background-color: $backgroundColor;color: $textColor;#app {max-width: 600px;margin-left: auto;margin-right: auto;padding: 20px;// border: $border_w;h1 {font-weight: bold;font-size: 28px;text-align: center;// border: $border_r;}form {display: flex;flex-direction: column;width: 100%;label {font-size: 14px;font-weight: bold;}input,button {height: $size5;box-shadow: none;outline: none;padding-left: $size2;padding-right: $size2;border-radius: $size1;font-size: 18px;margin-top: $size1;margin-bottom: $size2;transition: all 0.2s ease-in-out;/* 添加过渡效果使变化平滑 */}input {background-color: transparent;border: $border;color: inherit;}input:hover {border: 2px solid rgb(236, 35, 243);}button {cursor: pointer;background-color: rgb(236, 35, 243);border: 1px solid $primaryColor;font-weight: bold;color: white;border-radius: $size1;}}h2 {// border: $border_g;font-size: 22px;border-bottom: $border;padding-bottom: $size1;}ul {padding: 10px;li {display: flex;justify-content: space-between;align-items: center;border: $border;padding: 10px;border-radius: $size1;margin-bottom: $size2;span {cursor: pointer;}.done {text-decoration: line-through;}button {cursor: pointer;font-size: $size2;background-color: rgb(236, 35, 243);border: 1px solid $primaryColor;font-weight: bold;color: white;padding: 5px 15px;border-radius: $size1;}}}h4 {text-align: center;opacity: 0.5;margin: 0;}} } /stylestep-6 目前我们的数据虽然存在本地但是我们使用的是内存中的数据应该使用本地的数据 关闭浏览器再打开看到的还是和关闭之前一样的数据 templateh1ToDo App/h1form submit.preventaddTodo()labelNew ToDo /labelinputv-modelnewTodonamenewTodoautocompleteoffbuttonAdd ToDo/button/formh2ToDo List/h2ulliv-for(todo, index) in todos:keyindexspan:class{ done: todo.done }clickdoneTodo(todo){{ todo.content }}/spanbutton clickremoveTodo(index)Remove/button/li/ulh4 v-iftodos.length 0Empty list./h4 /templatescriptimport { ref } from vue;export default {name: App,setup () {const newTodo ref();const defaultData [{done: false,content: Write a blog post}]const todosData JSON.parse(localStorage.getItem(todos)) || defaultData;const todos ref(todosData);function addTodo () {if (newTodo.value) {todos.value.push({done: false,content: newTodo.value});newTodo.value ;}saveData();}function doneTodo (todo) {todo.done !todo.donesaveData();}function removeTodo (index) {todos.value.splice(index, 1);saveData();}function saveData () {const storageData JSON.stringify(todos.value);localStorage.setItem(todos, storageData);}return {todos,newTodo,addTodo,doneTodo,removeTodo,saveData}}} /scriptstyle langscss $border: 2px solidrgba($color: white,$alpha: 0.35,); $size1: 6px; $size2: 12px; $size3: 18px; $size4: 24px; $size5: 48px; $backgroundColor: #27292d; $textColor: white; $primaryColor: #a0a4d9; $secondTextColor: #1f2023; body {margin: 0;padding: 0;font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background-color: $backgroundColor;color: $textColor;#app {max-width: 600px;margin-left: auto;margin-right: auto;padding: 20px;h1 {font-weight: bold;font-size: 28px;text-align: center;}form {display: flex;flex-direction: column;width: 100%;label {font-size: 14px;font-weight: bold;}input,button {height: $size5;box-shadow: none;outline: none;padding-left: $size2;padding-right: $size2;border-radius: $size1;font-size: 18px;margin-top: $size1;margin-bottom: $size2;}input {background-color: transparent;border: $border;color: inherit;}}button {cursor: pointer;background-color: $primaryColor;border: 1px solid $primaryColor;color: $secondTextColor;font-weight: bold;outline: none;border-radius: $size1;}h2 {font-size: 22px;border-bottom: $border;padding-bottom: $size1;}ul {padding: 10px;li {display: flex;justify-content: space-between;align-items: center;border: $border;padding: $size2 $size4;border-radius: $size1;margin-bottom: $size2;span {cursor: pointer;}.done {text-decoration: line-through;}button {font-size: $size2;padding: $size1;}}}h4 {text-align: center;opacity: 0.5;margin: 0;}} } /style
http://www.w-s-a.com/news/818707/

相关文章:

  • 一起做网店网站入驻收费wordpress 自定义评论样式
  • 深圳高端网站建设公司排名app软件开发sh365
  • 泰州网站整站优化惠州做网站多少钱
  • 做博客网站的php代码一建论坛建工教育网
  • 邢台网站制作费用单页营销网站后台
  • 红色网站建设的比较好的高校用vs2010做购物网站
  • 网站域名备案号查询网页设计实验报告总结模板
  • 什么软件 做短视频网站好大型论坛网站建设
  • 视频网站用什么cms网络运营与维护主要做什么
  • 设计网站主页要多少钱赣州制作网站百度
  • 什么叫高端网站定制网站收录大幅度下降
  • 汝城县网站建设公司aspx网站实例
  • 专业微网站营销diywap手机微网站内容管理系统
  • 盗版做的最好的网站温州logo设计公司
  • 网站建设 中山南充微网站建设
  • 企业网站更新什么内容免费设计软件下载
  • 夏天做哪些网站能致富做网站怎么每天更新内容
  • 个人网站的设计与开发网站建设流程中哪些部分比较重要
  • 招聘网站如何建设中国计算机网络公司排名
  • 工信部网站备案规定厦门在线制作网站
  • 商丘网站公司智联招聘手机app下载
  • 江西专业南昌网站建设中国专业的网站建设
  • 物流企业网站建设方案招标网站有哪些
  • 网站建设服务中企动力建筑工程网络进度计划备注填写范例
  • 电子商务网站开发与建设试卷php网站开发专业
  • 运城网站制作路90江苏省网站备案系统
  • 唐山做企业网站实体门店管理系统
  • 网站优化推广教程深圳网站建设世纪前线
  • 网站建设专家哪家好兰州网络推广执行
  • 广东住房和城乡建设厅网站王芃增加网站收录