[英]tui-image-editor not showing properly
tui-image-editor not showing properly. tui-image-editor 显示不正确。 Why?为什么? What am I doing wrong?我究竟做错了什么?
Version: 3.15.3版本:3.15.3
code:代码:
import "./styles.css";
var ImageEditor = require("tui-image-editor");
var FileSaver = require("file-saver"); //to download edited image to local. Use after npm install file-saver
// var blackTheme = require("darktheme");
var locale_ru_RU = {
// override default English locale to your custom
Crop: "Обзрезать",
"Delete-all": "Удалить всё"
// etc...
};
var instance = new ImageEditor(document.querySelector("#tui-image-editor"), {
includeUI: {
loadImage: {
path: "img/sampleImage.jpg",
name: "SampleImage"
},
locale: locale_ru_RU,
// theme: blackTheme, // or whiteTheme
initMenu: "filter",
menuBarPosition: "bottom"
},
cssMaxWidth: 700,
cssMaxHeight: 500,
selectionStyle: {
cornerSize: 20,
rotatingPointOffset: 70
}
});
result:结果:
sandbox where I got this result https://ryy3zx.csb.app .我得到这个结果的沙箱https://ryy3zx.csb.app 。 Same on my rails application.我的 Rails 应用程序也是如此。
Solved problem putting解决了放置问题
<link
rel="stylesheet" href="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css"
/>
inside head tag in application.html file. application.html 文件中的 head 标签内。 You can put anywhere before element with tui-image-editor您可以使用 tui-image-editor 将元素放在元素之前的任何位置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.