主頁 > 企業開發 > 百度Amis+React低代碼實踐

百度Amis+React低代碼實踐

2023-06-25 08:11:15 企業開發

背景

在專案中有集成低代碼平臺的想法,經過多方對比最后選擇了 amis,主要是需要通過 amis 進行頁面配置,匯出 json 供移動端和 PC 端進行渲染,所以接下來講一下近兩周研究 amis 的新的以及一些簡單經驗,供大家參考.

什么是 amis

amis 是一個低代碼前端框架,它使用 JSON 配置來生成頁面,可以減少頁面開發作業量,極大提升效率,

如何使用 amis

在 amis 官網提供了兩種使用 amis 的方式分別是

  • JSSDK 可以在任意頁面使用
  • React 可以在 React 專案中使用

博主是在 umi 框架下結合 React 使用 amis,所以本文主要著重介紹第二種方法

在使用時需要對 amis 進行安裝,專案中也需要使用 amis-editor 進行頁面配置所以需要同時安裝如下兩個包

{
  "amis": "^3.1.1",
  "amis-editor": "^5.4.1"
}

amis

首先介紹 amis,amis 提供了 render 方法來對 amis-editor 生成的 JSON 物件頁面配置進行渲染,如下,在使用是 render 主要作用就是進行渲染

import { render as renderAmis } from "amis";

const App = () => {
  return (
    <div>
      {renderAmis({
        type: "button",
        label: "保存",
        level: "primary",
        onClick: function () {
          console.log("TEST");
        },
      })}
    </div>
  );
};

export default App;

amis-editor

amis-editor 提供了一個編譯器組件 <Editor />

import { useState } from "react";
import { Editor, setSchemaTpl } from "amis-editor";
import type { SchemaObject } from "amis";
import { render as renderAmis } from "amis";
import type { Schema } from "amis/lib/types";
// 以下樣式均生效
import "amis/lib/themes/default.css";
import "amis/lib/helper.css";
import "amis/sdk/iconfont.css";
import "amis-editor-core/lib/style.css";
import "amis-ui/lib/themes/antd.css";
type Props = {
  defaultPageConfig?: Schema;
  codeGenHandler?: (codeObject: Schema) => void;
  pageChangeHandler?: (codeObject: Schema) => void;
};

export function Amis(props: Props) {
  const [mobile, setMobile] = useState(false);
  const [preview, setPreview] = useState(false);
  const [defaultPageConfig] = useState<Schema>(props.defaultPageConfig); // 傳入配置
  const defaultSchema: Schema | SchemaObject = defaultPageConfig || {
    type: "page",
    body: "",
    title: "標題",
    regions: ["body"],
  };
  const [schema] = useState(defaultSchema);
  let pageJsonObj: Schema = defaultSchema;
  const onChange = (value: Schema) => {
    pageJsonObj = value;
    props.pageChangeHandler && props.pageChangeHandler(value);
  };
  const onSave = () => {
    props.codeGenHandler && props.codeGenHandler(pageJsonObj);
  };
  return (
    <>
      {renderAmis({
        type: "form",
        mode: "inline",
        title: "",
        body: [
          {
            type: "switch",
            option: "預覽",
            name: "preview",
            onChange: function (v: any) {
              setPreview(v);
            },
          },
          {
            type: "switch",
            option: "移動端",
            name: "mobile",
            onChange: function (v: any) {
              setMobile(v);
            },
          },
          {
            type: "button",
            label: "保存",
            level: "primary",
            onClick: function () {
              onSave();
            },
          },
          {
            type: "button",
            label: "退出",
            level: "danger",
            onClick: function () {
              // if (!window.confirm('確定退出?')) return;
              if (props.cancleGenHandler) props.cancleGenHandler();
            },
          },
        ],
      })}
      <Editor
        preview={preview}
        isMobile={mobile}
        onChange={onChange}
        value=https://www.cnblogs.com/plumliil/archive/2023/06/24/{schema as SchemaObject}
        theme={"antd"}
        onSave={onSave}
      />
    </>
  );
}

export default Amis;

在 amis 中提供了兩套組件樣式供我們選擇,分別是 cxd(云舍)和 antd(仿 Antd),我們可以通過設定Editor組件中 theme 屬性來進行主題的選擇,同時需要引入對應的組件樣式在以上代碼中,我們對Editor組件進行了二次封裝,暴露出了defaultPageConfig(進入編譯器默認頁面 JSON 配置)屬性和codeGenHandler(代碼生成保存方法),cancleGenHandler(退出頁面編輯器方法),pageChangeHandler(頁面改變方法)供外部使用

