dream-num / univer

Univer is an open-source productivity tool dev kit helping you integrate spreadsheets, docs and slides into your applications.
https://univer.ai
Apache License 2.0
6.9k stars 598 forks source link

[Feature] 1D code display #2170

Closed guoxunbo closed 5 months ago

guoxunbo commented 5 months ago

初始清单

问题

在表格中,很多时候会需要展示一维码/二维码的情景。 我找了一下,没发现实现。我想的是,我自己定制一个格式。比如Barcode/QRcode。但是我没找到怎么接管这个格式然后去自定义渲染的地方。

解决方案

我想的是,我自己定制一个格式。比如Barcode/QRcode。但是我没找到怎么接管这个格式然后去自定义渲染的地方。 根据我传进去的string/dpi等信息,自动渲染成Barcode/qrcode。以前渲染的技术用的是JSBarcode。但是不知道怎么接管这个格式进行熏染。

univer-bot[bot] commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: [Feature] 一维码展示

Title: [Feature] 1D code display


Initial list

question

In forms, it is often necessary to display 1D/QR codes. I searched and found no implementation. What I want is to customize a format myself. Such as Barcode/QRcode. But I didn't find how to take over this format and customize the rendering.

solution

What I want is to customize a format myself. Such as Barcode/QRcode. But I didn't find how to take over this format and customize the rendering. Based on the string/dpi and other information I passed in, it is automatically rendered into Barcode/qrcode. The previous rendering technology used JSBarcode. But I don’t know how to adopt this method for infection.

jikkai commented 5 months ago

Apologies for the delayed response.

We were unable to fully understand your requirements. Could you please clarify which specific features from Excel or Google Sheets you would like to implement? I will temporarily close this issue, but feel free to reopen it at any time if you can provide more detailed information about your request.

guoxunbo commented 4 months ago

Hello. @jikkai

something like this.

image

Now I had expand and implement this. Such as there have some 1D Code or QRCode in cell.

jikkai commented 4 months ago

What you need seems to be the function of inserting pictures. We will provide relevant plugins in version 0.1.13.

guoxunbo commented 4 months ago

nono it's no a picture. use JSBarCode or 'QRCode' js repository to build it. if it's a picture from server. it will not be a good function to transfer it.

jikkai commented 4 months ago

I got it. It seems that what you're looking for is a way to render a cell's string as custom content (such as the 1D code or QRCode you mentioned). This should be a capability provided by formula engine, and we plan to offer this functionality in the future.

guoxunbo commented 3 months ago

@jikkai I have already implemented it last month。I'll organize the code and send a PR。

guoxunbo commented 3 months ago

thanks a lot.