acdr-ui/dist/dev/mp-weixin/sheep/ui/su-switch/su-switch.js.map

1 line
2.8 KiB
Plaintext

{"version":3,"file":"su-switch.js","sources":["../../../../../../src/sheep/ui/su-switch/su-switch.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC91aS9zdS1zd2l0Y2gvc3Utc3dpdGNoLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"ui-switch\" :class=\"[{ disabled: props.disabled }, props.ui]\">\r\n <view class=\"ui-switch-wrapper\" @tap=\"change\">\r\n <view\r\n class=\"ui-switch-input\"\r\n :class=\"[\r\n { 'ui-switch-input-checked': props.modelValue },\r\n props.modelValue ? props.bg : '',\r\n props.text,\r\n props.size,\r\n ]\"\r\n ></view>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'UiSwitch',\r\n}\r\n</script>\r\n<script setup>\r\nconst props = defineProps({\r\n modelValue: {\r\n type: [Boolean, Number],\r\n default: false,\r\n },\r\n ui: {\r\n type: String,\r\n default: '',\r\n },\r\n bg: {\r\n type: String,\r\n default: 'ui-BG-Main',\r\n },\r\n text: {\r\n type: String,\r\n default: '',\r\n },\r\n size: {\r\n type: String,\r\n default: 'sm',\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n})\r\nconst emits = defineEmits(['update:modelValue'])\r\n\r\nconst change = () => {\r\n emits('update:modelValue', !props.modelValue)\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.ui-switch {\r\n display: inline-block;\r\n cursor: pointer;\r\n .ui-switch-wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n vertical-align: middle;\r\n }\r\n .ui-switch-input {\r\n position: relative;\r\n box-sizing: border-box;\r\n width: 47px;\r\n height: 26px;\r\n appearance: none;\r\n background-color: rgba(119, 119, 119, 0.3);\r\n border-radius: 16px;\r\n outline: 0;\r\n transition:\r\n background-color 0.1s,\r\n border 0.1s;\r\n &:after {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 20px;\r\n height: 20px;\r\n margin: 3px;\r\n content: ' ';\r\n background-color: #fff;\r\n border-radius: 200px;\r\n transition: transform 0.3s;\r\n }\r\n &.ui-switch-input-checked {\r\n &:after {\r\n transform: translateX(21px);\r\n }\r\n }\r\n }\r\n &.disabled {\r\n cursor: not-allowed;\r\n .ui-switch-input {\r\n opacity: 0.7;\r\n }\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/ui/su-switch/su-switch.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AAiBA,MAAA,cAAe;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,UAAM,QAAQ;AA0Bd,UAAM,QAAQ;AAEd,UAAM,SAAS,MAAM;AACnB,YAAM,qBAAqB,CAAC,MAAM,UAAU;AAAA,IAC9C;;;;;;;;;;;;;;;;;;;ACnDA,GAAG,gBAAgB,SAAS;"}