自定義組件

在 amis-editor 中使用的組件可以是我們的自定義組件.在撰寫自定義組件時特別需要主義的是它的 plugin 配置接下來以MyButton為例來進行自定義組件的介紹

首先來介紹以下組件結構

├─MyButton
  │  ├─comp.tsx # 組件本體
  │  ├─index.tsx # 整體匯出
  │  ├─plugin.tsx # 右側panel配置

comp.tsx中主要進行組件的開發

import React from "react";
import type { Schema } from "amis/lib/types";
import { Button } from "antd";

const MyButtonRender = React.forwardRef((props: Schema, ref: any) => {
  // const props = this.props
  return (
    <Button
      {...props}
      ref={ref}
      type={props.level || "primary"}
      name={props.name}
    >
      {props.label}
    </Button>
  );
});

class MyButtonRender2 extends React.Component<any, any> {
  handleClick = (nativeEvent: React.MouseEvent<any>) => {
    const { dispatchEvent, onClick } = this.props;
    // const params = this.getResolvedEventParams();
    dispatchEvent(nativeEvent, {});
    onClick?.({});
  };

  handleMouseEnter = (e: React.MouseEvent<any>) => {
    const { dispatchEvent } = this.props;
    // const params = this.getResolvedEventParams();

    dispatchEvent(e, {});
  };

  handleMouseLeave = (e: React.MouseEvent<any>) => {
    const { dispatchEvent } = this.props;
    // const params = this.getResolvedEventParams();

    dispatchEvent(e, {});
  };

  render() {
    return (
      <MyButtonRender
        onClick={this.handleClick}
        onm ouseEnter={this.handleMouseEnter}
        onm ouseLeave={this.handleMouseLeave}
      >
        {this.props.label}2
      </MyButtonRender>
    );
  }
}

export default MyButtonRender2;

在上述代碼中MyButtonRender簡單的對Button組件進行了簡單的封裝,MyButtonRender2對 amis 中組件的事件進行了簡單的處理并暴露出去

plugin.tsx中主要對MyButtonRender組件進行渲染器注冊以及對組件的 plugin 進行配置,注冊渲染器是為了將自定義組件拖入中間預覽區域是可以正常的顯示,這一操作與 amis 的作業原理有關(amis 的渲染程序是將 json 轉成對應的 React 組件,先通過 json 的 type 找到對應的 Component,然后把其他屬性作為 props 傳遞過去完成渲染,作業原理
)

plugin.tsx中進行 panel 配置

import { Renderer } from "amis";
import MyButtonRender from "./comp";
import type { BaseEventContext } from "amis-editor-core";
import { BasePlugin } from "amis-editor-core";
import { getSchemaTpl } from "amis-editor-core";
import type { RendererPluginAction, RendererPluginEvent } from "amis-editor";
import { getEventControlConfig } from "amis-editor/lib/renderer/event-control/helper";

// 渲染器注冊
Renderer({
  type: "my-button",
  autoVar: true,
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
  // @ts-ignore
})(MyButtonRender);

export class MyButton extends BasePlugin {
  // 關聯渲染器名字
  rendererName = "my-button";
  $schema = "/schemas/ActionSchema.json";
  order = -400;
  // 組件名稱
  name = "MyButton";
  isBaseComponent = true;
  description =
    "用來展示一個按鈕,你可以配置不同的展示樣式,配置不同的點擊行為,";
  docLink = "/amis/zh-CN/components/button";
  tags = ["自定義"];
  icon = "fa fa-square";
  pluginIcon = "button-plugin";
  scaffold = {
    type: "my-button",
    label: "MyButton",
    wrapperBody: true,
  };
  previewSchema: any = {
    type: "my-button",
    label: "MyButton",
    wrapperBody: true,
  };

  panelTitle = "MyButton";

  // 事件定義
  events: RendererPluginEvent[] = [
    {
      eventName: "click",
      eventLabel: "點擊",
      description: "點擊時觸發",
      defaultShow: true,
      dataSchema: [
        {
          type: "object",
          properties: {
            nativeEvent: {
              type: "object",
              title: "滑鼠事件物件",
            },
          },
        },
      ],
    },
    {
      eventName: "mouseenter",
      eventLabel: "滑鼠移入",
      description: "滑鼠移入時觸發",
      dataSchema: [
        {
          type: "object",
          properties: {
            nativeEvent: {
              type: "object",
              title: "滑鼠事件物件",
            },
          },
        },
      ],
    },
    {
      eventName: "mouseleave",
      eventLabel: "滑鼠移出",
      description: "滑鼠移出時觸發",
      dataSchema: [
        {
          type: "object",
          properties: {
            nativeEvent: {
              type: "object",
              title: "滑鼠事件物件",
            },
          },
        },
      ],
    },
  ];

