diff --git a/exports/knob.d.ts b/exports/knob.d.ts new file mode 100644 index 000000000..937efc155 --- /dev/null +++ b/exports/knob.d.ts @@ -0,0 +1 @@ +export * from './components/knob/Knob'; \ No newline at end of file diff --git a/exports/knob.js b/exports/knob.js new file mode 100644 index 000000000..86c5d9784 --- /dev/null +++ b/exports/knob.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./components/knob/Knob.vue'); \ No newline at end of file diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 2a41574e3..52819399e 100755 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -55,6 +55,7 @@ InputSwitch InputText FloatLabel + Knob Listbox MultiSelect Password diff --git a/src/components/common/Common.css b/src/components/common/Common.css index 0d26d2509..eb4534911 100755 --- a/src/components/common/Common.css +++ b/src/components/common/Common.css @@ -35,6 +35,7 @@ .p-disabled, .p-disabled * { cursor: default !important; pointer-events: none; + user-select: none; } .p-component-overlay { diff --git a/src/components/knob/Knob.d.ts b/src/components/knob/Knob.d.ts new file mode 100644 index 000000000..b5c0552f2 --- /dev/null +++ b/src/components/knob/Knob.d.ts @@ -0,0 +1,20 @@ +import Vue from 'vue'; + +declare class Knob extends Vue { + modelValue?: number; + size?: number; + disabled?: boolean; + readonly?: boolean; + step?: number; + min?: number; + max?: number; + valueColor?: string; + rangeColor?: string; + textColor?: string; + strokeWidth?: number; + showValue?: boolean; + valueTemplate?: string; + $emit(eventName: 'change', value: any): this; +} + +export default Knob; \ No newline at end of file diff --git a/src/components/knob/Knob.vue b/src/components/knob/Knob.vue new file mode 100644 index 000000000..d2b648c1b --- /dev/null +++ b/src/components/knob/Knob.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/main.js b/src/main.js index af6f556bb..eaf59b0a6 100644 --- a/src/main.js +++ b/src/main.js @@ -41,6 +41,7 @@ import InputMask from './components/inputmask/InputMask'; import InputNumber from './components/inputnumber/InputNumber'; import InputSwitch from './components/inputswitch/InputSwitch'; import InputText from './components/inputtext/InputText'; +import Knob from './components/knob/Knob'; import Listbox from './components/listbox/Listbox'; import MegaMenu from './components/megamenu/MegaMenu'; import Menu from './components/menu/Menu'; @@ -156,6 +157,7 @@ app.component('InputMask', InputMask); app.component('InputNumber', InputNumber); app.component('InputSwitch', InputSwitch); app.component('InputText', InputText); +app.component('Knob', Knob); app.component('Listbox', Listbox); app.component('MegaMenu', MegaMenu); app.component('Menu', Menu); diff --git a/src/router/index.js b/src/router/index.js index 8d92ce18b..c96a0e2be 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -397,6 +397,11 @@ const routes = [ name: 'splitter', component: () => import('../views/splitter/SplitterDemo.vue') }, + { + path: '/knob', + name: 'knob', + component: () => import('../views/knob/KnobDemo.vue') + }, { path: '/listbox', name: 'listbox', diff --git a/src/views/knob/KnobDemo.vue b/src/views/knob/KnobDemo.vue new file mode 100644 index 000000000..cebeb40ff --- /dev/null +++ b/src/views/knob/KnobDemo.vue @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/src/views/knob/KnobDoc.vue b/src/views/knob/KnobDoc.vue new file mode 100644 index 000000000..cc8a11c5d --- /dev/null +++ b/src/views/knob/KnobDoc.vue @@ -0,0 +1,275 @@ +