vue.js城市选择框组件
Vue.js的颜色选择器板 (Color picker board for Vue.js)
A Vue.js color picker component designed for humans.
专为人类设计的Vue.js颜色选择器组件。
Inspired by Svbtle's color picker.
受到Svbtle拾色器的启发。
![Color-picker-board-for-Vue](https://i-blog.csdnimg.cn/blog_migrate/cf6865018d168f2f49ec75258f86d92d.gif)
安装 (Installation)
npm i --save-dev vue-color-picker-board
浏览器 (Browser)
Include the script file, then install the component with Vue.use(VueColorPickerBoard);
e.g.:
包含脚本文件,然后使用Vue.use(VueColorPickerBoard);
安装组件Vue.use(VueColorPickerBoard);
例如:
<script type="text/javascript" src="node_modules/vuejs/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/vue-color-picker-board/dist/vue-color-picker-board.min.js"></script>
<script type="text/javascript">
Vue.use(VueColorPickerBoard);
</script>
模组 (Module)
import VueColorPickerBoard from 'vue-color-picker-board';
用法 (Usage)
Once installed, it can be used in a template as simply as:
安装后,可以在模板中简单地使用它,如下所示:
<color-picker-board default-color="#00AAFF"
:width="800"
:height="100"
@onSelection="colorSelection">
</color-picker-board>
物产 (Properties)
default-color | optional | string The default color that will be shown once the component is mounted. Example: default-color="#00AAFF"
默认颜色 | 可选| 字符串安装组件后将显示的默认颜色。 示例: default-color="#00AAFF"
width | optional | number | default: 800 The width of the color picker board in pixels. Example: :width="800"
宽度 可选| 编号 默认值:800拾色器板的宽度,以像素为单位。 示例:: :width="800"
height | optional | number | default: 100 The height of the color picker board in pixels. Example: :height="600"
身高 | 可选| 编号 默认值:100颜色选择器板的高度,以像素为单位。 示例:: :height="600"
翻译自: https://vuejsexamples.com/a-vue-js-color-picker-component-designed-for-humans/
vue.js城市选择框组件