  // 動作定義
  actions: RendererPluginAction[] = [];

  panelJustify = true;

  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  panelBodyCreator = (context: BaseEventContext) => {
    return getSchemaTpl("tabs", [
      {
        title: "屬性",
        body: [
          getSchemaTpl("label", {
            label: "按鈕名稱",
          }),
          {
            type: "input-text",
            label: "欄位名稱",
            name: "name",
          },
          {
            type: "select",
            label: "按鈕型別",
            name: "level",
            options: [
              {
                label: "默認",
                value: "primary",
              },
              {
                label: "危險",
                value: "danger",
              },
              {
                label: "警告",
                value: "warn",
              },
              {
                label: "成功",
                value: "success",
              },
              {
                label: "淺色",
                value: "default",
              },
            ],
            multiple: false,
            selectFirst: false,
          },
          {
            type: "input-text",
            label: "按鈕圖示",
            name: "icon",
            // 提示
            labelRemark: {
              icon: 'icon-close',
              trigger: ['hover'],
              className: 'Remark--warning',
              title: '提示',
              content: '圖示請從My Iconfont庫中選擇 部分圖示需要加icon-前綴 如close -> icon-close',
            // },
          },
        ],
      },
      {
        title: "樣式",
        body: [
          getSchemaTpl("buttonLevel", {
            label: "高亮樣式",
            name: "activeLevel",
            visibleOn: "data.active",
          }),

          getSchemaTpl("switch", {
            name: "block",
            label: "塊狀顯示",
          }),

          getSchemaTpl("size", {
            label: "尺寸",
          }),
        ],
      },
      {
        title: "事件",
        className: "p-none",
        body:
          !!context.schema.actionType ||
          ["submit", "reset"].includes(context.schema.type)
            ? [
                getSchemaTpl("eventControl", {
                  name: "onEvent",
                  ...getEventControlConfig(this.manager, context),
                }),
                // getOldActionSchema(this.manager, context)
              ]
            : [
                getSchemaTpl("eventControl", {
                  name: "onEvent",
                  ...getEventControlConfig(this.manager, context),
                }),
              ],
      },
    ]);
  };
}

當點選某個組件的時候,編輯器內部會觸發面板構建動作,每個插件都可以通過實作 buildEditorPanel 來插入右側面板,通常右側面板都是表單配置,使用 amis 配置就可以完成,所以推薦的做法是,直接在這個插件上面定義 panelBody 或者 panelBodyCreator 即可,

具體配置可以參考上述代碼,其中需要注意的是getSchemaTpl這一方法,該方法通過獲取預先通過setSchemaTpl設定的模板來進行渲染某些元素組件,一下部分原始碼可進行參考,tpl 部分全部原始碼可參考這里

export function getSchemaTpl(
  name: string,
  patch?: object,
  rendererSchema?: any
): any {
  const tpl = tpls[name] || {};
  let schema = null;

  if (typeof tpl === "function") {
    schema = tpl(patch, rendererSchema);
  } else {
    schema = patch
      ? {
          ...tpl,
          ...patch,
        }
      : tpl;
  }

  return schema;
}

export function setSchemaTpl(name: string, value: any) {
  tpls[name] = value;
}

index.tsx中主要進行自定義組件插件的注冊以及匯出

import { registerEditorPlugin } from "amis-editor";
import { MyButton } from "./plugin";

registerEditorPlugin(MyButton);

其他

在拖拽組件生成頁面時,amis-editor 可選擇的組件有很多,如果我們想使用自己組建的同時忽略隱藏原有組件可以通過disabledRendererPlugin來對原生組件進行隱藏

import { registerEditorPlugin, BasePlugin } from "amis-editor";
import type {
  RendererEventContext,
  SubRendererInfo,
  BasicSubRenderInfo,
} from "amis-editor";

/**
 * 用于隱藏一些不需要的Editor組件
 * 備注: 如果不知道當前Editor中有哪些預置組件,可以在這里設定一個斷點,console.log 看一下 renderers,
 */

// 需要在組件面板中隱藏的組件
const disabledRenderers = [
  // 'flex',
  "crud2",
  "crud2",
  "crud2",
  // 'crud',
  // 'input-text',
  "input-email",
  "input-password",
  "input-url",
  // "button",
  "reset",
  "submit",
  "tpl",
  "grid",
  "container",
  // 'flex',
  // 'flex',
  "collapse-group",
  "panel",
  "tabs",
  // 'form',
  "service",
  "textarea",
  "input-number",
  // 'select',
  "nested-select",
  "chained-select",
  "dropdown-button",
  "checkboxes",
  "radios",
  "checkbox",
  "input-date",
  "input-date-range",
  "input-file",
  "input-image",
  "input-excel",
  "input-tree",
  "input-tag",
  "list-select",
  "button-group-select",
  "button-toolbar",
  "picker",
  "switch",
  "input-range",
  "input-rating",
  "input-city",
  "transfer",
  "tabs-transfer",
  "input-color",
  "condition-builder",
  "fieldset",
  "combo",
  "input-group",
  "input-table",
  "matrix-checkboxes",
  "input-rich-text",
  "diff-editor",
  "editor",
  "search-box",
  "input-kv",
  "input-repeat",
  "uuid",
  "location-picker",
  "input-sub-form",
  "hidden",
  "button-group",
  "nav",
  "anchor-nav",
  "tooltip-wrapper",
  "alert",
  "wizard",
  "table-view",
  "web-component",
  "audio",
  "video",
  "custom",
  "tasks",
  "each",
  "property",
  "iframe",
  "qrcode",
  "icon",
  "link",
  "list",
  "mapping",
  "avatar",
  "card",
  "card2",
  "cards",
  "table",
  "table2",
  "chart",
  "sparkline",
  "carousel",
  "image",
  "images",
  "date",
  "time",
  "datetime",
  "tag",
  "json",
  "progress",
  "status",
  "steps",
  "timeline",
  "divider",
  "code",
  "markdown",
  "collapse",
  "log",
  "input-array",
  "control",
  "input-datetime",
  "input-datetime-range",
  "formula",
  "group",
  "input-month",
  "input-month-range",
  "input-quarter",
  "input-quarter-range",
  "static",
  "input-time",
  "input-time-range",
  "tree-select",
  "input-year",
  "input-year-range",
  "breadcrumb",
  "custom",
  "hbox",
  "page",
  "pagination",
  "plain",
  "wrapper",
  "column-toggler",
];

export class ManagerEditorPlugin extends BasePlugin {
  order = 9999;
  buildSubRenderers(
    context: RendererEventContext,
    renderers: SubRendererInfo[]
  ): BasicSubRenderInfo | BasicSubRenderInfo[] | void {
    // 更新NPM自定義組件排序和分類
    // console.log(renderers);
    for (let index = 0, size = renderers.length; index < size; index++) {
      // 判斷是否需要隱藏 Editor預置組件
      const pluginRendererName = renderers[index].rendererName;
      if (
        pluginRendererName &&
        disabledRenderers.indexOf(pluginRendererName) > -1
      ) {
        renderers[index].disabledRendererPlugin = true; // 更新狀態
      }
    }
  }
}

registerEditorPlugin(ManagerEditorPlugin);

寫在最后

一個階段的結束伴隨著另一個階段的開始,在新的階段中會繼續學習繼續進步

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/555884.html

標籤:其他

上一篇:React SSG - 也寫個 Demo 吧

下一篇:返回列表

標籤雲
其他(161549) Python(38244) JavaScript(25513) Java(18251) C(15238) 區塊鏈(8272) C#(7972) AI(7469) 爪哇(7425) MySQL(7265) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5875) 数组(5741) R(5409) Linux(5347) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4606) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2437) ASP.NET(2404) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) .NET技术(1984) HtmlCss(1971) 功能(1967) Web開發(1951) C++(1942) python-3.x(1918) 弹簧靴(1913) xml(1889) PostgreSQL(1881) .NETCore(1863) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • IEEE1588PTP在數字化變電站時鐘同步方面的應用

