Show newer
王小美 boosted
王小美 boosted
王小美 boosted

《特朗普将推出自己的社交平台 TRUTH Social》 美国前总统特朗普将推出自己的社交媒体应用程序 TRUTH Social,他说该应用程序将“对抗”Twitter 和 Facebook 等禁止他进入其平台的大科技公司。根据特朗普媒体技术集团(TMTG)与 Digital World Acquisition 发布的新闻稿,两家公司将进行合并,之后成立的新公司将推出 TRUTH Social。“在我们的这个世界,塔利班在 Twitter 上拥有巨大的影响力,然而你们最喜欢的美国总统却被噤声。这是不可接受的,”特朗普在书面声明中说。“我很高兴很快就能在 TRUTH Social 上发出我的第一个事实。TMTG 成立的使命是让所有人能够发声。我很高兴很快将开始在TRUTH Social上分享我的想法,并对大科技公司进行反击,”他说。 | solidot.org/story?sid=69332

王小美 boosted
王小美 boosted

公司这电脑我真的头疼,为什么是个机械硬盘

封装了一个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>

苹果教intel造CPU,教NVIDA造GPU系列 :bili_tv_xiaoku:
似乎PRO和MAX的区别就只是GPU?

王小美 boosted

苹果 M1 pro 的显卡性能,据说达到了 RTX 3050Ti 的水平。这是不是说,苹果的游戏短板终于补起了,以后可以在 MacBook Pro 玩大型游戏了。
anandtech.com/show/17019/apple

:sys_twitter: twitter.com/ruanyf/status/1450

突然觉得我是不是有点水PR的嫌疑 :ac_classic05:

github.com/go-gitea/gitea/pull

改天得正儿八经地给它提交点代码,反正移动端适配想提交多少有多少 :ac_classic24:

Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。