- 博客(15)
- 收藏
- 关注
原创 随手笔记 - 04(Object.assign)
方法:浅拷贝、对象属性的合并;属性名相同时后面覆盖前面的。(2).克隆对象(浅拷贝)(3).为对象添加多个方法。(1).合并多个对象。
2024-01-31 16:16:34
382
原创 随手笔记-03(字符串 + 数字)
1.字符串-替换–replace()"hello, world".replace("world", "mars"); // "hello, mars"2.字符串转大写 – toUpperCase()"hello".toUpperCase(); // "HELLO"3.字符串返回指定位置的字符–charAt()"hello".charAt(0); // "h"4.将字符串转换为整型–parseInt()parseInt("123", 10); // 123parseInt("010",
2021-07-28 14:27:49
176
原创 小程序菜单-锚点 左右滑动定位
HTML:<!-- menu.wxml --><view> <!-- mainBox --> <view class="mainBox"> <!-- menuMain --> <view class="menuMain"> <!-- left --> <scroll-view style="height:{{height}}px" class="menuTab
2021-01-20 17:15:36
445
原创 获取数组里英文名称的第一个字母,并转为大写
var arry = [ {username:'Ancd Xeds'}, {username:'Bncd Xeds'}, {username:'Cncd Xeds'},];arry.forEach((list, idx) => { // 获取名称第一个字母 var str = list.username; var arr = str.split(" "); var fristCode = ""; arr.forEach(function(v, i) { frist
2021-01-06 17:17:24
384
原创 登录时记住密码 (原生 和 vue)
1.原生HTML:<div class="login_box"> <div class="inputLine"> <img src="image/account.png" alt="" class="accountImg icon"> <input type="text" class="login_input" id="account" placeholder="请输入用户名/手机/邮箱"> </div> &
2020-11-14 16:31:51
295
原创 vue-cli4里安装bootstrapVue(老板要求引用bootstrap,一般不建议vue使用bootstrap)
先安装jquery;安装代码npm i jquery(不然要报错)再安装bootstrapVue;安装代码npm install vue bootstrap-vue bootstrap;最后在main.js中引用安装好后npm run serve执行代码即可BootstraoVue官网 https://bootstrap-vue.org/docs...
2020-11-13 14:20:28
644
原创 uni-app接省市区接口
HTML: <!-- 省市区 --> <view class="input-item"> <picker mode="multiSelector" @columnchange="bindMultiPickerColumnChange" :value="regionIndex" :range="regionArray" @change="bindMul
2020-10-31 14:58:13
971
1
原创 小程序省市区接接口
wxml代码:<!-- 省/市/区 --> <view class="form_item"> <image class="icon" src="cloud://xinpin-0nowm.7869-xinpin-0nowm-1303151547/address_icon.png"></image> <view class='viewAddress'> <picker class=
2020-10-31 14:52:31
606
原创 小程序 rich-text 从返回的数据里去图片
html:js:data:{schoolInstruction: “”,}initDAta:function({call.getData(‘myintroduce’, {school_id: school_id}, function (res) {if (res.errCode == 0) {var info = res.data.introduce;var firstImageUrl = that.getFirstImage(info);var instruction = ‘’;if
2020-09-18 15:39:32
486
原创 table -thead固定,tbody滚动的样式
table tbody {display: block;height: auto;max-height: 380px;overflow-y: scroll;}table thead,tbody tr {display: table;width: 100%;table-layout: fixed;}/* table thead {width: calc(100% - 1em)} *//* 隐藏滚动条 */tbody::-webkit-scrollbar {display: n
2020-09-11 14:59:51
275
原创 随手笔记02--let与var的区别
1.let,var作用在全局作用域,如果有块级作用域时:let 只作用在当前块级作用域( {...} );var 不受块级作用域影响;如: 2. 使用let 或 const 声明的变量,不能被重新声明;var可以重新声明3. let不存在‘变量提升’,var 存在‘变量提升’...
2020-04-01 15:52:06
138
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