Skip to content

Instantly share code, notes, and snippets.

View llccing's full-sized avatar
🎯
Focusing

Rowan Liu llccing

🎯
Focusing
View GitHub Profile
export { default as NavBar } from './NavBar';
export { default as SideBar } from './SideBar';
export { default as AppMain } from './AppMain';

value值如果是数字,那么validate验证时,不能正常识别变化!

<Select placeholder="选择ilo账号" v-model="opGroupForm.iloValue">
  <Option :key="item.id" :label="item.name" :value="`${item.id}`" v-for="item in iloData">
    <strong>{{item.name}}</strong>
    <div class="option-desc">{{item.desc}}</div>
  </Option>
@llccing
llccing / debounce.vue
Created July 26, 2019 06:24
防抖函数
<template>
<Select
:loading="loading"
:remote-method="remoteMethod"
filterable
clearable
placeholder="请选择部门"
remote
style="width:300px;"
v-model="value"
@llccing
llccing / deepClone.js
Created August 15, 2019 09:39
深克隆
function deepCopy(target) {
let copyed_objs = []; //此数组解决了循环引用和相同引用的问题,它存放已经递归到的目标对象
function _deepCopy(target) {
if (typeof target !== 'object' || !target) {
return target;
}
for (let i = 0; i < copyed_objs.length; i++) {
if (copyed_objs[i].target === target) {
return copyed_objs[i].copyTarget;
}
@llccing
llccing / js
Last active January 19, 2020 11:33
vue inspect > webpack.config.js
vue -V @vue/cli 4.1.2
{
mode: 'development',
context: '/Users/didi/Documents/project/test-cli4-driver',
node: {
setImmediate: false,
process: 'mock',
dgram: 'empty',
fs: 'empty',
@llccing
llccing / setup.sh
Created April 11, 2024 00:17
用于在 Ubuntu 上初始化开发环境,包含了zip, git, java, nodejs, sdkman, pm2, docker, docker-compose 这些常用的工具,以及初始化 ssh key Ed25519
i#!/bin/bash
# 更新系统软件包列表
sudo apt update
# 安装必需的软件包
for pkg in curl wget git vim; do
if ! command -v $pkg &> /dev/null; then
echo "Installing $pkg..."
sudo apt install -y $pkg
@llccing
llccing / postgresInit.sh
Created April 11, 2024 00:18
初始化一个 postgres 数据库,使用随机密码,并且将连接字符串打印到当前server的一个文件中
#!/bin/bash
# 生成随机密码
POSTGRES_PASSWORD=$(openssl rand -base64 12)
# 数据库名称
DATABASE_NAME=server
# 创建 Docker 卷
docker volume create postgres_data
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<meta charset="UTF-8">
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
#!/bin/bash
# 确保脚本以 root 权限运行
if [ "$EUID" -ne 0 ]
then echo "请以 root 权限运行"
exit
fi
# 同步磁盘数据,确保所有缓存数据写入磁盘
echo "正在同步磁盘数据..."
#!/bin/bash
# 更新系统软件包列表
sudo apt update
# 安装必需的软件包
for pkg in curl wget git vim; do
if ! command -v $pkg &> /dev/null; then
echo "Installing $pkg..."
sudo apt install -y $pkg