    IEEE1588ptp在數字化變電站時鐘同步方面的應用 京準電子科技官微——ahjzsz 一、電力系統時間同步基本概況 隨著對IEC 61850標準研究的不斷深入,國內外學者提出基于IEC61850通信標準體系建設數字化變電站的發展思路。數字化變電站與常規變電站的顯著區別在于程序層傳統的電流/電壓互 ......

    uj5u.com 2020-09-10 03:51:52 more
  • HTTP request smuggling CL.TE

    CL.TE 簡介 前端通過Content-Length處理請求,通過反向代理或者負載均衡將請求轉發到后端,后端Transfer-Encoding優先級較高,以TE處理請求造成安全問題。 檢測 發送如下資料包 POST / HTTP/1.1 Host: ac391f7e1e9af821806e890 ......

    uj5u.com 2020-09-10 03:52:11 more
  • 網路滲透資料大全單——漏洞庫篇

    網路滲透資料大全單——漏洞庫篇漏洞庫 NVD ——美國國家漏洞庫 →http://nvd.nist.gov/。 CERT ——美國國家應急回應中心 →https://www.us-cert.gov/ OSVDB ——開源漏洞庫 →http://osvdb.org Bugtraq ——賽門鐵克 →ht ......

    uj5u.com 2020-09-10 03:52:15 more
  • 京準講述NTP時鐘服務器應用及原理

