分享动态
//转发自: @_青红造了个白_: 【郎朗】海 上 东 北 钢 琴 师
这东北钢琴师老厉害了
https://api.2heng.xin/bilibili/og.php?av=545536244&high_quality=1&danmaku=0
https://t.bilibili.com/584380646236241930
《特朗普将推出自己的社交平台 TRUTH Social》 美国前总统特朗普将推出自己的社交媒体应用程序 TRUTH Social,他说该应用程序将“对抗”Twitter 和 Facebook 等禁止他进入其平台的大科技公司。根据特朗普媒体技术集团(TMTG)与 Digital World Acquisition 发布的新闻稿,两家公司将进行合并,之后成立的新公司将推出 TRUTH Social。“在我们的这个世界,塔利班在 Twitter 上拥有巨大的影响力,然而你们最喜欢的美国总统却被噤声。这是不可接受的,”特朗普在书面声明中说。“我很高兴很快就能在 TRUTH Social 上发出我的第一个事实。TMTG 成立的使命是让所有人能够发声。我很高兴很快将开始在TRUTH Social上分享我的想法,并对大科技公司进行反击,”他说。 | https://www.solidot.org/story?sid=69332
appwrite的sdk竟然是用twig模板生成的
https://github.com/appwrite/sdk-generator
封装了一个element ui多图上传组件,支持v-model
<template>
<div
class="uploader"
:exceed="
$props.value.length >= $props.limit ||
(pending && $props.value.length === $props.limit - 1)
"
>
<el-upload
action=""
list-type="picture-card"
:on-success="handleOnUploadSuccess"
:on-error="handleOnUploadError"
:on-exceed="handleOnUploadExceed"
:on-remove="handleOnRemove"
:before-upload="handleBeforeUpload"
:http-request="handleUploadHttpRequest"
:file-list="$props.value"
:on-preview="handlePreview"
:show-file-list="true"
:limit="$props.limit"
accept="image/png,image/gif,image/jpg,image/jpeg"
>
<i class="el-icon-plus"></i>
</el-upload>
<ElImageViewer
v-if="showViewer"
:on-close="() => (showViewer = false)"
:url-list="[viewerUrl]"
></ElImageViewer>
</div>
</template>
<script>
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
components: { ElImageViewer },
props: {
value: { type: Array, default: () => [] },
api: Function,
fileName: { type: String, default: "file" },
limit: { type: Number, default: 3 },
size: { type: Number, default: 5 }
},
model: {
prop: "value",
event: "change"
},
data() {
return {
pending: false,
viewerUrl: "",
showViewer: false,
attachmentFetching: true,
attachmentUploading: false,
attachmentTooLarge: false,
attachmentUploadFormData: new FormData()
};
},
methods: {
handleOnUploadSuccess(response, file, fileList) {
this.attachmentUploadFormData.delete(this.$props.fileName);
this.attachmentUploading = false;
this.$message.success("上传成功");
fileList[fileList.length - 1].url = response.data;
fileList[fileList.length - 1].isDefault = 1;
this.$emit("change", fileList);
this.pending = false;
},
handleOnUploadError(error) {
this.attachmentUploadFormData.delete(this.$props.fileName);
this.attachmentUploading = false;
this.$message.error(error.msg || error);
this.pending = false;
},
handleBeforeUpload(file) {
const isLt2M = file.size / 1024 / 1024 < this.$props.size;
if (!isLt2M) {
this.attachmentTooLarge = true;
this.$message.error(`上传图片大小不能超过 ${this.$props.size}MB!`);
return false;
}
this.attachmentUploadFormData.append(this.$props.fileName, file);
this.pending = true;
return true;
},
handleOnUploadExceed() {
this.$message.error(`最多只能上传 ${this.$props.limit} 个附件~`);
},
async handleUploadHttpRequest() {
this.attachmentUploading = true;
return this.$props
.api(this.attachmentUploadFormData)
.then(response => Promise.resolve(response))
.catch(error => Promise.reject(error));
},
handlePreview(file) {
this.viewerUrl = file.url;
this.showViewer = true;
},
handleOnRemove(file, fileList) {
if (this.attachmentTooLarge) {
this.attachmentTooLarge = false;
return;
}
this.$emit("change", fileList);
}
}
};
</script>
<style lang="scss" scoped>
.uploader {
display: inline-block;
width: 100%;
&[exceed="true"] {
::v-deep {
.el-upload.el-upload--picture-card {
display: none;
}
}
}
::v-deep {
.el-list-enter-active,
.el-list-leave-active {
transition: unset;
}
.el-list-enter,
.el-list-leave-active {
opacity: 0;
transform: unset;
}
}
}
</style>
苹果 M1 pro 的显卡性能,据说达到了 RTX 3050Ti 的水平。这是不是说,苹果的游戏短板终于补起了,以后可以在 MacBook Pro 玩大型游戏了。
https://www.anandtech.com/show/17019/apple-announced-m1-pro-m1-max-giant-new-socs-with-allout-performance
Chinese 🇨🇳 / Dictatorial Admin / Mastodon Code Contributor / 摸鱼技术布道师
Steam: https://steamcommunity.com/id/MashiroBest
Epic: https://store.epicgames.com/en-US/u/d211c824cbd94aaeba898db6bb823ff7
原批交流群:966322309