vue.js手写进度环
vue-simple-progress (vue-simple-progress)
A simple, flexible progress bar for Vue.js
Vue.js的简单灵活的进度条
vue-simple-progress is designed to be a lightweight Vue.js progress bar requiring minimal configuration.
vue-simple-progress设计为轻量级的Vue.js进度条,需要最少的配置。
安装 (Installation)
NPM (NPM)
npm install vue-simple-progress --save
用法 (Usage)
All styling for this component is done via computed styles in the
Progress.vue
component and requires no external CSS files.该组件的所有样式均通过
Progress.vue
组件中的计算样式完成,并且不需要外部CSS文件。
ES6 (ES6)
The following examples can also be used with CommonJS by replacing ES6-specific syntax with CommonJS equivalents.
以下示例也可以与CommonJS一起使用,方法是将ES6特定的语法替换为CommonJS等效项。
import Vue from 'vue'
import ProgressBar from 'vue-simple-progress'
new Vue({
components: {
ProgressBar
}
})
全局变量(脚本标签) (Globals (script tag))
Add a script tag pointing to dist/vue-simple-progress.min.js
after adding Vue.
添加Vue 后,添加指向dist/vue-simple-progress.min.js
的脚本标签。
Example:
例:
<html>
<head>
...
</head>
<body>
<div id="app">
<vue-simple-progress></vue-simple-progress>
</div>
<script src="path/to/vue.js"></script>
<script src="path/to/vue-simple-progress.js"></script>
<script>
new Vue({
el: '#app'
})
</script>
</body>
</html>
翻译自: https://vuejsexamples.com/a-flexible-progress-bar-for-vue-js/
vue.js手写进度环