    京準講述NTP時鐘服務器應用及原理京準講述NTP時鐘服務器應用及原理 安徽京準電子科技官微——ahjzsz 北斗授時原理 授時是指接識訓通過某種方式獲得本地時間與北斗標準時間的鐘差,然后調整本地時鐘使時差控制在一定的精度范圍內。 衛星導航系統通常由三部分組成:導航授時衛星、地面檢測校正維護系統和用戶 ......

    uj5u.com 2020-09-10 03:52:25 more
  • 利用北斗衛星系統設計NTP網路時間服務器

    利用北斗衛星系統設計NTP網路時間服務器 利用北斗衛星系統設計NTP網路時間服務器 安徽京準電子科技官微——ahjzsz 概述 NTP網路時間服務器是一款支持NTP和SNTP網路時間同步協議,高精度、大容量、高品質的高科技時鐘產品。 NTP網路時間服務器設備采用冗余架構設計,高精度時鐘直接來源于北斗 ......

    uj5u.com 2020-09-10 03:52:35 more
  • 詳細解讀電力系統各種對時方式

    詳細解讀電力系統各種對時方式 詳細解讀電力系統各種對時方式 安徽京準電子科技官微——ahjzsz,更多資料請添加VX 衛星同步時鐘是我京準公司開發研制的應用衛星授時時技術的標準時間顯示和發送的裝置,該裝置以M國全球定位系統(GLOBAL POSITIONING SYSTEM,縮寫為GPS)或者我國北 ......

    uj5u.com 2020-09-10 03:52:45 more
  • 如何保證外包團隊接入企業內網安全

    不管企業規模的大小,只要企業想省錢,那么企業的某些服務就一定會采用外包的形式,然而看似美好又經濟的策略,其實也有不好的一面。下面我通過安全的角度來聊聊使用外包團的安全隱患問題。 先看看什么服務會使用外包的,最常見的就是話務/客服這種需要大量重復性、無技術性的服務,或者是一些銷售外包、特殊的職能外包等 ......

    uj5u.com 2020-09-10 03:52:57 more
  • PHP漏洞之【整型數字型SQL注入】

    0x01 什么是SQL注入 SQL是一種注入攻擊,通過前端帶入后端資料庫進行惡意的SQL陳述句查詢。 0x02 SQL整型注入原理 SQL注入一般發生在動態網站URL地址里,當然也會發生在其它地發,如登錄框等等也會存在注入,只要是和資料庫打交道的地方都有可能存在。 如這里http://192.168. ......

    uj5u.com 2020-09-10 03:55:40 more
  • [GXYCTF2019]禁止套娃

