Это самый главный компонент, он служит обёрткой для всех остальных компонентов. Если вы не хотите делать полную установку, то подключить его можно следующим способом:
Ниже я приведу пример кода и входные параметры. Входные параметры можно менять, что я и советую вам сделать, так будет нагляднее. Если вы открыли данный сайт с компьютера или планшета, то пример кода будет находиться слева, а входные параметры справа. Если вы открыли данный сайт с мобильного телефона, то сначала будут идти входные параметры, а пример кода будет находиться ниже.
Итак, данный компонент имеет следующие входные параметры:
This is the most important component, it serves as a wrapper for all other components. If you do not want to do a full installation, then you can connect it in the following way:
Below I will provide an example of the code and input parameters. The input parameters can be changed, which I advise you to do, so it will be clearer. If you have opened this website from a computer or tablet, the sample code will be on the left and the input parameters on the right. If you have opened this website from a mobile phone, the input parameters will be displayed first, and the sample code will be below.
So, this component has the following input parameters:
theme - данный параметр отвечает за тему, которая будет применена к окну с кодом. На данный момент времени я реализовал 2 темы: "darcula" и "monokai". "Darcula", тема по умолчанию, если вы зададите несуществующее название темы, или не зададите данный параметр, то будет применена она. В данном примере я буду выводить темы через "select", но вы можете вставить сюда любое название темы. В таком случае стилизовать компонент нужно будет через следующий класс - "code-markup_theme-${название вашей темы}". Как создать свою тему я опишу ниже.
theme - this parameter is responsible for the theme that will be applied to the window with the code. At this point in time, I have implemented 2 themes: "darcula" and "monokai". "Darcula" is the default theme, if you set a non-existent theme name, or do not set this parameter, it will be applied. In this example, I will output themes via "select", but you can insert any theme name here. In this case, you will need to style the component using the following class - "code-markup_theme-${name of your theme}". I will describe how to create my own theme below.
isHeader - данный параметр отвечает за отображение заголовка окна с кодом. Если вы собираетесь отображать заголовок, то данный параметр можно не задавать, он по умолчанию равен "true".
isHeader - this parameter is responsible for displaying the title of the window with the code. If you are going to display the title, then you do not need to set this parameter, it is set to "true" by default.
header - заголовок окна с кодом. По умолчанию не имеет значения. Для примера я задал значение "BooksList.vue".
header is the title of the window with the code. It doesn't matter by default. For example, I set the value to "BooksList.vue".
isCount - данный параметр отвечает за отображение номера строки. Если его не задать, то строки будут пронумерованы, по умолчанию равен "true".
isCount - this parameter is responsible for displaying the row number. If it is not set, the rows will be numbered, the default value is "true".
lineCount - данный параметр отвечает за то, сколько строк отображать. В него нужно передавать числа, если нужно отобразить все строки, то нужно задать значение "auto", или вообще не задавать данный параметр. По умолчанию задано значение "auto". Для примера я задал {{ lineCount }} строк, и сделал интервал вывода от 10 до 65 строк.
lineCount - this parameter is responsible for how many lines to display. You need to pass numbers to it, if you want to display all the lines, then you need to set the value to "auto", or not set this parameter at all. The default value is "auto". For example, I set {{ lineCount }} lines, and made an output interval from 10 to 65 lines.
textBold - данный параметр отвечает за "толщину шрифта". По умолчанию задано "false".
textBold - this parameter is responsible for the "font thickness". The default value is set to "false".
headerBold - данный параметр отвечает за толщину шрифта заголовка окна с кодом. По умолчанию задано "false".
headerBold - this parameter is responsible for the font thickness of the title of the window with the code. The default value is set to "false".
title - подсказка, которая будет появляться при наведении на иконку "скопировать текст". По умолчанию задано значение "Copy code to clipboard". Как правило это нужно для интернационализации.
title - a hint that will appear when you hover over the "copy text" icon. The default value is "Copy code to clipboard". As a rule, this is necessary for internationalization.
successfulText - подсказка, которая будет появляться при наведении на иконку "скопировать текст" после того, как текст будет скопирован. По умолчанию задано значение "The code is copied to the clipboard". Как правило это нужно для интернационализации.
successfulText is a hint that will appear when you hover over the "copy text" icon after the text has been copied. The default value is "The code is copied to the clipboard". As a rule, this is necessary for internationalization.
errorText - подсказка, которая будет появляться при наведении на иконку "скопировать текст" в случае возникновении ошибки (если текст не получится скопировать). По умолчанию задано значение "An error occurred while copying the code to the clipboard". Как правило это нужно для интернационализации.
errorText - a hint that will appear when hovering over the "copy text" icon in case of an error (if the text cannot be copied). By default, the value is set to "An error occurred while copying the code to the clipboard". As a rule, this is necessary for internationalization.