@studio-west/component-sw 0.3.39 → 0.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ npm install @studio-west/component-sw
|
|
|
53
53
|
|
|
54
54
|
### Глобальное подключение / global add to main.js:
|
|
55
55
|
```js
|
|
56
|
-
import Library from '@studio-west/component-sw';
|
|
56
|
+
import { Library } from '@studio-west/component-sw';
|
|
57
57
|
import '@studio-west/component-sw/dist/component-sw.css';
|
|
58
58
|
|
|
59
59
|
app.use(Library)
|
|
@@ -95,11 +95,16 @@ const darkMode = () => {
|
|
|
95
95
|
### Пример использования / Example Usage
|
|
96
96
|
|
|
97
97
|
```js
|
|
98
|
+
// .js addons
|
|
99
|
+
import { Alert } from "@studio-west/component-sw"
|
|
100
|
+
Alert({message: 'Message', type: 'danger', duration:10000, before:'bell'})
|
|
101
|
+
|
|
98
102
|
// Composition API else <script setup>:
|
|
99
103
|
import {inject} from "vue"
|
|
100
|
-
Alert
|
|
104
|
+
const Alert = inject('Alert')
|
|
105
|
+
Alert({message: 'Alarm!', type: 'warning'})
|
|
101
106
|
//Options API:
|
|
102
|
-
this.$
|
|
107
|
+
this.$Alert({message: 'Welcome!', type: 'success'});
|
|
103
108
|
```
|
|
104
109
|
---
|
|
105
110
|
|