上一页 1 2 3 4 5 6 7 ··· 28 下一页
摘要: 1、App.vue代码如下: <template> <button @click="change">切换组件</button> <p></p> <keep-alive> <component :is="tabComponent"></component> </keep-alive> </templa 阅读全文
posted @ 2024-08-11 20:49 像一棵海草海草海草 阅读(87) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <component :is="tabComponent"></component> <button @click="change">切换组件</button> </template> <script> import Child1 from "./ 阅读全文
posted @ 2024-08-11 20:38 像一棵海草海草海草 阅读(87) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <div> <h3>主页面</h3> <button @click="change">改变</button> </div> </template> <script> export default { beforeCreate() { console 阅读全文
posted @ 2024-08-11 20:02 像一棵海草海草海草 阅读(16) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <div> <h3>主页面</h3> <Slot001> <template #s1="slotProps"> <h4>{{ msg }} {{ slotProps.msg1 }}</h4> </template> <template #s2="s 阅读全文
posted @ 2024-08-11 19:47 像一棵海草海草海草 阅读(51) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <div> <h3>主页面</h3> <Slot001 v-slot="slotProps"> <h4>{{ msg }} {{ slotProps.msg }}</h4> </Slot001> </div> </template> <script> 阅读全文
posted @ 2024-08-11 19:38 像一棵海草海草海草 阅读(33) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <div> <h3>插槽学习</h3> <Slot001> <!-- 插槽1--> <template v-slot:s2> <p>{{ msg1 }}</p> </template> <!-- 插槽2--> <template #s1> <p>{ 阅读全文
posted @ 2024-08-11 19:06 像一棵海草海草海草 阅读(67) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <div> <h3>插槽学习</h3> <!-- 插槽1--> <Slot001> <p>{{ msg }}</p> </Slot001> <!-- 插槽2--> <Slot001> <!-- <p>{{ msg }}</p>--> </Slot0 阅读全文
posted @ 2024-08-11 18:51 像一棵海草海草海草 阅读(77) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <div> <h3>插槽学习</h3> <Slot001> <p>我是主页面</p> </Slot001> </div> </template> <script> import Slot001 from './view/Slot001.vue' e 阅读全文
posted @ 2024-08-11 18:30 像一棵海草海草海草 阅读(16) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码如下: <te 阅读全文
posted @ 2024-08-11 18:17 像一棵海草海草海草 阅读(26) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father代码如下: <template 阅读全文
posted @ 2024-08-11 18:04 像一棵海草海草海草 阅读(41) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码: <templa 阅读全文
posted @ 2024-08-11 17:53 像一棵海草海草海草 阅读(44) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码: <templa 阅读全文
posted @ 2024-08-11 15:02 像一棵海草海草海草 阅读(154) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码: <templa 阅读全文
posted @ 2024-08-11 14:08 像一棵海草海草海草 阅读(87) 评论(0) 推荐(0)
摘要: 1、App.vue代码: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码 <templat 阅读全文
posted @ 2024-08-11 13:58 像一棵海草海草海草 阅读(75) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码如下: <te 阅读全文
posted @ 2024-08-11 02:01 像一棵海草海草海草 阅读(45) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <template> <Father/> </template> <script setup> import Father from './view/Father.vue' </script> <style> </style> 2、Father.vue代码如下: <te 阅读全文
posted @ 2024-08-11 01:12 像一棵海草海草海草 阅读(89) 评论(0) 推荐(0)
摘要: 1、main.js代码如下: // import './assets/main.css' import {createApp} from 'vue' import App from './App.vue' import Config from "@/config.js"; import Testpa 阅读全文
posted @ 2024-08-11 00:59 像一棵海草海草海草 阅读(155) 评论(0) 推荐(0)
摘要: 1、一个经典的样式布局 2、App.vue代码如下: <template> <Header/> <Main/> <Aside/> </template> <script> import Aside from "./view/Aside.vue"; import Main from "./view/M 阅读全文
posted @ 2024-08-11 00:04 像一棵海草海草海草 阅读(134) 评论(0) 推荐(0)
摘要: 1、全局代码App.vue如下 <script setup> import Testpage001 from './view/Testpage001.vue' import Testpage002 from './view/Testpage002.vue' </script> <template> 阅读全文
posted @ 2024-08-10 23:20 像一棵海草海草海草 阅读(10) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <div ref="container" class="container">{{ caption }}</div> <input type="text" ref="username"> <button @click="getElementHandle">获取元 阅读全文
posted @ 2024-08-10 22:51 像一棵海草海草海草 阅读(133) 评论(0) 推荐(0)
摘要: 1、代码如下 <template> <h3>表单输入绑定</h3> <form> <!-- 编辑框内容变化时候,下面标签同步显示编辑框内容--> <input type="text" v-model:="username"> <P>{{ username }}</P> <!-- 编辑框内容变化时候, 阅读全文
posted @ 2024-08-10 22:44 像一棵海草海草海草 阅读(23) 评论(0) 推荐(0)
摘要: 01、代码如下: <template> <h3>侦听器</h3> <div>{{ msg }}</div> <button @click="undateHandle">修改</button> </template> <script> export default { data() { return 阅读全文
posted @ 2024-08-10 22:06 像一棵海草海草海草 阅读(19) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <div :style="{color:activeColor,fontSize:fontsize+'px'}">Style绑定1</div> <div :style="styleObject">Style绑定2</div> <div :style="[styl 阅读全文
posted @ 2024-08-10 21:58 像一棵海草海草海草 阅读(364) 评论(0) 推荐(0)
摘要: 1、App.vue代码如下: <script setup> import Testpage001 from './view/Testpage001.vue' </script> <template> <Testpage001/> </template> <style> </style> 2、如图所示 阅读全文
posted @ 2024-08-10 21:48 像一棵海草海草海草 阅读(130) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>class绑定</h3> <div :class="{ 'active':isActive , 'text-danger':hasError }">Class样式绑定1</div> <div :class="classObject">Class样式绑定2 阅读全文
posted @ 2024-08-10 21:33 像一棵海草海草海草 阅读(194) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>计算属性</h3> <div>{{ func1 }}</div> <div>{{ func1 }}</div> <div>{{ func1 }}</div> <!-- <div>{{ func1() }}</div>--> <!-- <div>{{ fu 阅读全文
posted @ 2024-08-10 18:29 像一棵海草海草海草 阅读(28) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>数组变化侦听</h3> <button @click="addListHandle">添加数据</button> <ul> <li v-for="(item,index) of names" :key="index">{{ item }}</li> </ 阅读全文
posted @ 2024-08-10 18:10 像一棵海草海草海草 阅读(71) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>事件修饰符</h3> <a @click.prevent="clickHandle" href="http://www.baidu.com">百度</a> <div @click="click1"><p @click="click2">测试1</p></ 阅读全文
posted @ 2024-08-10 17:48 像一棵海草海草海草 阅读(20) 评论(0) 推荐(0)
摘要: 1、代码如下 <template> <h3>事件传参</h3> <p @click="getNameHandler(item,$event)" v-for="(item,index) of names" :key="index">{{ item }}</p> </template> <script> 阅读全文
posted @ 2024-08-10 17:34 像一棵海草海草海草 阅读(48) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>内联事件处理群</h3> <button @click="addCount1">Add</button> <p>{{ count1 }}</p> <button @click="addCount2('hello')">按钮</button> <p>{{ 阅读全文
posted @ 2024-08-10 17:12 像一棵海草海草海草 阅读(65) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>内联事件处理群</h3> <button @click="addCount">Add</button> <p>{{ count }}</p> </template> <script> export default { data() { return { 阅读全文
posted @ 2024-08-10 17:03 像一棵海草海草海草 阅读(49) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>列表渲染</h3> <p v-for="(item,index) of names">序号:{{ index }},内容:{{ item }} </p> <div v-for="item of result"> <p>ID:{{ item.id }}, 阅读全文
posted @ 2024-08-10 16:29 像一棵海草海草海草 阅读(80) 评论(0) 推荐(0)
摘要: 01、代码如下: <template> <button @click="isCn = !isCn">转换</button> <h1 v-if="isCn">十年一梦学Vue!</h1> <h1 v-else>Ten years of dreaming of Vue!</h1> </template> 阅读全文
posted @ 2024-08-10 15:59 像一棵海草海草海草 阅读(77) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <div v-bind:id="myId1" v-bind:class="testCls" v-bind="objAttrs">测试1</div> </template> <script> export default { data() { return { t 阅读全文
posted @ 2024-08-10 15:01 像一棵海草海草海草 阅读(137) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <div v-bind:id="myId1" v-bind:class="testCls">测试1</div> <div v-bind:id="myId2" v-bind:title="testTitle">测试2</div> <div :id="myId3" 阅读全文
posted @ 2024-08-10 14:55 像一棵海草海草海草 阅读(174) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <div v-bind:id="myId" v-bind:class="testCls">测试</div> </template> <script> export default { data() { return { testCls: "appclass", 阅读全文
posted @ 2024-08-10 14:43 像一棵海草海草海草 阅读(22) 评论(0) 推荐(0)
摘要: 1、代码如下: <template> <h3>模板语法</h3> <p>{{ msg }}</p> <p>{{ msg_cn }}</p> <p>{{ number + 1 }}</p> <p>{{ ok ? 'Yes' : 'No' }}</p> <p>{{ message.split("").r 阅读全文
posted @ 2024-08-10 14:33 像一棵海草海草海草 阅读(13) 评论(0) 推荐(0)
摘要: 1、在App.vue中写入下面的代码 <template> <h3>模板语法</h3> <p>{{ msg }}</p> <p>{{ msg_cn }}</p> </template> <script> export default { data() { return { msg: "Hello W 阅读全文
posted @ 2024-08-10 14:31 像一棵海草海草海草 阅读(32) 评论(0) 推荐(0)
摘要: CI4和VUE前端代码,可以看我在https://www.cnblogs.com/tianpan2019写的前2篇 运行CI4能正常打开 使用npm run dev 也可以正常打开VUE 根据https://www.cnblogs.com/tianpan2019前1篇把根目录设置成CI4的publi 阅读全文
posted @ 2024-08-10 02:15 像一棵海草海草海草 阅读(49) 评论(0) 推荐(0)
摘要: 安装node22.5 选择路径 安装完成 装好后使用cmd查看node -v和 npm -v,看一下就知道有没有装好了 nodejs的安装目录,需要完全授权才可以,不然后面会报错 在网站的根目录,打开Powershell 显示权限不足的错误 管理员模式打开系统的Powershell 输入set-Ex 阅读全文
posted @ 2024-08-10 01:47 像一棵海草海草海草 阅读(63) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 28 下一页