From 77c8d5edfe352c63dfb46000a7687275ff4bcab9 Mon Sep 17 00:00:00 2001 From: divisey <18656007202@163.com> Date: Wed, 28 Jun 2023 14:47:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20update=20ui=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FAssetAmountInput.stories.ts | 32 +++++++++++++++++++ .../FAssetAmountInput/FAssetAmountInput.tsx | 5 +++ .../src/components/FAssetLogo/FAssetLogo.tsx | 10 +++--- .../components/FAssetSelect/FAssetSelect.tsx | 11 ++++++- .../FAssetSelect/FAssetSelectField.scss | 5 +-- .../FAssetSelect/FAssetSelectField.tsx | 2 +- .../FInfiniteLoad/FInfiniteLoad.stories.ts | 2 +- .../FLoading/FFullscreenLoading.tsx | 4 +-- .../components/FLoading/FLoading.stories.ts | 4 +-- .../uikit/src/components/FLoading/index.ts | 2 +- 10 files changed, 63 insertions(+), 14 deletions(-) diff --git a/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.stories.ts b/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.stories.ts index cffd3090..e00a4e95 100644 --- a/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.stories.ts +++ b/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.stories.ts @@ -111,3 +111,35 @@ export const WithRecords = Template3.bind({}); WithRecords.args = { showRecords: true, }; + +const Template4: StoryFn = (args) => ({ + components: { FAssetAmountInput }, + setup() { + const asset = ref({ + asset_id: "02a39171-dfc1-36d1-94c3-9e9725d59bbb", + provider: "mixin", + chain_id: "43d61dcd-e413-450d-80b8-101d5e903357", + symbol: "ZIL", + name: "Zilliqa", + logo: "https://mixin-images.zeromesh.net/prUxZ_5EC6UYufpA3lYn7Sjiq8HeTCiZ7VsIFtso0sjZrck7T8oCHyaSKNwsrKAE82h1oxqAJM_hZsnRm-ZAIMc=s128", + confirmations: 16, + price_usd: "0.02306898", + change_usd: "0.047327018826841996", + balance: "0.00000001", + destination: "0x4cC777dFb649b9Ebc524E78e7DA89f0916Dd0f24", + tag: "", + }); + const amount = ref(""); + + return { + args, + asset, + amount, + assets: assets.map((asset) => convertMixinAsset(asset)), + }; + }, + template: ``, +}); + +export const NotSelectable = Template4.bind({}); +NotSelectable.args = {}; diff --git a/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.tsx b/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.tsx index 492a8fa0..96d5f053 100644 --- a/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.tsx +++ b/packages/uikit/src/components/FAssetAmountInput/FAssetAmountInput.tsx @@ -38,6 +38,10 @@ export const FAssetAmountInput = defineComponent({ type: Object as PropType, default: () => [], }, + selectable: { + type: Boolean, + deafult: true, + }, }, emits: { @@ -81,6 +85,7 @@ export const FAssetAmountInput = defineComponent({ records={props.records} themeColor={props.themeColor} showRecords={props.showRecords} + selectable={props.selectable} onUpdate:asset={(v) => emit("update:asset", v)} onUpdate:records={(v) => emit("update:records", v)} onClear:records={() => emit("clear:records")} diff --git a/packages/uikit/src/components/FAssetLogo/FAssetLogo.tsx b/packages/uikit/src/components/FAssetLogo/FAssetLogo.tsx index c7624674..ca83187d 100644 --- a/packages/uikit/src/components/FAssetLogo/FAssetLogo.tsx +++ b/packages/uikit/src/components/FAssetLogo/FAssetLogo.tsx @@ -1,5 +1,4 @@ import { defineComponent, PropType } from "vue"; -import { VImg } from "vuetify/components"; import "./FAssetLogo.scss"; @@ -25,10 +24,13 @@ export const FAssetLogo = defineComponent({ setup(props) { return () => ( -