    git泄露獲取原始碼 使用GET傳參,引數為exp 經過三層過濾執行 第一層過濾偽協議,第二層過濾帶引數的函式,第三層過濾一些函式 preg_replace('/[a-z,_]+\((?R)?\)/', NULL, $_GET['exp'] (?R)參考當前正則運算式,相當于匹配函式里的引數 因此傳遞 ......

    uj5u.com 2020-09-10 03:56:07 more
  • 等保2.0實施流程

    流程 結論 ......

    uj5u.com 2020-09-10 03:56:16 more
最新发布
  • 百度Amis+React低代碼實踐

    ### 背景 在專案中有集成低代碼平臺的想法,經過多方對比最后選擇了 amis,主要是需要通過 amis 進行頁面配置,匯出 json 供移動端和 PC 端進行渲染,所以接下來講一下近兩周研究 amis 的新的以及一些簡單經驗,供大家參考. ### 什么是 amis amis 是一個低代碼前端框架, ......

    uj5u.com 2023-06-25 08:11:15 more
  • React SSG - 也寫個 Demo 吧

    上次寫了一個 `SSR` 的 `DEMO`,今天寫個小 `Demo` 來從頭實作一下 `react` 的 `SSG`,來理解下 `SSG` 是如何實作的。 ## 什么是 SSG `SSG` 即 `Static Site Generation` 靜態站點生成,是指將在構建時就提前生成靜態 `HTML` ......

    uj5u.com 2023-06-25 08:11:05 more
  • 驅動開發:摘除InlineHook內核鉤子

    在筆者上一篇文章`《驅動開發:內核層InlineHook掛鉤函式》`中介紹了通過替換`函式`頭部代碼的方式實作`Hook`掛鉤,對于ARK工具來說實作掃描與摘除`InlineHook`鉤子也是最基本的功能,此類功能的實作一般可在應用層進行,而驅動層只需要保留一個`讀寫位元組`的函式即可,將復雜的流程放... ......

    uj5u.com 2023-06-25 08:05:06 more
  • 驅動開發:摘除InlineHook內核鉤子

    在筆者上一篇文章`《驅動開發:內核層InlineHook掛鉤函式》`中介紹了通過替換`函式`頭部代碼的方式實作`Hook`掛鉤,對于ARK工具來說實作掃描與摘除`InlineHook`鉤子也是最基本的功能,此類功能的實作一般可在應用層進行,而驅動層只需要保留一個`讀寫位元組`的函式即可,將復雜的流程放... ......

    uj5u.com 2023-06-25 07:59:01 more
  • 曾經辛苦造的輪子,現在能否用 ChatGPT 替代呢?

    上一篇文章 [我在 vscode 插件里接入了 ChatGPT,解決了代碼變數命名的難題](https://www.cnblogs.com/jaycewu/p/17476198.html) 中,展示了如何在 vscode 插件中使用 ChatGPT 解決代碼變數命名的問題。vscode 插件市場中有 ......

    uj5u.com 2023-06-24 08:01:15 more
  • 前端Vue自定義支付密碼輸入鍵盤Keyboard和支付設定輸入框Input

    #### 前端Vue自定義支付密碼輸入鍵盤Keyboard和支付設定輸入框Input, 下載完整代碼請訪問uni-app插件市場地址:https://ext.dcloud.net.cn/plugin?id=13166 #### 效果圖如下: ![](https://p3-juejin.byteimg ......

    uj5u.com 2023-06-24 08:01:11 more
  • 前端Vue自定義簡單實用輪播圖封裝組件 快速實作輪播圖

    前端Vue自定義簡單實用輪播圖封裝組件 快速實作輪播圖, 下載完整代碼請訪問uni-app插件市場地址:https://ext.dcloud.net.cn/plugin?id=13153 效果圖如下: ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fb ......

    uj5u.com 2023-06-24 08:01:06 more
  • 曾經辛苦造的輪子,現在能否用 ChatGPT 替代呢?

    上一篇文章 [我在 vscode 插件里接入了 ChatGPT,解決了代碼變數命名的難題](https://www.cnblogs.com/jaycewu/p/17476198.html) 中,展示了如何在 vscode 插件中使用 ChatGPT 解決代碼變數命名的問題。vscode 插件市場中有 ......

    uj5u.com 2023-06-24 08:00:53 more
  • 前端Vue自定義簡單好用商品分類串列組件 側邊欄商品分類組件

    #### 前端Vue自定義簡單好用商品分類串列組件 側邊欄商品分類組件 , 下載完整代碼請訪問uni-app插件市場地址:https://ext.dcloud.net.cn/plugin?id=13148 #### 效果圖如下: ![](https://p3-juejin.byteimg.com/t ......

    uj5u.com 2023-06-23 07:38:42 more
  • 【技識訓累】Vue.js中的基礎概念與語法【一】

    博客推行版本更新,成果積累制度,已經寫過的博客還會再次更新,不斷地琢磨,高質量高數量都是要追求的,工匠精神是學習必不可少的精神。因此,大家有何建議歡迎在評論區踴躍發言,你們的支持是我最大的動力,你們敢投,我就敢肝 ......

    uj5u.com 2023-06-23 07:33:27 more