摘要: promise用来做任务处理,方便串行或并行处理多个任务。在js中Promise对象指的是‘承诺将来会执行’的对象 示例 test函数只关心自身的逻辑,并不关心具体的resolve和reject将如何处理结果。(创建约定) function test(resolve, reject) { let n 阅读全文
posted @ 2022-03-30 21:14 微山湖上静悄悄 阅读(81) 评论(0) 推荐(0)
摘要: povide,inject可跨组件传值,使用方式如下: 父组件 使用povide发送值 <template> <div class="wrap"> <h3>父组件</h3> <p>父组件: {{ fVal }}</p> <child></child> </div> </template> <scri 阅读全文
posted @ 2022-03-30 21:13 微山湖上静悄悄 阅读(84) 评论(0) 推荐(0)
摘要: 父组件 <template> <div class="wrap"> <div id="app" style="position: relative"> <h3>Tooltips with Vue 3 Teleport</h3> <div> <modalButton></modalButton> </ 阅读全文
posted @ 2022-03-30 21:12 微山湖上静悄悄 阅读(77) 评论(0) 推荐(0)
摘要: 父组件 <map-comp title="卫星地图2-2"> <template #img> <img :src="model4Img" style="border-radius: 10px" /> </template> <template #img-primary> <img :src="mod 阅读全文
posted @ 2022-03-30 21:11 微山湖上静悄悄 阅读(260) 评论(0) 推荐(0)
摘要: 以ant-design-vue 2.2.8版Upload上传组件为例: 官方示例代码 封装前 <template> <a-upload v-model:file-list="fileList" name="file" :multiple="true" action="https://www.mock 阅读全文
posted @ 2022-03-30 21:10 微山湖上静悄悄 阅读(335) 评论(0) 推荐(0)
摘要: css自定义属性 css使用--开头可自定义属性,也就是常说的css变量。使用时var(自定义属性名) 示例 <div class="test"> <p>测试</p> </div> <style> .test { --myColor: red; --myWidth: 200px; } p { wid 阅读全文
posted @ 2022-03-30 21:09 微山湖上静悄悄 阅读(48) 评论(0) 推荐(0)
摘要: react组件主要有两种形式,一种是class组件,一种是函数组件,class组件扩展性强,写起来较为繁琐。函数组件功能单一,但写起来简单。 class组件 class List extends React.Component { render() { return ( <button classN 阅读全文
posted @ 2022-03-30 21:04 微山湖上静悄悄 阅读(48) 评论(0) 推荐(0)
摘要: template <template> <div class="wrap"> <div>{{ num }}</div> <Button @click="getData">改变数据</Button> </div> </template> <style lang="less" scoped> .wrap 阅读全文
posted @ 2022-03-30 21:02 微山湖上静悄悄 阅读(48) 评论(0) 推荐(0)
摘要: v-model用于在元素上创建双向数据绑定,负责监听用户输入事件来更新数据。 v-model应用于输入框 <input v-model="searchText" /> // 等价于 <input :value="searchText" @input="searchText = $event.targ 阅读全文
posted @ 2022-02-20 23:37 微山湖上静悄悄 阅读(6242) 评论(0) 推荐(0)
摘要: three模型高亮外发光效果 页面效果如下: vue3+three完整代码如下: <template> </template> <script setup> import * as THREE from 'three'; import { EffectComposer } from "three/examples/jsm/pos 阅读全文
posted @ 2021-12-29 22:39 微山湖上静悄悄 阅读(2448) 评论(0) 推荐(0)
Document