-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,8 +133,8 @@ import { throttle } from 'mdui/functions/throttle.js';</code></pre> | |
这个例子使用全局构建版本的 mdui,所有函数都以属性的形式暴露在全局对象 `mdui` 上: | ||
|
||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].0/mdui.global.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].1/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].1/mdui.global.js"></script> | ||
|
||
<mdui-button class="btn">点我</mdui-button> | ||
|
||
|
@@ -150,12 +150,12 @@ import { throttle } from 'mdui/functions/throttle.js';</code></pre> | |
这个例子使用 ES 模块构建版本的 mdui,你可以使用 ES 模块语法从 CDN 导入: | ||
|
||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/mdui.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].1/mdui.css"> | ||
|
||
<mdui-button class="btn">点我</mdui-button> | ||
|
||
<script> | ||
import { snackbar } from 'https://unpkg.com/[email protected].0/mdui.esm.js'; | ||
import { snackbar } from 'https://unpkg.com/[email protected].1/mdui.esm.js'; | ||
document.querySelector('.btn').addEventListener('click', () => { | ||
snackbar({ message: '点击了按钮' }); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ | |
将下面代码添加到页面的 `<head>` 标签中: | ||
|
||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].0/mdui.global.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].1/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].1/mdui.global.js"></script> | ||
``` | ||
|
||
mdui 不依赖任何第三方库,引入上面两个文件后,就能正常工作了。 | ||
|
@@ -34,8 +34,8 @@ mdui 不依赖任何第三方库,引入上面两个文件后,就能正常工 | |
<meta name="renderer" content="webkit"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].0/mdui.global.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected].1/mdui.css"> | ||
<script src="https://unpkg.com/[email protected].1/mdui.global.js"></script> | ||
|
||
<title>Hello, world!</title> | ||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters